nx_x509_pubkey_ed.nx
buildroot/runtime/nx_x509_pubkey_ed.nx
about
nx_x509_pubkey_ed.nx -- extract a 32-byte Ed25519 public key from
an X.509 SubjectPublicKeyInfo.
Phase 0b §I.4 piece 5a of the chain-walker arc. Trivial parallel
to nx_x509_pubkey_ec.nx -- Ed25519 BIT STRING content is just
the 32 raw pubkey bytes (RFC 8410 §4 -- no leading indicator,
no compressed/uncompressed split).
x509_parse already strips the BIT STRING's "unused bits" prefix
byte, so cert.pubkey_off points at the first key byte and
cert.pubkey_len == 32 for an Ed25519 key.
Public API:
nx_x509_pubkey_extract_ed25519(buf, cert, out_32) -> verdict
nx_x509_pubkey_ed_verdict_is_valid(v) -> 0|1
Sealed verdict:
NX_X509_PUBKEY_ED_OK 32 bytes copied
NX_X509_PUBKEY_ED_BAD_LEN pubkey_len != 32
Per Cardinals 9 (single-responsibility -- extract, not verify or
alg-identify) and 12 (defensive at boundaries -- length check).
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/ietf/rfc_8410
lineage_id: nishi_x509_pubkey_ed25519_q10
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_x509.nx
imported by: nx_x509_pubkey_ed_kat.nxnx_x509_verify_under_issuer.nx
structs
| none |
consts
| 37 | const NX_X509_PUBKEY_ED_OK: i64 = 1 |
| 38 | const NX_X509_PUBKEY_ED_BAD_LEN: i64 = 2 |
| 39 | const NX_X509_PUBKEY_ED_VERDICT_N: i64 = 3 |
functions
| 41 | func nx_x509_pubkey_ed_verdict_is_valid(v: i64) -> i64 called by 1: main |
| 49 | func nx_x509_pubkey_extract_ed25519(buf: *u8, cert: *X509Cert, |
| 61 | func main() -> i64 |