code wiki / (root) / nx_opaque_login_gate.nx

nx_opaque_login_gate.nx

buildroot/runtime/nx_opaque_login_gate.nx

4289 B64 linesdepth 16pulls 46 transitivereach 0 importersview sourcekind gate/prooftopic opaque
docsdependenciesstructsconstsfunctions

about

nx_opaque_login_gate.nx -- KAT for the no-cookie OPAQUE login seam. Drives the FULL over-the-wire flow in-process: server-key/ctx setup -> register (BIP39 mnemonic) -> login (base64 token) -> whoami(valid) -> tamper-reject -> expiry-reject -> wrong-passphrase-reject -> ghost-user-reject. Proves the base64 token survives the wire round-trip and every reject path fires. exit 0 = pass, N = assertion N failed. (Light argon2id KSF here for test speed; the daemon runs production 64 MiB/t3/p4 -- KSF strength itself is separately proven by the OPAQUE RFC 9807 KAT.)

dependencies 2 imports · 0 importers

nx_opaque_login.nx nx_assert.nx nx_opaque_login_gate.nx

imports: nx_opaque_login.nxnx_assert.nx

imported by: nobody (leaf or entry point)

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

main olg_trunc olg_ctx_setup olg_ctx_setup_ttl nx_uas_server_keys_load_or 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 nxa_dump_sizes sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap 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 ↻ u256_alloc nx_scratch nx_opq_hash_to_scalar sys_mmap ↻ nx_h2c_expand_message_xmd_

structs

none

consts

none

functions

10func olg_trunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd >= 0 { sys_close(fd) } return 0 }
called by 1: main
12func main() -> i64