code wiki / _hdl_build / nx_attest_ceremony.nx

nx_attest_ceremony.nx

buildroot/runtime/_hdl_build/nx_attest_ceremony.nx

17087 B275 linesdepth 10pulls 13 transitivereach 0 importersview sourcekind tooltopic attest
docsdependenciesstructsconstsfunctions

about

nx_attest_ceremony.nx -- the OPERATOR-SIDE key ceremony for the attestation plane, PROVEN against the real verifier before any real key exists. WHY: PROVEN=0/41 is bound on knowledge/attest_keys.conf (operator-held Ed25519 key). The recipe existed only as PROSE derived from reading nx_evattest.nx -- and an untested recipe handed to the operator is litter: if the claim-prefix boundary is off by one byte, every genuine attestation reads BAD-SIGNATURE while all refusal paths still pass (nx_evattest.nx:136 warns exactly this). This organ makes the ceremony EXECUTABLE and proves it byte-exact with a THROWAWAY key that is never registered anywhere real -- the real key stays with the operator, never in an agent session. THE LINE THIS TOOL DOES NOT CROSS: it contains no path that writes knowledge/attest_keys.conf. Registration is the operator's act (the whole clause, per nx_evattest: "Minting a human attestation is an act the operator performs with a key the operator holds"). This tool only makes that act one command and PROVES the output verifies. nx_attest_ceremony keygen <priv_out> -- 32B seed from /dev/urandom -> file; prints pub=<64hex> (pub is PUBLIC; the priv file never prints) nx_attest_ceremony sign <priv_file> <row_file> -- signs the row file's CLAIM PREFIX (trailing newline stripped), prints the full signed row nx_attest_ceremony -- GATE: 6 teeth against the REAL at_verify_row license_tier: ORIGINAL layer: evidence module: nishi-core.evidence.attest_ceremony

dependencies 1 imports · 0 importers

nx_evattest.nx nx_attest_ceremony.nx

imports: nx_evattest.nx

imported by: nobody (leaf or entry point)

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

main ac_p ac_random32 sys_read sys_openat_wr 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 ↻ sha512_ch sha512_k sha512_sigma0 rotr64_v ↻ sha512_maj sha512_final sha512_blk_set_byte ↻ sha512_compress ↻ ge_p3_alloc sys_mmap ↻ fe_alloc nx_scratch nx_scratch_init sys_mmap ↻ nx_scratch_oom

structs

none

consts

23const K_MAGIC_8192: i64 = 8192
24const K_MAGIC_8000: i64 = 8000
25const K_MAGIC_65536: i64 = 65536
26const K_MAGIC_65000: i64 = 65000
27const K_MAGIC_4096: i64 = 4096
28const K_MAGIC_4000: i64 = 4000

functions

30func ac_p(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 1: main
31func ac_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
32func ac_hex(b: *u8, n: i64, out: *u8) -> i64
called by 2: ac_sign_rowmain
46func ac_has(b: *u8, s: i64, e: i64, pat: *u8) -> i64
called by 1: main
60func ac_n(v: i64) -> i64
called by 1: main calls 1: sys_munmap
71func ac_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){ dst[o]=s[i]; o=o+1; i=i+1 } return o }
called by 2: ac_sign_rowmain
75func ac_random32(out: *u8) -> i64
called by 1: main calls 1: sys_read
86func ac_sign_row(priv: *u8, row: *u8, rowlen: i64, out: *u8) -> i64
102func main(argc: i64, argv: *i64) -> i64