de.flexiprovider.common.math.ellipticcurves
Class EllipticCurve
java.lang.Object
|
+--de.flexiprovider.common.math.ellipticcurves.EllipticCurve
- Direct Known Subclasses:
- EllipticCurveGF2n, EllipticCurveGFP
- public abstract class EllipticCurve
- extends java.lang.Object
This class is the top-interface for elliptic curves over finite fields.
Implemented are those over prime fields GF(p) (EllipticCurveGFP)
as well as over characteristic 2 fields GF(2n)) (EllipticCurveGF2n).
This class stores the size of the underlying field as a FlexiBigInt
mQ = p or mQ = 2n. The curve parameters
a and b are stored as instances of GFElement.
- Author:
- Birgit Henhapl, Martin Döring
- See Also:
EllipticCurveGFP,
EllipticCurveGF2n,
GFElement
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
mQ
protected FlexiBigInt mQ
- size of the underlying field
mA
protected GFElement mA
- curve parameter a
mB
protected GFElement mB
- curve parameter b
EllipticCurve
protected EllipticCurve(GFElement a,
GFElement b,
FlexiBigInt q)
- Construct an elliptic curve E with the specified parameters.
- Parameters:
a - curve parameter ab - curve parameter bq - size of the underlying field- See Also:
GFElement
getQ
public FlexiBigInt getQ()
- Returns the size of underlying field p.
- Returns:
- characteristic of underlying field p
getA
public GFElement getA()
- Returns:
- a copy of the elliptic curve parameter a
getB
public GFElement getB()
- Returns:
- a copy of the elliptic curve parameter b
equals
public boolean equals(java.lang.Object other)
- Compare this curve with another object.
- Overrides:
equals in class java.lang.Object
- Parameters:
other - the other object- Returns:
- the result of the comparison
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
- Returns:
- the hash code of this curve
toString
public abstract java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- a human readable form of this elliptic curve