code wiki / _hdl_build / nx_coe_dsse.nx
nx_coe_dsse.nx
buildroot/runtime/_hdl_build/nx_coe_dsse.nx
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
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
structs
| none |
consts
| 13 | const CD_MAGIC_65536: i64 = 65536 |
| 14 | const CD_MAGIC_1024: i64 = 1024 |
| 16 | const CD_CAP: i64 = 1048576 |
| 17 | const CD_B64: *u8 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| 18 | const CD_TYPE: *u8 = "application/vnd.in-toto+json" |
| 19 | const CD_KEYID: *u8 = "94e8a64c4e00009caeefde99599ea2e09dad102f48def0bf8a363da522135e50" |
functions
| 21 | func cd_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 26 | func cd_pi(v: i64) -> i64 { nxi_out(v); return 0 } |
| 27 | func 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 } |
| 28 | func cd_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 38 | func cd_q(dst: *u8, off: i64) -> i64 { dst[off] = 34 as u8; return off + 1 } called by 1: cd_cq |
| 39 | func 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 } |
| 40 | func 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 |
| 43 | func cd_b64enc(src: *u8, n: i64, out: *u8) -> i64 called by 1: main |
| 76 | func cd_write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 84 | func main() -> i64 |