pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct ($pk, $sk=null) | |
check ($message, $signature) | |
serialize (\fpoirotte\Pssht\Wire\Encoder $encoder) | |
sign ($message) | |
Static Public Member Functions | |
static | getName () |
Return the name of the algorithm. | |
static | isAvailable () |
static | unserialize (\fpoirotte\Pssht\Wire\Decoder $decoder, $private=null) |
Static Protected Member Functions | |
static | decodeint ($s) |
static | decodepoint ($s) |
static | encodeint ($y) |
static | encodepoint ($P) |
static | hashint ($m) |
static | isOnCurve ($P) |
Protected Attributes | |
$pk | |
Public key. | |
$sk | |
Private (secret) key. | |
Public key algorithm based on EdDSA (Edwards-curve Digital Signature Algorithm) using curve "Ed25519".
Definition at line 25 of file ED25519.php.
fpoirotte\Pssht\Key\SSH\ED25519::__construct | ( | $pk, | |
$sk = null |
|||
) |
Construct a new public/private EdDSA key.
string | $pk | Public key as a string. |
string | $sk | (optional) Private key as a string. If omitted, only the public part of the key is loaded, meaning that signature generation will be unavailable. |
Definition at line 48 of file ED25519.php.
References fpoirotte\Pssht\Key\SSH\ED25519\$pk, and fpoirotte\Pssht\Key\SSH\ED25519\$sk.
fpoirotte\Pssht\Key\SSH\ED25519::check | ( | $message, | |
$signature | |||
) |
Check the signature for a message.
string | $message | Signed message. |
string | $signature | Signature to check. |
bool | true if the signature is valid for the given message, false otherwise. |
Implements fpoirotte\Pssht\Key\KeyInterface.
Definition at line 181 of file ED25519.php.
|
static |
Determine whether the algorithm is available.
bool | true if the algorithm is available, false otherwise. |
Implements fpoirotte\Pssht\Algorithms\AvailabilityInterface.
Definition at line 78 of file ED25519.php.
fpoirotte\Pssht\Key\SSH\ED25519::serialize | ( | \fpoirotte\Pssht\Wire\Encoder | $encoder | ) |
Serialize a key.
fpoirotte::Pssht::Wire::Encoder | $encoder | Encoder to use to serialize the key. |
string | Serialized representation of the key. |
Implements fpoirotte\Pssht\Key\KeyInterface.
Definition at line 62 of file ED25519.php.
References fpoirotte\Pssht\Key\SSH\ED25519\$pk.
fpoirotte\Pssht\Key\SSH\ED25519::sign | ( | $message | ) |
Sign a message using the key.
string | $message | Message to sign. |
string | Message signature. |
Implements fpoirotte\Pssht\Key\KeyInterface.
Definition at line 150 of file ED25519.php.