public class DomainParameters extends ASN1Object
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 }
Constructor and Description |
---|
DomainParameters(BigInteger p,
BigInteger g,
BigInteger q,
BigInteger j,
ValidationParams validationParams)
Base constructor - the full domain parameter set.
|
Modifier and Type | Method and Description |
---|---|
BigInteger |
getG()
Return the generator of the multiplicative subgroup of order g.
|
static DomainParameters |
getInstance(ASN1TaggedObject obj,
boolean explicit)
Return a DomainParameters object from the passed in tagged object.
|
static DomainParameters |
getInstance(Object obj)
Return a DomainParameters object from the passed in object.
|
BigInteger |
getJ()
Return the value that satisfies the equation p = jq+1 (if present).
|
BigInteger |
getP()
Return the prime p defining the Galois field.
|
BigInteger |
getQ()
Return q, the prime factor of p - 1
|
ValidationParams |
getValidationParams()
Return the validation parameters for this set (if present).
|
ASN1Primitive |
toASN1Primitive()
Return an ASN.1 primitive representation of this object.
|
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
public DomainParameters(BigInteger p, BigInteger g, BigInteger q, BigInteger j, ValidationParams validationParams)
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+1validationParams
- parameters for validating these domain parameters.public static DomainParameters getInstance(ASN1TaggedObject obj, boolean explicit)
obj
- a tagged object.explicit
- true if the contents of the object is explictly tagged, false otherwise.public static DomainParameters getInstance(Object obj)
obj
- an object for conversion or a byte[].public BigInteger getP()
public BigInteger getG()
public BigInteger getQ()
public BigInteger getJ()
public ValidationParams getValidationParams()
public ASN1Primitive toASN1Primitive()
toASN1Primitive
in interface ASN1Encodable
toASN1Primitive
in class ASN1Object
Copyright © 2020 BouncyCastle.org. All rights reserved.