de.flexiprovider.core.mersa
Class MeRSAKeyPairGenerator
java.lang.Object
|
+--java.security.KeyPairGeneratorSpi
|
+--de.flexiprovider.api.keys.KeyPairGenerator
|
+--de.flexiprovider.core.mersa.MeRSAKeyPairGenerator
- public class MeRSAKeyPairGenerator
- extends KeyPairGenerator
This class is used to generate key pairs for the multi-exponent RSA
algorithms. It can be initialized with an instance of
MeRSAKeyGenParameterSpec or with the bit length of the modulus
n. The default bit length of the modulus is 1024.
- Author:
- Erik Dahmen, Paul Nguentcheu, Martin Döring
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MeRSAKeyPairGenerator
public MeRSAKeyPairGenerator()
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 parametersrandom - the source of randomness- Throws:
InvalidAlgorithmParameterException - if the parameters are not an instance of
MeRSAKeyGenParameterSpec.
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 prime psecureRand - the source of randomness.
genKeyPair
public KeyPair genKeyPair()
- Generate a MeRSA key pair, consisting of a
MeRSAPrivateKey and an
RSAPublicKey.
- Overrides:
genKeyPair in class KeyPairGenerator
- Returns:
- the generated key pair