anon.crypto
Class DSAKeyPair
java.lang.Object
anon.crypto.AsymmetricCryptoKeyPair
anon.crypto.DSAKeyPair
public class DSAKeyPair
- extends AsymmetricCryptoKeyPair
This class creates key pairs for the DSA algorithm.
- Author:
- Rolf Wendolsky
Method Summary |
static DSAKeyPair |
getInstance(java.security.SecureRandom a_secureRandom,
int a_keyLength,
int a_certainty)
This creates a new DSA key pair. |
private static DSAKeyPair |
getInstanceJCE(java.security.SecureRandom a_secureRandom,
int a_keyLength,
int a_certainty)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DSAKeyPair
public DSAKeyPair(MyDSAPrivateKey a_privateKey)
- Creates a new DSA key pair.
- Parameters:
a_privateKey
- a private key
getInstance
public static DSAKeyPair getInstance(java.security.SecureRandom a_secureRandom,
int a_keyLength,
int a_certainty)
- This creates a new DSA key pair.
- Parameters:
a_secureRandom
- A random number as initialization for the key generator.a_keyLength
- The length of the key in bits. For the current implementation of
bouncycastle it must be a number between 256 and 1024 which is a multiple
of 64.a_certainty
- Measure of robustness of prime. For FIPS 186-2 compliance this
value should be at least 80.
- Returns:
- a key pair or null if no key pair could be created with these parameters
getInstanceJCE
private static DSAKeyPair getInstanceJCE(java.security.SecureRandom a_secureRandom,
int a_keyLength,
int a_certainty)