org.gudy.bouncycastle.math.ec
Class ECPoint

java.lang.Object
  extended by org.gudy.bouncycastle.math.ec.ECPoint
Direct Known Subclasses:
ECPoint.F2m, ECPoint.Fp

public abstract class ECPoint
extends Object

base class for points on elliptic curves.


Nested Class Summary
static class ECPoint.F2m
          Elliptic curve points over F2m
static class ECPoint.Fp
          Elliptic curve points over Fp
 
Field Summary
protected  org.gudy.bouncycastle.math.ec.ECMultiplier multiplier
           
protected  org.gudy.bouncycastle.math.ec.PreCompInfo preCompInfo
           
protected  boolean withCompression
           
 
Constructor Summary
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
           
 
Method Summary
abstract  ECPoint add(ECPoint b)
           
 boolean equals(Object other)
           
 ECCurve getCurve()
           
abstract  byte[] getEncoded()
           
 ECFieldElement getX()
           
 ECFieldElement getY()
           
 int hashCode()
           
 boolean isCompressed()
           
 boolean isInfinity()
           
 ECPoint multiply(BigInteger k)
          Multiplies this ECPoint by the given number.
abstract  ECPoint negate()
           
abstract  ECPoint subtract(ECPoint b)
           
abstract  ECPoint twice()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

withCompression

protected boolean withCompression

multiplier

protected org.gudy.bouncycastle.math.ec.ECMultiplier multiplier

preCompInfo

protected org.gudy.bouncycastle.math.ec.PreCompInfo preCompInfo
Constructor Detail

ECPoint

protected ECPoint(ECCurve curve,
                  ECFieldElement x,
                  ECFieldElement y)
Method Detail

getCurve

public ECCurve getCurve()

getX

public ECFieldElement getX()

getY

public ECFieldElement getY()

isInfinity

public boolean isInfinity()

isCompressed

public boolean isCompressed()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getEncoded

public abstract byte[] getEncoded()

add

public abstract ECPoint add(ECPoint b)

subtract

public abstract ECPoint subtract(ECPoint b)

negate

public abstract ECPoint negate()

twice

public abstract ECPoint twice()

multiply

public ECPoint multiply(BigInteger k)
Multiplies this ECPoint by the given number.

Parameters:
k - The multiplicator.
Returns:
k * this.