de.flexiprovider.core.rprimersa
Class RprimeRSAKeyPairGenerator
java.lang.Object
|
+--java.security.KeyPairGeneratorSpi
|
+--de.flexiprovider.api.keys.KeyPairGenerator
|
+--de.flexiprovider.core.rprimersa.RprimeRSAKeyPairGenerator
- public class RprimeRSAKeyPairGenerator
- extends KeyPairGenerator
This class is used to generate key pairs for the rebalanced multi-prime RSA
algorithm. It can be initialized with an instance of
RprimeRSAKeyGenParameterSpec or with a key size. The key size
translates directly to the bit length of the modulus n = p*q. The
key pair generation follows the PKCS #1 standard.
- Author:
- Paul Nguentcheu, Martin Döring
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RprimeRSAKeyPairGenerator
public RprimeRSAKeyPairGenerator()
initialize
public void initialize(AlgorithmParameterSpec params,
SecureRandom secureRand)
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 - an AlgorithmParameterSpec objectsecureRand - the source of randomness- Throws:
InvalidAlgorithmParameterException - if the parameters are not an instance of
RprimeRSAKeyGenParameterSpec.
initialize
public void initialize(int keySize,
SecureRandom random)
- 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 nrandom - the source of randomness
genKeyPair
public KeyPair genKeyPair()
- Generate a multi-prime RSA key pair.
- Overrides:
genKeyPair in class KeyPairGenerator
- Returns:
- the key pair, consisting of an
MpRSAPrivateKey and an
RSAPublicKey