TwistedEdwards

Extends\phpseclib3\Crypt\EC\BaseCurves\Base

Curves over a*x^2 + y^2 = 1 + d*x^2*y^2

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

Returns the a coefficient

getA(): \phpseclib3\Math\PrimeField\Integer

Retrieve the base point as an array

getBasePoint(): array

Response

array

Returns the a coefficient

getD(): \phpseclib3\Math\PrimeField\Integer

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 modulo

getModulo(): \phpseclib3\Math\BigInteger

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( $x, $y)

Arguments

$x

$y

Set coefficients a and b

setCoefficients(\phpseclib3\Math\BigInteger $a,\phpseclib3\Math\BigInteger $d)

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

Tests whether or not the x / y values satisfy the equation

verifyPoint(array $p): boolean

Arguments

$p

array

Response

boolean

Properties

The modulo

modulo :\phpseclib3\Math\BigInteger

Cofficient for x^2

a :object
var

Type(s)

object

Cofficient for x^2*y^2

d :object
var

Type(s)

object

Base Point

p :array<mixed,object>
var

Type(s)

array<mixed,object>

The number zero over the specified finite field

zero :object
var

Type(s)

object

The number one over the specified finite field

one :object
var

Type(s)

object

The number two over the specified finite field

two :object
var

Type(s)

object

The Order

order :\phpseclib3\Math\BigInteger
inherited

Finite Field Integer factory

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

Type(s)

\phpseclib3\Math\FiniteField\Integer