nx_install_attest_signed.nx
buildroot/runtime/nx_install_attest_signed.nx
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
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
| 80 | const NX_INSTALL_SIG_OK: i64 = 0 |
| 81 | const NX_INSTALL_SIG_TAMPERED: i64 = 1 |
| 82 | const NX_INSTALL_SIG_BAD_KEY: i64 = 2 |
| 83 | const NX_INSTALL_SIG_BAD_INPUT: i64 = 3 |
| 84 | const NX_INSTALL_SIG_N: i64 = 4 |
| 93 | const NX_INSTALL_PRIV_BYTES: i64 = 32 |
| 94 | const NX_INSTALL_PUB_BYTES: i64 = 32 |
| 95 | const NX_INSTALL_SIG_BYTES: i64 = 64 |
functions
| 86 | func nx_install_sig_verdict_is_valid(v: i64) -> i64 called by 1: main |
| 104 | func nx_install_sign( |
| 133 | func nx_install_verify_sig( |
| 160 | func nx_install_sign_plan( |
| 181 | func nx_install_verify_sig_plan( |