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
- Enclosing class:
- ECPoint
Elliptic curve points over 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
ConstructorsConstructorDescriptionDeprecated.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
Modifier and TypeMethodDescriptionAdds 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) negate()
Subtracts anotherECPoints.F2m
fromthis
without checking if both points are on the same curve.twice()
Methods inherited from class org.gudy.bouncycastle.math.ec.ECPoint
assertECMultiplier, equals, getCurve, getX, getY, hashCode, isCompressed, isInfinity, multiply, setPreCompInfo
-
Constructor Details
-
F2m
- Parameters:
curve
- base curvex
- x pointy
- y point
-
F2m
- Parameters:
curve
- base curvex
- x pointy
- y pointwithCompression
- true if encode with point compression.
-
F2m
Deprecated.use ECCurve.getInfinity() Constructor for point at infinity
-
-
Method Details
-
getEncoded
public byte[] getEncoded(boolean ignore) - Specified by:
getEncoded
in classECPoint
-
checkPoints
Check, if twoECPoint
s can be added or subtracted.- Parameters:
a
- The firstECPoint
to check.b
- The secondECPoint
to check.- Throws:
IllegalArgumentException
- ifa
andb
cannot be added.
-
add
-
addSimple
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
-
subtract
-
subtractSimple
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
-
twice
-
negate
-