anon.crypto
Class RSAKeyPair
java.lang.Object
anon.crypto.AsymmetricCryptoKeyPair
anon.crypto.RSAKeyPair
public class RSAKeyPair
- extends AsymmetricCryptoKeyPair
This class creates key pairs for the RSA algorithm.
- Author:
- Rolf Wendolsky
Method Summary |
static RSAKeyPair |
getInstance(java.math.BigInteger a_publicExponent,
java.security.SecureRandom a_random,
int a_strength,
int a_certainty)
Creates a new rsa key pair. |
static RSAKeyPair |
getInstance(java.security.SecureRandom a_random,
int a_strength,
int a_certainty)
Creates a new rsa key pair with a public exponent of 65537. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_LENGTH_2048
public static final int KEY_LENGTH_2048
- See Also:
- Constant Field Values
RSAKeyPair
public RSAKeyPair(MyRSAPrivateKey a_privateKey)
- Creates a new rsa key pair.
- Parameters:
a_privateKey
- an rsa private key
getInstance
public static RSAKeyPair getInstance(java.math.BigInteger a_publicExponent,
java.security.SecureRandom a_random,
int a_strength,
int a_certainty)
- Creates a new rsa key pair.
- Parameters:
a_publicExponent
- the public encyption exponent; a small integer denoted e,
often a prime close to a power of 2, for example
3, 5, 7, 17, 257, or 65537.a_random
- a random number generatora_strength
- The bit-length of n = p*q.a_certainty
- The certainty, that the generated numbers are prime.
- Returns:
- a key pair or null if no key pair could be created with these parameters
getInstance
public static RSAKeyPair getInstance(java.security.SecureRandom a_random,
int a_strength,
int a_certainty)
- Creates a new rsa key pair with a public exponent of 65537.
- Parameters:
a_random
- a random number generatora_strength
- The bit-length of n = p*q.a_certainty
- The certainty, that the generated numbers are prime.
- Returns:
- a key pair or null if no key pair could be created with these parameters