org.bouncycastle.math.ec

Class 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

Fp(ECCurve curve, ECFieldElement x, ECFieldElement y)
Create a point which encodes with point compression.
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(BigInteger k)
ECPoint
subtract(ECPoint p2)
ECPoint
twice()

Methods inherited from class org.bouncycastle.math.ec.ECPoint

add, equals, getCurve, getEncoded, getX, getY, multiply, subtract, twice

Constructor Details

Fp

public 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


Fp

public 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 Details

add

public ECPoint add(ECPoint b)
Overrides:
add in interface ECPoint


getEncoded

public byte[] getEncoded()
return the field element encoded with point compression. (S 4.3.6)
Overrides:
getEncoded in interface ECPoint


multiply

public ECPoint multiply(BigInteger k)
Overrides:
multiply in interface ECPoint


subtract

public ECPoint subtract(ECPoint p2)
Overrides:
subtract in interface ECPoint


twice

public ECPoint twice()
Overrides:
twice in interface ECPoint