public abstract class ECPoint extends 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 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(Object other)
Compares this instance with the specified object and indicates if they
are equal.
|
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) |
protected ECFieldElement |
getRawXCoord() |
protected 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()
Returns an integer hash code for this object.
|
boolean |
isCompressed()
Deprecated.
per-point compression property will be removed, refer
getEncoded(boolean) |
boolean |
isInfinity() |
boolean |
isNormalized() |
boolean |
isValid() |
ECPoint |
multiply(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) |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
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 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()
IllegalStateException - if the point is not normalizedpublic ECFieldElement getAffineYCoord()
IllegalStateException - if the point is not normalizedpublic ECFieldElement getXCoord()
public ECFieldElement getYCoord()
public ECFieldElement getZCoord(int index)
public ECFieldElement[] getZCoords()
protected final ECFieldElement getRawXCoord()
protected 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(Object other)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectother - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)public String toString()
ObjectgetClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString method
if you intend implementing your own toString method.
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(BigInteger k)
ECPoint by the given number.k - The multiplicator.k * this.