Make WordPress Core

Changeset 55699


Ignore:
Timestamp:
04/30/2023 02:06:51 PM (22 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.20.0.

The latest version of sodium_compat includes a fix for the Poly1305 implementation.

References:

Follow-up to [49741], [51002], [51591], [52988], [54150], [54310].

Props jrf, costdev, paragoninitiativeenterprises, mukesh27.
Fixes #58224.

Location:
trunk/src/wp-includes/sodium_compat
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/LICENSE

    r54310 r55699  
    11ISC License
    22
    3 Copyright (c) 2016-2022, Paragon Initiative Enterprises <security at paragonie dot com>
     3Copyright (c) 2016-2023, Paragon Initiative Enterprises <security at paragonie dot com>
    44Copyright (c) 2013-2019, Frank Denis <j at pureftpd dot org>
    55
  • trunk/src/wp-includes/sodium_compat/lib/php72compat.php

    r54310 r55699  
    13611361     * @throws SodiumException
    13621362     * @throws TypeError
     1363     *
     1364     * @psalm-suppress ReferenceConstraintViolation
    13631365     */
    13641366    function sodium_memzero(&$string)
  • trunk/src/wp-includes/sodium_compat/src/Core/Poly1305/State.php

    r46858 r55699  
    211211            /* h *= r */
    212212            $d0 = (
    213                 self::mul($h0, $r0, 25) +
    214                 self::mul($s4, $h1, 26) +
    215                 self::mul($s3, $h2, 26) +
    216                 self::mul($s2, $h3, 26) +
    217                 self::mul($s1, $h4, 26)
     213                self::mul($h0, $r0, 27) +
     214                self::mul($s4, $h1, 27) +
     215                self::mul($s3, $h2, 27) +
     216                self::mul($s2, $h3, 27) +
     217                self::mul($s1, $h4, 27)
    218218            );
    219219
    220220            $d1 = (
    221                 self::mul($h0, $r1, 25) +
    222                 self::mul($h1, $r0, 25) +
    223                 self::mul($s4, $h2, 26) +
    224                 self::mul($s3, $h3, 26) +
    225                 self::mul($s2, $h4, 26)
     221                self::mul($h0, $r1, 27) +
     222                self::mul($h1, $r0, 27) +
     223                self::mul($s4, $h2, 27) +
     224                self::mul($s3, $h3, 27) +
     225                self::mul($s2, $h4, 27)
    226226            );
    227227
    228228            $d2 = (
    229                 self::mul($h0, $r2, 25) +
    230                 self::mul($h1, $r1, 25) +
    231                 self::mul($h2, $r0, 25) +
    232                 self::mul($s4, $h3, 26) +
    233                 self::mul($s3, $h4, 26)
     229                self::mul($h0, $r2, 27) +
     230                self::mul($h1, $r1, 27) +
     231                self::mul($h2, $r0, 27) +
     232                self::mul($s4, $h3, 27) +
     233                self::mul($s3, $h4, 27)
    234234            );
    235235
    236236            $d3 = (
    237                 self::mul($h0, $r3, 25) +
    238                 self::mul($h1, $r2, 25) +
    239                 self::mul($h2, $r1, 25) +
    240                 self::mul($h3, $r0, 25) +
    241                 self::mul($s4, $h4, 26)
     237                self::mul($h0, $r3, 27) +
     238                self::mul($h1, $r2, 27) +
     239                self::mul($h2, $r1, 27) +
     240                self::mul($h3, $r0, 27) +
     241                self::mul($s4, $h4, 27)
    242242            );
    243243
    244244            $d4 = (
    245                 self::mul($h0, $r4, 25) +
    246                 self::mul($h1, $r3, 25) +
    247                 self::mul($h2, $r2, 25) +
    248                 self::mul($h3, $r1, 25) +
    249                 self::mul($h4, $r0, 25)
     245                self::mul($h0, $r4, 27) +
     246                self::mul($h1, $r3, 27) +
     247                self::mul($h2, $r2, 27) +
     248                self::mul($h3, $r1, 27) +
     249                self::mul($h4, $r0, 27)
    250250            );
    251251
  • trunk/src/wp-includes/sodium_compat/src/Core32/Poly1305/State.php

    r52988 r55699  
    256256            /* h *= r */
    257257            $d0 = $zero
    258                 ->addInt64($h0->mulInt64($r0, 25))
    259                 ->addInt64($s4->mulInt64($h1, 26))
    260                 ->addInt64($s3->mulInt64($h2, 26))
    261                 ->addInt64($s2->mulInt64($h3, 26))
    262                 ->addInt64($s1->mulInt64($h4, 26));
     258                ->addInt64($h0->mulInt64($r0, 27))
     259                ->addInt64($s4->mulInt64($h1, 27))
     260                ->addInt64($s3->mulInt64($h2, 27))
     261                ->addInt64($s2->mulInt64($h3, 27))
     262                ->addInt64($s1->mulInt64($h4, 27));
    263263
    264264            $d1 = $zero
    265                 ->addInt64($h0->mulInt64($r1, 25))
    266                 ->addInt64($h1->mulInt64($r0, 25))
    267                 ->addInt64($s4->mulInt64($h2, 26))
    268                 ->addInt64($s3->mulInt64($h3, 26))
    269                 ->addInt64($s2->mulInt64($h4, 26));
     265                ->addInt64($h0->mulInt64($r1, 27))
     266                ->addInt64($h1->mulInt64($r0, 27))
     267                ->addInt64($s4->mulInt64($h2, 27))
     268                ->addInt64($s3->mulInt64($h3, 27))
     269                ->addInt64($s2->mulInt64($h4, 27));
    270270
    271271            $d2 = $zero
    272                 ->addInt64($h0->mulInt64($r2, 25))
    273                 ->addInt64($h1->mulInt64($r1, 25))
    274                 ->addInt64($h2->mulInt64($r0, 25))
    275                 ->addInt64($s4->mulInt64($h3, 26))
    276                 ->addInt64($s3->mulInt64($h4, 26));
     272                ->addInt64($h0->mulInt64($r2, 27))
     273                ->addInt64($h1->mulInt64($r1, 27))
     274                ->addInt64($h2->mulInt64($r0, 27))
     275                ->addInt64($s4->mulInt64($h3, 27))
     276                ->addInt64($s3->mulInt64($h4, 27));
    277277
    278278            $d3 = $zero
    279                 ->addInt64($h0->mulInt64($r3, 25))
    280                 ->addInt64($h1->mulInt64($r2, 25))
    281                 ->addInt64($h2->mulInt64($r1, 25))
    282                 ->addInt64($h3->mulInt64($r0, 25))
    283                 ->addInt64($s4->mulInt64($h4, 26));
     279                ->addInt64($h0->mulInt64($r3, 27))
     280                ->addInt64($h1->mulInt64($r2, 27))
     281                ->addInt64($h2->mulInt64($r1, 27))
     282                ->addInt64($h3->mulInt64($r0, 27))
     283                ->addInt64($s4->mulInt64($h4, 27));
    284284
    285285            $d4 = $zero
    286                 ->addInt64($h0->mulInt64($r4, 25))
    287                 ->addInt64($h1->mulInt64($r3, 25))
    288                 ->addInt64($h2->mulInt64($r2, 25))
    289                 ->addInt64($h3->mulInt64($r1, 25))
    290                 ->addInt64($h4->mulInt64($r0, 25));
     286                ->addInt64($h0->mulInt64($r4, 27))
     287                ->addInt64($h1->mulInt64($r3, 27))
     288                ->addInt64($h2->mulInt64($r2, 27))
     289                ->addInt64($h3->mulInt64($r1, 27))
     290                ->addInt64($h4->mulInt64($r0, 27));
    291291
    292292            /* (partial) h %= p */
Note: See TracChangeset for help on using the changeset viewer.