Top Description Fields Constructors Methods
org.bouncycastle.jcajce.spec

public Class DHDomainParameterSpec

extends DHParameterSpec
Class Inheritance
Imports
java.math.BigInteger, javax.crypto.spec.DHParameterSpec, org.bouncycastle.crypto.asymmetric.DHDomainParameters, .DHValidationParameters

Extension class for DHParameterSpec that wraps a DHDomainParameters object and provides the q domain parameter.

Field Summary

Modifier and TypeField and Description
private final BigInteger
j

private final int
m

private final BigInteger
q

private final DHValidationParameters

Constructor Summary

AccessConstructor and Description
public
DHDomainParameterSpec(DHDomainParameters
the Diffie-Hellman domain parameters to wrap.
domainParameters
)

Base constructor - use the values in an existing set of domain parameters.

public
DHDomainParameterSpec(BigInteger
the prime p defining the Galois field.
p
,
BigInteger
specifies the prime factor of p - 1
q
,
BigInteger
the generator of the multiplicative subgroup of order g.
g
)

Minimal constructor for parameters able to be used to verify a public key, or use with MQV.

public
DHDomainParameterSpec(BigInteger
the prime p defining the Galois field.
p
,
BigInteger
specifies the prime factor of p - 1
q
,
BigInteger
the generator of the multiplicative subgroup of order g.
g
,
int
the maximum bit length for the private value.
l
)

Minimal constructor for parameters able to be used to verify a public key, or use with MQV, and a private value length.

public
DHDomainParameterSpec(BigInteger
the prime p defining the Galois field.
p
,
BigInteger
specifies the prime factor of p - 1
q
,
BigInteger
the generator of the multiplicative subgroup of order g.
g
,
BigInteger
optionally specifies the value that satisfies the equation p = jq+1
j
,
int
the maximum bit length for the private value.
l
,
DHValidationParameters
parameters for validating these domain parameters.
validationParameters
)

X9.42 parameters with private value length.

public
DHDomainParameterSpec(BigInteger
the prime p defining the Galois field.
p
,
BigInteger
specifies the prime factor of p - 1
q
,
BigInteger
the generator of the multiplicative subgroup of order g.
g
,
BigInteger
optionally specifies the value that satisfies the equation p = jq+1
j
,
int
the minimum bit length for the private value.
m
,
int
the maximum bit length for the private value.
l
,
DHValidationParameters
parameters for validating these domain parameters.
validationParameters
)

Base constructor - the full domain parameter set.

Method Summary

Modifier and TypeMethod and Description
public DHDomainParameters

Returns:

the internal DHDomainParameters.
getDomainParameters
()

Return the DHDomainParameters object we represent.

public BigInteger

Returns:

the value J, null otherwise.
getJ
()

Return the J value for the domain parameter set if available.

public int

Returns:

minimum bitlength for private value.
getM
()

Return the minimum bitlength for a private value to be generated from these parameters, 0 if not set.

public BigInteger

Returns:

the value Q.
getQ
()

Return the Q value for the domain parameter set.

public DHValidationParameters

Returns:

the Diffie-Hellman validation parameters.
getValidationParameters
()

Return the validation parameters for the domain parameter set.

Inherited from javax.crypto.spec.DHParameterSpec:
getGgetLgetP

Field Detail

jback to summary
private final BigInteger j
mback to summary
private final int m
qback to summary
private final BigInteger q
validationParametersback to summary
private final DHValidationParameters validationParameters

Constructor Detail

DHDomainParameterSpecback to summary
public DHDomainParameterSpec(DHDomainParameters domainParameters)

Base constructor - use the values in an existing set of domain parameters.

Parameters
domainParameters:DHDomainParameters

the Diffie-Hellman domain parameters to wrap.

DHDomainParameterSpecback to summary
public DHDomainParameterSpec(BigInteger p, BigInteger q, BigInteger g)

Minimal constructor for parameters able to be used to verify a public key, or use with MQV.

Parameters
p:BigInteger

the prime p defining the Galois field.

q:BigInteger

specifies the prime factor of p - 1

g:BigInteger

the generator of the multiplicative subgroup of order g.

DHDomainParameterSpecback to summary
public 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.

Parameters
p:BigInteger

the prime p defining the Galois field.

q:BigInteger

specifies the prime factor of p - 1

g:BigInteger

the generator of the multiplicative subgroup of order g.

l:int

the maximum bit length for the private value.

DHDomainParameterSpecback to summary
public DHDomainParameterSpec(BigInteger p, BigInteger q, BigInteger g, BigInteger j, int l, DHValidationParameters validationParameters)

X9.42 parameters with private value length.

Parameters
p:BigInteger

the prime p defining the Galois field.

q:BigInteger

specifies the prime factor of p - 1

g:BigInteger

the generator of the multiplicative subgroup of order g.

j:BigInteger

optionally specifies the value that satisfies the equation p = jq+1

l:int

the maximum bit length for the private value.

validationParameters:DHValidationParameters

parameters for validating these domain parameters.

DHDomainParameterSpecback to summary
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:BigInteger

the prime p defining the Galois field.

q:BigInteger

specifies the prime factor of p - 1

g:BigInteger

the generator of the multiplicative subgroup of order g.

j:BigInteger

optionally specifies the value that satisfies the equation p = jq+1

m:int

the minimum bit length for the private value.

l:int

the maximum bit length for the private value.

validationParameters:DHValidationParameters

parameters for validating these domain parameters.

Method Detail

getDomainParametersback to summary
public DHDomainParameters getDomainParameters()

Return the DHDomainParameters object we represent.

Returns:DHDomainParameters

the internal DHDomainParameters.

getJback to summary
public BigInteger getJ()

Return the J value for the domain parameter set if available.

Returns:BigInteger

the value J, null otherwise.

getMback to summary
public int getM()

Return the minimum bitlength for a private value to be generated from these parameters, 0 if not set.

Returns:int

minimum bitlength for private value.

getQback to summary
public BigInteger getQ()

Return the Q value for the domain parameter set.

Returns:BigInteger

the value Q.

getValidationParametersback to summary
public DHValidationParameters getValidationParameters()

Return the validation parameters for the domain parameter set.

Returns:DHValidationParameters

the Diffie-Hellman validation parameters.