Package org.bouncycastle.jcajce.spec
Class DHDomainParameterSpec
java.lang.Object
javax.crypto.spec.DHParameterSpec
org.bouncycastle.jcajce.spec.DHDomainParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
Extension class for DHParameterSpec that wraps a DHDomainParameters object and provides the q domain parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionMinimal constructor for parameters able to be used to verify a public key, or use with MQV.DHDomainParameterSpec
(BigInteger p, BigInteger q, BigInteger g, int l) Minimal constructor for parameters able to be used to verify a public key, or use with MQV, and a private value length.DHDomainParameterSpec
(BigInteger p, BigInteger q, BigInteger g, BigInteger j, int m, int l, DHValidationParameters validationParameters) Base constructor - the full domain parameter set.DHDomainParameterSpec
(BigInteger p, BigInteger q, BigInteger g, BigInteger j, int l, DHValidationParameters validationParameters) X9.42 parameters with private value length.DHDomainParameterSpec
(DHDomainParameters domainParameters) Base constructor - use the values in an existing set of domain parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturn the DHDomainParameters object we represent.getJ()
Return the J value for the domain parameter set if available.int
getM()
Return the minimum bitlength for a private value to be generated from these parameters, 0 if not set.getQ()
Return the Q value for the domain parameter set.Return the validation parameters for the domain parameter set.Methods inherited from class javax.crypto.spec.DHParameterSpec
getG, getL, getP
-
Constructor Details
-
DHDomainParameterSpec
Base constructor - use the values in an existing set of domain parameters.- Parameters:
domainParameters
- the Diffie-Hellman domain parameters to wrap.
-
DHDomainParameterSpec
Minimal constructor for parameters able to be used to verify a public key, or use with MQV.- Parameters:
p
- the prime p defining the Galois field.g
- the generator of the multiplicative subgroup of order g.q
- specifies the prime factor of p - 1
-
DHDomainParameterSpec
Minimal constructor for parameters able to be used to verify a public key, or use with MQV, and a private value length.- Parameters:
p
- the prime p defining the Galois field.g
- the generator of the multiplicative subgroup of order g.q
- specifies the prime factor of p - 1l
- the maximum bit length for the private value.
-
DHDomainParameterSpec
public DHDomainParameterSpec(BigInteger p, BigInteger q, BigInteger g, BigInteger j, int l, DHValidationParameters validationParameters) X9.42 parameters with private value length.- Parameters:
p
- the prime p defining the Galois field.g
- the generator of the multiplicative subgroup of order g.q
- specifies the prime factor of p - 1j
- optionally specifies the value that satisfies the equation p = jq+1l
- the maximum bit length for the private value.validationParameters
- parameters for validating these domain parameters.
-
DHDomainParameterSpec
public DHDomainParameterSpec(BigInteger p, BigInteger q, BigInteger g, BigInteger j, int m, int l, DHValidationParameters validationParameters) Base constructor - the full domain parameter set.- Parameters:
p
- the prime p defining the Galois field.g
- the generator of the multiplicative subgroup of order g.q
- specifies the prime factor of p - 1j
- optionally specifies the value that satisfies the equation p = jq+1m
- the minimum bit length for the private value.l
- the maximum bit length for the private value.validationParameters
- parameters for validating these domain parameters.
-
-
Method Details
-
getQ
Return the Q value for the domain parameter set.- Returns:
- the value Q.
-
getJ
Return the J value for the domain parameter set if available.- Returns:
- the value J, null otherwise.
-
getM
public int getM()Return the minimum bitlength for a private value to be generated from these parameters, 0 if not set.- Returns:
- minimum bitlength for private value.
-
getValidationParameters
Return the validation parameters for the domain parameter set.- Returns:
- the Diffie-Hellman validation parameters.
-
getDomainParameters
Return the DHDomainParameters object we represent.- Returns:
- the internal DHDomainParameters.
-