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 sys_openat_wr 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 ↻ u256_alloc ↻ p256_field_one p256_field_zero p256_point_load_g

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 calls 1: sys_openat_wr
12func main() -> i64