Keccak
Apply Keccak-f[200], [400], [800], [1600] or Keccak-p rounds.
from oxcrypto.hazmat.permutation.keccak import KECCAK
state = KECCAK.KECCAK_F1600.permute(bytes(200))
turbo = KECCAK.KECCAK_F1600.permute(bytes(200), rounds=12) # Keccak-p[1600, 12]The state is 25 lanes in FIPS 202 order, lane x + 5y first, each lane
little-endian. rounds selects Keccak-p[b, rounds], the last rounds rounds of
Keccak-f[b].
| Variant | State | Rounds |
|---|---|---|
KECCAK_F200 | 25 bytes | 1 to 18 |
KECCAK_F400 | 50 bytes | 1 to 20 |
KECCAK_F800 | 100 bytes | 1 to 22 |
KECCAK_F1600 | 200 bytes | 1 to 24 |
| Standard | FIPS 202 section 3 (Final); Keccak-p[1600, 12] is used by RFC 9861 |
| Crate | keccak 0.2.2 (RustCrypto sponges), pre-1.0 release |
| Audit | No published audit |
| MSRV | 1.85, builds with the project MSRV 1.88 |
| Experimental | No |
| Test vectors | XKCP KeccakF-*-IntermediateValues.txt; Keccak-p rounds cross-checked against SHAKE128 and TurboSHAKE128 |