diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /vendor/paragonie/sodium_compat/src/Core32/Poly1305 | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to 'vendor/paragonie/sodium_compat/src/Core32/Poly1305')
-rw-r--r-- | vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php b/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php index d80e1ff..90d0362 100644 --- a/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php +++ b/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php @@ -255,39 +255,39 @@ class ParagonIE_Sodium_Core32_Poly1305_State extends ParagonIE_Sodium_Core32_Uti /* h *= r */ $d0 = $zero - ->addInt64($h0->mulInt64($r0, 25)) - ->addInt64($s4->mulInt64($h1, 26)) - ->addInt64($s3->mulInt64($h2, 26)) - ->addInt64($s2->mulInt64($h3, 26)) - ->addInt64($s1->mulInt64($h4, 26)); + ->addInt64($h0->mulInt64($r0, 27)) + ->addInt64($s4->mulInt64($h1, 27)) + ->addInt64($s3->mulInt64($h2, 27)) + ->addInt64($s2->mulInt64($h3, 27)) + ->addInt64($s1->mulInt64($h4, 27)); $d1 = $zero - ->addInt64($h0->mulInt64($r1, 25)) - ->addInt64($h1->mulInt64($r0, 25)) - ->addInt64($s4->mulInt64($h2, 26)) - ->addInt64($s3->mulInt64($h3, 26)) - ->addInt64($s2->mulInt64($h4, 26)); + ->addInt64($h0->mulInt64($r1, 27)) + ->addInt64($h1->mulInt64($r0, 27)) + ->addInt64($s4->mulInt64($h2, 27)) + ->addInt64($s3->mulInt64($h3, 27)) + ->addInt64($s2->mulInt64($h4, 27)); $d2 = $zero - ->addInt64($h0->mulInt64($r2, 25)) - ->addInt64($h1->mulInt64($r1, 25)) - ->addInt64($h2->mulInt64($r0, 25)) - ->addInt64($s4->mulInt64($h3, 26)) - ->addInt64($s3->mulInt64($h4, 26)); + ->addInt64($h0->mulInt64($r2, 27)) + ->addInt64($h1->mulInt64($r1, 27)) + ->addInt64($h2->mulInt64($r0, 27)) + ->addInt64($s4->mulInt64($h3, 27)) + ->addInt64($s3->mulInt64($h4, 27)); $d3 = $zero - ->addInt64($h0->mulInt64($r3, 25)) - ->addInt64($h1->mulInt64($r2, 25)) - ->addInt64($h2->mulInt64($r1, 25)) - ->addInt64($h3->mulInt64($r0, 25)) - ->addInt64($s4->mulInt64($h4, 26)); + ->addInt64($h0->mulInt64($r3, 27)) + ->addInt64($h1->mulInt64($r2, 27)) + ->addInt64($h2->mulInt64($r1, 27)) + ->addInt64($h3->mulInt64($r0, 27)) + ->addInt64($s4->mulInt64($h4, 27)); $d4 = $zero - ->addInt64($h0->mulInt64($r4, 25)) - ->addInt64($h1->mulInt64($r3, 25)) - ->addInt64($h2->mulInt64($r2, 25)) - ->addInt64($h3->mulInt64($r1, 25)) - ->addInt64($h4->mulInt64($r0, 25)); + ->addInt64($h0->mulInt64($r4, 27)) + ->addInt64($h1->mulInt64($r3, 27)) + ->addInt64($h2->mulInt64($r2, 27)) + ->addInt64($h3->mulInt64($r1, 27)) + ->addInt64($h4->mulInt64($r0, 27)); /* (partial) h %= p */ $c = $d0->shiftRight(26); @@ -419,7 +419,7 @@ class ParagonIE_Sodium_Core32_Poly1305_State extends ParagonIE_Sodium_Core32_Uti $g4 = $g4->mask($mask); /** @var int $mask */ - $mask = (~$mask) & 0xffffffff; + $mask = ~$mask; $h0 = $h0->mask($mask)->orInt32($g0); $h1 = $h1->mask($mask)->orInt32($g1); |