Bouncy Castle Cryptography Library 1.87

org.bouncycastle.jcajce.provider.asymmetric.mlkem
Class MLKEMKeyPairGeneratorSpi

java.lang.Object
  extended byjava.security.KeyPairGeneratorSpi
      extended byjava.security.KeyPairGenerator
          extended byorg.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyPairGeneratorSpi
Direct Known Subclasses:
MLKEMKeyPairGeneratorSpi.MLKEM1024, MLKEMKeyPairGeneratorSpi.MLKEM512, MLKEMKeyPairGeneratorSpi.MLKEM768

public class MLKEMKeyPairGeneratorSpi
extends java.security.KeyPairGenerator

ML-KEM (FIPS 203) key pair generation. A generator obtained as "ML-KEM" and not initialised produces ML-KEM-768 keys, the parameter set NIST recommends (NIST IR 8547). An initialisation that gives no SecureRandom, including this default and a generator obtained under a parameter set name such as "ML-KEM-512", draws the key from the default SecureRandom set on CryptoServicesRegistrar, if one has been set, and otherwise from the provider's 256 bit DEFAULT DRBG.


Nested Class Summary
static class MLKEMKeyPairGeneratorSpi.MLKEM1024
           
static class MLKEMKeyPairGeneratorSpi.MLKEM512
           
static class MLKEMKeyPairGeneratorSpi.MLKEM768
           
 
Constructor Summary
  MLKEMKeyPairGeneratorSpi()
           
protected MLKEMKeyPairGeneratorSpi(MLKEMParameterSpec paramSpec)
           
 
Method Summary
 java.security.KeyPair generateKeyPair()
           
 void initialize(java.security.spec.AlgorithmParameterSpec params)
           
 void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
           
 void initialize(int strength, java.security.SecureRandom random)
           
 
Methods inherited from class java.security.KeyPairGenerator
genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MLKEMKeyPairGeneratorSpi

public MLKEMKeyPairGeneratorSpi()

MLKEMKeyPairGeneratorSpi

protected MLKEMKeyPairGeneratorSpi(MLKEMParameterSpec paramSpec)
Method Detail

initialize

public void initialize(int strength,
                       java.security.SecureRandom random)

initialize

public void initialize(java.security.spec.AlgorithmParameterSpec params)
                throws java.security.InvalidAlgorithmParameterException
Throws:
java.security.InvalidAlgorithmParameterException

initialize

public void initialize(java.security.spec.AlgorithmParameterSpec params,
                       java.security.SecureRandom random)
                throws java.security.InvalidAlgorithmParameterException
Throws:
java.security.InvalidAlgorithmParameterException

generateKeyPair

public java.security.KeyPair generateKeyPair()

Bouncy Castle Cryptography Library 1.87