part7
Class RealPoint

java.lang.Object
  extended bypart7.ECPoint
      extended bypart7.RealPoint
All Implemented Interfaces:
java.lang.Comparable

public class RealPoint
extends ECPoint

A class used to represent a real point (x,y) on an elliptic curve.


Field Summary
 
Fields inherited from class part7.ECPoint
_c
 
Constructor Summary
RealPoint(Curve c, java.math.BigInteger x, java.math.BigInteger y)
           
 
Method Summary
 ECPoint add(ECPoint p)
          A method to add this point to the point p.
 int compareTo(java.lang.Object obj)
          A method that implements lexicographic ordering of points.
 java.math.BigInteger getX()
           
 java.math.BigInteger getY()
           
 ECPoint inverse()
          A method to return the inverse of this point.
 java.math.BigInteger log(ECPoint p)
          A method to compute the log of this point to the base b.
 java.math.BigInteger order()
          A method to return the order of this point.
 ECPoint power(java.math.BigInteger e)
          A method to raise this point to the power e.
 java.lang.String toString()
           
 
Methods inherited from class part7.ECPoint
getCurve, ord, points
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealPoint

public RealPoint(Curve c,
                 java.math.BigInteger x,
                 java.math.BigInteger y)
          throws java.lang.Exception
Throws:
java.lang.Exception - if the point (x,y) is not on the curve c.
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Description copied from class: ECPoint
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
Specified by:
compareTo in class ECPoint

toString

public java.lang.String toString()

add

public ECPoint add(ECPoint p)
            throws java.lang.Exception
Description copied from class: ECPoint
A method to add this point to the point p.

Specified by:
add in class ECPoint
Returns:
this + p
Throws:
java.lang.Exception - if the points to be added are on different curves.

power

public ECPoint power(java.math.BigInteger e)
              throws java.lang.Exception
Description copied from class: ECPoint
A method to raise this point to the power e.

Specified by:
power in class ECPoint
Returns:
thise
Throws:
java.lang.Exception

log

public java.math.BigInteger log(ECPoint p)
                         throws java.lang.Exception
Description copied from class: ECPoint
A method to compute the log of this point to the base b.
Note this method may fail to terminate.

Specified by:
log in class ECPoint
Returns:
logbthis
Throws:
java.lang.Exception

inverse

public ECPoint inverse()
                throws java.lang.Exception
Description copied from class: ECPoint
A method to return the inverse of this point.

Specified by:
inverse in class ECPoint
Returns:
this-1
Throws:
java.lang.Exception

order

public java.math.BigInteger order()
                           throws java.lang.Exception
Description copied from class: ECPoint
A method to return the order of this point.

Specified by:
order in class ECPoint
Returns:
ord(this)
Throws:
java.lang.Exception

getX

public java.math.BigInteger getX()
                          throws java.lang.Exception
Throws:
java.lang.Exception

getY

public java.math.BigInteger getY()
                          throws java.lang.Exception
Throws:
java.lang.Exception