code wiki / _hdl_build / nx_hmaccounter_extvec_gate.nx

nx_hmaccounter_extvec_gate.nx

buildroot/runtime/_hdl_build/nx_hmaccounter_extvec_gate.nx

9442 B227 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_hmaccounter_extvec_gate.nx -- HMAC-SHA-1 over an 8-byte COUNTER, vs RFC 4226 Appendix D Table 1. CLOSES THE LAST UNGRADED TABLE IN A DOCUMENT ALREADY ON DISK. RFC 4226 Appendix D publishes TWO tables; Table 2 (the HOTP codes) is graded by nx_hotp_extvec_gate, and Table 1 -- ten RAW HMAC-SHA-1 values keyed by counter -- sat unused. ★ACQUIRED IS NOT COVERED, and a document is not finished when one of its tables passes (third time this session: rfc6234/rfc9106 sat pinned-but-ungated, and RFC 4648 needed all four encodings before it was actually done). ★WHY THIS IS NOT REDUNDANT WITH RFC 2202. RFC 2202 exercises HMAC-SHA-1 over ASCII strings and repeated byte fills. Table 1 exercises it over an 8-BYTE BIG-ENDIAN COUNTER -- a message that is mostly ZERO bytes with a low-order value, and exactly the shape HOTP/TOTP feed it in production. * A PRIMITIVE VALIDATED ONLY ON THE INPUT SHAPES SOMEONE THOUGHT TO PUBLISH IS VALIDATED ONLY ON THOSE SHAPES. Zero-heavy inputs are where length-handling and padding bugs hide. The secret is read from the document (`Secret = 0x3132...3930`), never typed from recall. Document pinned to a CORROBORATED digest (sovereign fetch and .NET WebClient agree). license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_sha256_wasm.nx nx_hmac_sha1.nx nx_gate_verdict.nx nx_hmaccounter_extvec_gate.nx

imports: nx_syscalls.nxnx_sha256_wasm.nxnx_hmac_sha1.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main w sys_write sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_sha256_one_shot _h_set _sha256_compress _blk_word_be _rotr32 _h_get _sha256_k _h_set ↻ _h_get ↻ hexnib findfrom starts parsehex_run hexval next_dec

structs

none

consts

none

functions

23func w(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 2: nnmain calls 1: sys_write
24func wb(b: *u8, n: i64) -> i64 { sys_write(1, b, n); return 0 }
calls 1: sys_write
26func nn(v: i64) -> i64
called by 1: main calls 3: wsys_mmapsys_write
40func hexnib(v: i64) -> i64 { if v < 10 { return 48 + v } return 87 + v }
called by 2: phmain
41func ph(v: i64) -> i64
called by 1: main calls 3: sys_mmaphexnibsys_write
48func hexval(c: i64) -> i64
called by 1: parsehex_run
54func isws(c: i64) -> i64
called by 2: next_decskip_ws
61func starts(b: *u8, n: i64, at: i64, s: *u8) -> i64
called by 1: findfrom
70func findfrom(b: *u8, n: i64, s: *u8, from: i64) -> i64
called by 1: main calls 1: starts
75func parsehex_run(b: *u8, n: i64, from: i64, out: *u8, want: i64) -> i64
called by 1: main calls 1: hexval
92func next_dec(b: *u8, n: i64, p0: i64, endp: *i64) -> i64
called by 1: main calls 1: isws
114func skip_ws(b: *u8, n: i64, p0: i64) -> i64
called by 1: main calls 1: isws
120func main() -> i64