|
Bouncy Castle Cryptography 1.50 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.math.ec.ECPoint
public abstract class ECPoint
base class for points on elliptic curves.
Nested Class Summary | |
---|---|
static class |
ECPoint.F2m
Elliptic curve points over F2m |
static class |
ECPoint.Fp
Elliptic curve points over Fp |
Field Summary | |
---|---|
protected ECCurve |
curve
|
protected static ECFieldElement[] |
EMPTY_ZS
|
protected PreCompInfo |
preCompInfo
|
protected boolean |
withCompression
|
protected ECFieldElement |
x
|
protected ECFieldElement |
y
|
protected ECFieldElement[] |
zs
|
Constructor Summary | |
---|---|
protected |
ECPoint(ECCurve curve,
ECFieldElement x,
ECFieldElement y)
|
protected |
ECPoint(ECCurve curve,
ECFieldElement x,
ECFieldElement y,
ECFieldElement[] zs)
|
Method Summary | |
---|---|
abstract ECPoint |
add(ECPoint b)
|
protected void |
checkNormalized()
|
protected ECPoint |
createScaledPoint(ECFieldElement sx,
ECFieldElement sy)
|
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()
|
byte[] |
getEncoded()
|
byte[] |
getEncoded(boolean compressed)
return the field element encoded with point compression. |
protected static ECFieldElement[] |
getInitialZCoords(ECCurve curve)
|
protected ECFieldElement |
getRawXCoord()
|
protected ECFieldElement |
getRawYCoord()
|
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()
|
boolean |
isInfinity()
|
boolean |
isNormalized()
|
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. |
abstract ECPoint |
subtract(ECPoint b)
|
ECPoint |
threeTimes()
|
ECPoint |
timesPow2(int e)
|
java.lang.String |
toString()
|
abstract ECPoint |
twice()
|
ECPoint |
twicePlus(ECPoint b)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static ECFieldElement[] EMPTY_ZS
protected ECCurve curve
protected ECFieldElement x
protected ECFieldElement y
protected ECFieldElement[] zs
protected boolean withCompression
protected PreCompInfo preCompInfo
Constructor Detail |
---|
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs)
Method Detail |
---|
protected static ECFieldElement[] getInitialZCoords(ECCurve curve)
public ECCurve getCurve()
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()
protected ECFieldElement getRawXCoord()
protected ECFieldElement getRawYCoord()
protected void checkNormalized()
public boolean isNormalized()
public ECPoint normalize()
protected ECPoint createScaledPoint(ECFieldElement sx, ECFieldElement sy)
public boolean isInfinity()
public boolean isCompressed()
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()
public byte[] getEncoded(boolean compressed)
protected abstract boolean getCompressionYTilde()
public abstract ECPoint add(ECPoint b)
public abstract ECPoint negate()
public abstract ECPoint subtract(ECPoint b)
public ECPoint timesPow2(int e)
public abstract ECPoint twice()
public ECPoint twicePlus(ECPoint b)
public ECPoint threeTimes()
public ECPoint multiply(java.math.BigInteger k)
ECPoint
by the given number.
k
- The multiplicator.
k * this
.
|
Bouncy Castle Cryptography 1.50 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |