code wiki / _hdl_build / nx_email_auth_gate.nx

nx_email_auth_gate.nx

buildroot/runtime/_hdl_build/nx_email_auth_gate.nx

6464 B128 linesdepth 10pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic email
docsdependenciesstructsconstsfunctions

about

nx_email_auth_gate.nx -- GATE for EMAIL R5 (SPF/DKIM/DMARC, nx_email_auth). COMPLETENESS : DKIM body hash is identical across bodies that differ only in trailing blank lines (simple canon); a DKIM ed25519-sha256 header signature round-trips (sign -> verify=1); SPF ip4/cidr + exact + all evaluate; DMARC p= policy parses. NEG-CONTROL : a non-SPF string -> NONE; a non-DMARC string -> norecord. TAMPER : a flipped body byte changes bh= (hashes differ); a flipped signed header fails the signature (forgery rejected); DMARC "sp=reject; p=quarantine" returns QUARANTINE -- the boundary-anchored parser does NOT mistake the subdomain-policy "sp=" for "p=". Evidence -> knowledge/status/email_auth.log (AUTHGATE authored=organ ... verdict=GREEN) license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_email_auth.nx nx_syscalls.nx nx_gate_verdict.nx nx_email_auth_gate.nx

imports: nx_email_auth.nxnx_syscalls.nxnx_gate_verdict.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 nx_dkim_body_hash sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ slen memeq ed25519_pub_from_priv sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte blk_get_i64 blk_set_i64 sha512_compress sys_mmap ↻ blk_get_i64 ↻ sha512_gamma0 rotr64_v shr64_v sha512_gamma1 rotr64_v ↻ shr64_v ↻ sha512_sigma1 rotr64_v ↻

structs

none

consts

22const AUTH_LOG: *u8 = "knowledge/status/email_auth.log"

functions

24func ew(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 2: epfmain calls 1: sys_write
25func epf(fd: i64, label: *u8, pass: i64) -> i64
called by 1: main calls 1: ew
28func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
29func memeq(a: *u8, b: *u8, len: i64) -> i64 { var i: i64 = 0; while i < len { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
30func mkip(a: i64, b: i64, c: i64, d: i64) -> i64 { return (a << 24) | (b << 16) | (c << 8) | d }
called by 1: main
32func main() -> i64