Expand description
Ed25519 signing-key minting (RFC 8032).
Split from ed25519-verify so a provider can serve verification alone.
Ed25519 signing is constant-time by construction (no per-signature
secret nonce, complete addition laws), so providers in shared timing
domains can serve it (see README.md, “Timing-channel policy”).
Signing keys import as PKCS#8 or an OKP private JWK — the platform
pass-through formats — and never as a bare seed (see README.md,
“Design notes”, the format-admission rule). Imports return only the
signing key; the public half is supplied separately via
ed25519-verify (there is no derive from a private import).
Functions§
- generate_
key - Generate a fresh random signing key, returning both halves — the only point at which every provider is guaranteed to have the public key on hand.
- import_
signing_ key_ jwk - Import a signing key as an RFC 8037 OKP private JWK
(
kty: "OKP",crv: "Ed25519", withxanddboth required; analgmember, when present, must be"Ed25519"or"EdDSA"). Implementations MAY reject a JWK whosexis not the public key ofd, and MUST NOT trustxfor any operation. Seemac-key.export-key-jwkfor the package-wide JWK contract. - import_
signing_ key_ pkcs8 - Import a signing key as a PKCS#8 PrivateKeyInfo (DER, RFC 8410:
the 32-byte seed in a CurvePrivateKey). Wrong OIDs and malformed
DER fail with
error.invalid-key. - unwrap_
signing_ key_ jwk - Mint a signing key from unwrapped key material read as an OKP
private JWK, subject to
import-signing-key-jwk’s contract plus the unwrap-pathuse/key_opschecks (seeREADME.md, “JWK contract”).inputis consumed; seeunwrap-signing-key-pkcs8for the options model. - unwrap_
signing_ key_ pkcs8 - Mint a signing key from unwrapped key material (see the
wrappinginterface):input’s bytes are read as a PKCS#8 PrivateKeyInfo, subject toimport-signing-key-pkcs8’s contract.inputis consumed.