Static ReadonlyKEY_The byte length of a X25519PrivateKey.
A copy of the bytes; mutating it does not touch this value.
StaticcodecTagged-CBOR codec; decode also accepts the untagged form.
StaticrandomA fresh random value; pass rng to make it deterministic.
StatickeypairA fresh private key and its public key.
StaticderiveDerive an X25519PrivateKey from the given key material.
The key material to derive from
A new X25519PrivateKey derived from the key material
StaticfromRestore an X25519PrivateKey from a fixed-size array of bytes.
StaticfromGet hex string representation.
Get base64 representation.
Get the X25519PublicKey corresponding to this X25519PrivateKey.
Derive a shared symmetric key from this X25519PrivateKey and the given X25519PublicKey.
The other party's public key
A SymmetricKey derived from the shared secret
Perform ECDH key agreement with a public key (legacy method).
The reference: the digest of the tagged CBOR, as the reference computes it.
The first four bytes of reference() in hex, the reference's ref_hex_short.
The reference's Display: the type name over the short reference.
The CBOR tags this type decodes from; the first one is used to encode.
Returns the untagged CBOR encoding (as a byte string).
The tagged CBOR form.
As a UR, typed by the first tag's name.
Staticfrom
X25519 private key for ECDH key exchange (32 bytes seed)
X25519 is an elliptic-curve Diffie-Hellman key exchange protocol based on Curve25519 as defined in RFC 7748. It allows two parties to establish a shared secret key over an insecure channel.
Key features of X25519:
CBOR Serialization
X25519PrivateKeyis serialized to CBOR with tag 40010.