code wiki / (root) / nx_install_attest_signed.nx

nx_install_attest_signed.nx

buildroot/runtime/nx_install_attest_signed.nx

8059 B194 linesdepth 9pulls 19 transitivereach 2 importersview sourcekind librarytopic install
docsdependenciesstructsconstsfunctions

about

nx_install_attest_signed.nx -- Ed25519-signed install attestation. EM-9 milestone of NISHI_ECOSYSTEM_EVOLUTION_ROADMAP.md. Composes nx_install_attest (hex codec + verify_against) with the shipped bits-up Ed25519 stack to give every install_hash a cryptographic signature. This closes the racing-line "unsigned spores rejected" load-bearing claim. Operator workflow: 1. Generate / load a 32-byte Ed25519 keypair (priv + pub) 2. Run substrate -> obtain install_hash 3. nx_install_sign(install_hash, priv) -> 64-byte sig 4. Persist (install_hash, sig) in nx_journal_log + share with peers 5. Receiver: nx_install_verify_sig(install_hash, pub, sig) -> SIGNATURE_OK on valid, TAMPERED on any of: - hash modified - sig modified - wrong pub key Threat model coverage (per feedback-racing-crew-team-honesty-threat-aware): - THREAT_OPPORTUNISTIC -- adversary can flip bytes in transit; signature catches any modification to hash or sig - THREAT_TARGETED_CRIMINAL -- adversary cannot forge a signature without priv key (Ed25519 = 2^128 security) - THREAT_AI_ADVERSARY -- byzantine-N-of-M (queued for SA-7) adds threshold signing for AI-adversary tier - THREAT_QUANTUM_FUTURE -- Ed25519 is NOT quantum-resistant; migration to ML-DSA / Dilithium queued (composes with shipped nx_ml_dsa_65_wasm.nx) V1 scope: - Operator-supplied priv + pub (no key generation primitive yet; RFC 8032 test vectors used in smoke; KDF / HW-derived keys queued) - Single signature per install_hash (multi-sig / threshold queued) - Detached signature (NOT embedded in hash) so the SAME hash can be re-signed by different keys (e.g., dev-key during build + ops-key at deploy) Deferred per roadmap:

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_ed25519_signature.nx nx_install_hash.nx nx_install_attest_signed.nx nx_install_attest_signed_test.nx nx_spore_up_lifecycle_test.nx

imports: nx_syscalls.nxnx_ed25519_signature.nxnx_install_hash.nx

imported by: nx_install_attest_signed_test.nxnx_spore_up_lifecycle_test.nx

structs

none

consts

80const NX_INSTALL_SIG_OK: i64 = 0
81const NX_INSTALL_SIG_TAMPERED: i64 = 1
82const NX_INSTALL_SIG_BAD_KEY: i64 = 2
83const NX_INSTALL_SIG_BAD_INPUT: i64 = 3
84const NX_INSTALL_SIG_N: i64 = 4
93const NX_INSTALL_PRIV_BYTES: i64 = 32
94const NX_INSTALL_PUB_BYTES: i64 = 32
95const NX_INSTALL_SIG_BYTES: i64 = 64

functions

86func nx_install_sig_verdict_is_valid(v: i64) -> i64
called by 1: main
104func nx_install_sign(
133func nx_install_verify_sig(
160func nx_install_sign_plan(
181func nx_install_verify_sig_plan(