code wiki / _hdl_build / nx_coe_frame.nx
nx_coe_frame.nx
buildroot/runtime/_hdl_build/nx_coe_frame.nx
about
nx_coe_frame.nx -- CHAIN-OF-EVIDENCE FRAME (F701 keystone + F702 signature, v1)
Emits a 5-pillar evidence frame as an ed25519-SIGNED row on an append-only CID hash-chain, then
VERIFIES the whole chain deny-by-default: re-hash every row (integrity) + ed25519_verify every
signature (authenticity) + check prev-hash linkage (chain). A forged OR tampered row -> RED.
Pillars: provenance | custody | environment | content-CID (immutability) | corroboration (re-hash + sig).
v1 signs with a dedicated deterministic CoE key (RFC-8032 ed25519, reproducible; pubkey printed).
Honest: production key custody (offline private seed / vault) = F702b. Append-only, never deletes.
Composes proven libs: nx_str/nx_syscalls/nx_sha256 + nx_ed25519_signature (via nx_fw_capsule lineage).
x86-lane. license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_str.nxnx_itoa_lib.nxnx_syscalls.nxnx_sha256.nxnx_ed25519_signature.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 15 | const CF_MAGIC_1024: i64 = 1024 |
| 16 | const CF_MAGIC_1500: i64 = 1500 |
| 18 | const CF_CAP: i64 = 1048576 |
| 19 | const CF_MAXROWS: i64 = 4096 |
functions
| 21 | func cf_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 27 | func cf_pi(v: i64) -> i64 { nxi_out(v); return 0 } |
| 29 | func cf_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 35 | func cf_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 47 | func cf_hexn(d: *u8, n: i64, out: *u8) -> i64 |
| 60 | func cf_nib(c: i64) -> i64 called by 1: cf_unhex |
| 66 | func cf_unhex(hexin: *u8, hexlen: i64, out: *u8) -> i64 |
| 78 | func cf_hash_hex(buf: *u8, n: i64, out: *u8) -> i64 |
| 85 | func cf_eq(a: *u8, b: *u8) -> i64 called by 1: main |
| 95 | func cf_copy(dst: *u8, src: *u8) -> i64 |
| 102 | func cf_line_end(b: *u8, i0: i64, n: i64) -> i64 |
| 108 | func cf_find_tab(b: *u8, i0: i64, e: i64) -> i64 |
| 114 | func cf_slice(b: *u8, i0: i64, e: i64, dst: *u8) -> i64 |
| 123 | func cf_coe_seed(out: *u8) -> i64 called by 1: main |
| 130 | func cf_scan_last(vb: *u8, n: i64, lastfh: *u8) -> i64 |
| 145 | func main() -> i64 |