public class SM9G2Point
extends java.lang.Object
ECCurve.Fp.| Modifier and Type | Method and Description |
|---|---|
SM9G2Point |
add(SM9G2Point o) |
static SM9G2Point |
decode(byte[] enc) |
boolean |
equals(java.lang.Object other) |
byte[] |
getEncoded()
Uncompressed encoding 0x04 || x || y, each F_p2 coordinate written high
dimension first (u-coefficient then constant), 32 bytes per F_p component;
129 bytes total.
|
int |
hashCode() |
boolean |
isInfinity() |
SM9G2Point |
multiply(java.math.BigInteger k)
Scalar multiplication by a Montgomery ladder, maintaining the invariant
r1 = r0 + this and returning [k]this.
|
public boolean isInfinity()
public SM9G2Point add(SM9G2Point o)
public SM9G2Point multiply(java.math.BigInteger k)
NOTE: this is a hardening, not a full constant-time guarantee. The per-bit
if/else selects which running point is updated (a data-dependent branch), the
INFINITY fast paths in add(org.bouncycastle.math.ec.sm9.SM9G2Point)/twice() make the leading-zero prefix
of the scalar cheaper (leaking its most-significant-bit position), and the
underlying F_p2 arithmetic is BigInteger-based and not itself constant time.
It is used only for the two secret scalars in offline KGC key derivation
([ks]P2 and [t2]P2); a fully constant-time G2 would need a uniform,
sentinel-free point representation over a fixed-limb F_p2.
public byte[] getEncoded()
public static SM9G2Point decode(byte[] enc)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object