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 boolean |
withCompression |
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() |
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()
Deprecated.
per-point compression property will be removed, refer
getEncoded(boolean) |
byte[] |
getEncoded(boolean compressed)
Get an encoding of the point value, optionally in compressed format.
|
protected static ECFieldElement[] |
getInitialZCoords(ECCurve curve) |
ECFieldElement |
getRawXCoord() |
ECFieldElement |
getRawYCoord() |
protected ECFieldElement[] |
getRawZCoords() |
ECFieldElement |
getX()
Deprecated.
Use getAffineXCoord(), or normalize() and getXCoord(), instead
|
ECFieldElement |
getXCoord()
Returns the x-coordinate.
|
ECFieldElement |
getY()
Deprecated.
Use getAffineYCoord(), or normalize() and getYCoord(), instead
|
ECFieldElement |
getYCoord()
Returns the y-coordinate.
|
ECFieldElement |
getZCoord(int index) |
ECFieldElement[] |
getZCoords() |
int |
hashCode() |
boolean |
isCompressed()
Deprecated.
per-point compression property will be removed, refer
getEncoded(boolean) |
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 boolean |
satisfiesCofactor() |
protected abstract boolean |
satisfiesCurveEquation() |
ECPoint |
scaleX(ECFieldElement scale) |
ECPoint |
scaleY(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 ECFieldElement[] EMPTY_ZS
protected ECCurve curve
protected ECFieldElement x
protected ECFieldElement y
protected ECFieldElement[] zs
protected boolean withCompression
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 boolean satisfiesCofactor()
protected abstract boolean satisfiesCurveEquation()
public final ECPoint getDetachedPoint()
public ECCurve getCurve()
protected abstract ECPoint detach()
protected int getCurveCoordinateSystem()
public ECFieldElement getX()
public ECFieldElement getY()
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 isCompressed()
getEncoded(boolean)
public boolean isValid()
public ECPoint scaleX(ECFieldElement scale)
public ECPoint scaleY(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()
getEncoded(boolean)
public byte[] getEncoded(boolean compressed)
compressed
- whether to generate a compressed point encoding.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
.