code wiki / _hdl_build / nx_dr_restore_verify_gate.nx
nx_dr_restore_verify_gate.nx
buildroot/runtime/_hdl_build/nx_dr_restore_verify_gate.nx
about
nx_dr_restore_verify_gate.nx -- exceed-gate for CAP-DR-RESTORE-VERIFY. Proves the integrity-scrub logic: a
faithful copy re-hashes identically (verify OK), a single-byte change is DETECTED (corruption caught), and the
hash is a deterministic KAT (sha256("abc")). This is what a naive cp+size-check CANNOT do -> the exceed.
Sovereign: nx_syscalls + nx_sha256. expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_sha256.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
structs
| none |
consts
| none |
functions
| 9 | func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 10 | func gn(v: i64) -> i64 { var t: i64=v; if t<0{sys_write(1,"-" as *u8,1);t=0-t} let tm:*u8=sys_mmap(24); var k:i64=0; if t==0{tm[0]=48 as u8;k=1} while t>0{tm[k]=(48+(t%10)) as u8;t=t/10;k=k+1} let b:*u8=sys_mmap(24); var j:i64=0; while j<k{b[j]=tm[k-1-j];j=j+1} sys_write(1,b,k); return 0 } |
| 11 | func g_hex(buf: *u8, n: i64, out: *u8) -> i64 |
| 17 | func g_eq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } called by 1: main |
| 19 | func main(argc: i64, argv: *i64) -> i64 |