public static function ParagonIE_Sodium_Core32_Curve25519::ge_p3_to_cached in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core32/Curve25519.php \ParagonIE_Sodium_Core32_Curve25519::ge_p3_to_cached()
@internal You should not use this directly from another application
Parameters
ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p:
Return value
ParagonIE_Sodium_Core32_Curve25519_Ge_Cached
Throws
SodiumException
TypeError
2 calls to ParagonIE_Sodium_Core32_Curve25519::ge_p3_to_cached()
- ParagonIE_Sodium_Core32_Curve25519::ge_double_scalarmult_vartime in vendor/
paragonie/ sodium_compat/ src/ Core32/ Curve25519.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Core32_Curve25519::ge_mul_l in vendor/
paragonie/ sodium_compat/ src/ Core32/ Curve25519.php - multiply by the order of the main subgroup l = 2^252+27742317777372353535851937790883648493
File
- vendor/
paragonie/ sodium_compat/ src/ Core32/ Curve25519.php, line 1735
Class
- ParagonIE_Sodium_Core32_Curve25519
- Class ParagonIE_Sodium_Core32_Curve25519
Code
public static function ge_p3_to_cached(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p) {
static $d2 = null;
if ($d2 === null) {
$d2 = ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray(array(
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[0]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[1]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[2]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[3]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[4]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[5]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[6]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[7]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[8]),
ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[9]),
));
}
/** @var ParagonIE_Sodium_Core32_Curve25519_Fe $d2 */
$r = new ParagonIE_Sodium_Core32_Curve25519_Ge_Cached();
$r->YplusX = self::fe_add($p->Y, $p->X);
$r->YminusX = self::fe_sub($p->Y, $p->X);
$r->Z = self::fe_copy($p->Z);
$r->T2d = self::fe_mul($p->T, $d2);
return $r;
}