|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.security.ecc.math.ecgroup.ECPoint
A point on an elliptic curve. It consists of a reference to the elliptic curve and one to its coordinates. All the point operations are forwarded to the corresponding elliptic curve group (subclass of EllipticCurve).
Field Summary | |
protected EllipticCurve |
curve_
the elliptic curve (the group this point belongs to) |
protected boolean |
isInfinity_
indicates whether this point is infinity |
Constructor Summary | |
ECPoint(byte[] b,
EllipticCurve curve)
Creates a new point, performing the Octet-String-to-Point Conversion as specified in X9.62. |
Method Summary | |
void |
addPoint(ECPoint other)
Computes this += other. |
java.lang.Object |
clone()
Creates a new Point on the same curve with the same coordinates (cloned) |
void |
doublePoint()
Doubles this point. |
boolean |
equals(java.lang.Object other)
Checks, whether two ECPoints are equal. |
Coordinate |
getCoordinates()
Returns the coordinates of the point. |
EllipticCurve |
getCurve()
The group (EllipticCurve) this point belongs to. |
int |
hashCode()
Returns the hash code of this ECPoint. |
void |
invert()
Inverts (negates) this point. |
boolean |
isInfinity()
Evaluates if this point is the point at infinity. |
void |
multiply(java.math.BigInteger val)
Computes the scalar multiplication: this *= val. |
void |
multiply2(java.math.BigInteger k,
ECPoint q,
java.math.BigInteger l)
Computes the scalar multiplication: this = k*this + l*q. |
void |
precomputePoints()
This method is only called, if EllipticCurve.isPrecomputationEnabled() returns true .
|
void |
setCoordinates(Coordinate c)
Sets the coordinates of the ECPoint. |
void |
setInfinity()
Sets the point to infinity. |
iaik.asn1.OCTET_STRING |
toASN1Object()
The ASN.1 representation of this point as defined in X9.62. |
java.lang.String |
toString()
|
void |
unsetInfinity()
Resets the point. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected EllipticCurve curve_
protected boolean isInfinity_
Constructor Detail |
public ECPoint(byte[] b, EllipticCurve curve) throws ECCException
b
- the octet string representationcurve
- the group, the new point belongs to.Method Detail |
public void addPoint(ECPoint other)
other
- the point which is added to this point.EllipticCurve.addPoint(iaik.security.ecc.math.ecgroup.ECPoint, iaik.security.ecc.math.ecgroup.ECPoint)
public java.lang.Object clone()
public void doublePoint()
EllipticCurve.doublePoint(iaik.security.ecc.math.ecgroup.ECPoint)
public boolean equals(java.lang.Object other)
ECPoints
are equal.
other
- the other object.public Coordinate getCoordinates()
isInfinity()
public EllipticCurve getCurve()
public int hashCode()
public void invert()
EllipticCurve.invert(iaik.security.ecc.math.ecgroup.ECPoint)
public boolean isInfinity()
public void multiply(java.math.BigInteger val)
val
- the scalar factor.EllipticCurve.multiply(iaik.security.ecc.math.ecgroup.ECPoint, java.math.BigInteger)
public void multiply2(java.math.BigInteger k, ECPoint q, java.math.BigInteger l)
curve_
is an instance of
FastPrimeCurve
, arithmetic speed-ups are supported.
k
- the first scalar factor.q
- the second ECPoint
.l
- the second scalar factor.public void precomputePoints()
EllipticCurve.isPrecomputationEnabled()
returns true
.
This is only the case, if curve_
is an instance of FastPrimeCurve
.
public void setInfinity()
public iaik.asn1.OCTET_STRING toASN1Object()
public java.lang.String toString()
public void unsetInfinity()
public void setCoordinates(Coordinate c)
c
- the new coordinates.
|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |