Skip to main content

install_user_identity

Function install_user_identity 

Source
pub fn install_user_identity(
    secrets_dir: &Path,
    ed_sk: &SigningKey,
    mldsa_sk: Option<&MlDsaSigningKey>,
) -> Result<InstalledIdentityBackup>
Expand description

Install adopted identity key material (the --ssh/--key path), backing up any displaced key files first.

The adopted Ed25519 key becomes the client’s user-signing-key (via install_user_signing_key). Under Hybrid, a freshly generated ML-DSA-65 key is installed as its sibling — an adopted SSH/seed key can never make the identity hybrid by itself, so a new PQ component is minted and bound to the same anchor. Under Classical, no PQ sibling is written, and any pre-existing sibling is backed up and removed so the on-disk pair stays consistent (the file layout never claims hybrid without a matching PQ key).