Documentation

CurveFpInterface

This is the contract for implementing CurveFp (EC prime finite-field).

Table of Contents

Methods

__toString()  : string
Return string representation of curve for debugging
cmp()  : int
Compares the curve to another.
contains()  : bool
Checks whether the curve contains the given coordinates.
equals()  : bool
Checks whether the curve is equal to another.
getA()  : GMP
Returns the a parameter of the curve.
getB()  : GMP
Returns the b parameter of the curve.
getGenerator()  : GeneratorPoint
getInfinity()  : PointInterface
Returns a point representing infinity on the curve.
getModAdapter()  : ModularArithmetic
Returns a modular arithmetic adapter.
getPoint()  : PointInterface
Returns the point identified by given coordinates.
getPrime()  : GMP
Returns the prime associated with the curve.
getSize()  : int
recoverYfromX()  : GMP

Methods

__toString()

Return string representation of curve for debugging

public __toString() : string
Return values
string

contains()

Checks whether the curve contains the given coordinates.

public contains(GMP $x, GMP $y) : bool
Parameters
$x : GMP
$y : GMP
Return values
bool

getA()

Returns the a parameter of the curve.

public getA() : GMP
Return values
GMP

getB()

Returns the b parameter of the curve.

public getB() : GMP
Return values
GMP

getPoint()

Returns the point identified by given coordinates.

public getPoint(GMP $x, GMP $y[, GMP $order = null ]) : PointInterface
Parameters
$x : GMP
$y : GMP
$order : GMP = null
Return values
PointInterface

getPrime()

Returns the prime associated with the curve.

public getPrime() : GMP
Return values
GMP

recoverYfromX()

public recoverYfromX(bool $wasOdd, GMP $x) : GMP
Parameters
$wasOdd : bool
$x : GMP
Return values
GMP

        
On this page

Search results