Maven module :un.api : api-encoding :
Class : un.impl.cryptography.ec.ECPoint
Extends/Implements : un.impl.cryptography.ec.ECField
Subclasses : -

Elliptic curves over GF(2^m).

This public domain software was written by Stuart D. Gathman,
based on C software written by Paulo S.L.M. Barreto
based on original C++ software written by
George Barwood

THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Variables : -
Functions : ECPoint, ECPoint, ECPoint, copy, copyX, calcY, isZero, add, sub, dbl, mult, Ybit, packX, pack, unpack, toString, check, equals, random, clear, negate




Create a new Elliptic Curve point at infinity (the zero value). */
public void ECPoint ()


Create a copy of an existing Elliptic Curve point. */
public void ECPoint (ECPoint q)


Unpack a BigInteger into a new Elliptic Curve point. */
public void ECPoint (BigInteger k)


/* Sets p := q */
public void copy (ECPoint q)


Copy just the x coordinate. */
void copyX (ECPoint q)


Given the x coordinate of p and a suitable bit ybit of the corresponding
y coordinate, evaluate the full y value such that y^2 + x*y = x^3 + EC_B
returning true if successful and false if there is no solution.
public boolean calcY (boolean ybit)


/* ecCalcY */
public boolean isZero ()


Sets p := p + q */
public void add (ECPoint q)


sets p := p - r */
public void sub (ECPoint r)


Sets p := 2*p */
public void dbl ()


Sets p := k*p. */
public ECPoint mult (BigInteger k)


evaluates to 0 if p->x == 0, otherwise to gfYbit (p->y / p->x) */
public boolean Ybit ()


Return just the X coord packed into a BigInteger. */
public BigInteger packX ()


Pack this curve point into a BigInteger. */
public BigInteger pack ()


unpacks a vlPoint into a curve point */
public void unpack (BigInteger a)


Format the Elliptic Curve point as a String for debugging. */
public String toString ()


/* Confirm that y^2 + x*y = x^3 + EC_B for point p. */
public boolean check ()


Evaluates to true if p == q, otherwise false (or an error code) */
public boolean equals (Object obj)


Sets p to a random point of the elliptic curve defined by
y^2 + x*y = x^3 + EC_B */
public void random (Random rand)


Sets p to the point at infinity O, clearing entirely the content of p.
Clearing entirely sets all bits to zero to avoid any possibility
of leaking secret data.
public void clear ()


sets p := -p */
public void negate ()