Documentation

NumberTheory
in package

Rewritten to take a MathAdaptor to handle different environments. Has some desireable functions for public key compression/recovery.

Table of Contents

Properties

$adapter  : GmpMathInterface

Methods

__construct()  : mixed
polynomialMultiplyMod()  : array<string|int, GMP>
polynomialPowMod()  : array<string|int, GMP>
polynomialReduceMod()  : array<string|int, GMP>
squareRootModP()  : GMP

Properties

Methods

polynomialMultiplyMod()

public polynomialMultiplyMod(array<string|int, GMP$m1, array<string|int, GMP$m2, array<string|int, GMP$polymod, GMP $p) : array<string|int, GMP>
Parameters
$m1 : array<string|int, GMP>
$m2 : array<string|int, GMP>
$polymod : array<string|int, GMP>
$p : GMP
Return values
array<string|int, GMP>

polynomialPowMod()

public polynomialPowMod(array<string|int, GMP$base, GMP $exponent, array<string|int, GMP$polymod, GMP $p) : array<string|int, GMP>
Parameters
$base : array<string|int, GMP>
$exponent : GMP
$polymod : array<string|int, GMP>
$p : GMP
Return values
array<string|int, GMP>

polynomialReduceMod()

public polynomialReduceMod(array<string|int, GMP$poly, array<string|int, GMP$polymod, GMP $p) : array<string|int, GMP>
Parameters
$poly : array<string|int, GMP>
$polymod : array<string|int, GMP>
$p : GMP
Return values
array<string|int, GMP>

squareRootModP()

public squareRootModP(GMP $a, GMP $p) : GMP
Parameters
$a : GMP
$p : GMP
Return values
GMP

        
On this page

Search results