MlKemPrivateKey
An ML-KEM (FIPS 203) private key.
Parameters
the ML-KEM algorithm (Algorithm.ML_KEM_512, Algorithm.ML_KEM_768, or Algorithm.ML_KEM_1024).
the encoded private key bytes (either seed-only or expanded key).
the corresponding public key.
Properties
Functions
Throws IllegalStateException if this key has already been destroyed.
Securely zeroes out the private key material in memory and marks this key as destroyed. Subsequent cryptographic operations or property accesses on this instance will throw IllegalStateException.
Creates an independent duplicate of this private key with its own lifecycle and memory buffer. The returned key must be closed independently.
Serializes this private key as a CBOR DataItem encoding a COSE_Key.
Encodes this private key as a DER-encoded PKCS#8 OneAsymmetricKey (PrivateKeyInfo) sequence.