Interface MLKEMPrivateKey
- All Superinterfaces:
AsymmetricKey, DEREncodablePREVIEW, Destroyable, Key, MLKEMKey, PrivateKey, Serializable
- All Known Implementing Classes:
BCMLKEMPrivateKey
-
Field Summary
Fields inherited from interface Key
serialVersionUIDFields inherited from interface PrivateKey
serialVersionUID -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Return the long form private data for the ML-KEM private key.getPrivateKey(boolean preferSeedOnly) Return a privateKey which will encode as seed-only or as an expanded-key.Return the public key corresponding to this private key.byte[]getSeed()Return the seed the private key was generated from (if available).Methods inherited from interface AsymmetricKey
getParamsMethods inherited from interface Destroyable
destroy, isDestroyedMethods inherited from interface Key
getAlgorithm, getEncoded, getFormatMethods inherited from interface MLKEMKey
getParameterSpec
-
Method Details
-
getPublicKey
MLKEMPublicKey getPublicKey()Return the public key corresponding to this private key.- Returns:
- a ML-KEM Public Key
-
getPrivateData
byte[] getPrivateData()Return the long form private data for the ML-KEM private key.- Returns:
- long form private data for private key.
-
getSeed
byte[] getSeed()Return the seed the private key was generated from (if available).- Returns:
- the seed for the private key, null if not available.
-
getPrivateKey
Return a privateKey which will encode as seed-only or as an expanded-key.- Parameters:
preferSeedOnly- if true, return a privateKey which will encode to seed-only if possible.- Returns:
- a new MLKEMPrivateKey which encodes to either seed-only or expanded-key.
-