com.ibm.crypto.fips.provider

Class RSAKeyPairGenerator

  1. java.lang.Object
  2. extended byjava.security.KeyPairGeneratorSpi
  3. extended bycom.ibm.crypto.fips.provider.RSAKeyPairGenerator
All implemented interfaces:
AlgorithmStatus

  1. public final class RSAKeyPairGenerator
  2. extends java.security.KeyPairGeneratorSpi
  3. implements AlgorithmStatus
This class generates RSA public/private key pairs. Note: There is a very small chance that an ArithmeticException being thrown during generateKeyPair().

Constructor Summary

Constructor and Description
RSAKeyPairGenerator()

Method Summary

Modifier and Type Method and Description
  1. java.security.KeyPair
generateKeyPair()
  1. void
initialize(java.security.spec.AlgorithmParameterSpec params,java.security.SecureRandom random)
  1. void
initialize(int strength)
  1. void
initialize(int strength,java.security.SecureRandom random)
Initializes this KeyPairGenerator for given modulus and random source
  1. protected
  2. java.security.KeyPair
internalGenerateKeyPair()
  1. boolean
isFipsApproved()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RSAKeyPairGenerator

  1. public RSAKeyPairGenerator()

Method Detail

initialize

  1. public void initialize(java.security.spec.AlgorithmParameterSpec params,
  2. java.security.SecureRandom random)
  3. throws java.security.InvalidAlgorithmParameterException
Overrides:
initialize in class java.security.KeyPairGeneratorSpi
Throws:
java.security.InvalidAlgorithmParameterException

initialize

  1. public void initialize(int strength,
  2. java.security.SecureRandom random)
Initializes this KeyPairGenerator for given modulus and random source
Specified by:
initialize in class java.security.KeyPairGeneratorSpi
Parameters:
strength - the length of the key to be generated
random - the SecureRandom object for generating random number

initialize

  1. public void initialize(int strength)

isFipsApproved

  1. public boolean isFipsApproved()
Description copied from interface: AlgorithmStatus
Module identifies if the cryptographic operation (algorithm) is FIPS certified
Specified by:
See Also:

generateKeyPair

  1. public java.security.KeyPair generateKeyPair( )
Specified by:
generateKeyPair in class java.security.KeyPairGeneratorSpi
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGenerateKeyPair

  1. protected java.security.KeyPair internalGenerateKeyPair( )