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 ECPoint
ECPoint.F2m, ECPoint.Fp -
Field Summary
Fields inherited from class 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.F2mtothiswithout checking if both points are on the same curve.private static voidcheckPoints(ECPoint a, ECPoint b) Check, if twoECPoints can be added or subtracted.byte[]getEncoded(boolean ignore) negate()Subtracts anotherECPoints.F2mfromthiswithout checking if both points are on the same curve.twice()Methods inherited from class 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:
getEncodedin classECPoint
-
checkPoints
Check, if twoECPoints can be added or subtracted.- Parameters:
a- The firstECPointto check.b- The secondECPointto check.- Throws:
IllegalArgumentException- ifaandbcannot be added.
-
add
-
addSimple
Adds anotherECPoints.F2mtothiswithout 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.F2mto add tothis.- Returns:
this + b
-
subtract
-
subtractSimple
Subtracts anotherECPoints.F2mfromthiswithout 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.F2mto subtract fromthis.- Returns:
this - b
-
twice
-
negate
-