Changeset 55699
- Timestamp:
- 04/30/2023 02:06:51 PM (22 months ago)
- Location:
- trunk/src/wp-includes/sodium_compat
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/LICENSE
r54310 r55699 1 1 ISC License 2 2 3 Copyright (c) 2016-202 2, Paragon Initiative Enterprises <security at paragonie dot com>3 Copyright (c) 2016-2023, Paragon Initiative Enterprises <security at paragonie dot com> 4 4 Copyright (c) 2013-2019, Frank Denis <j at pureftpd dot org> 5 5 -
trunk/src/wp-includes/sodium_compat/lib/php72compat.php
r54310 r55699 1361 1361 * @throws SodiumException 1362 1362 * @throws TypeError 1363 * 1364 * @psalm-suppress ReferenceConstraintViolation 1363 1365 */ 1364 1366 function sodium_memzero(&$string) -
trunk/src/wp-includes/sodium_compat/src/Core/Poly1305/State.php
r46858 r55699 211 211 /* h *= r */ 212 212 $d0 = ( 213 self::mul($h0, $r0, 2 5) +214 self::mul($s4, $h1, 2 6) +215 self::mul($s3, $h2, 2 6) +216 self::mul($s2, $h3, 2 6) +217 self::mul($s1, $h4, 2 6)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) 218 218 ); 219 219 220 220 $d1 = ( 221 self::mul($h0, $r1, 2 5) +222 self::mul($h1, $r0, 2 5) +223 self::mul($s4, $h2, 2 6) +224 self::mul($s3, $h3, 2 6) +225 self::mul($s2, $h4, 2 6)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) 226 226 ); 227 227 228 228 $d2 = ( 229 self::mul($h0, $r2, 2 5) +230 self::mul($h1, $r1, 2 5) +231 self::mul($h2, $r0, 2 5) +232 self::mul($s4, $h3, 2 6) +233 self::mul($s3, $h4, 2 6)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) 234 234 ); 235 235 236 236 $d3 = ( 237 self::mul($h0, $r3, 2 5) +238 self::mul($h1, $r2, 2 5) +239 self::mul($h2, $r1, 2 5) +240 self::mul($h3, $r0, 2 5) +241 self::mul($s4, $h4, 2 6)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) 242 242 ); 243 243 244 244 $d4 = ( 245 self::mul($h0, $r4, 2 5) +246 self::mul($h1, $r3, 2 5) +247 self::mul($h2, $r2, 2 5) +248 self::mul($h3, $r1, 2 5) +249 self::mul($h4, $r0, 2 5)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) 250 250 ); 251 251 -
trunk/src/wp-includes/sodium_compat/src/Core32/Poly1305/State.php
r52988 r55699 256 256 /* h *= r */ 257 257 $d0 = $zero 258 ->addInt64($h0->mulInt64($r0, 2 5))259 ->addInt64($s4->mulInt64($h1, 2 6))260 ->addInt64($s3->mulInt64($h2, 2 6))261 ->addInt64($s2->mulInt64($h3, 2 6))262 ->addInt64($s1->mulInt64($h4, 2 6));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)); 263 263 264 264 $d1 = $zero 265 ->addInt64($h0->mulInt64($r1, 2 5))266 ->addInt64($h1->mulInt64($r0, 2 5))267 ->addInt64($s4->mulInt64($h2, 2 6))268 ->addInt64($s3->mulInt64($h3, 2 6))269 ->addInt64($s2->mulInt64($h4, 2 6));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)); 270 270 271 271 $d2 = $zero 272 ->addInt64($h0->mulInt64($r2, 2 5))273 ->addInt64($h1->mulInt64($r1, 2 5))274 ->addInt64($h2->mulInt64($r0, 2 5))275 ->addInt64($s4->mulInt64($h3, 2 6))276 ->addInt64($s3->mulInt64($h4, 2 6));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)); 277 277 278 278 $d3 = $zero 279 ->addInt64($h0->mulInt64($r3, 2 5))280 ->addInt64($h1->mulInt64($r2, 2 5))281 ->addInt64($h2->mulInt64($r1, 2 5))282 ->addInt64($h3->mulInt64($r0, 2 5))283 ->addInt64($s4->mulInt64($h4, 2 6));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)); 284 284 285 285 $d4 = $zero 286 ->addInt64($h0->mulInt64($r4, 2 5))287 ->addInt64($h1->mulInt64($r3, 2 5))288 ->addInt64($h2->mulInt64($r2, 2 5))289 ->addInt64($h3->mulInt64($r1, 2 5))290 ->addInt64($h4->mulInt64($r0, 2 5));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)); 291 291 292 292 /* (partial) h %= p */
Note: See TracChangeset
for help on using the changeset viewer.