nx_sign_facade.nx
buildroot/runtime/nx_sign_facade.nx
about
nx_sign_facade.nx -- unified signing interface.
Wraps existing ML-DSA-65 (sovereign post-quantum, already shipped)
+ Ed25519 fallback (commodity, queued) behind one substrate-level
API. Other primitives that take "externally-supplied signature"
parameters can now call nx_sign_facade_sign() directly — closes
the gap noted across many shipped primitives.
Algorithm picked from trust ceiling: high-trust hosts use the
sovereign post-quantum primitive; low-trust hosts fall back to
Ed25519 (which is widely-vetted classical crypto, still strong vs
non-quantum attackers).
Composes:
nx_ml_dsa_65 -- post-quantum signature primitive (existing)
nx_attest_silicon -- trust ceiling informs algorithm choice
nx_hash_facade -- pairs for sign+verify chains
nx_methyl -- methyl marks via this facade
nx_vesicle -- vesicle authenticity via this facade
dependencies 2 imports · 3 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_crypto_event_compose_test.nxnx_save_slot.nxnx_sign_facade_test.nx
structs
| 70 | struct NxSignRequest |
consts
| 23 | const NX_MAGIC_3309: i64 = 3309 |
| 27 | const NX_SA_ML_DSA_65: nx_int = 0 // post-quantum sovereign |
| 28 | const NX_SA_ED25519: nx_int = 1 // classical commodity |
| 29 | const NX_SA_N_ALGOS: nx_int = 2 |
| 33 | const NX_SF_OK: nx_int = 0 |
| 34 | const NX_SF_ERR_BAD_ALGO: nx_int = 1 |
| 35 | const NX_SF_ERR_BAD_KEY: nx_int = 2 |
| 36 | const NX_SF_ERR_BAD_INPUT: nx_int = 3 |
| 37 | const NX_SF_ERR_BAD_SIG_LEN: nx_int = 4 |
| 38 | const NX_SF_VERIFIED: nx_int = 5 |
| 39 | const NX_SF_REJECTED: nx_int = 6 |
functions
| 41 | func nx_sa_is_valid(a: nx_int) -> nx_int |
| 53 | func nx_sign_facade_pick_algo(trust_q10: nx_int) -> nx_int called by 1: main |
| 62 | func nx_sign_facade_signature_size(algo: nx_int) -> nx_size |
| 81 | func nx_sign_request_new(algo: nx_int, |
| 110 | func nx_sign_facade_sign(req: *NxSignRequest) -> nx_int called by 4: mainnx_save_slot_createnx_sign_facade_verifymain calls 2: nx_sa_is_validnx_sign_facade_signature_size |
| 166 | func nx_sign_facade_verify(algo: nx_int, |