Top Inners Fields Constructors Methods
org.bouncycastle.jcajce.provider.asymmetric.mlkem

public Class MLKEMKeyGeneratorSpi

extends KeyGeneratorSpi
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyGeneratorSpi.MLKEM512, org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyGeneratorSpi.MLKEM768, org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyGeneratorSpi.MLKEM1024
Imports
java.security.InvalidAlgorithmParameterException, .SecureRandom, java.security.spec.AlgorithmParameterSpec, javax.crypto.KeyGeneratorSpi, .SecretKey, javax.crypto.spec.SecretKeySpec, javax.security.auth.DestroyFailedException, org.bouncycastle.crypto.SecretWithEncapsulation, org.bouncycastle.jcajce.SecretKeyWithEncapsulation, org.bouncycastle.jcajce.spec.KEMExtractSpec, .KEMGenerateSpec, .MLKEMParameterSpec, org.bouncycastle.pqc.crypto.mlkem.MLKEMExtractor, .MLKEMGenerator, .MLKEMParameters, org.bouncycastle.pqc.jcajce.provider.util.KdfUtil, org.bouncycastle.util.Arrays

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private KEMExtractSpec
private KEMGenerateSpec
private MLKEMParameters
private SecureRandom

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
protected SecretKey
engineGenerateKey()

Implements abstract javax.crypto.KeyGeneratorSpi.engineGenerateKey.

Generates a secret key.

protected void
engineInit(SecureRandom
the source of randomness for this generator
secureRandom
)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator.

protected void
engineInit(AlgorithmParameterSpec
the key generation parameters
algorithmParameterSpec
,
SecureRandom
the source of randomness for this key generator
secureRandom
)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator with the specified parameter set and a user-provided source of randomness.

protected void
engineInit(int
the keysize. This is an algorithm-specific metric, specified in number of bits.
i
,
SecureRandom
the source of randomness for this key generator
secureRandom
)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Initializes this key generator for a certain keysize, using the given source of randomness.

Field Detail

extSpecback to summary
private KEMExtractSpec extSpec
genSpecback to summary
private KEMGenerateSpec genSpec
kyberParametersback to summary
private MLKEMParameters kyberParameters
randomback to summary
private SecureRandom random

Constructor Detail

MLKEMKeyGeneratorSpiback to summary
public MLKEMKeyGeneratorSpi()
MLKEMKeyGeneratorSpiback to summary
protected MLKEMKeyGeneratorSpi(MLKEMParameters kyberParameters)

Method Detail

engineGenerateKeyback to summary
protected SecretKey engineGenerateKey()

Implements abstract javax.crypto.KeyGeneratorSpi.engineGenerateKey.

Doc from javax.crypto.KeyGeneratorSpi.engineGenerateKey.

Generates a secret key.

Returns:SecretKey

the new key

engineInitback to summary
protected void engineInit(SecureRandom secureRandom)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Doc from javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator.

Parameters
secureRandom:SecureRandom

the source of randomness for this generator

engineInitback to summary
protected void engineInit(AlgorithmParameterSpec algorithmParameterSpec, SecureRandom secureRandom) throws InvalidAlgorithmParameterException

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Doc from javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator with the specified parameter set and a user-provided source of randomness.

Parameters
algorithmParameterSpec:AlgorithmParameterSpec

the key generation parameters

secureRandom:SecureRandom

the source of randomness for this key generator

Exceptions
InvalidAlgorithmParameterException:
if params is inappropriate for this key generator
engineInitback to summary
protected void engineInit(int i, SecureRandom secureRandom)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Doc from javax.crypto.KeyGeneratorSpi.engineInit.

Initializes this key generator for a certain keysize, using the given source of randomness.

Parameters
i:int

the keysize. This is an algorithm-specific metric, specified in number of bits.

secureRandom:SecureRandom

the source of randomness for this key generator

org.bouncycastle.jcajce.provider.asymmetric.mlkem back to summary

public Class MLKEMKeyGeneratorSpi.MLKEM1024

extends MLKEMKeyGeneratorSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyGeneratorSpi:
engineGenerateKeyengineInitengineInitengineInit

Constructor Detail

MLKEM1024back to summary
public MLKEM1024()
org.bouncycastle.jcajce.provider.asymmetric.mlkem back to summary

public Class MLKEMKeyGeneratorSpi.MLKEM512

extends MLKEMKeyGeneratorSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyGeneratorSpi:
engineGenerateKeyengineInitengineInitengineInit

Constructor Detail

MLKEM512back to summary
public MLKEM512()
org.bouncycastle.jcajce.provider.asymmetric.mlkem back to summary

public Class MLKEMKeyGeneratorSpi.MLKEM768

extends MLKEMKeyGeneratorSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyGeneratorSpi:
engineGenerateKeyengineInitengineInitengineInit

Constructor Detail

MLKEM768back to summary
public MLKEM768()