code wiki / (root) / nx_mlkem_verify.nx

nx_mlkem_verify.nx

buildroot/runtime/nx_mlkem_verify.nx

1804 B34 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_mlkem_verify.nx -- native harness that PROVES the real ML-KEM-768 (nx_ml_kem_768_wasm.nx) works: keygen -> encaps -> decaps and assert the encaps/decaps shared secrets MATCH (its built-in round-trip KAT returns 0 on success, a non-zero failure bitmap otherwise). This is the anti-liar check: the sibling ml_kem_768.nx is a STUB (encaps/decaps just zero + return PENDING); the wasm variant is the genuine implementation. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_ml_kem_768_wasm.nx nx_mlkem_verify.nx

imports: nx_syscalls.nxnx_itoa_lib.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 nx_mlkem_round_trip_test nx_mlkem_keygen _kpke_keygen _sha3_512 _sponge_one_shot _keccak_f1600 _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 ↻ _u16_store_le ↻ _mont ↻ _poly_add _u16_store_le ↻ _u16_load_le ↻ _poly_tobytes12

structs

none

consts

9const K_MAGIC_131072: i64 = 131072

functions

11func mv_puts(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
16func mv_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
18func main() -> i64