Package org.bouncycastle.jcajce.spec
Class DSADomainParametersGenerationParameterSpec
java.lang.Object
org.bouncycastle.jcajce.spec.DSADomainParametersGenerationParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
public class DSADomainParametersGenerationParameterSpec
extends Object
implements AlgorithmParameterSpec
Parameter spec for guiding the generation of DSA Domain Parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDSADomainParametersGenerationParameterSpec
(int L, int N, int certainty) Construct without a usage index, this will do a random construction of G.DSADomainParametersGenerationParameterSpec
(int L, int N, int certainty, int usageIndex) Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.Construct using a specific value of p and q - this will do a random construction of g.DSADomainParametersGenerationParameterSpec
(BigInteger p, BigInteger q, byte[] seed, int usageIndex) Construct using a specific value of p and q, but with a seed and usageIndex as well - this has the effect of using verifiable canonical generation of G. -
Method Summary
Modifier and TypeMethodDescriptionint
int
getL()
int
getN()
getP()
getQ()
byte[]
getSeed()
int
withDigestAlgorithm
(DigestAlgorithm digestAlgorithm) Create a spec which also specifies a specific digest algorithm to use for parameters generation.
-
Field Details
-
DIGITAL_SIGNATURE_USAGE
public static final int DIGITAL_SIGNATURE_USAGE- See Also:
-
KEY_ESTABLISHMENT_USAGE
public static final int KEY_ESTABLISHMENT_USAGE- See Also:
-
-
Constructor Details
-
DSADomainParametersGenerationParameterSpec
public DSADomainParametersGenerationParameterSpec(int L, int N, int certainty) Construct without a usage index, this will do a random construction of G.- Parameters:
L
- desired length of prime P in bits (the effective key size).N
- desired length of prime Q in bits.certainty
- certainty level for prime number generation.
-
DSADomainParametersGenerationParameterSpec
public DSADomainParametersGenerationParameterSpec(int L, int N, int certainty, int usageIndex) Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.- Parameters:
L
- desired length of prime P in bits (the effective key size).N
- desired length of prime Q in bits.certainty
- certainty level for prime number generation.usageIndex
- a valid usage index.
-
DSADomainParametersGenerationParameterSpec
Construct using a specific value of p and q - this will do a random construction of g.- Parameters:
p
- the prime p.q
- the sub-prime q.
-
DSADomainParametersGenerationParameterSpec
public DSADomainParametersGenerationParameterSpec(BigInteger p, BigInteger q, byte[] seed, int usageIndex) Construct using a specific value of p and q, but with a seed and usageIndex as well - this has the effect of using verifiable canonical generation of G.- Parameters:
p
- the prime p.q
- the sub-prime q.seed
- the seed used to generate p and q.usageIndex
- a valid usage index.
-
-
Method Details
-
withDigestAlgorithm
public DSADomainParametersGenerationParameterSpec withDigestAlgorithm(DigestAlgorithm digestAlgorithm) Create a spec which also specifies a specific digest algorithm to use for parameters generation.- Parameters:
digestAlgorithm
- the specific digest algorithm to use.- Returns:
- a new parameters generator spec.
-
getL
public int getL() -
getN
public int getN() -
getCertainty
public int getCertainty() -
getUsageIndex
public int getUsageIndex() -
getP
-
getQ
-
getSeed
public byte[] getSeed() -
getDigestAlgorithm
-