Top Fields Constructors Methods
org.bouncycastle.pqc.jcajce.provider.saber

public Class SABERKeyGeneratorSpi

extends KeyGeneratorSpi
Class Inheritance
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, org.bouncycastle.pqc.crypto.saber.SABERKEMExtractor, .SABERKEMGenerator, org.bouncycastle.util.Arrays

Field Summary

Modifier and TypeField and Description
private KEMExtractSpec
private KEMGenerateSpec
private SecureRandom

Constructor Summary

AccessConstructor and Description
public

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
randomback to summary
private SecureRandom random

Constructor Detail

SABERKeyGeneratorSpiback to summary
public SABERKeyGeneratorSpi()

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