Class ECDomainParameters
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.ECDomainParameters
-
- Direct Known Subclasses:
ECImplicitDomainParameters
,NamedECDomainParameters
public class ECDomainParameters extends java.lang.Object
Container class for Elliptic Curve domain parameters.
-
-
Constructor Summary
Constructors Constructor Description ECDomainParameters(ECCurve curve, ECPoint G, java.math.BigInteger n)
Constructor that assumes the co-factor h is 1.ECDomainParameters(ECCurve curve, ECPoint G, java.math.BigInteger n, java.math.BigInteger h)
Constructor with explicit co-factor.ECDomainParameters(ECCurve curve, ECPoint G, java.math.BigInteger n, java.math.BigInteger h, byte[] seed)
Constructor with explicit co-factor and generation seed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
ECCurve
getCurve()
Return the curve associated with these domain parameters.ECPoint
getG()
Return the base point associated with these domain parameters.java.math.BigInteger
getH()
Return the co-factor associated with these domain parameters.java.math.BigInteger
getInverseH()
Return the multiplicative inverse of H over the order N.java.math.BigInteger
getN()
Return the order associated with these domain parameters.byte[]
getSeed()
Return the generation seed associated with these domain parameters.int
hashCode()
-
-
-
Constructor Detail
-
ECDomainParameters
public ECDomainParameters(ECCurve curve, ECPoint G, java.math.BigInteger n)
Constructor that assumes the co-factor h is 1.- Parameters:
curve
- the curve for these domain parameters.G
- the base point G for the domain parameters.n
- the order for the domain parameters.
-
ECDomainParameters
public ECDomainParameters(ECCurve curve, ECPoint G, java.math.BigInteger n, java.math.BigInteger h)
Constructor with explicit co-factor.- Parameters:
curve
- the curve for these domain parameters.G
- the base point G for the domain parameters.n
- the order for the domain parameters.h
- the co-factor.
-
ECDomainParameters
public ECDomainParameters(ECCurve curve, ECPoint G, java.math.BigInteger n, java.math.BigInteger h, byte[] seed)
Constructor with explicit co-factor and generation seed.- Parameters:
curve
- the curve for these domain parameters.G
- the base point G for the domain parameters.n
- the order for the domain parameters.h
- the co-factor.seed
- the seed value used to generate the domain parameters.
-
-
Method Detail
-
getCurve
public ECCurve getCurve()
Return the curve associated with these domain parameters.- Returns:
- the domain parameters' curve.
-
getG
public ECPoint getG()
Return the base point associated with these domain parameters.- Returns:
- the domain parameters' base point.
-
getN
public java.math.BigInteger getN()
Return the order associated with these domain parameters.- Returns:
- the domain parameters' order.
-
getH
public java.math.BigInteger getH()
Return the co-factor associated with these domain parameters.- Returns:
- the domain parameters' co-factor.
-
getInverseH
public java.math.BigInteger getInverseH()
Return the multiplicative inverse of H over the order N.- Returns:
- inverse of H.
-
getSeed
public byte[] getSeed()
Return the generation seed associated with these domain parameters.- Returns:
- the domain parameters' seed.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-