ParagonIE_Sodium_Core32_X25519

Extends\ParagonIE_Sodium_Core32_Curve25519

Class ParagonIE_Sodium_Core32_X25519

Implements Curve25519 core functions

Based on the ref10 curve25519 code provided by libsodium

package

Default

Methods

abs

abs(integer $integer,integer $size): integer
inheritedstatic

Arguments

$integer

integer

$size

integer

(16, 32, 64)

Response

integer

If a variable does not match a given type, throw a TypeError.

declareScalarType(mixed &$mixedVar = null,string $type = 'void',integer $argumentIndex): void
inheritedstatic
Throws
\TypeError
\SodiumException

Arguments

$mixedVar

mixed

$type

string

$argumentIndex

integer

multiply by the order of the main subgroup l = 2^252+27742317777372353535851937790883648493

ge_mul_l(\ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A): \ParagonIE_Sodium_Core32_Curve25519_Ge_P3
inheritedstatic
Throws
\SodiumException
\TypeError

Arguments

Response

\ParagonIE_Sodium_Core32_Curve25519_Ge_P3

ge_precomp_0

ge_precomp_0(): \ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp
inheritedstatic
Throws
\SodiumException
\TypeError

Response

\ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp

Convert a group element to a byte string.

ge_tobytes(\ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $h): string
inheritedstatic
Throws
\SodiumException
\TypeError

Arguments

Response

string

Catch hash_update() failures and throw instead of silently proceeding

hash_update( &$hs,string $data): void
inheritedstatic
psalm-suppress

PossiblyInvalidArgument

Throws
\SodiumException

Arguments

$hs

$data

string

Evaluate whether or not two strings are equal (in constant-time)

hashEquals(string $left,string $right): boolean
inheritedstatic
Throws
\SodiumException
\TypeError

Arguments

$left

string

$right

string

Response

boolean

Properties

See: libsodium's crypto_core/curve25519/ref10/base.h

base :\array<int,
inheritedstatic
var

array<int, array<int, array<int, int>>>> Basically, int[32][8][3][10]

Type(s)

\array

See: libsodium's crypto_core/curve25519/ref10/base2.h

base2 :\array<int,
inheritedstatic
var

array<int, array<int, int>>> basically int[8][3]

Type(s)

\array

37095705934669439343138083508754565189542113879843219016388785533085940283555

d :\array<int,
inheritedstatic
var

int>

Type(s)

\array

2 * d = 16295367250680780974490674513165176452449235426866156013048779062215315747161

d2 :\array<int,
inheritedstatic
var

int>

Type(s)

\array

sqrt(-1)

sqrtm1 :\array<int,
inheritedstatic
var

int>

Type(s)

\array