Skip to main content

Module aead

Module aead 

Source
Expand description

src/crypto/aead.rs AEAD interface for AES-256-GCM and ChaCha20-Poly1305.

Design notes:

  • Both ciphers use 32-byte keys and 12-byte nonces.
  • Tag verification is constant-time and must fail closed (no partial plaintext).
  • Caller provides nonce and AAD (built by aad module) per frame.
  • Cipher selection is driven by header.cipher (u16 registry).

Enumsยง

AeadImpl
Unified AEAD cipher implementation selected by header.cipher.