Skip to main content

Crate tc_sparkle_aead

Crate tc_sparkle_aead 

Source
Expand description

SCHWAEMM authenticated encryption, the AEAD family built on the SPARKLE permutation, a finalist of the NIST lightweight cryptography competition. The engine implements the AeadCipher and AeadCipherInit contracts of tc_aead_cipher. Ported from Bouncy Castle C#.

The crate is no_std and needs no allocator. The engine is constant time: SPARKLE adds, rotates and XORs 32-bit words, and tags are compared in fixed time. Lengths are public. On x86 the 16-word permutation uses SSE2 when run-time detection finds it; that is the crate’s only unsafe code.

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§

SparkleEngine
Incremental engine for the four SCHWAEMM parameter sets.

Enums§

SparkleVariant
SCHWAEMM parameter set.