Module chacha20poly1305

Module chacha20poly1305 

Source
Expand description

ChaCha20-Poly1305 authenticated encryption

This module implements the ChaCha20-Poly1305 AEAD algorithm as specified in RFC 8439.

§Constant-Time Guarantees

  • No variable-length early-returns after authentication is checked.
  • Heap allocations and frees are balanced in both success and failure paths.
  • Authentication is decided with a branch-free constant-time mask; the same byte-wise loop executes whatever the tag’s validity.

Structs§

ChaCha20Poly1305
ChaCha20-Poly1305 AEAD
ChaCha20Poly1305DecryptOperation
Operation for ChaCha20Poly1305 decryption operations
ChaCha20Poly1305EncryptOperation
Operation for ChaCha20Poly1305 encryption operations

Constants§

CHACHA20POLY1305_KEY_SIZE
Size constants
CHACHA20POLY1305_NONCE_SIZE
Size of the nonce used by ChaCha20Poly1305 in bytes
CHACHA20POLY1305_TAG_SIZE
Size of the authentication tag produced by ChaCha20Poly1305 in bytes