ML-KEM primitives, for every FIPS 203 parameter set #
VCVio's pure-Lean NTT, encoding and CBD, with SHA-3/SHAKE from the pure-Lean Keccak sponge in
HashSig.SLHDSA.Concrete.Keccak in place of VCVio's FFI hash bindings.
Instances For
n bytes of ba from offset.
Equations
- Cryptlib.Primitives.KEM.FIPS203.byteArrayToVector ba offset n = Vector.ofFn fun (x : Fin n) => match x with | ⟨i, isLt⟩ => ba.get! (offset + i)
Instances For
SampleNTT (FIPS 203 Algorithm 7): rejection sampling from SHAKE-128 #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
PRF + CBD (FIPS 203 Algorithms 6 + 8), and the two hash wrappers #
PRF_η(σ, N) = SHAKE-256(σ ‖ N, 64η) followed by CBD_η.
Equations
- One or more equations did not get rendered due to their size.
Instances For
G(input) = SHA3-512(input), split into two 32-byte halves.
Equations
- One or more equations did not get rendered due to their size.
Instances For
H(input) = SHA3-256(input) as a 32-byte vector.
Equations
- Cryptlib.Primitives.KEM.FIPS203.hashH input = Cryptlib.Primitives.KEM.FIPS203.byteArrayToVector (SLHDSA.Concrete.Keccak.sha3_256 input) 0 32
Instances For
A faster byteEncodeVec #
VCVio's byteEncodeVec computes each output byte by encoding that byte's whole polynomial again,
so encoding u re-encodes each polynomial 32·d_u times; it was nearly all of encapsulation's
time. This version encodes each polynomial once and reads the bytes from that.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Primitives instance per parameter set #
Equations
- One or more equations did not get rendered due to their size.
Instances For
The FIPS 203 parameters of ps.
Equations
- Cryptlib.Primitives.KEM.FIPS203.params ps = ps.params
Instances For
VCVio's pure-Lean Concrete.Encoding, with byteEncodeVecFast for byteEncodeDUVec.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encoding round-trip laws, from VCVio's via encoding_eq.
Equations
- One or more equations did not get rendered due to their size.
Instances For
VCVio's NTT ring operations.
Equations
- Cryptlib.Primitives.KEM.FIPS203.ring = MLKEM.Concrete.concreteNTTRingOps