ParagonIE_Sodium_Core_Util::mul

SummerySummery

Multiply two integers in constant-time

Syntax

ParagonIE_Sodium_Core_Util::mul( int $a, int $b, int $size )

DescriptionDescription

Micro-architecture timing side-channels caused by how your CPU implements multiplication are best prevented by never using the multiplication operators and ensuring that our code always takes the same number of operations to complete, regardless of the values of $a and $b.

ParametersParameters

$a

(int) (Required)

$b

(int) (Required)

$size

(int) (Required) Limits the number of operations (useful for small, constant operands)

ReturnReturn

(int)

SourceSource

File: wp-includes/sodium_compat/src/Core/Util.php


			
Scroll to Top