Module ibm.crypto.ibmjcehybrid
Class RSAPSSKeyPairGeneratorHybrid
java.lang.Object
java.security.KeyPairGeneratorSpi
java.security.KeyPairGenerator
com.ibm.crypto.ibmjcehybrid.provider.RSAPSSKeyPairGeneratorHybrid
This class is a facade for the RSASSA-PSS public/private key pair
generation algorithm.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static com.ibm.misc.Debug
The debug object, null if not instantiated at JVM startup. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of the RSAPSSKeyPairGeneratorHybrid class. -
Method Summary
Modifier and TypeMethodDescriptionGenerates an RSA key pair.protected void
Creates an instance of the KeyPairGenerator.void
initialize
(int strength, SecureRandom random) Initializes this KeyPairGenerator for given modulus size and secure random source.void
initialize
(AlgorithmParameterSpec params, SecureRandom random) Initializes this KeyPairGenerator for given parameters and secure random source.Methods inherited from class java.security.KeyPairGenerator
genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider, initialize, initialize
-
Field Details
-
debug
protected static com.ibm.misc.Debug debugThe debug object, null if not instantiated at JVM startup.
-
-
Constructor Details
-
RSAPSSKeyPairGeneratorHybrid
public RSAPSSKeyPairGeneratorHybrid()Creates an instance of the RSAPSSKeyPairGeneratorHybrid class.
-
-
Method Details
-
initialize
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException, InvalidParameterException Initializes this KeyPairGenerator for given parameters and secure random source.- Overrides:
initialize
in classKeyPairGenerator
- Parameters:
params
- the RSAKeyParameterSpec for this object.random
- the SecureRandom object for generating random numbers.- Throws:
InvalidAlgorithmParameterException
- thrown when parameter set is not recognized.InvalidParameterException
-
initialize
Initializes this KeyPairGenerator for given modulus size and secure random source. The private key will be stored in the CLEAR not the hardware or the PKDS, the private key label will be randomly generated and the key will be used for signing purposes.- Overrides:
initialize
in classKeyPairGenerator
- Parameters:
strength
- the length of the key to be generated.random
- the SecureRandom object for generating a random number.- Throws:
InvalidParameterException
- thrown when a parameter is not recognized.
-
generateKeyPair
Generates an RSA key pair.- Overrides:
generateKeyPair
in classKeyPairGenerator
- Returns:
- a KeyPair contains a pair of generated RSA keys
- Throws:
IllegalArgumentException
- in the key label formal is not valid
-
getGenerator
protected void getGenerator()Creates an instance of the KeyPairGenerator.- Throws:
RuntimeException
- if this method fails to create and to initialize the message digest.
-