public static function ParagonIE_Sodium_Core_Curve25519::ge_p2_dbl in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core/Curve25519.php \ParagonIE_Sodium_Core_Curve25519::ge_p2_dbl()
@internal You should not use this directly from another application
Parameters
ParagonIE_Sodium_Core_Curve25519_Ge_P2 $p:
Return value
ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
3 calls to ParagonIE_Sodium_Core_Curve25519::ge_p2_dbl()
- ParagonIE_Sodium_Core_Curve25519::ge_double_scalarmult_vartime in vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Core_Curve25519::ge_p3_dbl in vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Core_Curve25519::ge_scalarmult_base in vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php - @internal You should not use this directly from another application
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php, line 1526
Class
- ParagonIE_Sodium_Core_Curve25519
- Class ParagonIE_Sodium_Core_Curve25519
Code
public static function ge_p2_dbl(ParagonIE_Sodium_Core_Curve25519_Ge_P2 $p) {
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1();
$r->X = self::fe_sq($p->X);
$r->Z = self::fe_sq($p->Y);
$r->T = self::fe_sq2($p->Z);
$r->Y = self::fe_add($p->X, $p->Y);
$t0 = self::fe_sq($r->Y);
$r->Y = self::fe_add($r->Z, $r->X);
$r->Z = self::fe_sub($r->Z, $r->X);
$r->X = self::fe_sub($t0, $r->Y);
$r->T = self::fe_sub($r->T, $r->Z);
return $r;
}