Class DSAParametersGenerator
java.lang.Object
org.bouncycastle.crypto.generators.DSAParametersGenerator
Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwhich generates the p and g values from the given parameters, returning the DSAParameters object.void
init
(int size, int certainty, SecureRandom random) initialise the key generator.void
init
(DSAParameterGenerationParameters params) Initialise the key generator for DSA 2.
-
Constructor Details
-
DSAParametersGenerator
public DSAParametersGenerator() -
DSAParametersGenerator
-
-
Method Details
-
init
initialise the key generator.- Parameters:
size
- size of the key (range 2^512 -> 2^1024 - 64 bit increments)certainty
- measure of robustness of prime (for FIPS 186-2 compliance this should be at least 80).random
- random byte source.
-
init
Initialise the key generator for DSA 2.Use this init method if you need to generate parameters for DSA 2 keys.
- Parameters:
params
- DSA 2 key generation parameters.
-
generateParameters
which generates the p and g values from the given parameters, returning the DSAParameters object.Note: can take a while...
- Returns:
- a generated DSA parameters object.
-