part7
Class ECPoint

java.lang.Object
  extended bypart7.ECPoint
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
PointAtInfinity, RealPoint

public abstract class ECPoint
extends java.lang.Object
implements java.lang.Comparable

A superclass used to represent points (including the point at infinity) of an elliptic curve.
Note that objects of type ECPoint and all derived classes are immutable.


Field Summary
protected  Curve _c
           
 
Constructor Summary
ECPoint(Curve c)
          A constructor for points on the curve c.
 
Method Summary
abstract  ECPoint add(ECPoint p)
          A method to add this point to the point p.
abstract  int compareTo(java.lang.Object obj)
          A method that implements lexicographic ordering of points.
 Curve getCurve()
          A method to return the curve on which this point is located.
abstract  ECPoint inverse()
          A method to return the inverse of this point.
abstract  java.math.BigInteger log(ECPoint b)
          A method to compute the log of this point to the base b.
 java.math.BigInteger ord()
          A method to compute the order of the curve of this pint.
abstract  java.math.BigInteger order()
          A method to return the order of this point.
 java.util.AbstractSet points()
          A method to return all the points of the curve used by this point.
abstract  ECPoint power(java.math.BigInteger e)
          A method to raise this point to the power e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_c

protected Curve _c
Constructor Detail

ECPoint

public ECPoint(Curve c)
        throws java.lang.Exception
A constructor for points on the curve c.

Throws:
java.lang.Exception - if c is not an acceptable curve.
Method Detail

getCurve

public final Curve getCurve()
                     throws java.lang.Exception
A method to return the curve on which this point is located.

Throws:
java.lang.Exception

add

public abstract ECPoint add(ECPoint p)
                     throws java.lang.Exception
A method to add this point to the point p.

Returns:
this + p
Throws:
java.lang.Exception - if the points to be added are on different curves.

power

public abstract ECPoint power(java.math.BigInteger e)
                       throws java.lang.Exception
A method to raise this point to the power e.

Returns:
thise
Throws:
java.lang.Exception

log

public abstract java.math.BigInteger log(ECPoint b)
                                  throws java.lang.Exception
A method to compute the log of this point to the base b.
Note this method may fail to terminate.

Returns:
logbthis
Throws:
java.lang.Exception

inverse

public abstract ECPoint inverse()
                         throws java.lang.Exception
A method to return the inverse of this point.

Returns:
this-1
Throws:
java.lang.Exception

order

public abstract java.math.BigInteger order()
                                    throws java.lang.Exception
A method to return the order of this point.

Returns:
ord(this)
Throws:
java.lang.Exception

ord

public final java.math.BigInteger ord()
                               throws java.lang.Exception
A method to compute the order of the curve of this pint.

Throws:
java.lang.Exception

compareTo

public abstract int compareTo(java.lang.Object obj)
A method that implements lexicographic ordering of points. It is assumed that the point at infinity is less than all other points.
Required by java.language.Comparible to allow objects of type Point to be compared when added to collection types such as AbstractSte.

Specified by:
compareTo in interface java.lang.Comparable

points

public final java.util.AbstractSet points()
                                   throws java.lang.Exception
A method to return all the points of the curve used by this point.

Returns:
A set of objects of type ECPoint.
Throws:
java.lang.Exception