code wiki / _hdl_build / nx_coe_frame.nx

nx_coe_frame.nx

buildroot/runtime/_hdl_build/nx_coe_frame.nx

9724 B288 linesdepth 9pulls 15 transitivereach 0 importersview sourcekind tooltopic coe
docsdependenciesstructsconstsfunctions

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

nx_str.nx nx_itoa_lib.nx nx_syscalls.nx nx_sha256.nx nx_ed25519_signature.nx nx_coe_frame.nx

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

main cf_puts sys_write nx_str_len sys_mmap cf_coe_seed 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 ↻

structs

none

consts

15const CF_MAGIC_1024: i64 = 1024
16const CF_MAGIC_1500: i64 = 1500
18const CF_CAP: i64 = 1048576
19const CF_MAXROWS: i64 = 4096

functions

21func cf_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
27func cf_pi(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
29func cf_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
35func cf_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
47func cf_hexn(d: *u8, n: i64, out: *u8) -> i64
called by 2: cf_hash_hexmain
60func cf_nib(c: i64) -> i64
called by 1: cf_unhex
66func cf_unhex(hexin: *u8, hexlen: i64, out: *u8) -> i64
called by 1: main calls 1: cf_nib
78func cf_hash_hex(buf: *u8, n: i64, out: *u8) -> i64
called by 1: main calls 3: sys_mmapsha256_digestcf_hexn
85func cf_eq(a: *u8, b: *u8) -> i64
called by 1: main
95func cf_copy(dst: *u8, src: *u8) -> i64
called by 2: cf_scan_lastmain
102func cf_line_end(b: *u8, i0: i64, n: i64) -> i64
called by 2: cf_scan_lastmain
108func cf_find_tab(b: *u8, i0: i64, e: i64) -> i64
called by 2: cf_scan_lastmain
114func cf_slice(b: *u8, i0: i64, e: i64, dst: *u8) -> i64
called by 2: cf_scan_lastmain
123func cf_coe_seed(out: *u8) -> i64
called by 1: main
130func cf_scan_last(vb: *u8, n: i64, lastfh: *u8) -> i64
145func main() -> i64