Montgomery

Extends\phpseclib3\Crypt\EC\BaseCurves\Base

Curves over y^2 = x^3 + a*x + x

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Converts a BigInteger to a \phpseclib3\Math\FiniteField\Integer integer

convertInteger(\phpseclib3\Math\BigInteger $x): object
inherited

Arguments

Response

object

Returns the affine point

convertToAffine(array $p): array<mixed,object>
inherited

Arguments

$p

array

Response

array<mixed,object>

Converts an affine point to a jacobian coordinate

convertToInternal(array $p): array<mixed,object>
inherited

Arguments

$p

array

Response

array<mixed,object>

Creates a random scalar multiplier

createRandomMultiplier(): \phpseclib3\Math\BigInteger
inherited

Doubles and adds a point on a curve

doubleAndAddPoint(array $p,array $q,\phpseclib3\Math\PrimeField\Integer $x1): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField[]>

Arguments

$p

array

$q

array

Response

array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField[]>

Retrieve the base point as an array

getBasePoint(): array

Response

array

Returns the length, in bits, of the modulo

getLength(): integer
inherited

Response

integer

Returns the length, in bytes, of the modulo

getLengthInBytes(): integer
inherited

Response

integer

Returns the Order

getOrder(): \phpseclib3\Math\BigInteger
inherited

Multiply and Add Points

multiplyAddPoints(array $points,array $scalars): array<mixed,integer>
inherited

Arguments

$points

array

$scalars

array

Response

array<mixed,integer>

Multiply a point on the curve by a scalar

multiplyPoint(array $p,\phpseclib3\Math\BigInteger $d): array
inherited

Negates a point

negatePoint(array $p): array<mixed,object>
inherited

Arguments

$p

array

Response

array<mixed,object>

Returns a random integer

randomInteger(): object
inherited

Response

object

Performs range check

rangeCheck(\phpseclib3\Math\BigInteger $x)
inherited

Set x and y coordinates for the base point

setBasePoint(\phpseclib3\Math\BigInteger|\phpseclib3\Math\PrimeField\Integer $x,\phpseclib3\Math\BigInteger|\phpseclib3\Math\PrimeField\Integer $y): array<mixed,\phpseclib3\Math\PrimeField\Integer>

Set coefficients a

setCoefficients(\phpseclib3\Math\BigInteger $a)

Sets the modulo

setModulo(\phpseclib3\Math\BigInteger $modulo)

Arguments

Sets the Order

setOrder(\phpseclib3\Math\BigInteger $order)
inherited

Arguments

Use a custom defined modular reduction function

setReduction(callable $func): object
inherited

Arguments

$func

callable

Response

object

Properties

Finite Field Integer factory

factory :\phpseclib3\Math\FiniteField\Integer
inherited
var

Type(s)

\phpseclib3\Math\FiniteField\Integer

Cofficient for x

a :object
var

Type(s)

object

Constant used for point doubling

a24 :object
var

Type(s)

object

The Number Zero

zero :object
var

Type(s)

object

The Number One

one :object
var

Type(s)

object

Base Point

p :object
var

Type(s)

object

The modulo

modulo :\phpseclib3\Math\BigInteger

The Order

order :\phpseclib3\Math\BigInteger
inherited