wppaste
WordPress

ParagonIE_Sodium_Core_X25519

Source
wp-includes/sodium_compat/src/Core/X25519.php:10
Class ParagonIE_Sodium_Core_X25519

Compatibility

WordPress
core
  • 6.7.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

Methods · 5

Source code

abstract class ParagonIE_Sodium_Core_X25519 extends ParagonIE_Sodium_Core_Curve25519{    /**     * Alters the objects passed to this method in place.     *     * @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 void     * @psalm-suppress MixedAssignment     */    public static function fe_cswap(        ParagonIE_Sodium_Core_Curve25519_Fe $f,        ParagonIE_Sodium_Core_Curve25519_Fe $g,        $b = 0    ) {        $f0 = (int) $f[0];        $f1 = (int) $f[1];        $f2 = (int) $f[2];        $f3 = (int) $f[3];        $f4 = (int) $f[4];        $f5 = (int) $f[5];        $f6 = (int) $f[6];        $f7 = (int) $f[7];        $f8 = (int) $f[8];        $f9 = (int) $f[9];        $g0 = (int) $g[0];        $g1 = (int) $g[1];        $g2 = (int) $g[2];        $g3 = (int) $g[3];        $g4 = (int) $g[4];        $g5 = (int) $g[5];        $g6 = (int) $g[6];        $g7 = (int) $g[7];        $g8 = (int) $g[8];        $g9 = (int) $g[9];        $b = -$b;        $x0 = ($f0 ^ $g0) & $b;        $x1 = ($f1 ^ $g1) & $b;        $x2 = ($f2 ^ $g2) & $b;        $x3 = ($f3 ^ $g3) & $b;        $x4 = ($f4 ^ $g4) & $b;        $x5 = ($f5 ^ $g5) & $b;        $x6 = ($f6 ^ $g6) & $b;        $x7 = ($f7 ^ $g7) & $b;        $x8 = ($f8 ^ $g8) & $b;        $x9 = ($f9 ^ $g9) & $b;        $f[0] = $f0 ^ $x0;        $f[1] = $f1 ^ $x1;        $f[2] = $f2 ^ $x2;        $f[3] = $f3 ^ $x3;        $f[4] = $f4 ^ $x4;        $f[5] = $f5 ^ $x5;        $f[6] = $f6 ^ $x6;        $f[7] = $f7 ^ $x7;        $f[8] = $f8 ^ $x8;        $f[9] = $f9 ^ $x9;        $g[0] = $g0 ^ $x0;        $g[1] = $g1 ^ $x1;        $g[2] = $g2 ^ $x2;        $g[3] = $g3 ^ $x3;        $g[4] = $g4 ^ $x4;        $g[5] = $g5 ^ $x5;        $g[6] = $g6 ^ $x6;        $g[7] = $g7 ^ $x7;        $g[8] = $g8 ^ $x8;        $g[9] = $g9 ^ $x9;    }     /**     * @internal You should not use this directly from another application     *     * @param ParagonIE_Sodium_Core_Curve25519_Fe $f     * @return ParagonIE_Sodium_Core_Curve25519_Fe     */    public static function fe_mul121666(ParagonIE_Sodium_Core_Curve25519_Fe $f)    {        $h = array(

Changelog

Unchanged from 6.7.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.11 tag, from src/wp-includes/sodium_compat/src/Core/X25519.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.