Skip to main content

Module aead

Module aead 

Source
Expand description

AEAD (RFC 5116) under a profile: AES-128-GCM, AES-256-GCM and ChaCha20-Poly1305, each with a 96-bit nonce the crate’s module call chooses and a 128-bit tag.

Structs§

Key
An AEAD key the profile admits. It seals under nonces the crate chooses, never the caller’s: AES-GCM’s is drawn inside the module’s seal, ChaCha20-Poly1305’s from the module’s DRBG just before its seal. It refuses its 2^32 + 1th seal with CryptoError::AeadLimit. It opens under the nonce stored beside a ciphertext. It is not Clone, so its seal count cannot be copied. Its key schedule is held in the module’s AEAD contexts, which the module clears on drop.

Constants§

NONCE_LEN
The nonce length in bytes.
TAG_LEN
The authentication tag length in bytes.