Documentation

EccFactory
in package

Static factory class providing factory methods to work with NIST and SECG recommended curves.

Table of Contents

Methods

createCurve()  : CurveFpInterface
Creates a new curve from arbitrary parameters.
getAdapter()  : GmpMathInterface
Selects and creates the most appropriate adapter for the running environment.
getNistCurves()  : NistCurve
Returns a factory to create NIST Recommended curves and generators.
getSecgCurves()  : SecgCurve
Returns a factory to return SECG Recommended curves and generators.
getSigner()  : Signer

Methods

createCurve()

Creates a new curve from arbitrary parameters.

public static createCurve(int $bitSize, GMP $prime, GMP $a, GMP $b[, GmpMathInterface $adapter = null ]) : CurveFpInterface
Parameters
$bitSize : int
$prime : GMP
$a : GMP
$b : GMP
$adapter : GmpMathInterface = null

[optional] Defaults to the return value of EccFactory::getAdapter().

Return values
CurveFpInterface

getAdapter()

Selects and creates the most appropriate adapter for the running environment.

public static getAdapter([bool $debug = false ]) : GmpMathInterface
Parameters
$debug : bool = false

[optional] Set to true to get a trace of all mathematical operations

Tags
throws
RuntimeException
Return values
GmpMathInterface

getNistCurves()

Returns a factory to create NIST Recommended curves and generators.

public static getNistCurves([GmpMathInterface $adapter = null ]) : NistCurve
Parameters
$adapter : GmpMathInterface = null

[optional] Defaults to the return value of EccFactory::getAdapter().

Return values
NistCurve

getSecgCurves()

Returns a factory to return SECG Recommended curves and generators.

public static getSecgCurves([GmpMathInterface $adapter = null ]) : SecgCurve
Parameters
$adapter : GmpMathInterface = null

[optional] Defaults to the return value of EccFactory::getAdapter().

Return values
SecgCurve

        
On this page

Search results