Ed448
Sign and verify with Ed448 and Ed448ph from RFC 8032.
Warning
Experimental: ed448-goldilocks is a pre-release, pinned to
0.14.0-pre.15. Its API and behavior can change between pre-releases, and
its README states that the code has not been audited or reviewed.
from oxcrypto.signature.ed448 import ED448
private_key = ED448.ED448.generate()
signature = private_key.sign(b"message", context=b"protocol v1")
assert private_key.public_key().verify(signature, b"message", context=b"protocol v1")ED448 signs the message directly and ED448PH hashes it with SHAKE256 (64
bytes) first. Both take an optional context of up to 255 bytes (default
empty). Private keys are 57-byte seeds, public keys are 57 bytes and
signatures are 114 bytes.
The ed448-goldilocks point decoder ignores bits 448 to 454 of an encoded
point, which RFC 8032 section 5.2.3 requires to be zero. oxcrypto checks them
first: a public key with any of these bits set raises ValueError, and a
signature with them set in R does not verify.
Keys
Keys use the same methods and formats as Ed25519, with the RFC 8410 OID 1.3.101.113.
Upstream
| Crate | Standard | Audit |
|---|---|---|
ed448-goldilocks 0.14.0-pre.15 (pre-release) | RFC 8032, FIPS 186-5 | No published audit |
The crate builds with Rust 1.88, the oxcrypto MSRV. Tests use RFC 8032
sections 7.4 and 7.5 and the C2SP Wycheproof ed448_test.json vectors.
Zeroization
Note
ed448-goldilocks is written to wipe the seed and the expanded secret
scalar of a SigningKey when it is dropped; oxcrypto has not verified this
independently. DER built from a private key is wiped after the returned
bytes are created. Not covered: seeds, passwords and serialized keys
passed in or returned as Python bytes, the per-signature nonce and hash
output ed448-goldilocks keeps on the stack during sign, and the PBES2
key pkcs5 derives from a password.