code wiki / _hdl_build / nx_coe_witness.nx

nx_coe_witness.nx

buildroot/runtime/_hdl_build/nx_coe_witness.nx

7410 B221 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic coe
docsdependenciesstructsconstsfunctions

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

nx_str.nx nx_syscalls.nx nx_sha256.nx nx_coe_witness.nx

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

main cw_puts sys_write nx_str_len sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close cw_line_end cw_find_tab cw_unhex32 cw_nib sys_exit cw_cp32 cw_pair sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ cw_hexn cw_eq32 sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real cw_cat

structs

none

consts

13const CW_CAP: i64 = 1048576
14const CW_MAXLEAF: i64 = 4096

functions

16func cw_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
18func cw_pi(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
31func cw_hexn(d: *u8, n: i64, out: *u8) -> i64
called by 1: main
44func cw_nib(c: i64) -> i64
called by 1: cw_unhex32
49func cw_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
54func cw_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
65func cw_line_end(b: *u8, i0: i64, n: i64) -> i64
called by 1: main
70func cw_find_tab(b: *u8, i0: i64, e: i64) -> i64
called by 1: main
77func 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
79func 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
81func cw_pair(l: *u8, r: *u8, out: *u8) -> i64
called by 1: main calls 2: sys_mmapsha256_digest
91func cw_unhex32(src: *u8, off: i64, out: *u8) -> i64
called by 1: main calls 1: cw_nib
102func main() -> i64