de.flexiprovider.core.mprsa
Class MpRSAKeyPairGenerator

java.lang.Object
  |
  +--java.security.KeyPairGeneratorSpi
        |
        +--de.flexiprovider.api.keys.KeyPairGenerator
              |
              +--de.flexiprovider.core.mprsa.MpRSAKeyPairGenerator

public class MpRSAKeyPairGenerator
extends KeyPairGenerator

This class extends the KeyPairGenerator class. A key pair consists of a MpRSAPubKey and a MpRSAPrivKey.

The default bit length of n is 1024 bits and the default number of prime is 3.

Author:
Paul Nguentcheu

Constructor Summary
MpRSAKeyPairGenerator()
           
 
Method Summary
 KeyPair genKeyPair()
          Generate a new multi-prime RSA key pair, consisting of an MpRSAPrivateKey and an RSAPublicKey.
 void initialize(AlgorithmParameterSpec params, SecureRandom random)
          Initialize the key pair generator with the given parameters and source of randomness.
 void initialize(int keySize, SecureRandom secureRand)
          Initialize the key pair generator with the given key size and source of randomness.
 
Methods inherited from class de.flexiprovider.api.keys.KeyPairGenerator
generateKeyPair, initialize, initialize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MpRSAKeyPairGenerator

public MpRSAKeyPairGenerator()
Method Detail

initialize

public void initialize(AlgorithmParameterSpec params,
                       SecureRandom random)
                throws InvalidAlgorithmParameterException
Initialize the key pair generator with the given parameters and source of randomness. If the parameters are null, the default parameters are used.
Overrides:
initialize in class KeyPairGenerator
Parameters:
params - the parameters
random - the source of randomness
Throws:
InvalidAlgorithmParameterException - if the parameters are not an instance of MpRSAKeyGenParameterSpec.

initialize

public void initialize(int keySize,
                       SecureRandom secureRand)
Initialize the key pair generator with the given key size and source of randomness.
Overrides:
initialize in class KeyPairGenerator
Parameters:
keySize - the bit length of the modulus n
secureRand - the source of randomness

genKeyPair

public KeyPair genKeyPair()
Generate a new multi-prime RSA key pair, consisting of an MpRSAPrivateKey and an RSAPublicKey.
Overrides:
genKeyPair in class KeyPairGenerator
Returns:
the generated key pair