IAIK ECC
version 2.18

iaik.security.ecc.math.ecgroup
Interface EllipticCurve


public interface EllipticCurve

Abstract representation of the additive group defined over elliptic curves. That means this interface encapsulates the parameters "a" and "b" of an elliptic curve and defines the group operation. The two parameters a and b are both elements of the undelying finite field. The group operation (point addition) is different for affine/projective coordinates and for prime / binary fields. Use the ECGroupFactory to get a concrete implementation.


Method Summary
 void addPoint(ECPoint a, ECPoint b)
          Computes a += b.
 void doublePoint(ECPoint a)
          Doubles the specified point.
 FieldElement getA()
           
 FieldElement getB()
           
 Field getField()
           
 java.math.BigInteger getOrder()
          The order of the group
 void invert(ECPoint a)
          Inverts (negates) the specified point on the curve.
 boolean isPrecomputationEnabled()
          Returns true if points can be precomputed to speed up operations on this curve.
 void multiply(ECPoint a, java.math.BigInteger val)
          Scalar multiplication of a point and an integer a *= val.
 void multiply2(ECPoint a, java.math.BigInteger valA, ECPoint b, java.math.BigInteger valB)
          Simultaneous multiplication of 2 points, as it is used in ECDSA signature verifcation.
 ECPoint newInfinityPoint()
          Creates the point at infinity.
 ECPoint newPoint(Coordinate c)
          Creates a new point with the specified coordinates.
 iaik.asn1.ASN1Object toASN1Object()
          Converts a curve to the following ASN.1 structure: Curve ::= SEQUENCE { a FieldElement, -- Elliptic curve coefficient a b FieldElement, -- Elliptic curve coefficient b seed BIT STRING OPTIONAL -- !!
 java.lang.String toString()
          Converts the elliptic curve into a human readable form.
 boolean useAffine()
          Subclasses indicate whether they use affine or projective coordinates.
 

Method Detail

addPoint

public void addPoint(ECPoint a,
                     ECPoint b)
Computes a += b. The points must be elements of the group (must lie on the curve). Subclasses needn't check this.

Parameters:
a - the point a, to which b will be added
b - the point b, which is added to a.

doublePoint

public void doublePoint(ECPoint a)
Doubles the specified point. The point must be element of the group (must lie on the curve). Subclasses needn't check this.

Parameters:
a - the point on this curve

getA

public FieldElement getA()
Returns:
the curve parameter a

getB

public FieldElement getB()
Returns:
the curve parameter b

getField

public Field getField()
Returns:
the underlying finite field.

getOrder

public java.math.BigInteger getOrder()
The order of the group

Returns:
the order or null if the order is unknown.

invert

public void invert(ECPoint a)
Inverts (negates) the specified point on the curve.

Parameters:
a - the point to be inverted.

isPrecomputationEnabled

public boolean isPrecomputationEnabled()
Returns true if points can be precomputed to speed up operations on this curve.

Returns:
true if points can be precomputed

multiply

public void multiply(ECPoint a,
                     java.math.BigInteger val)
Scalar multiplication of a point and an integer a *= val.

Parameters:
a - the point and result
val - the factor

multiply2

public void multiply2(ECPoint a,
                      java.math.BigInteger valA,
                      ECPoint b,
                      java.math.BigInteger valB)
Simultaneous multiplication of 2 points, as it is used in ECDSA signature verifcation. Since this can be done more more efficient than 2 single multiplications it is defined here. Both points must be elements of the same ec.

Parameters:
a - the point and result of the first multiplication
valA - the factor to compute a = a * valA
b - the point and result of the second multiplication
valB - the factor to compute b = b * valB

newInfinityPoint

public ECPoint newInfinityPoint()
Creates the point at infinity.

Returns:
the point.

newPoint

public ECPoint newPoint(Coordinate c)
Creates a new point with the specified coordinates. Make sure that this point indeed lies on the curve.

If the coordinates are of the wrong type (e.g. projective over an elliptic curve group using affine coordinates) they will be converted.

Parameters:
c - the coordinates.
Returns:
the point on the elliptic curve.

toASN1Object

public iaik.asn1.ASN1Object toASN1Object()
Converts a curve to the following ASN.1 structure: Curve ::= SEQUENCE { a FieldElement, -- Elliptic curve coefficient a b FieldElement, -- Elliptic curve coefficient b seed BIT STRING OPTIONAL -- !! NOT SPECIFIED !! }

Returns:
the ASN.1 structure.

toString

public java.lang.String toString()
Converts the elliptic curve into a human readable form.

Returns:
the field elements and curve parameters a and b.

useAffine

public boolean useAffine()
Subclasses indicate whether they use affine or projective coordinates.

Returns:
true if the used coordinates are affine.

IAIK ECC
version 2.18

IAIK-ECC 2.18, (c) 2002 IAIK, (c) 2003 SIC