iaik.security.dsa
Class DSAParameterGenerator

java.lang.Object
  |
  +--java.security.AlgorithmParameterGeneratorSpi
        |
        +--iaik.security.dsa.DSAParameterGenerator

public class DSAParameterGenerator
extends AlgorithmParameterGeneratorSpi

This class implements an AlgorithmParameterGenerator that generates parameters for the DSA algorithm as specified in FIPS PUB 186.

Valid length for the modulus is any multiple of 64 in the range of 512 to 1024.

Version:
File Revision 6
See Also:
AlgorithmParameterGenerator, DSAParameters, DSAParams

Constructor Summary
DSAParameterGenerator()
          The default constructor.
 
Method Summary
protected  AlgorithmParameters engineGenerateParameters()
          Actually generates the required DSA AlgorithmParameters.
protected  void engineInit(AlgorithmParameterSpec param, SecureRandom random)
          Initializes this generator with some random seed.
protected  void engineInit(int primeLength, SecureRandom random)
          Initializes the parameter generator with given prime modulus length and random seed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSAParameterGenerator

public DSAParameterGenerator()
The default constructor. Only internally used for creating an DSAParameterGenerator object. Applications shall use one of the AlgorithmParameterGenerator.getInstance factory methods for obtaining an AlgorithmParamterGenerator for generating paramters for DSA signature algorithm.
Method Detail

engineInit

protected void engineInit(int primeLength,
                          SecureRandom random)
Initializes the parameter generator with given prime modulus length and random seed.

Overrides:
engineInit in class AlgorithmParameterGeneratorSpi
Parameters:
primeLength - the length of the prime modulus in bits
random - the random seed for this generator.

engineInit

protected void engineInit(AlgorithmParameterSpec param,
                          SecureRandom random)
                   throws InvalidAlgorithmParameterException
Initializes this generator with some random seed. The parameters must be null.

Applications shall call init(param_spec, random) for provider independent access of this method.

Overrides:
engineInit in class AlgorithmParameterGeneratorSpi
Parameters:
param - must be null
random - the random seed to be used by this generator.
Throws:
InvalidAlgorithmParameterException - if param is not null.

engineGenerateParameters

protected AlgorithmParameters engineGenerateParameters()
Actually generates the required DSA AlgorithmParameters.

Applications shall call generatePrameters() for provider independently accessing this method.

Overrides:
engineGenerateParameters in class AlgorithmParameterGeneratorSpi
Returns:
the new created DSA AlgorithmParameters

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK