Package org.gudy.bouncycastle.math.ec
Class ECPoint.F2m
- java.lang.Object
-
- org.gudy.bouncycastle.math.ec.ECPoint
-
- org.gudy.bouncycastle.math.ec.ECPoint.F2m
-
-
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
curve, multiplier, preCompInfo, withCompression, x, y
-
-
Constructor Summary
Constructors Constructor Description F2m(ECCurve curve)
Deprecated.use ECCurve.getInfinity() Constructor for point at infinityF2m(ECCurve curve, ECFieldElement x, ECFieldElement y)
F2m(ECCurve curve, ECFieldElement x, ECFieldElement y, boolean withCompression)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ECPoint
add(ECPoint b)
ECPoint.F2m
addSimple(ECPoint.F2m b)
Adds anotherECPoints.F2m
tothis
without checking if both points are on the same curve.private static void
checkPoints(ECPoint a, ECPoint b)
Check, if twoECPoint
s can be added or subtracted.byte[]
getEncoded(boolean ignore)
ECPoint
negate()
ECPoint
subtract(ECPoint b)
ECPoint.F2m
subtractSimple(ECPoint.F2m b)
Subtracts anotherECPoints.F2m
fromthis
without checking if both points are on the same curve.ECPoint
twice()
-
Methods inherited from class org.gudy.bouncycastle.math.ec.ECPoint
assertECMultiplier, equals, getCurve, getX, getY, hashCode, isCompressed, isInfinity, multiply, setPreCompInfo
-
-
-
-
Constructor Detail
-
F2m
public F2m(ECCurve curve, ECFieldElement x, ECFieldElement y)
- Parameters:
curve
- base curvex
- x pointy
- y point
-
F2m
public F2m(ECCurve curve, ECFieldElement x, ECFieldElement y, boolean withCompression)
- Parameters:
curve
- base curvex
- x pointy
- y pointwithCompression
- true if encode with point compression.
-
F2m
public F2m(ECCurve curve)
Deprecated.use ECCurve.getInfinity() Constructor for point at infinity
-
-
Method Detail
-
getEncoded
public byte[] getEncoded(boolean ignore)
- Specified by:
getEncoded
in classECPoint
-
checkPoints
private static void checkPoints(ECPoint a, ECPoint b)
Check, if twoECPoint
s can be added or subtracted.- Parameters:
a
- The firstECPoint
to check.b
- The secondECPoint
to check.- Throws:
java.lang.IllegalArgumentException
- ifa
andb
cannot be added.
-
addSimple
public ECPoint.F2m addSimple(ECPoint.F2m b)
Adds anotherECPoints.F2m
tothis
without checking if both points are on the same curve. Used by multiplication algorithms, because there all points are a multiple of the same point and hence the checks can be omitted.- Parameters:
b
- The otherECPoints.F2m
to add tothis
.- Returns:
this + b
-
subtractSimple
public ECPoint.F2m subtractSimple(ECPoint.F2m b)
Subtracts anotherECPoints.F2m
fromthis
without checking if both points are on the same curve. Used by multiplication algorithms, because there all points are a multiple of the same point and hence the checks can be omitted.- Parameters:
b
- The otherECPoints.F2m
to subtract fromthis
.- Returns:
this - b
-
-