code wiki / _hdl_build / nx_cms_argon_gate.nx
nx_cms_argon_gate.nx
buildroot/runtime/_hdl_build/nx_cms_argon_gate.nx
about
nx_cms_argon_gate.nx -- CMS C10 GATE (re-runnable, evidence-driven): argon2id admin credentials
at the wire. Site fixture carries admin_pw.ar2 (self-describing params; gate uses m=8192 t=3 to
stay brisk -- production = the vault's measured m=32768, the FILE decides) PLUS a deliberately
VALID legacy admin_pw.sha256 for a DIFFERENT password: the gate proves the legacy file cannot
bypass when .ar2 is present (no downgrade), wrong pw refused, right pw verifies memory-hard,
lockout still enforced. Appends "CMSGATE row=nx_cms_argon ... verdict=PASS|FAIL". Exit 0 iff all
rows pass. license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_cms_pw.nxnx_connect.nxnx_cms_store.nxnx_sha256.nxnx_kill_portable.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
| 14 | const AG_PORT: i64 = 8082 |
| 15 | const AG_SITE: *u8 = "/tmp/_cms_ar2_site" |
| 16 | const AG_M_KIB: i64 = 8192 // gate-speed param, recorded IN the fixture file (rule 11: data not code) |
| 17 | const AG_T: i64 = 3 |
functions
| 19 | func ag_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 20 | func ag_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 21 | func ag_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 27 | func ag_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 |
| 33 | func ag_index(hay: *u8, n: i64, needle: *u8) -> i64 |
| 45 | func ag_has(hay: *u8, n: i64, needle: *u8) -> i64 { if ag_index(hay, n, needle) >= 0 { return 1 } return 0 } |
| 47 | func ag_http(req: *u8, rl: i64, resp: *u8, cap: i64) -> i64 |
| 81 | func ag_post(req: *u8, path: *u8, cookie: *u8, body: *u8) -> i64 |
| 103 | func ag_get(req: *u8, path: *u8, cookie: *u8) -> i64 |
| 116 | func ag_row(id: i64, ok: i64, what: *u8) -> i64 |
| 126 | func ag_mkdir(path: *u8, mode: i64) -> i64 called by 1: main |
| 132 | func main() -> i64 |