code wiki / _hdl_build / nx_modauth_e2e_gate.nx

nx_modauth_e2e_gate.nx

buildroot/runtime/_hdl_build/nx_modauth_e2e_gate.nx

10933 B228 linesdepth 15pulls 43 transitivereach 0 importersview sourcekind gate/prooftopic modauth
docsdependenciesstructsconstsfunctions

about

nx_modauth_e2e_gate.nx -- ENGINEER gate: the WHOLE modern-auth login stack end to end. Composes the real production path the wiki daemon will call: server key bundle (load-or-init, idempotent) -> nx_modern_auth_register (OPAQUE registration + argon2id KSF + additive-only store) -> nx_modern_auth_login (OPAQUE-3DH KE1/KE2/KE3 + ServerFinish + Ed25519 session mint) -> nx_modern_auth_validate_session. 14 rows: 1 keygen idempotent (second load == first) 6 tampered token rejected 2 register OK + 24-word BIP39 mnemonic issued 7 expired token rejected 3 login correct pw -> 152B token 8 re-register supersedes (old pw dies) 4 token validates + user_id_hash matches 9 new pw lives after supersede 5 wrong pw -> WRONG_PASSPHRASE 10 unknown user -> USER_NOT_FOUND 11 recover w/ mnemonic -> OK + NEW rotated mnemonic 12 login with recovered passphrase -> OK (and pre-recover pw dead) 13 recover with the OLD mnemonic after rotation -> RECOVERY_MISMATCH 14 recover with a typo'd mnemonic (checksum) -> RECOVERY_MISMATCH KSF here: argon2id m=8 MiB t=1 (real memory-hard path, gate-speed params). Production realm ctx uses vault-lineage 32 MiB / t=3. Recovery credential = KSF Identity by design (256-bit CSPRNG entropy; no dictionary to defend against). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_modern_auth_flow.nx nx_syscalls.nx nx_modauth_e2e_gate.nx

imports: nx_modern_auth_flow.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 eg_trunc sys_openat_wr sys_close sys_mmap 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_scratch_init sys_mmap ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻ nx_opq_hash_to_scalar sys_mmap ↻ nx_h2c_expand_message_xmd_ sys_mmap ↻ _h2c_i2osp_1 _h2c_i2osp_2 u256_alloc ↻ _opq_reduce_48be_mod_n

structs

none

consts

none

functions

26func eg_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: eg_rowmain calls 1: sys_write
27func eg_row(idx: i64, ok: i64, name: *u8) -> i64
called by 1: main calls 3: eg_wsys_mmapsys_write
40func eg_eq(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
45func eg_trunc(path: *u8) -> i64
called by 1: main calls 2: sys_openat_wrsys_close
51func main() -> i64