Make WordPress Core


Ignore:
Timestamp:
06/16/2021 05:28:49 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.16.1.

The latest version of sodium_compat includes polyfills for new features slated to land in PHP 8.1:
https://paragonie.com/blog/2021/05/ristretto255-for-php-community

It also fixes a race condition with the autoloader that caused an "undefined constant" error on some systems:
https://github.com/paragonie/sodium_compat/issues/122

A full list of changes in this update can be found on GitHub:
https://github.com/paragonie/sodium_compat/compare/v1.14.0...v1.16.1

Follow-up to [49741].

Props paragoninitiativeenterprises, oxyrealm.
Merges [51002] to the 5.7 branch.
Fixes #53274.

Location:
branches/5.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

  • branches/5.7/src/wp-includes/sodium_compat/src/Core/Curve25519/H.php

    r46586 r51171  
    14651465        11406482
    14661466    );
     1467
     1468    /**
     1469     * 1 / sqrt(a - d)
     1470     *
     1471     * @var array<int, int>
     1472     */
     1473    protected static $invsqrtamd = array(
     1474        6111485,
     1475        4156064,
     1476        -27798727,
     1477        12243468,
     1478        -25904040,
     1479        120897,
     1480        20826367,
     1481        -7060776,
     1482        6093568,
     1483        -1986012
     1484    );
     1485
     1486    /**
     1487     *  sqrt(ad - 1) with a = -1 (mod p)
     1488     *
     1489     * @var array<int, int>
     1490     */
     1491    protected static $sqrtadm1 = array(
     1492        24849947,
     1493        -153582,
     1494        -23613485,
     1495        6347715,
     1496        -21072328,
     1497        -667138,
     1498        -25271143,
     1499        -15367704,
     1500        -870347,
     1501        14525639
     1502    );
     1503
     1504    /**
     1505     * 1 - d ^ 2
     1506     *
     1507     * @var array<int, int>
     1508     */
     1509    protected static $onemsqd = array(
     1510        6275446,
     1511        -16617371,
     1512        -22938544,
     1513        -3773710,
     1514        11667077,
     1515        7397348,
     1516        -27922721,
     1517        1766195,
     1518        -24433858,
     1519        672203
     1520    );
     1521
     1522    /**
     1523     * (d - 1) ^ 2
     1524     * @var array<int, int>
     1525     */
     1526    protected static $sqdmone = array(
     1527        15551795,
     1528        -11097455,
     1529        -13425098,
     1530        -10125071,
     1531        -11896535,
     1532        10178284,
     1533        -26634327,
     1534        4729244,
     1535        -5282110,
     1536        -10116402
     1537    );
     1538
     1539
     1540    /*
     1541     *  2^252+27742317777372353535851937790883648493
     1542        static const unsigned char L[] = {
     1543            0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7,
     1544            0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     1545            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10
     1546        };
     1547    */
     1548    const L = "\xed\xd3\xf5\x5c\x1a\x63\x12\x58\xd6\x9c\xf7\xa2\xde\xf9\xde\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10";
    14671549}
Note: See TracChangeset for help on using the changeset viewer.