code wiki / _hdl_build / nx_recover_gate.nx

nx_recover_gate.nx

buildroot/runtime/_hdl_build/nx_recover_gate.nx

4534 B61 linesdepth 16pulls 45 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_recover_gate.nx -- proves the forgot-passphrase RECOVERY flow (olg_recover, the new seam over the KAT'd nx_modern_auth_recover). Full lifecycle in-process (the socket path is already proven by nx_lan_signup_socket_gate): register brad -> login(old pw) OK -> recover(mnemonic, NEW pw) OK + NEW mnemonic -> login(NEW pw) OK -> login(OLD pw) REJECTED -> recover(OLD/rotated mnemonic) REJECTED (rotation = the old phrase can't be replayed). GREEN iff every row matches. Durable -> knowledge/status/recover_gate.log.

dependencies 2 imports · 0 importers

nx_opaque_login.nx nx_syscalls.nx nx_recover_gate.nx

imports: nx_opaque_login.nxnx_syscalls.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 g_w sys_write gtrunc sys_openat_wr sys_close olg_ctx_setup olg_ctx_setup_ttl nx_uas_server_keys_load_or sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ _uas_hex_dec _uas_nib nx_csprng_fill sys_mmap ↻ nx_csprng_urandom_path sys_openat_rd ↻ sys_read ↻ sys_close ↻ nx_opq_derive_keypair sys_mmap ↻ _voprf_load_context_string u256_alloc nx_scratch nx_opq_hash_to_scalar sys_mmap ↻ nx_h2c_expand_message_xmd_ u256_alloc ↻ _opq_reduce_48be_mod_n u256_store_be u256_load_be u256_is_zero p256_point_alloc nx_scratch ↻

structs

none

consts

none

functions

9func g_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 3: g_ng_rowmain calls 1: sys_write
10func g_n(v: i64) -> i64 { var m: i64=v; if m<0{g_w("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); var k:i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i:i64=0; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
called by 1: main calls 3: g_wsys_mmapsys_write
11func g_row(id: *u8, ok: i64, pass: *i64) -> i64 { g_w(" " as *u8); g_w(id); g_w(": " as *u8); if ok==1 { g_w("OK\n" as *u8); pass[0]=pass[0]+1 } else { g_w("FAIL\n" as *u8) } return 0 }
called by 1: main calls 1: g_w
12func gw(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
13func gtrunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
15func mn_differs(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 1 } var i: i64=0; while i<an { if a[i]!=b[i] { return 1 } i=i+1 } return 0 }
called by 1: main
17func main() -> i64