Documentation

GeneratorPoint extends Point
in package

Curve point from which public and private keys can be derived.

Table of Contents

Properties

$adapter  : GmpMathInterface
$curve  : CurveFpInterface
$generator  : RandomNumberGeneratorInterface
$infinity  : bool
$modAdapter  : ModularArithmetic
$order  : GMP
$windowSize  : int
$x  : GMP
$y  : GMP

Methods

__construct()  : mixed
Initialize a new instance.
__debugInfo()  : array<string|int, mixed>
__toString()  : string
Returns the string representation of the point.
add()  : self
Adds another point to the current one and returns the resulting point.
cmp()  : int
Compares the current instance to another point.
createPrivateKey()  : PrivateKeyInterface
cswapValue()  : mixed
equals()  : bool
Checks whether the current instance is equal to the given point.
getAdapter()  : GmpMathInterface
getCurve()  : CurveFpInterface
Returns the curve to which the point belongs.
getDouble()  : self
Doubles the current point and returns the resulting point.
getOrder()  : GMP
Returns the order of the point.
getPrivateKeyFrom()  : PrivateKeyInterface
getPublicKeyFrom()  : PublicKeyInterface
getWindowSize()  : int
getX()  : GMP
Returns the X coordinate of the point.
getY()  : GMP
Returns the Y coordinate of the point.
isInfinity()  : bool
Returns true if instance is an non-finite point.
isValid()  : bool
Verifies validity of given coordinates against the current point and its point.
mul()  : PointInterface
Multiplies the point by a scalar value and returns the resulting point.
setWindowSize()  : self
cswap()  : mixed
validate()  : mixed

Properties

$infinity

private bool $infinity = false

$windowSize

private int $windowSize

Methods

__debugInfo()

public __debugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

cmp()

Compares the current instance to another point.

public cmp(PointInterface $other) : int
Parameters
$other : PointInterface
Tags
see
PointInterface::cmp()
Return values
int

A number different than 0 when current instance is less than the given point, 0 when they are equal.

cswapValue()

public cswapValue(bool|GMP &$a, bool|GMP &$b, int $cond, int $maskBitSize) : mixed
Parameters
$a : bool|GMP
$b : bool|GMP
$cond : int
$maskBitSize : int

getWindowSize()

public getWindowSize() : int
Return values
int

isValid()

Verifies validity of given coordinates against the current point and its point.

public isValid(GMP $x, GMP $y) : bool
Parameters
$x : GMP
$y : GMP
Tags
todo

Check if really necessary here (only used for testing in lib)

Return values
bool

setWindowSize()

public setWindowSize(int $n) : self
Parameters
$n : int
Return values
self

cswap()

private cswap(self $a, self $b, int $cond, int $curveSize) : mixed
Parameters
$a : self
$b : self
$cond : int
$curveSize : int

validate()

private validate() : mixed

        
On this page

Search results