Expand description
Ed25519 verification-key minting (RFC 8032).
Ed25519 has no parameters: 32-byte public keys, 64-byte signatures.
Keys report algorithm-name "Ed25519" and none for curve and hash.
Security — the verification criterion. RFC 8032 leaves edge cases open and real implementations disagree on them; divergent verify results across providers is a vulnerability class, so this interface pins one policy:
- Keys minted here verify with the cofactorless equation
(
[S]B = R + [k]A). - Implementations MUST reject signatures with a non-canonical scalar
(
S ≥ L), a non-canonically-encoded or small-orderR, and keys with a non-canonically-encoded or small-orderA— the strict semantics of ed25519-dalek’sverify_strict. - Whether a degenerate
Ais rejected at import (error.invalid-key) or at verification (error.authentication-failed) is implementation-defined; the guarantee is that no signature ever verifies under one. - Inputs with mixed-order (torsion-component, not small-order)
AorRare the remaining freedom: they verify iff the cofactorless equation holds.
None of the rejected inputs can be produced by an honest RFC 8032 signer, so this strictness costs no interoperability.
Functions§
- import_
verifying_ key_ jwk - Import a public key as an RFC 8037 OKP public JWK (
kty: "OKP",crv: "Ed25519",x).jwkis the JWK as JSON text; seemac-key.export-key-jwkfor the package-wide JWK contract. Analgmember, when present, must be"Ed25519"or"EdDSA". The same strict point criterion applies. - import_
verifying_ key_ raw - Import a 32-byte raw public key (RFC 8032 encoding). Material of
any other length fails with
error.invalid-key; a non-canonical or small-order encoding is rejected here or at verification, per the interface’s verification criterion. - import_
verifying_ key_ spki - Import a public key as an X.509 SubjectPublicKeyInfo (DER, RFC
8410 algorithm id 1.3.101.112). The embedded point is subject to
the same strict criterion as
import-verifying-key-raw.