code wiki / (root) / nx_signup_origin_gate.nx

nx_signup_origin_gate.nx

buildroot/runtime/nx_signup_origin_gate.nx

6063 B128 linesdepth 17pulls 77 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_signup_origin_gate.nx -- proves POST /register is gated on LAN-AND-INVITED, not on a global flag. WHY (debt 1785445694): public registration was open to the internet because /register consulted ONE global boolean. nx_lan_signup.ls_signup_allowed (LAN AND invited) existed and was gate-proven, but was NOT WIRED to the route. This gate proves the wiring, which is the half that was missing. EVERY TOOTH IS A DENIAL. No tooth registers an account: the ALLOW path is deliberately untested here because exercising it would create a real credential. The ALLOW semantics are already proven 17/17 by nx_lan_signup_gate; what this file adds is that the ROUTE actually consults that decision. T4 IS THE NON-VACUITY TOOTH and the reason this gate is worth anything: with the flag CLOSED the route must answer "registration closed". That proves T1-T3's 403s come from the NEW origin/invite checks and are not just the old flag firing -- without it, a permanently-shut flag would make T1-T3 pass for the wrong reason, which is exactly the vacuous-green class. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_opaque_login_routes.nx nx_opaque_login.nx nx_syscalls.nx nx_signup_origin_gate.nx

imports: nx_opaque_login_routes.nxnx_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_puts sys_write 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 ↻ u256_alloc ↻

structs

none

consts

21const SG_RESP: i64 = 262144
22const SG_MODE: i64 = 0x1a4

functions

24func g_puts(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: chkmain calls 1: sys_write
25func rfind(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main
37func chk(name: *u8, got: i64, want: i64, st: *i64) -> i64
called by 1: main calls 1: g_puts
43func sg_writeflag(path: *u8, ch: i64) -> i64
53func sg_ip(a: i64, b: i64, c: i64, d: i64) -> *u8
called by 1: main calls 1: sys_mmap
59func main() -> i64