Skip to main content

Module identity

Module identity 

Source
Expand description

Nothing here generates randomness: the 64 bytes ARE the two private keys, used verbatim (no stretching). Their quality is the key’s quality.

Modules§

destination_identity
held
in_memory
vault

Structs§

IdentityEncryptionPublicKey
X25519 public keys are used outside of identity work as well. This newtype is used as a brand to avoid accidental crossing.
IdentityHash
IdentityMaterialLengthError
IdentityPublicKeys
IdentitySigningPublicKey
Ed25519 public keys are used outside of identity work as well. This newtype is used as a brand to avoid accidental crossing.
OpenedToken
PrivateIdentityMaterial
PublicIdentityMaterial
RemoteIdentity
The encrypting side of RNS 1.4.2 Identity.encrypt. No private material.
RetainIdentityOutcome
Zeroizing
Zeroizing is a a wrapper for any Z: Zeroize type which implements a Drop handler which zeroizes dropped values.

Enums§

DecryptError
DestinationIdentityRetentionState
EncryptError
IdentityKeyFallback
RNS 1.4.2 Identity.decrypt(..., enforce_ratchets=…): whether the identity key may open a token that no retained ratchet authenticates.
MarkDestinationUsedOutcome
OpenedBy
The reference surfaces this as Destination.latest_ratchet_id (None when the identity key opened it).
ReleaseDestinationOutcome
RetainDestinationOutcome

Constants§

ENCRYPTION_EPHEMERAL_PUBLIC_KEY_LEN
ENCRYPTION_IV_LEN
IDENTITY_PUBLIC_KEY_LEN
The public mirror: an X25519 encryption key ‖ an Ed25519 signing key, RNS’s Identity.get_public_key() layout.
IDENTITY_SECRET_KEY_LEN
An X25519 secret ‖ an Ed25519 secret. RNS’s persisted layout (prv_bytes ‖ sig_prv_bytes); these bytes are the keys.

Traits§

IdentitySigner
Deliberately the operation surface, not the secret one. No accessor for either private key.

Functions§

decrypt_token_in_place_with_ratchets
RNS 1.4.2 Identity.decrypt(ciphertext, ratchets=…): ratchets newest-first, then the identity key. The HKDF salt stays the identity hash even when a ratchet did the exchange (reference get_salt is self.hash unconditionally). Candidates are probed by MAC so the buffer decrypts in place exactly once.