Bouncy Castle Cryptography Library 1.81

org.bouncycastle.jcajce.interfaces
Interface MLKEMPrivateKey

All Superinterfaces:
java.security.Key, MLKEMKey, java.security.PrivateKey, java.io.Serializable
All Known Implementing Classes:
BCMLKEMPrivateKey

public interface MLKEMPrivateKey
extends java.security.PrivateKey, MLKEMKey


Field Summary
 
Fields inherited from interface java.security.PrivateKey
serialVersionUID
 
Method Summary
 byte[] getPrivateData()
          Return the long form private data for the ML-KEM private key.
 MLKEMPrivateKey getPrivateKey(boolean preferSeedOnly)
          Return a privateKey which will encode as seed-only or as an expanded-key.
 MLKEMPublicKey getPublicKey()
          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 java.security.Key
getAlgorithm, getEncoded, getFormat
 
Methods inherited from interface org.bouncycastle.jcajce.interfaces.MLKEMKey
getParameterSpec
 

Method Detail

getPublicKey

public MLKEMPublicKey getPublicKey()
Return the public key corresponding to this private key.

Returns:
a ML-KEM Public Key

getPrivateData

public byte[] getPrivateData()
Return the long form private data for the ML-KEM private key.

Returns:
long form private data for private key.

getSeed

public 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

public MLKEMPrivateKey getPrivateKey(boolean preferSeedOnly)
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.

Bouncy Castle Cryptography Library 1.81