public abstract class ECPoint
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ECPoint.AbstractF2m |
static class |
ECPoint.AbstractFp |
static class |
ECPoint.F2m
Elliptic curve points over F2m
|
static class |
ECPoint.Fp
Elliptic curve points over Fp
|
Modifier and Type | Field and Description |
---|---|
protected ECCurve |
curve |
protected static ECFieldElement[] |
EMPTY_ZS |
protected java.util.Hashtable |
preCompTable |
protected ECFieldElement |
x |
protected ECFieldElement |
y |
protected ECFieldElement[] |
zs |
Modifier | Constructor and Description |
---|---|
protected |
ECPoint(ECCurve curve,
ECFieldElement x,
ECFieldElement y) |
protected |
ECPoint(ECCurve curve,
ECFieldElement x,
ECFieldElement y,
ECFieldElement[] zs) |
Modifier and Type | Method and Description |
---|---|
abstract ECPoint |
add(ECPoint b) |
protected void |
checkNormalized() |
protected ECPoint |
createScaledPoint(ECFieldElement sx,
ECFieldElement sy) |
protected abstract ECPoint |
detach() |
void |
encodeTo(boolean compressed,
byte[] buf,
int off) |
boolean |
equals(ECPoint other) |
boolean |
equals(java.lang.Object other) |
ECFieldElement |
getAffineXCoord()
Returns the affine x-coordinate after checking that this point is normalized.
|
ECFieldElement |
getAffineYCoord()
Returns the affine y-coordinate after checking that this point is normalized
|
protected abstract boolean |
getCompressionYTilde() |
ECCurve |
getCurve() |
protected int |
getCurveCoordinateSystem() |
ECPoint |
getDetachedPoint() |
byte[] |
getEncoded(boolean compressed)
Get an encoding of the point value, optionally in compressed format.
|
int |
getEncodedLength(boolean compressed) |
protected static ECFieldElement[] |
getInitialZCoords(ECCurve curve) |
ECFieldElement |
getRawXCoord() |
ECFieldElement |
getRawYCoord() |
protected ECFieldElement[] |
getRawZCoords() |
ECFieldElement |
getXCoord()
Returns the x-coordinate.
|
ECFieldElement |
getYCoord()
Returns the y-coordinate.
|
ECFieldElement |
getZCoord(int index) |
ECFieldElement[] |
getZCoords() |
int |
hashCode() |
boolean |
isInfinity() |
boolean |
isNormalized() |
boolean |
isValid() |
ECPoint |
multiply(java.math.BigInteger k)
Multiplies this
ECPoint by the given number. |
abstract ECPoint |
negate() |
ECPoint |
normalize()
Normalization ensures that any projective coordinate is 1, and therefore that the x, y
coordinates reflect those of the equivalent point in an affine coordinate system.
|
protected abstract boolean |
satisfiesCurveEquation() |
protected boolean |
satisfiesOrder() |
ECPoint |
scaleX(ECFieldElement scale) |
ECPoint |
scaleXNegateY(ECFieldElement scale) |
ECPoint |
scaleY(ECFieldElement scale) |
ECPoint |
scaleYNegateX(ECFieldElement scale) |
abstract ECPoint |
subtract(ECPoint b) |
ECPoint |
threeTimes() |
ECPoint |
timesPow2(int e) |
java.lang.String |
toString() |
abstract ECPoint |
twice() |
ECPoint |
twicePlus(ECPoint b) |
protected static final ECFieldElement[] EMPTY_ZS
protected ECCurve curve
protected ECFieldElement x
protected ECFieldElement y
protected ECFieldElement[] zs
protected java.util.Hashtable preCompTable
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs)
protected static ECFieldElement[] getInitialZCoords(ECCurve curve)
protected abstract boolean satisfiesCurveEquation()
protected boolean satisfiesOrder()
public final ECPoint getDetachedPoint()
public ECCurve getCurve()
protected abstract ECPoint detach()
protected int getCurveCoordinateSystem()
public ECFieldElement getAffineXCoord()
java.lang.IllegalStateException
- if the point is not normalizedpublic ECFieldElement getAffineYCoord()
java.lang.IllegalStateException
- if the point is not normalizedpublic ECFieldElement getXCoord()
public ECFieldElement getYCoord()
public ECFieldElement getZCoord(int index)
public ECFieldElement[] getZCoords()
public final ECFieldElement getRawXCoord()
public final ECFieldElement getRawYCoord()
protected final ECFieldElement[] getRawZCoords()
protected void checkNormalized()
public boolean isNormalized()
public ECPoint normalize()
protected ECPoint createScaledPoint(ECFieldElement sx, ECFieldElement sy)
public boolean isInfinity()
public boolean isValid()
public ECPoint scaleX(ECFieldElement scale)
public ECPoint scaleXNegateY(ECFieldElement scale)
public ECPoint scaleY(ECFieldElement scale)
public ECPoint scaleYNegateX(ECFieldElement scale)
public boolean equals(ECPoint other)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] getEncoded(boolean compressed)
compressed
- whether to generate a compressed point encoding.public int getEncodedLength(boolean compressed)
public void encodeTo(boolean compressed, byte[] buf, int off)
protected abstract boolean getCompressionYTilde()
public abstract ECPoint negate()
public ECPoint timesPow2(int e)
public abstract ECPoint twice()
public ECPoint threeTimes()
public ECPoint multiply(java.math.BigInteger k)
ECPoint
by the given number.k
- The multiplicator.k * this
.