Class EllipticCurve


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

      • 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 Detail

      • 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()