MlDsaPrivateKey
class MlDsaPrivateKey(val algorithm: Algorithm, encoded: ByteArray, val publicKey: MlDsaPublicKey) : PrivateKey
An ML-DSA (FIPS 204) private key.
Parameters
algorithm
the ML-DSA algorithm (Algorithm.ML_DSA_44, Algorithm.ML_DSA_65, or Algorithm.ML_DSA_87).
encoded
the encoded private key bytes (either seed-only or expanded key).
publicKey
the corresponding public key.
Properties
Functions
Link copied to clipboard
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.
Link copied to clipboard
Creates an independent duplicate of this private key with its own lifecycle and memory buffer. The returned key must be closed independently.
Link copied to clipboard
Serializes this private key as a CBOR DataItem encoding a COSE_Key.
Link copied to clipboard
Link copied to clipboard
Encodes this private key as a DER-encoded PKCS#8 OneAsymmetricKey (PrivateKeyInfo) sequence.