Expand description
From-scratch, pure-Rust, #![no_std] implementation of NIST FIPS 202
(SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions).
Provides the four FIPS 202 primitives required by FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), and FIPS 205 (SLH-DSA):
Sha3_256(Hin ML-KEM, 32-byte digest, rate = 136 bytes)Sha3_512(Gin ML-KEM, 64-byte digest, rate = 72 bytes)Shake128/Shake128Reader(XOFin ML-KEM, rate = 168 bytes)Shake256/Shake256Reader(JandPRFin ML-KEM, rate = 136 bytes)
§Security Properties
- Zero external cryptographic dependencies;
#![forbid(unsafe_code)];#![no_std]. - All internal
Keccak-f[1600]states and byte buffers are automatically zeroized on drop. - Constant-time bitwise permutation with no secret-dependent branching or table lookups.
Structs§
- Sha3_
256 - SHA3-256 hash function (FIPS 202, Section 6.1).
- Sha3_
512 - SHA3-512 hash function (FIPS 202, Section 6.1).
- Shake128
- SHAKE128 extendable-output function (FIPS 202, Section 6.2).
- Shake256
- SHAKE256 extendable-output function (FIPS 202, Section 6.2).
- Shake128
Reader - Streaming output reader for
Shake128. - Shake256
Reader - Streaming output reader for
Shake256.