Skip to main content

Module keccak

Module keccak 

Source
Expand description

Keccak-f[1600] + SHA-3 / SHAKE runtime kernels — the symmetric/hash layer ML-KEM is built on (SHA3-256/512 for hashing, SHAKE128 for matrix expansion, SHAKE256 for the PRF). Reached from compiled LOGOS via the sha3_256 / sha3_512 / shake128 / shake256 stdlib functions. Verified against the NIST FIPS-202 KATs (see the tests). Input/output are LOGOS Int bytes (0..255) carried in a Seq of Int.

Functions§

keccak_f1600
The Keccak-f[1600] permutation: 24 rounds of θ, ρ·π, χ, ι over the 5×5×64 state.
sha3_256
SHA3-256 — the compiled form of LOGOS sha3_256(a). 32 output bytes.
sha3_512
SHA3-512 — 64 output bytes.
sha3_256_bytes
sha3_512_bytes
shake128
SHAKE128 XOF — outlen output bytes.
shake256
SHAKE256 XOF — outlen output bytes.
shake128_bytes
shake256_bytes