de.flexiprovider.core.rbrsa
Class RbRSAKeyPairGenerator
java.lang.Object
|
+--java.security.KeyPairGeneratorSpi
|
+--de.flexiprovider.api.keys.KeyPairGenerator
|
+--de.flexiprovider.core.rbrsa.RbRSAKeyPairGenerator
- public class RbRSAKeyPairGenerator
- extends KeyPairGenerator
This class is used to generate key pairs for the rebalanced RSA algorithm. It
can be initialized with an instance of RbRSAKeyGenParameterSpec 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 |
RbRSAKeyPairGenerator
public RbRSAKeyPairGenerator()
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
RbRSAKeyGenParameterSpec.
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 key sizerandom - the source of randomness
genKeyPair
public KeyPair genKeyPair()
- Generate a new rebalanced RSA key pair, consisting of an
RSAPrivateCrtKey and an RSAPublicKey.
- Overrides:
genKeyPair in class KeyPairGenerator
- Returns:
- the generated key pair