Package org.bouncycastle.jcajce.spec
Class DSADomainParametersGenerationParameterSpec
- java.lang.Object
-
- org.bouncycastle.jcajce.spec.DSADomainParametersGenerationParameterSpec
-
- All Implemented Interfaces:
java.security.spec.AlgorithmParameterSpec
public class DSADomainParametersGenerationParameterSpec extends java.lang.Object implements java.security.spec.AlgorithmParameterSpecParameter spec for guiding the generation of DSA Domain Parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static intDIGITAL_SIGNATURE_USAGEstatic intKEY_ESTABLISHMENT_USAGE
-
Constructor Summary
Constructors Constructor Description DSADomainParametersGenerationParameterSpec(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.DSADomainParametersGenerationParameterSpec(java.math.BigInteger p, java.math.BigInteger q)Construct using a specific value of p and q - this will do a random construction of g.DSADomainParametersGenerationParameterSpec(java.math.BigInteger p, java.math.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCertainty()DigestAlgorithmgetDigestAlgorithm()intgetL()intgetN()java.math.BigIntegergetP()java.math.BigIntegergetQ()byte[]getSeed()intgetUsageIndex()DSADomainParametersGenerationParameterSpecwithDigestAlgorithm(DigestAlgorithm digestAlgorithm)Create a spec which also specifies a specific digest algorithm to use for parameters generation.
-
-
-
Field Detail
-
DIGITAL_SIGNATURE_USAGE
public static final int DIGITAL_SIGNATURE_USAGE
- See Also:
- Constant Field Values
-
KEY_ESTABLISHMENT_USAGE
public static final int KEY_ESTABLISHMENT_USAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
public DSADomainParametersGenerationParameterSpec(java.math.BigInteger p, java.math.BigInteger q)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(java.math.BigInteger p, java.math.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 Detail
-
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
public java.math.BigInteger getP()
-
getQ
public java.math.BigInteger getQ()
-
getSeed
public byte[] getSeed()
-
getDigestAlgorithm
public DigestAlgorithm getDigestAlgorithm()
-
-