wp-includes/sodium_compat/src/Core/Curve25519.php:16Class ParagonIE_Sodium_Core_Curve25519
abstract class ParagonIE_Sodium_Core_Curve25519 extends ParagonIE_Sodium_Core_Curve25519_H{ /** * Get a field element of size 10 with a value of 0 * * @internal You should not use this directly from another application * * @return ParagonIE_Sodium_Core_Curve25519_Fe */ public static function fe_0() { return new ParagonIE_Sodium_Core_Curve25519_Fe(); } /** * Get a field element of size 10 with a value of 1 * * @internal You should not use this directly from another application * * @return ParagonIE_Sodium_Core_Curve25519_Fe */ public static function fe_1() { $fe = new ParagonIE_Sodium_Core_Curve25519_Fe(); $fe->e0 = 1; return $fe; } /** * Add two field elements. * * @internal You should not use this directly from another application * * @param ParagonIE_Sodium_Core_Curve25519_Fe $f * @param ParagonIE_Sodium_Core_Curve25519_Fe $g * @return ParagonIE_Sodium_Core_Curve25519_Fe * @psalm-suppress MixedAssignment * @psalm-suppress MixedOperand */ public static function fe_add( ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g ) { return new ParagonIE_Sodium_Core_Curve25519_Fe( (int)($f->e0 + $g->e0), (int)($f->e1 + $g->e1), (int)($f->e2 + $g->e2), (int)($f->e3 + $g->e3), (int)($f->e4 + $g->e4), (int)($f->e5 + $g->e5), (int)($f->e6 + $g->e6), (int)($f->e7 + $g->e7), (int)($f->e8 + $g->e8), (int)($f->e9 + $g->e9) ); } /** * Constant-time conditional move. * * @internal You should not use this directly from another application * * @param ParagonIE_Sodium_Core_Curve25519_Fe $f * @param ParagonIE_Sodium_Core_Curve25519_Fe $g * @param int $b * @return ParagonIE_Sodium_Core_Curve25519_Fe * @psalm-suppress MixedAssignment */ public static function fe_cmov( ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g, $b = 0 ) { $h = new ParagonIE_Sodium_Core_Curve25519_Fe(); $b *= -1; $x = (($f->e0 ^ $g->e0) & $b); $h->e0 = $f->e0 ^ $x; $x = (($f->e1 ^ $g->e1) & $b); $h->e1 = $f->e1 ^ $x; $x = (($f->e2 ^ $g->e2) & $b); $h->e2 = $f->e2 ^ $x; $x = (($f->e3 ^ $g->e3) & $b); $h->e3 = $f->e3 ^ $x; $x = (($f->e4 ^ $g->e4) & $b); $h->e4 = $f->e4 ^ $x;Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/sodium_compat/src/Core/Curve25519.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.