Class EllipticCurve

java.lang.Object
java.security.spec.EllipticCurve

public class EllipticCurve
extends Object
An Elliptic Curve with its necessary values.
  • Constructor Details

    • EllipticCurve

      public EllipticCurve​(ECField field, BigInteger a, BigInteger b, byte[] seed)
      Creates a new EllipticCurve with the specified field, coefficients and seed.
      Parameters:
      field - the finite field of this elliptic curve.
      a - the coefficient a.
      b - the coefficient b.
      seed - the seed used for the generation of the curve.
      Throws:
      IllegalArgumentException - if the specified coefficients are not in the specified field.
    • EllipticCurve

      public EllipticCurve​(ECField field, BigInteger a, BigInteger b)
      Creates a new EllipticCurve with the specified field and coefficients.
      Parameters:
      field - the finite field of this elliptic curve.
      a - the coefficient a.
      b - the coefficient b.
      Throws:
      IllegalArgumentException - if the specified coefficients are not in the specified field.
  • Method Details

    • getA

      public BigInteger getA()
      Returns the coefficient a of this elliptic curve.
      Returns:
      the coefficient a of this elliptic curve.
    • getB

      public BigInteger getB()
      Returns the coefficient b of this elliptic curve.
      Returns:
      the coefficient b of this elliptic curve.
    • getField

      public ECField getField()
      Returns the finite field of this elliptic curve.
      Returns:
      the finite field of this elliptic curve.
    • getSeed

      public byte[] getSeed()
      Returns a copy of the seed that was used to generate this elliptic curve.
      Returns:
      a copy of the seed that was used to generate this elliptic curve, or null if none specified.
    • equals

      public boolean equals​(Object other)
      Returns whether the specified object equals to this elliptic curve.
      Overrides:
      equals in class Object
      Parameters:
      other - the object to compare.
      Returns:
      true if the specified object is equal to this elliptic curve, otherwise false.
      See Also:
      Object.hashCode()
    • hashCode

      public int hashCode()
      Returns the hashcode of this elliptic curve.
      Overrides:
      hashCode in class Object
      Returns:
      the hashcode of this elliptic curve.
      See Also:
      Object.equals(java.lang.Object)