Expand description
ed25519-verify / ed25519-sign key creation.
Functions§
- generate_
key - Generate a fresh random signing key, returning both halves.
- import_
signing_ key_ jwk - Import a signing key as an RFC 8037 OKP private JWK (
kty: "OKP",crv: "Ed25519", withxanddboth required; as JSON text). Analgmember, when present, must be"Ed25519"or"EdDSA". - import_
signing_ key_ pkcs8 - Import a signing key as a PKCS#8 PrivateKeyInfo (DER, RFC 8410: the
32-byte seed in a CurvePrivateKey). Returns only the signing key; the
public half is imported separately (there is no derive from a private
import — see the WIT
ed25519-signinterface doc). - import_
verifying_ key_ jwk - Import a public key as an RFC 8037 OKP public JWK (
kty: "OKP",crv: "Ed25519",x; as JSON text). Analgmember, when present, must be"Ed25519"or"EdDSA". The same strict point criterion asimport_verifying_key_rawapplies; see the WITmac-key.export-key-jwkdoc for the package-wide JWK contract. - import_
verifying_ key_ raw - Import a 32-byte raw public key (RFC 8032 encoding). Material of any
other length fails
Error::InvalidKey; a non-canonical or small-order encoding is rejected here or at verification, per the WIT interface’s verification criterion. - import_
verifying_ key_ spki - Import a public key as an X.509 SubjectPublicKeyInfo (DER, RFC 8410).
The embedded point is subject to the same strict criterion as
import_verifying_key_raw. - 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 (see the WITREADME.md, “JWK contract”). Consumes theUnwrapInput; seeunwrap_signing_key_pkcs8for the options model. - unwrap_
signing_ key_ pkcs8 - Mint a signing key from unwrapped key material read as a PKCS#8
PrivateKeyInfo, subject to
import_signing_key_pkcs8’s contract. Consumes theUnwrapInput; the minted key’s usages and extractability come fromoptionsalone.