Expand description
Keccak/SHA-3/SHAKE hash function implementations (FIPS 202). SHA-3 / SHAKE high-level wrappers used by ML-DSA (FIPS 204).
This module no longer carries its own copy of the Keccak
permutation: it builds on top of the shared sponge core in
crate::sha3. The ML-DSA-specific surface (sha3_256,
sha3_512, shake128, shake256, h_init, g_init, plus the
KeccakState re-export consumed by the rest of the algorithm) is
unchanged.
Structs§
- Keccak
State - Keccak sponge state for SHA-3 and SHAKE constructions.
Functions§
- g_init
- Initialize the ML-DSA G function (SHAKE128 with streaming
interface). Alias for
shake128, named to match FIPS 204. - h_init
- Initialize the ML-DSA H function (SHAKE256 with streaming
interface). Alias for
shake256, named to match FIPS 204. - sha3_
256 - Compute SHA3-256 over the input and return the 32-byte digest.
- sha3_
512 - Compute SHA3-512 over the input and return the 64-byte digest.
- shake128
- Create a new SHAKE128 extendable-output function (XOF) context.
- shake256
- Create a new SHAKE256 extendable-output function (XOF) context.
- shake128_
digest - Convenience function: absorb
inputinto SHAKE128 and squeeze intoout. - shake256_
digest - Convenience function: absorb
inputinto SHAKE256 and squeeze intoout.