public class DSADomainParametersGenerationParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec
Modifier and Type | Field and Description |
---|---|
static int |
DIGITAL_SIGNATURE_USAGE |
static int |
KEY_ESTABLISHMENT_USAGE |
Constructor and Description |
---|
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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
int |
getCertainty() |
DigestAlgorithm |
getDigestAlgorithm() |
int |
getL() |
int |
getN() |
java.math.BigInteger |
getP() |
java.math.BigInteger |
getQ() |
byte[] |
getSeed() |
int |
getUsageIndex() |
DSADomainParametersGenerationParameterSpec |
withDigestAlgorithm(DigestAlgorithm digestAlgorithm)
Create a spec which also specifies a specific digest algorithm to use for parameters generation.
|
public static final int DIGITAL_SIGNATURE_USAGE
public static final int KEY_ESTABLISHMENT_USAGE
public DSADomainParametersGenerationParameterSpec(int L, int N, int certainty)
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.public DSADomainParametersGenerationParameterSpec(int L, int N, int certainty, int usageIndex)
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.public DSADomainParametersGenerationParameterSpec(java.math.BigInteger p, java.math.BigInteger q)
p
- the prime p.q
- the sub-prime q.public DSADomainParametersGenerationParameterSpec(java.math.BigInteger p, java.math.BigInteger q, byte[] seed, int usageIndex)
p
- the prime p.q
- the sub-prime q.seed
- the seed used to generate p and q.usageIndex
- a valid usage index.public DSADomainParametersGenerationParameterSpec withDigestAlgorithm(DigestAlgorithm digestAlgorithm)
digestAlgorithm
- the specific digest algorithm to use.public int getL()
public int getN()
public int getCertainty()
public int getUsageIndex()
public java.math.BigInteger getP()
public java.math.BigInteger getQ()
public byte[] getSeed()
public DigestAlgorithm getDigestAlgorithm()