com.ibm.security12.sun.security.provider
Class DSAKeyPairGenerator
java.lang.Object
|
+--com.ibm.security12.java.security.KeyPairGeneratorSpi
|
+--com.ibm.security12.java.security.KeyPairGenerator
|
+--com.ibm.security12.sun.security.provider.DSAKeyPairGenerator
- public class DSAKeyPairGenerator
- extends KeyPairGenerator
- implements DSAKeyPairGenerator
This class generates DSA key parameters and public/private key
pairs according to the DSS standard NIST FIPS 186. It uses the
updated version of SHA, SHA-1 as described in FIPS 180-1.
- Version:
- 1.11, 98/07/22
- Author:
- Benjamin Renaud
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DSAKeyPairGenerator
public DSAKeyPairGenerator()
initialize
public void initialize(int strength,
SecureRandom random)
- Overrides:
- initialize in class KeyPairGenerator
initialize
public void initialize(int modlen,
boolean genParams,
SecureRandom random)
throws InvalidParameterException
- Initializes the DSA key pair generator. If
genParams
is false, a set of pre-computed parameters is used. In this case,
modelen
must be 512, 768, or 1024.
- Specified by:
- initialize in interface DSAKeyPairGenerator
initialize
public void initialize(DSAParams params,
SecureRandom random)
throws InvalidParameterException
- Initializes the DSA object using a DSA parameter object.
- Specified by:
- initialize in interface DSAKeyPairGenerator
- Parameters:
params
- a fully initialized DSA parameter object.
initialize
public void initialize(AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidAlgorithmParameterException
- Initializes the DSA object using a parameter object.
- Parameters:
params
- the parameter set to be used to generate
the keys.random
- the source of randomness for this generator.- Throws:
- InvalidAlgorithmParameterException - if the given parameters
are inappropriate for this key pair generator
- Overrides:
- initialize in class KeyPairGenerator
generateKeyPair
public KeyPair generateKeyPair()
- Generates a pair of keys usable by any JavaSecurity compliant
DSA implementation.
- Parameters:
rnd
- the source of random bits from which the random key
generation parameters are drawn. In particular, this includes
the XSEED parameter.- Throws:
- InvalidParameterException - if the modulus is not
between 512 and 1024.
- Overrides:
- generateKeyPair in class KeyPairGeneratorSpi
generateKeyPair
public KeyPair generateKeyPair(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
SecureRandom random)