code wiki / _hdl_build / nx_tls12_prf_gate.nx

nx_tls12_prf_gate.nx

buildroot/runtime/_hdl_build/nx_tls12_prf_gate.nx

6558 B136 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_prf_gate.nx -- TLS 1.2 PRF (P_SHA256) KNOWN-ANSWER GATE, rung 1 of the TLS-1.2 client arc (debt seq861). WHY THIS EXISTS even though nx_tls12_prf_test.nx already passed: that test is SILENT (prints nothing, exit 0) and carries NO `verdict=` anchor, so (a) the ecosystem judge cannot read it, (b) an hourly beat cannot report it, and (c) a silent pass is the weakest possible evidence -- an organ that returned 0 without testing looks IDENTICAL. This gate emits the anchor AND carries its own non-vacuity control (T4), so it can prove that its comparator is capable of reporting a mismatch at all. VECTOR PROVENANCE (honest): secret/label/seed and the 100-byte expected output are the widely-circulated IETF TLS-WG P_SHA256 test vector (secret 9bbe...db35, label "test label", seed a16c...f9da). NOTE the older test file's header credits "RFC5246 section 5" -- RFC 5246 defines the PRF but publishes NO test vectors, so that citation is wrong; the vector is the TLS-WG mailing-list one. Recorded rather than repeated. D001: emits a `verdict=` anchor. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tls12_prf.nx nx_gate_lib.nx nx_tls12_prf_gate.nx

imports: nx_syscalls.nxnx_tls12_prf.nxnx_gate_lib.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 tpg_unhex tpg_hexv tpg_check gl_check gl_puts sys_write gl_slen nx_tls12_prf_sha256 sys_mmap ↻ hmac_sha256 sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word sha256_final blk_set_byte ↻ sha256_compress ↻ sha256_init ↻ sha256_update ↻ sha256_final ↻ tpg_eq gl_log sys_openat_append sys_mmap ↻ gl_bcatn sys_mmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gl_bcat

structs

none

consts

16const TPG_BUF: i64 = 4096
17const TPG_EXIT_RED: i64 = 1

functions

22func tpg_puts(s: *u8) -> i64 { return gl_puts(s) }
called by 1: main calls 1: gl_puts
23func tpg_putn(v: i64) -> i64 { return gl_putn(v) }
called by 1: main calls 1: gl_putn
24func tpg_hexv(c: i64) -> i64
called by 1: tpg_unhex
30func tpg_unhex(s: *u8, out: *u8) -> i64
called by 1: main calls 1: tpg_hexv
45func tpg_eq(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
51func tpg_check(nm: *u8, ok: i64, counts: *i64) -> i64 { return gl_check(nm, ok, counts) }
called by 1: main calls 1: gl_check
53func main() -> i64