Returns the security level of this key.
The bytes (a view; do not mutate).
Number of bytes.
StaticcodecTagged-CBOR codec; decode also accepts the untagged form.
StaticrandomA fresh private key at level; pass rng to make it deterministic.
StaticfromCreate an MLKEMPrivateKey from raw bytes.
The ML-KEM security level
The private key bytes
StatickeypairA fresh private key at level and its public key.
Decapsulate a shared secret from a ciphertext.
The ML-KEM ciphertext
The decapsulated shared secret as a SymmetricKey
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.
Format: [level, key_bytes]
The tagged CBOR form.
As a UR, typed by the first tag's name.
Staticfrom
MLKEMPrivateKey - Post-quantum key decapsulation private key using ML-KEM.