code wiki / (root) / nx_install_attest_signed_test.nx

nx_install_attest_signed_test.nx

buildroot/runtime/nx_install_attest_signed_test.nx

9306 B267 linesdepth 10pulls 21 transitivereach 0 importersview sourcekind gate/prooftopic install
docsdependenciesstructsconstsfunctions

about

nx_install_attest_signed_test.nx -- smoke for EM-9 Ed25519 signing. Uses the RFC 8032 ยง7.1 Test 1 keypair (the only canonical Ed25519 test vector pair that's bit-stable across implementations): priv = 9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60 pub = d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a Test plan: 1. Sign a known install_hash; verify with correct pub -> OK 2. Tamper install_hash bytes -> verify returns TAMPERED 3. Tamper signature bytes -> verify returns TAMPERED 4. Use WRONG public key -> verify returns TAMPERED 5. Bad-input gates (null hash / null priv / null pub / null sig / null out) 6. Sealed-enum verdict gate 7. Plan-level sign + verify roundtrip (compose with nx_install_hash_compute on a real NxInstallPlan)

dependencies 9 imports · 0 importers

nx_syscalls.nx nx_probe.nx nx_calibrate.nx nx_select.nx nx_select_joint.nx nx_install_plan.nx nx_install_hash.nx nx_install_pipeline.nx nx_install_attest_signed.nx nx_install_attest_signed_test.

imports: nx_syscalls.nxnx_probe.nxnx_calibrate.nxnx_select.nxnx_select_joint.nxnx_install_plan.nxnx_install_hash.nxnx_install_pipeline.nxnx_install_attest_signed.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap _rfc_priv _rfc_pub _make_hash nx_install_sign 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 sha512_gamma1 sha512_sigma1 sha512_ch sha512_k sha512_sigma0 sha512_maj sha512_final sha512_blk_set_byte ↻ sha512_compress ↻ ge_p3_alloc sys_mmap ↻ fe_alloc nx_scratch nx_scratch_init nx_scratch_oom sys_mmap ↻ fe_zero ed25519_basepoint_p3 sys_mmap ↻ ge_p3_decompress sys_mmap ↻

structs

none

consts

none

functions

30func _rfc_priv(buf: *u8) -> i64
called by 1: main
67func _rfc_pub(buf: *u8) -> i64
called by 1: main
105func _make_hash(buf: *u8) -> i64
called by 1: main
114func _make_probe() -> *NxProbeRecord
called by 1: main calls 1: nx_probe_new
126func _make_calib() -> *NxCalibrationRecord
called by 1: main calls 1: nx_calibrate_new
139func _mk(variant_id: i64, cost: i64, in_lay: i64, out_lay: i64) -> *NxManifest
150func main() -> i64