Make WordPress Core


Ignore:
Timestamp:
10/06/2025 03:46:40 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.23.0.

The previous version of sodium_compat was overly permissible with sodium_base642bin() when the *_NO_PADDING variants were specified, which was not compatible with ext-sodium. This has been fixed in version 1.22.0.

Version 1.23.0 includes some optimizations by replacing the array in the Curve25519 field element with 10 integer object properties instead. The result is a 7% to 12% speedup for the overall PHPUnit suite.

References:

Follow-up to [55699], [58752], [58753], [60787].

Props paragoninitiativeenterprises, SergeyBiryukov.
Fixes #64079.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/src/Core/ChaCha20/IetfCtx.php

    r46586 r60905  
    2727            throw new InvalidArgumentException('ChaCha20 expects a 96-bit nonce in IETF mode.');
    2828        }
     29        $counter = $this->initCounter($counter);
    2930        parent::__construct($key, self::substr($iv, 0, 8), $counter);
    30 
    31         if (!empty($counter)) {
    32             $this->container[12] = self::load_4(self::substr($counter, 0, 4));
    33         }
     31        $this->container[12] = self::load_4(self::substr($counter, 0, 4));
    3432        $this->container[13] = self::load_4(self::substr($iv, 0, 4));
    3533        $this->container[14] = self::load_4(self::substr($iv, 4, 4));
Note: See TracChangeset for help on using the changeset viewer.