Class ECDomainParameters

java.lang.Object
org.bouncycastle.crypto.asymmetric.ECDomainParameters
Direct Known Subclasses:
ECImplicitDomainParameters, NamedECDomainParameters

public class ECDomainParameters extends Object
Container class for Elliptic Curve domain parameters.
  • Constructor Details

    • ECDomainParameters

      public ECDomainParameters(ECCurve curve, ECPoint G, 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, BigInteger n, 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, BigInteger n, 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 Details

    • 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 BigInteger getN()
      Return the order associated with these domain parameters.
      Returns:
      the domain parameters' order.
    • getH

      public BigInteger getH()
      Return the co-factor associated with these domain parameters.
      Returns:
      the domain parameters' co-factor.
    • getInverseH

      public 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(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object