code wiki / _hdl_build / nx_tls12_prf_gate.nx
nx_tls12_prf_gate.nx
buildroot/runtime/_hdl_build/nx_tls12_prf_gate.nx
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
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
structs
| none |
consts
| 16 | const TPG_BUF: i64 = 4096 |
| 17 | const TPG_EXIT_RED: i64 = 1 |
functions
| 22 | func tpg_puts(s: *u8) -> i64 { return gl_puts(s) } |
| 23 | func tpg_putn(v: i64) -> i64 { return gl_putn(v) } |
| 24 | func tpg_hexv(c: i64) -> i64 called by 1: tpg_unhex |
| 30 | func tpg_unhex(s: *u8, out: *u8) -> i64 |
| 45 | func tpg_eq(a: *u8, b: *u8, n: i64) -> i64 called by 1: main |
| 51 | func tpg_check(nm: *u8, ok: i64, counts: *i64) -> i64 { return gl_check(nm, ok, counts) } |
| 53 | func main() -> i64 |