code wiki / (root) / nx_mlkem_kat_gate.nx

nx_mlkem_kat_gate.nx

buildroot/runtime/nx_mlkem_kat_gate.nx

5066 B57 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_mlkem_kat_gate.nx -- FIPS-203 INTEROP KAT for the real ML-KEM-768 (nx_ml_kem_768_wasm.nx). Unlike the round-trip gate (self-consistency only), this proves the impl matches the NIST ACVP FIPS-203 ML-KEM-768 keyGen vector BYTE-EXACT: KeyGen(d||z) -> ek must equal NIST's expected ek. Vector = NIST usnistgov/ACVP-Server ML-KEM-keyGen-FIPS203 tgId 2 (ML-KEM-768) tcId 26, fetched sovereignly via nx_https_get_cli. This is F-sec-04.0 -- the interop gate that must pass before PQ is wired into TLS. RED if the impl diverges from the standard (never a false-green). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_ml_kem_768_wasm.nx nx_mlkem_kat_gate.nx

imports: nx_syscalls.nxnx_ml_kem_768_wasm.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap hexdec hexnib nx_mlkem_keygen _kpke_keygen _sha3_512 _sponge_one_shot _keccak_f1600 _lane_load _lane_store _rotl64 _rho_off _keccak_rc _gen_noise_eta2 _shake256 _sponge_one_shot ↻ _poly_cbd_eta2 _u16_store_le _ntt _zeta _u16_load_le _fqmul _mont _u16_store_le ↻ _poly_zero _u16_store_le ↻ _gen_matrix_entry _shake128 _sponge_one_shot ↻ _sample_ntt _u16_store_le ↻ _poly_basemul_acc _zeta ↻ _basemul_pair_acc _u16_load_le ↻ _fqmul ↻ _u16_store_le ↻ _poly_tomont _u16_load_le ↻

structs

none

consts

none

functions

10func kw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
11func kn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
20func hexnib(c: u8) -> i64
called by 1: hexdec
27func hexdec(hex: *u8, out: *u8, nbytes: i64) -> i64
called by 1: main calls 1: hexnib
33func main() -> i64