PuTTY
abstract class PuTTY extends PuTTY (View source)
PuTTY Formatted EC Key Handler
Traits
Constants
PUBLIC_HANDLER |
Public Handler |
Properties
static protected bool | $childOIDsLoaded | Child OIDs loaded | from Common |
static protected array | $types | Supported Key Types |
Methods
Break a public or private key down into its constituent components
Wrap a private key appropriately
Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based on the curve parameters
Convert a private key to the appropriate format.
Details
in
PuTTY at line 49
static
setComment(string $comment)
Sets the default comment
static array
load(string $key, string $password = '')
Break a public or private key down into its constituent components
in
PuTTY at line 201
static protected string
wrapPrivateKey(string $public, string $private, string $type, string $password, array $options = [])
Wrap a private key appropriately
in
PuTTY at line 252
static protected string
wrapPublicKey(string $key, string $type)
Wrap a public key appropriately
This is basically the format described in RFC 4716 (https://tools.ietf.org/html/rfc4716)
static
setImplicitCurve(Base $curve)
Explicitly set the curve
If the key contains an implicit curve phpseclib needs the curve to be explicitly provided
static protected Base|false
loadCurveByParam(array $params)
Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based on the curve parameters
static object[]
extractPoint(string $str, Base $curve)
Extract points from a string
Supports both compressed and uncompressed points
static
useSpecifiedCurve()
Use Specified Curve
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
static
useNamedCurve()
Use Named Curve
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
static string
savePrivateKey(Integer $privateKey, Base $curve, array $publicKey, string $password = false, array $options = [])
Convert a private key to the appropriate format.
static string
savePublicKey(Base $curve, array $publicKey)
Convert an EC public key to the appropriate format