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

public Class KeyPairGeneratorSpi

extends KeyPairGenerator
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyPairGeneratorSpi.PSS
Imports
java.math.BigInteger, java.security.InvalidAlgorithmParameterException, .KeyPair, .SecureRandom, java.security.spec.AlgorithmParameterSpec, .RSAKeyGenParameterSpec, org.bouncycastle.asn1.DERNull, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .CryptoServicesRegistrar, org.bouncycastle.crypto.generators.RSAKeyPairGenerator, org.bouncycastle.crypto.params.RSAKeyGenerationParameters, .RSAKeyParameters, .RSAPrivateCrtKeyParameters, org.bouncycastle.jcajce.provider.asymmetric.util.PrimeCertaintyCalculator

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
pack-priv AlgorithmIdentifier
pack-priv static final BigInteger
pack-priv RSAKeyPairGenerator
pack-priv RSAKeyGenerationParameters
private static final AlgorithmIdentifier
private static final AlgorithmIdentifier

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public KeyPair
public void
initialize(int
the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
strength
,
SecureRandom
the source of randomness.
random
)

Overrides java.security.KeyPairGenerator.initialize.

Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).
public void
initialize(AlgorithmParameterSpec
the parameter set used to generate the keys.
params
,
SecureRandom
the source of randomness.
random
)

Overrides java.security.KeyPairGenerator.initialize.

Initializes the key pair generator with the given parameter set and source of randomness.
Inherited from java.security.KeyPairGenerator:
genKeyPairgetAlgorithmgetInstancegetInstancegetInstancegetProviderinitializeinitialize

Field Detail

algIdback to summary
pack-priv AlgorithmIdentifier algId
defaultPublicExponentback to summary
pack-priv static final BigInteger defaultPublicExponent
engineback to summary
pack-priv RSAKeyPairGenerator engine
paramback to summary
pack-priv RSAKeyGenerationParameters param
PKCS_ALGIDback to summary
private static final AlgorithmIdentifier PKCS_ALGID
PSS_ALGIDback to summary
private static final AlgorithmIdentifier PSS_ALGID

Constructor Detail

KeyPairGeneratorSpiback to summary
public KeyPairGeneratorSpi(String algorithmName, AlgorithmIdentifier algId)
KeyPairGeneratorSpiback to summary
public KeyPairGeneratorSpi()

Method Detail

generateKeyPairback to summary
public KeyPair generateKeyPair()

Overrides java.security.KeyPairGenerator.generateKeyPair.

Doc from java.security.KeyPairGenerator.generateKeyPair.

Generates a key pair.

If this KeyPairGenerator has not been initialized explicitly, provider-specific defaults will be used for the size and other (algorithm-specific) values of the generated keys.

This will generate a new key pair every time it is called.

This method is functionally equivalent to genKeyPair.

Returns:KeyPair

the generated key pair

initializeback to summary
public void initialize(int strength, SecureRandom random)

Overrides java.security.KeyPairGenerator.initialize.

Doc from java.security.KeyPairGenerator.initialize.

Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).

Parameters
strength:int

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

random:SecureRandom

the source of randomness.

initializeback to summary
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException

Overrides java.security.KeyPairGenerator.initialize.

Doc from java.security.KeyPairGenerator.initialize.

Initializes the key pair generator with the given parameter set and source of randomness.

This concrete method has been added to this previously-defined abstract class. This method calls the KeyPairGeneratorSpi initialize method, passing it params and random. That initialize method always throws an UnsupportedOperationException if it is not overridden by the provider.

Parameters
params:AlgorithmParameterSpec

the parameter set used to generate the keys.

random:SecureRandom

the source of randomness.

Exceptions
InvalidAlgorithmParameterException:
if the given parameters are inappropriate for this key pair generator.
org.bouncycastle.jcajce.provider.asymmetric.rsa back to summary

public Class KeyPairGeneratorSpi.PSS

extends KeyPairGeneratorSpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyPairGeneratorSpi:
algIddefaultPublicExponentengineparam

Constructor Summary

AccessConstructor and Description
public
PSS()

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyPairGeneratorSpi:
generateKeyPairinitializeinitialize

Constructor Detail

PSSback to summary
public PSS()