Top Description Fields Constructors Methods
org.bouncycastle.asn1.x9

public Class DomainParameters

extends ASN1Object
Class Inheritance
Imports
java.math.BigInteger, java.util.Enumeration, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERSequence

X9.44 Diffie-Hellman domain parameters.
   DomainParameters ::= SEQUENCE {
      p                INTEGER,           -- odd prime, p=jq +1
      g                INTEGER,           -- generator, g
      q                INTEGER,           -- factor of p-1
      j                INTEGER OPTIONAL,  -- subgroup factor, j >= 2
      validationParams  ValidationParams OPTIONAL
   }

Field Summary

Modifier and TypeField and Description
private final ASN1Integer
g

private final ASN1Integer
j

private final ASN1Integer
p

private final ASN1Integer
q

private final ValidationParams

Constructor Summary

AccessConstructor and Description
public
DomainParameters(BigInteger
the prime p defining the Galois field.
p
,
BigInteger
the generator of the multiplicative subgroup of order g.
g
,
BigInteger
specifies the prime factor of p - 1
q
,
BigInteger
optionally specifies the value that satisfies the equation p = jq+1
j
,
ValidationParams
parameters for validating these domain parameters.
validationParams
)

Base constructor - the full domain parameter set.

private

Method Summary

Modifier and TypeMethod and Description
public BigInteger

Returns:

the generator g.
getG
()

Return the generator of the multiplicative subgroup of order g.

public static DomainParameters

Returns:

a DomainParameters
getInstance
(ASN1TaggedObject
a tagged object.
obj
,
boolean
true if the contents of the object is explictly tagged, false otherwise.
explicit
)

Return a DomainParameters object from the passed in tagged object.

public static DomainParameters

Returns:

a DomainParameters
getInstance
(Object
an object for conversion or a byte[].
obj
)

Return a DomainParameters object from the passed in object.

public BigInteger

Returns:

j value or null.
getJ
()

Return the value that satisfies the equation p = jq+1 (if present).

private static ASN1Encodable
public BigInteger

Returns:

the prime p.
getP
()

Return the prime p defining the Galois field.

public BigInteger

Returns:

q value
getQ
()

Return q, the prime factor of p - 1

public ValidationParams

Returns:

validation parameters, or null if absent.
getValidationParams
()

Return the validation parameters for this set (if present).

public ASN1Primitive

Returns:

a DERSequence containing the parameter values.
toASN1Primitive
()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Return an ASN.1 primitive representation of this object.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

gback to summary
private final ASN1Integer g
jback to summary
private final ASN1Integer j
pback to summary
private final ASN1Integer p
qback to summary
private final ASN1Integer q
validationParamsback to summary
private final ValidationParams validationParams

Constructor Detail

DomainParametersback to summary
public DomainParameters(BigInteger p, BigInteger g, BigInteger q, BigInteger j, ValidationParams validationParams)

Base constructor - the full domain parameter set.

Parameters
p:BigInteger

the prime p defining the Galois field.

g:BigInteger

the generator of the multiplicative subgroup of order g.

q:BigInteger

specifies the prime factor of p - 1

j:BigInteger

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

validationParams:ValidationParams

parameters for validating these domain parameters.

DomainParametersback to summary
private DomainParameters(ASN1Sequence seq)

Method Detail

getGback to summary
public BigInteger getG()

Return the generator of the multiplicative subgroup of order g.

Returns:BigInteger

the generator g.

getInstanceback to summary
public static DomainParameters getInstance(ASN1TaggedObject obj, boolean explicit)

Return a DomainParameters object from the passed in tagged object.

Parameters
obj:ASN1TaggedObject

a tagged object.

explicit:boolean

true if the contents of the object is explictly tagged, false otherwise.

Returns:DomainParameters

a DomainParameters

getInstanceback to summary
public static DomainParameters getInstance(Object obj)

Return a DomainParameters object from the passed in object.

Parameters
obj:Object

an object for conversion or a byte[].

Returns:DomainParameters

a DomainParameters

getJback to summary
public BigInteger getJ()

Return the value that satisfies the equation p = jq+1 (if present).

Returns:BigInteger

j value or null.

getNextback to summary
private static ASN1Encodable getNext(Enumeration<E> e)
getPback to summary
public BigInteger getP()

Return the prime p defining the Galois field.

Returns:BigInteger

the prime p.

getQback to summary
public BigInteger getQ()

Return q, the prime factor of p - 1

Returns:BigInteger

q value

getValidationParamsback to summary
public ValidationParams getValidationParams()

Return the validation parameters for this set (if present).

Returns:ValidationParams

validation parameters, or null if absent.

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Return an ASN.1 primitive representation of this object.

Returns:ASN1Primitive

a DERSequence containing the parameter values.