pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct ($p, $q, $g, $y, $x=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 | unserialize (\fpoirotte\Pssht\Wire\Decoder $decoder, $private=null) |
Public Attributes | |
const | DER_HEADER = "\x30\x20\x30\x0c\x06\x08\x2a\x86\x48\x86\xf7\x0d\x02\x05\x05\x00\x04\x10" |
DER header for DSA. | |
Protected Attributes | |
$g | |
DSA parameter g. | |
$p | |
DSA parameter p. | |
$q | |
DSA prime number. | |
$x | |
Private key. | |
$y | |
Public key. | |
Public key using the Digital Signature Algorithm (DSA), as used in the Digital Signature Standard (DSS).
fpoirotte\Pssht\Key\SSH\DSS::__construct | ( | $p, | |
$q, | |||
$g, | |||
$y, | |||
$x = null |
|||
) |
Construct a new public/private DSA key.
resource | $p | GMP resource containing the p parameter for DSA. |
resource | $q | GMP resource containing the q parameter for DSA. |
resource | $g | GMP resource containing the g parameter for DSA. |
resource | $y | GMP resource containing the public key. |
resource | $x | (optional) GMP resource containing the private key. If omitted, only the public part of the key is loaded, meaning that signature generation will be unavailable. |
Definition at line 60 of file DSS.php.
References fpoirotte\Pssht\Key\SSH\DSS\$g, fpoirotte\Pssht\Key\SSH\DSS\$p, fpoirotte\Pssht\Key\SSH\DSS\$q, fpoirotte\Pssht\Key\SSH\DSS\$x, and fpoirotte\Pssht\Key\SSH\DSS\$y.
fpoirotte\Pssht\Key\SSH\DSS::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 134 of file DSS.php.
Referenced by fpoirotte\Pssht\Key\SSH\DSS\sign().
fpoirotte\Pssht\Key\SSH\DSS::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 74 of file DSS.php.
References fpoirotte\Pssht\Key\SSH\DSS\$g, fpoirotte\Pssht\Key\SSH\DSS\$p, fpoirotte\Pssht\Key\SSH\DSS\$q, and fpoirotte\Pssht\Key\SSH\DSS\$y.
fpoirotte\Pssht\Key\SSH\DSS::sign | ( | $message | ) |
Sign a message using the key.
string | $message | Message to sign. |
string | Message signature. |
Implements fpoirotte\Pssht\Key\KeyInterface.
Definition at line 95 of file DSS.php.
References fpoirotte\Pssht\Key\SSH\DSS\check().