code wiki / _hdl_build / nx_coe_dsse.nx

nx_coe_dsse.nx

buildroot/runtime/_hdl_build/nx_coe_dsse.nx

6435 B141 linesdepth 9pulls 15 transitivereach 0 importersview sourcekind tooltopic coe
docsdependenciesstructsconstsfunctions

about

nx_coe_dsse.nx -- DSSE-wrap the CoE in-toto attestation (F714 interop completion) Reads coe_intoto.json (the in-toto ITE-6 Statement), wraps it in a DSSE envelope (Dead Simple Signing Envelope, the standard Sigstore/in-toto signature wrapper): base64 payload + payloadType + an ed25519 signature over the DSSE-PAE pre-authentication encoding. External verifiers can now verify our attestation with just our public key. EXPORT-ONLY boundary. Written to coe_dsse.json. PAE(t,b) = "DSSEv1" SP len(t) SP t SP len(b) SP b (RFC-style); sig = ed25519(seed, PAE). Composes proven libs: nx_str/nx_syscalls + nx_ed25519_signature. x86-lane. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_str.nx nx_itoa_lib.nx nx_syscalls.nx nx_estate_path.nx nx_ed25519_signature.nx nx_coe_dsse.nx

imports: nx_str.nxnx_itoa_lib.nxnx_syscalls.nxnx_estate_path.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 ep_anchor sys_openat_rd sys_close sys_chdir sys_mmap cd_puts sys_write nx_str_len sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ sys_exit nx_str_len ↻ cd_cat cd_catn sys_mmap ↻ cd_coe_seed ed25519_sign_full 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 ↻

structs

none

consts

13const CD_MAGIC_65536: i64 = 65536
14const CD_MAGIC_1024: i64 = 1024
16const CD_CAP: i64 = 1048576
17const CD_B64: *u8 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
18const CD_TYPE: *u8 = "application/vnd.in-toto+json"
19const CD_KEYID: *u8 = "94e8a64c4e00009caeefde99599ea2e09dad102f48def0bf8a363da522135e50"

functions

21func cd_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
26func cd_pi(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
27func cd_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 2: cd_cqmain
28func cd_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
38func cd_q(dst: *u8, off: i64) -> i64 { dst[off] = 34 as u8; return off + 1 }
called by 1: cd_cq
39func cd_cq(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = cd_q(dst, off); o = cd_cat(dst, o, s); o = cd_q(dst, o); return o }
called by 1: main calls 2: cd_qcd_cat
40func cd_coe_seed(out: *u8) -> i64 { var i: i64 = 0; while i < 32 { out[i] = ((i * 11 + 29) & 0xff) as u8; i = i + 1 } return 0 }
called by 1: main
43func cd_b64enc(src: *u8, n: i64, out: *u8) -> i64
called by 1: main
76func cd_write_file(path: *u8, buf: *u8, n: i64) -> i64
84func main() -> i64