Documentation

Common

Generic EC Key Parsing Helper functions

Tags
author

Jim Wigginton terrafrost@php.net

access

public

Table of Contents

Properties

$childOIDsLoaded  : bool
Child OIDs loaded
$curveOIDs  : array<string|int, mixed>
Curve OIDs
$useNamedCurves  : bool
Use Named Curves

Methods

extractPoint()  : array<string|int, object>
Extract points from a string
setImplicitCurve()  : mixed
Explicitly set the curve
useNamedCurve()  : mixed
Use Named Curve
useSpecifiedCurve()  : mixed
Use Specified Curve
loadCurveByParam()  : Base|false
Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based on the curve parameters
encodeParameters()  : string|false
Encode Parameters
initialize_static_variables()  : mixed
Initialize static variables

Properties

$childOIDsLoaded

Child OIDs loaded

protected static bool $childOIDsLoaded = false

$curveOIDs

Curve OIDs

private static array<string|int, mixed> $curveOIDs = []

$useNamedCurves

Use Named Curves

private static bool $useNamedCurves = true

Methods

extractPoint()

Extract points from a string

public static extractPoint(string $str, Base $curve) : array<string|int, object>

Supports both compressed and uncompressed points

Parameters
$str : string
$curve : Base
Return values
array<string|int, object>

setImplicitCurve()

Explicitly set the curve

public static setImplicitCurve(Base $curve) : mixed

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

Parameters
$curve : Base

useNamedCurve()

Use Named Curve

public static useNamedCurve() : mixed

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

useSpecifiedCurve()

Use Specified Curve

public static useSpecifiedCurve() : mixed

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

loadCurveByParam()

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

protected static loadCurveByParam(array<string|int, mixed> $params) : Base|false
Parameters
$params : array<string|int, mixed>
Return values
Base|false

encodeParameters()

Encode Parameters

private static encodeParameters(Base $curve[, bool $returnArray = false ][, array<string|int, mixed> $options = [] ]) : string|false
Parameters
$curve : Base
$returnArray : bool = false

optional

$options : array<string|int, mixed> = []

optional

Tags
todo

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

Return values
string|false

initialize_static_variables()

Initialize static variables

private static initialize_static_variables() : mixed

        
On this page

Search results