code wiki / _hdl_build / nx_coe_witness.nx
nx_coe_witness.nx
buildroot/runtime/_hdl_build/nx_coe_witness.nx
about
nx_coe_witness.nx -- CHAIN-OF-EVIDENCE TRANSPARENCY-LOG WITNESS (F713, Rekor-class)
Builds a SHA-256 Merkle tree over the frame-hash leaves of the signed evidence chain
(knowledge/status/coe_signed.log), computes the tree ROOT (a signed-tree-head), emits an
INCLUSION PROOF (audit path) for the latest leaf, and VERIFIES it deny-by-default (the audit
path must recompute the exact root). Each run appends the root to coe_witness.log = the STH
sequence (the substrate for consistency proofs). This is the transparency-log property Sigstore
/Rekor provide; sovereign (our own sha256), append-only, never deletes.
Composes proven libs only: nx_str/nx_syscalls/nx_sha256. x86-lane. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_str.nxnx_syscalls.nxnx_sha256.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
| 13 | const CW_CAP: i64 = 1048576 |
| 14 | const CW_MAXLEAF: i64 = 4096 |
functions
| 16 | func cw_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 18 | func cw_pi(v: i64) -> i64 |
| 31 | func cw_hexn(d: *u8, n: i64, out: *u8) -> i64 called by 1: main |
| 44 | func cw_nib(c: i64) -> i64 called by 1: cw_unhex32 |
| 49 | func cw_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 54 | func cw_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 65 | func cw_line_end(b: *u8, i0: i64, n: i64) -> i64 called by 1: main |
| 70 | func cw_find_tab(b: *u8, i0: i64, e: i64) -> i64 called by 1: main |
| 77 | func cw_cp32(dst: *u8, src: *u8) -> i64 { var i: i64 = 0; while i < 32 { dst[i] = src[i]; i = i + 1 } return 0 } called by 1: main |
| 79 | func cw_eq32(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while i < 32 { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 81 | func cw_pair(l: *u8, r: *u8, out: *u8) -> i64 |
| 91 | func cw_unhex32(src: *u8, off: i64, out: *u8) -> i64 |
| 102 | func main() -> i64 |