Bouncy Castle Cryptography 1.32

org.bouncycastle.math.ec
Class ECPoint.Fp

java.lang.Object
  extended by org.bouncycastle.math.ec.ECPoint
      extended by org.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.bouncycastle.math.ec.ECPoint
ECPoint.F2m, ECPoint.Fp
 
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 multiply(java.math.BigInteger k)
           
 ECPoint subtract(ECPoint p2)
           
 ECPoint twice()
           
 
Methods inherited from class org.bouncycastle.math.ec.ECPoint
equals, getCurve, getX, getY, hashCode, isInfinity
 
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 p2)
Specified by:
subtract in class ECPoint

multiply

public ECPoint multiply(java.math.BigInteger k)
Specified by:
multiply in class ECPoint

Bouncy Castle Cryptography 1.32