java.security.interfaces

Interface DSAKeyPairGenerator

public interface DSAKeyPairGenerator

This interface contains methods for intializing a Digital Signature Algorithm key generation engine. The initialize methods may be called any number of times. If no explicity initialization call is made, then the engine defaults to generating 1024-bit keys using pre-calculated base, prime, and subprime values.
Method Summary
voidinitialize(DSAParams params, SecureRandom random)
Initializes the key generator with the specified DSA parameters and random bit source
voidinitialize(int modlen, boolean genParams, SecureRandom random)
Initializes the key generator to a give modulus.

Method Detail

initialize

public void initialize(DSAParams params, SecureRandom random)
Initializes the key generator with the specified DSA parameters and random bit source

Parameters: params The DSA parameters to use random The random bit source to use

Throws: InvalidParameterException If the parameters passed are not valid

initialize

public void initialize(int modlen, boolean genParams, SecureRandom random)
Initializes the key generator to a give modulus. If the genParams value is true then new base, prime, and subprime values will be generated for the given modulus. If not, the pre-calculated values will be used. If no pre-calculated values exist for the specified modulus, an exception will be thrown. It is guaranteed that there will always be pre-calculated values for all modulus values between 512 and 1024 bits inclusives.

Parameters: modlen The modulus length genParams true to generate new DSA parameters, false otherwise random The random bit source to use

Throws: InvalidParameterException If a parameter is invalid