NistCurve
in package
This class encapsulates the NIST recommended curves - fields are Mersenne primes, i.e.
for some p, Mersenne_prine = 2^p - 1
Table of Contents
Constants
- NAME_P192 = 'nistp192'
- NAME_P224 = 'nistp224'
- NAME_P256 = 'nistp256'
- NAME_P384 = 'nistp384'
- NAME_P521 = 'nistp521'
Properties
Methods
- __construct() : mixed
- curve192() : NamedCurveFp
- Returns an NIST P-192 curve.
- curve224() : NamedCurveFp
- Returns an NIST P-224 curve
- curve256() : NamedCurveFp
- Returns an NIST P-256 curve.
- curve384() : NamedCurveFp
- Returns an NIST P-384 curve.
- curve521() : NamedCurveFp
- Returns an NIST P-521 curve.
- generator192() : GeneratorPoint
- Returns an NIST P-192 generator.
- generator224() : GeneratorPoint
- Returns an NIST P-224 generator.
- generator256() : GeneratorPoint
- Returns an NIST P-256 generator.
- generator384() : GeneratorPoint
- Returns an NIST P-384 generator.
- generator521() : GeneratorPoint
- Returns an NIST P-521 generator.
Constants
NAME_P192
public
mixed
NAME_P192
= 'nistp192'
NAME_P224
public
mixed
NAME_P224
= 'nistp224'
NAME_P256
public
mixed
NAME_P256
= 'nistp256'
NAME_P384
public
mixed
NAME_P384
= 'nistp384'
NAME_P521
public
mixed
NAME_P521
= 'nistp521'
Properties
$adapter
private
GmpMathInterface
$adapter
Methods
__construct()
public
__construct(GmpMathInterface $adapter) : mixed
Parameters
- $adapter : GmpMathInterface
curve192()
Returns an NIST P-192 curve.
public
curve192() : NamedCurveFp
Return values
NamedCurveFpcurve224()
Returns an NIST P-224 curve
public
curve224() : NamedCurveFp
Return values
NamedCurveFpcurve256()
Returns an NIST P-256 curve.
public
curve256() : NamedCurveFp
Return values
NamedCurveFpcurve384()
Returns an NIST P-384 curve.
public
curve384() : NamedCurveFp
Return values
NamedCurveFpcurve521()
Returns an NIST P-521 curve.
public
curve521() : NamedCurveFp
Return values
NamedCurveFpgenerator192()
Returns an NIST P-192 generator.
public
generator192([RandomNumberGeneratorInterface $randomGenerator = null ]) : GeneratorPoint
Parameters
- $randomGenerator : RandomNumberGeneratorInterface = null
Return values
GeneratorPointgenerator224()
Returns an NIST P-224 generator.
public
generator224([RandomNumberGeneratorInterface $randomGenerator = null ]) : GeneratorPoint
Parameters
- $randomGenerator : RandomNumberGeneratorInterface = null
Return values
GeneratorPointgenerator256()
Returns an NIST P-256 generator.
public
generator256([RandomNumberGeneratorInterface $randomGenerator = null ]) : GeneratorPoint
Parameters
- $randomGenerator : RandomNumberGeneratorInterface = null
Return values
GeneratorPointgenerator384()
Returns an NIST P-384 generator.
public
generator384([RandomNumberGeneratorInterface $randomGenerator = null ]) : GeneratorPoint
Parameters
- $randomGenerator : RandomNumberGeneratorInterface = null
Return values
GeneratorPointgenerator521()
Returns an NIST P-521 generator.
public
generator521([RandomNumberGeneratorInterface $randomGenerator = null ]) : GeneratorPoint
Parameters
- $randomGenerator : RandomNumberGeneratorInterface = null