Returns the signing private key.
StaticcodecTagged-CBOR codec; decode also accepts the untagged form.
StaticfromBundle a signing key with an encapsulation key.
StaticrandomFresh Ed25519 signing and X25519 encapsulation keys.
StaticgenerateGenerate a new PrivateKeys container with random Ed25519/X25519 keys. This is an alias for new() for API compatibility.
Returns the encapsulation private key.
Note: Named to match the reference implementation's API (which has a typo but we maintain compatibility)
Derive the corresponding public keys.
Throws where a key cannot derive its public key: General for an
ML-DSA signing key, Crypto for an ML-KEM encapsulation key.
Sign a message with optional signing options using the signing private key.
Optionaloptions: SigningOptionsDecapsulate a shared secret from a ciphertext.
This implements the Decrypter interface, allowing PrivateKeys to be used in encryption contexts where a shared secret needs to be recovered.
Returns a unique reference to this PrivateKeys instance.
The reference is derived from the SHA-256 hash of the tagged CBOR representation, providing a unique, content-addressable identifier.
PrivateKeys(<refHexShort>, <signingPrivateKey>, <encapsulationPrivateKey>)
The previous abbreviated form (PrivateKeys(<short>) only) was a
parity drift caught by the E1a summarizer audit.
The CBOR tags this type decodes from; the first one is used to encode.
Returns the untagged CBOR encoding.
Format: [
The tagged CBOR form.
As a UR, typed by the first tag's name.
Staticfrom
PrivateKeys - Container for a signing key and an encapsulation key.
This type provides a convenient way to manage a pair of private keys for both signing and encryption operations.