code wiki / _hdl_build / nx_evattest_cli.nx

nx_evattest_cli.nx

buildroot/runtime/_hdl_build/nx_evattest_cli.nx

5836 B140 linesdepth 10pulls 13 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_evattest_cli.nx -- the OPERATOR's tool for the human leg of the evidence law. The evidence law requires a human attestation before any domain can read PROVEN, and nx_evattest verifies that attestation cryptographically. This is the other half: how a human actually mints one. ★THIS TOOL EXISTS SO THE OPERATOR CAN SIGN. It is deliberately NOT wired into any automated path, any beat, or any agent workflow. An agent running `sign` against a human-role key would be certifying its own work -- the precise thing require_human forbids -- and the verifier's role check is what makes that forgery detectable rather than merely discouraged. Keep the human key somewhere the automation does not operate, and never register a key the automation holds as role=human. VERBS keygen <keyfile> -- 32 CSPRNG bytes -> keyfile (0600); prints ONLY the public key pub <keyfile> -- print the public key hex for the registry sign <keyfile> <class> <verdict> <scope> <signer> -- print a complete signed attestation row on stdout The signed region is the CLAIM PREFIX (up to " pub="), so class/verdict/scope/signer/epoch are all immutable under the signature. Redirect the row into knowledge/status/evclass_<domain>.conf. license_tier: ORIGINAL expect_exit: 2

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_evattest.nx nx_evattest_cli.nx

imports: nx_syscalls.nxnx_evattest.nx

imported by: nobody (leaf or entry point)

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

main w sys_write sys_exit sys_mmap streq sys_openat_rd sys_close sys_read sys_openat_wr sys_write ↻ 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

structs

none

consts

23const K_MAGIC_8192: i64 = 8192

functions

25func 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 1: main calls 1: sys_write
26func hexw(src: *u8, n: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
39func catz(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
45func catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
56func readkey(path: *u8, out: *u8) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
64func streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
called by 1: main
66func main(argc: i64, argv: *i64) -> i64