Skip to main content

Crate tc_ascon_aead

Crate tc_ascon_aead 

Source
Expand description

Ascon authenticated encryption: Ascon-AEAD128, standardized in NIST SP 800-232, and the Ascon-128, Ascon-128a and Ascon-80pq variants of Ascon v1.2, which the standard supersedes. Both engines implement the AeadCipher and AeadCipherInit contracts of tc_aead_cipher. Ported from Bouncy Castle C#.

The crate is no_std, needs no allocator and contains no unsafe code. Both engines are constant time: the permutation is bitsliced, without tables or data-dependent branches, and tags are compared in fixed time. Lengths are public.

Decryption may write unauthenticated plaintext before do_final verifies the tag, so discard the output when do_final fails. Each engine’s documentation carries a usage example.

Structs§

AsconAead128Engine
Incremental Ascon-AEAD128 engine from NIST SP 800-232.
AsconLegacyEngine
Incremental engine for the legacy Ascon v1.2 AEAD variants.

Enums§

AsconLegacyVariant
Legacy Ascon v1.2 AEAD variant.