Expand description
x25519 key creation (RFC 7748 §5, the X25519 function).
Keys minted here drive AgreementSecretKey::agree, whose result
chains into the KDFs (see
hkdf_sha2::prepare_from). Peer
imports are deliberately permissive — a degenerate (small-order) peer
surfaces at agree, the operation that computes the secret, as
Error::InvalidKey.
Functions§
- generate_
key - Generate a fresh random keypair, returning both halves.
- import_
public_ key_ jwk - Import a peer’s public key from an RFC 8037 OKP JWK (as JSON text).
- import_
public_ key_ raw - Import a peer’s raw 32-byte public key (RFC 7748’s little-endian u-coordinate).
- import_
public_ key_ spki - Import a peer’s public key from an X.509 SubjectPublicKeyInfo (DER).
- import_
secret_ key_ jwk - Import a secret key from an RFC 8037 OKP private JWK (as JSON text).
- import_
secret_ key_ pkcs8 - Import a secret key from a PKCS#8 PrivateKeyInfo (DER).