Class SM9P256V1Point
java.lang.Object
org.bouncycastle.math.ec.ECPoint
org.bouncycastle.math.ec.ECPoint.AbstractFp
org.bouncycastle.math.ec.custom.gm.SM9P256V1Point
Jacobian-coordinate point of the SM9 G1 curve y^2 = x^3 + 5 (a = 0) over
SM9P256V1Field.
The group law is the standard a=0 Jacobian addition (add-2007-bl) and doubling
(dbl-2009-l), written in terms of the ECFieldElement operations so it is
correct over the Montgomery-form field. (It does not use the Solinas-specific
int[]-level fused reductions that SM2P256V1Point relies on, which are
not valid for a Montgomery representation.)
-
Nested Class Summary
Nested classes/interfaces inherited from class ECPoint
ECPoint.AbstractF2m, ECPoint.AbstractFp, ECPoint.F2m, ECPoint.Fp -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ECPointdetach()voidencodeTo(boolean compressed, byte[] buf, int off) Only the uncompressed encoding is written.intgetEncodedLength(boolean compressed) The compressed length is refused, asencodeTo(boolean, byte[], int)refuses the compressed encoding itself.negate()twice()Methods inherited from class ECPoint.AbstractFp
getCompressionYTilde, satisfiesCurveEquation, subtractMethods inherited from class ECPoint
checkNormalized, createScaledPoint, equals, equals, getAffineXCoord, getAffineYCoord, getCurve, getCurveCoordinateSystem, getDetachedPoint, getEncoded, getInitialZCoords, getRawXCoord, getRawYCoord, getRawZCoords, getXCoord, getYCoord, getZCoord, getZCoords, hashCode, isInfinity, isNormalized, isValid, multiply, normalize, satisfiesOrder, scaleX, scaleXNegateY, scaleY, scaleYNegateX, timesPow2, toString
-
Method Details
-
detach
-
getEncodedLength
public int getEncodedLength(boolean compressed) The compressed length is refused, asencodeTo(boolean, byte[], int)refuses the compressed encoding itself.- Overrides:
getEncodedLengthin classECPoint
-
encodeTo
public void encodeTo(boolean compressed, byte[] buf, int off) Only the uncompressed encoding is written. The SM9 G1 curve cannot decompress a point - its field has no square root, seeSM9P256V1FieldElement.sqrt()- so a compressed encoding written here was oneECCurve.decodePoint(byte[])on the same curve then refused. The point at infinity keeps its one-octet encoding, which decodes.- Overrides:
encodeToin classECPoint- Throws:
UnsupportedOperationException- if compressed is true for a finite point.
-
add
-
twice
-
twicePlus
-
threeTimes
- Overrides:
threeTimesin classECPoint
-
negate
-