Binary Finite Fields
author | Jim Wigginton terrafrost@php.net |
---|---|
package | Default |
__construct( $instanceID, $num = '')
__debugInfo()
__toString()
add(self $y): static
self
static
checkInstance(self $x,self $y)
Throws an exception if the incorrect class is being utilized
self
self
compare(self $x): integer
self
integer
deg(string $x): integer
string
integer
divide(self $x): static
self
static
equals(self $x): boolean
self
boolean
getModulo( $instanceID): string
string
jsonSerialize()
modInverse(): static
static
multiply(self $y): static
self
static
negate(): object
A negative number can be written as 0-12. With modulos, 0 is the same thing as the modulo so 0-12 is the same thing as modulo-12
object
polynomialDivide( $x, $y): array<mixed,string>
link | https://en.wikipedia.org/wiki/Polynomial_greatest_common_divisor#Euclidean_division |
---|---|
array<mixed,string>
polynomialMultiply( $x, $y): string
Uses karatsuba multiplication to reduce x-bit multiplications to a series of 32-bit multiplications
link | |
---|---|
string
regularPolynomialMultiply( $x, $y): string
link | https://en.wikipedia.org/wiki/Finite_field_arithmetic#Multiplication |
---|---|
string
setModulo(integer $instanceID,string $modulo)
integer
string
setRecurringModuloFunction( $instanceID,callable $function)
callable
subAdd2(string $x,string $y): string
string
string
string
subAdd3(string $x,string $y, $z): string
string
string
string
subMultiply(string $x,string $y): string
link |
---|
string
string
string
subtract(self $x): static
self
static
toBigInteger(): string
string
toBits(): string
string
toBytes(): string
string
toHex(): string
string
value :string
var |
---|
string
instanceID :integer
var |
---|
integer
modulo :\phpseclib3\Math\BinaryField\array<int,
var | string> |
---|
\phpseclib3\Math\BinaryField\array
reduce :array<mixed,callable>
var |
---|
array<mixed,callable>