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
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MpRSAKeyPairGenerator
public MpRSAKeyPairGenerator()
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
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 nsecureRand - 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