secp224k1

Extends\phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime

Curves over y^2 = x^3 + b

package

Default

Methods

__construct

__construct()

Adds two points on the curve

addPoint(array $p,array $q): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

$q

array

Response

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

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 X coordinate and the derived Y coordinate

derivePoint( $m): array
inherited

Arguments

$m

Response

array

Doubles a point on a curve

doublePoint(array $p): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

Response

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

Returns the numerator and denominator of the slope

doublePointHelper(array $p): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

Response

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

Calculates the parameters needed from the Euclidean algorithm as discussed at http://diamond.boisestate.edu/~liljanab/MATH308/GuideToECC.pdf#page=148

extendedGCD(\phpseclib3\Math\BigInteger $u,\phpseclib3\Math\BigInteger $v): array<mixed,\phpseclib3\Math\BigInteger>
inheritedstatic

Returns the a coefficient

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

Returns the a coefficient

getB(): \phpseclib3\Math\PrimeField\Integer
inherited

Retrieve the base point as an array

getBasePoint(): array
inherited

Response

array

Precomputes points in Joint Sparse Form

getJSFPoints(\phpseclib3\Math\Common\FiniteField\Integer $k1,\phpseclib3\Math\Common\FiniteField\Integer $k2): array<mixed,integer>
inheritedstatic

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
inherited

Precomputes NAF points

getNAFPoints(array $point, $wnd): array<mixed,integer>
inherited

Arguments

$point

array

$wnd

Response

array<mixed,integer>

Returns the Order

getOrder(): \phpseclib3\Math\BigInteger
inherited

Adds two jacobian coordinates on the curve

jacobianAddPoint(array $p,array $q): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

$q

array

Response

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

Adds one "fresh" jacobian form on the curve

jacobianAddPointMixedX(array $p,array $q): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

The second parameter should be the "fresh" one

Arguments

$p

array

$q

array

Response

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

Adds two "fresh" jacobian form on the curve

jacobianAddPointMixedXY(array $p,array $q): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

$q

array

Response

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

Doubles a jacobian coordinate on the curve

jacobianDoublePoint(array $p): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

Response

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

Doubles a "fresh" jacobian coordinate on the curve

jacobianDoublePointMixed(array $p): array<mixed,\phpseclib3\Crypt\EC\BaseCurves\FiniteField>
inherited

Arguments

$p

array

Response

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

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>
inherited

Set coefficients a and b

setCoefficients(\phpseclib3\Math\BigInteger $a,\phpseclib3\Math\BigInteger $b)
inherited

Sets the modulo

setModulo(\phpseclib3\Math\BigInteger $modulo)
inherited

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
inherited

Arguments

$p

array

Response

boolean

Properties

Basis

basis :\phpseclib3\Crypt\EC\BaseCurves\list<array{a:
inherited
var

BigInteger, b: BigInteger}>

Type(s)

\phpseclib3\Crypt\EC\BaseCurves\list

Beta

beta :\phpseclib3\Math\PrimeField\Integer
inherited

Finite Field Integer factory

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

Type(s)

\phpseclib3\Math\FiniteField\Integer

Cofficient for x^1

a :object
inherited
var

Type(s)

object

Cofficient for x^0

b :object
inherited
var

Type(s)

object

Base Point

p :object
inherited
var

Type(s)

object

The number one over the specified finite field

one :object
inherited
var

Type(s)

object

The number two over the specified finite field

two :object
inherited
var

Type(s)

object

The number three over the specified finite field

three :object
inherited
var

Type(s)

object

The number four over the specified finite field

four :object
inherited
var

Type(s)

object

The number eight over the specified finite field

eight :object
inherited
var

Type(s)

object

The modulo

modulo :\phpseclib3\Math\BigInteger
inherited

The Order

order :\phpseclib3\Math\BigInteger
inherited