From f58da3a283490f4a376bb9b52a26a820bfe5cc51 Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Fri, 19 Apr 2024 20:05:27 -0400 Subject: [PATCH 1/3] Update sodium_compat dependency --- .github/workflows/ci.yml | 6 +++--- composer.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3b970a..b9e2657 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: phpunit-versions: ['latest'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -34,11 +34,11 @@ jobs: strategy: matrix: operating-system: ['ubuntu-latest'] - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] phpunit-versions: ['latest'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 886ae2e..8e1bc96 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "ext-gmp": "*", "defuse/php-encryption": "^2.1", "mdanter/ecc": "^1", - "paragonie/sodium_compat": "^1.16", + "paragonie/sodium_compat": "^1|^2", "paragonie/constant_time_encoding": "^2.1" }, "require-dev": { From 8b2800f8e532879d03171d7b3eaa460e1bfb9a40 Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Fri, 19 Apr 2024 20:08:20 -0400 Subject: [PATCH 2/3] Fix sodium_compat integration --- src/Curve25519/X25519.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Curve25519/X25519.php b/src/Curve25519/X25519.php index 07c90a0..7122883 100644 --- a/src/Curve25519/X25519.php +++ b/src/Curve25519/X25519.php @@ -43,7 +43,7 @@ public function __construct(PrivateKeyInterface $sk = null, PublicKeyInterface $ */ public function scalarMult(): string { - return \ParagonIE_Sodium_Compat::crypto_scalarmult( + return \sodium_crypto_scalarmult( $this->sk->getAsString(), $this->pk->getAsString() ); From acddf3d3d905e6871cb6ae3f95ba091580eaa5ee Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Fri, 19 Apr 2024 20:10:05 -0400 Subject: [PATCH 3/3] -8.4 for now --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9e2657..69a2b31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: operating-system: ['ubuntu-latest'] - php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3'] phpunit-versions: ['latest'] steps: - name: Checkout