code wiki / _hdl_build / nx_succession_recover_gate.nx

nx_succession_recover_gate.nx

buildroot/runtime/_hdl_build/nx_succession_recover_gate.nx

4724 B94 linesdepth 10pulls 17 transitivereach 0 importersview sourcekind gate/prooftopic succession
docsdependenciesstructsconstsfunctions

about

nx_succession_recover_gate.nx -- REFEREE for attestation-gated succession (the death/incapacity path). Splits a master secret into a succession quorum, mints a designated-authority ed25519 key, signs a death attestation, and proves recovery happens ONLY with a genuine, correctly-targeted attestation: T1 valid death attestation + quorum -> master RECOVERED (== expected) T2 attestation signed by the WRONG authority -> REFUSED (BAD_ATTEST) (can't forge the signer) T3 attestation for a DIFFERENT person/event -> REFUSED (WRONG_EVENT) (no replay onto another user) T4 tampered attestation signature -> REFUSED (BAD_ATTEST) GREEN iff T1..T4. Sovereign: nx_succession_recover + nx_social_recovery + ed25519 + nx_syscalls. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_succession_recover.nx nx_syscalls.nx nx_succession_recover_gate.nx

imports: nx_succession_recover.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 g_w sys_write sys_mmap nx_sr_split sr_chunk_nbytes sys_mmap ↻ sr_pack nx_csprng_fill sys_mmap ↻ nx_csprng_urandom_path sys_openat_rd sys_read sys_close sh_mod sh_eval sh_add sh_mod ↻ sh_mul sh_mod ↻ sys_exit 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

structs

none

consts

none

functions

12func g_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: g_rowmain calls 1: sys_write
13func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
14func g_row(name: *u8, ok: i64) -> i64
called by 1: main calls 1: g_w
21func g_eq32(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while i < SR_KEY_BYTES { if (a[i] as i64) != (b[i] as i64) { return 0 } i = i + 1 } return 1 }
called by 1: main
23func main() -> i64