Common

Generic EC Key Parsing Helper functions

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Encode Parameters

encodeParameters(\phpseclib3\Crypt\EC\BaseCurves\Base $curve,boolean $returnArray = false,array $options = array()): string|false
static
todo

Maybe at some point this could be moved to __toString() for each of the curves?

Arguments

$returnArray

boolean

optional

$options

array

optional

Response

string|false

Extract points from a string

extractPoint(string $str,\phpseclib3\Crypt\EC\BaseCurves\Base $curve): array<mixed,object>
static

Supports both compressed and uncompressed points

Arguments

$str

string

Response

array<mixed,object>

Initialize static variables

initialize_static_variables()
static

Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based on the curve parameters

loadCurveByParam(array $params): \phpseclib3\Crypt\EC\BaseCurves\Base|false
static

Arguments

$params

array

Response

\phpseclib3\Crypt\EC\BaseCurves\Base|false

Explicitly set the curve

setImplicitCurve(\phpseclib3\Crypt\EC\BaseCurves\Base $curve)
static

If the key contains an implicit curve phpseclib needs the curve to be explicitly provided

Arguments

Use Named Curve

useNamedCurve()
static

A named curve does not include any parameters. It is up to the EC parameters to know what the coefficients, the base points, etc, are from the name of the curve. A named curve is a more concise way of representing a curve

Use Specified Curve

useSpecifiedCurve()
static

A specified curve has all the coefficients, the base points, etc, explicitely included. A specified curve is a more verbose way of representing a curve

Properties

Curve OIDs

curveOIDs :array
static
var

Type(s)

array

Child OIDs loaded

childOIDsLoaded :boolean
static
var

Type(s)

boolean

Use Named Curves

useNamedCurves :boolean
static
var

Type(s)

boolean