Skip to main content

Module ciphers

Module ciphers 

Source
Expand description

Block and stream ciphers.

The crate keeps primitive implementations grouped here and layers higher level composition (modes, hash, cprng) on top. This separation keeps the cipher modules focused on the algorithm cores and their direct key schedules rather than mixing protocol or framing concerns into each file.

Ct policy:

  • new table-based cipher implementations must ship a corresponding Ct variant in the same module.
  • table-free designs (for example pure ARX/bitwise constructions) may be exempt, but the exemption must be explicitly recorded in src/scrub.rs.

Modules§

aes
AES (Rijndael, 128-bit block) — AES-128, AES-192, AES-256.
camellia
Camellia block cipher — CRYPTREC / ISO/IEC 18033-3 / RFC 3713.
cast128
CAST-128 / CAST5 block cipher — RFC 2144.
chacha20
ChaCha20 and XChaCha20 stream ciphers.
des
DES and Triple-DES (TDEA) implemented from FIPS PUB 46-3.
grasshopper
Kuznyechik (Grasshopper) block cipher — RFC 7801 / GOST R 34.12-2015.
magma
Magma (GOST R 34.12-2015) block cipher — RFC 8891.
present
PRESENT lightweight block cipher — CHES 2007 / ISO/IEC 29192-2.
rabbit
Rabbit stream cipher — RFC 4503.
salsa20
Salsa20 stream cipher — Daniel J. Bernstein’s original Snuffle design.
seed
SEED block cipher — RFC 4009 / RFC 4196.
serpent
Serpent block cipher — AES submission / FSE 1998.
simon
Simon family of lightweight block ciphers.
sm4
SM4 block cipher (formerly SMS4) — GM/T 0002-2012 / GB/T 32907-2016.
snow3g
SNOW 3G stream cipher core from the ETSI/SAGE v1.1 specification.
speck
Speck family of lightweight block ciphers.
twofish
Twofish block cipher — AES submission (1998).
zuc
ZUC-128 stream cipher — GM/T 0001.1 / ETSI SAGE ZUC specification v1.6.