org.gudy.bouncycastle.math.ec
Class ECPoint.Fp

java.lang.Object
  extended by org.gudy.bouncycastle.math.ec.ECPoint
      extended by org.gudy.bouncycastle.math.ec.ECPoint.Fp
Enclosing class:
ECPoint

public static class ECPoint.Fp
extends ECPoint

Elliptic curve points over Fp


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gudy.bouncycastle.math.ec.ECPoint
ECPoint.F2m, ECPoint.Fp
 
Field Summary
 
Fields inherited from class org.gudy.bouncycastle.math.ec.ECPoint
multiplier, preCompInfo, withCompression
 
Constructor Summary
ECPoint.Fp(ECCurve curve, ECFieldElement x, ECFieldElement y)
          Create a point which encodes with point compression.
ECPoint.Fp(ECCurve curve, ECFieldElement x, ECFieldElement y, boolean withCompression)
          Create a point that encodes with or without point compresion.
 
Method Summary
 ECPoint add(ECPoint b)
           
 byte[] getEncoded()
          return the field element encoded with point compression.
 ECPoint negate()
           
 ECPoint subtract(ECPoint b)
           
 ECPoint twice()
           
 
Methods inherited from class org.gudy.bouncycastle.math.ec.ECPoint
equals, getCurve, getX, getY, hashCode, isCompressed, isInfinity, multiply
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECPoint.Fp

public ECPoint.Fp(ECCurve curve,
                  ECFieldElement x,
                  ECFieldElement y)
Create a point which encodes with point compression.

Parameters:
curve - the curve to use
x - affine x co-ordinate
y - affine y co-ordinate

ECPoint.Fp

public ECPoint.Fp(ECCurve curve,
                  ECFieldElement x,
                  ECFieldElement y,
                  boolean withCompression)
Create a point that encodes with or without point compresion.

Parameters:
curve - the curve to use
x - affine x co-ordinate
y - affine y co-ordinate
withCompression - if true encode with point compression
Method Detail

getEncoded

public byte[] getEncoded()
return the field element encoded with point compression. (S 4.3.6)

Specified by:
getEncoded in class ECPoint

add

public ECPoint add(ECPoint b)
Specified by:
add in class ECPoint

twice

public ECPoint twice()
Specified by:
twice in class ECPoint

subtract

public ECPoint subtract(ECPoint b)
Specified by:
subtract in class ECPoint

negate

public ECPoint negate()
Specified by:
negate in class ECPoint