pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct (\fpoirotte\Pssht\ECC\Point $Q, $d=null) | |
check ($message, $signature) | |
getPublic () | |
getRNG () | |
isValid () | |
serialize (\fpoirotte\Pssht\Wire\Encoder $encoder) | |
setRNG (\fpoirotte\Pssht\Random\RandomInterface $rng) | |
sign ($message, $raw_output=false) | |
![]() | |
sign ($message) | |
Static Public Member Functions | |
static | getName () |
Return the name of the algorithm. | |
static | unserialize (\fpoirotte\Pssht\Wire\Decoder $decoder, $private=null) |
![]() | |
static | getHash () |
static | getIdentifier () |
Protected Attributes | |
$d | |
Private key. | |
$Q | |
Public key. | |
$rng | |
RNG. | |
Abstract class for a Public key using the Elliptic Curve Digital Signature Algorithm (ECDSA).
fpoirotte\Pssht\Key\ECDSA\SHA2\Base::__construct | ( | \fpoirotte\Pssht\ECC\Point | $Q, |
$d = null |
|||
) |
Construct a new public/private ECDSA key with the NIST P-256 elliptic curve.
Point | $Q | GMP resource containing public key Q from ECDSA. |
resource | $d | (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 44 of file Base.php.
References fpoirotte\Pssht\Key\ECDSA\SHA2\Base\$d, and fpoirotte\Pssht\Key\ECDSA\SHA2\Base\$Q.
fpoirotte\Pssht\Key\ECDSA\SHA2\Base::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.
fpoirotte\Pssht\Key\ECDSA\SHA2\Base::getRNG | ( | ) |
Get the Random Number Generator associated with this key.
fpoirotte::Pssht::Random::RandomInterface | RNG associated with this key. |
Definition at line 140 of file Base.php.
References fpoirotte\Pssht\Key\ECDSA\SHA2\Base\$rng.
fpoirotte\Pssht\Key\ECDSA\SHA2\Base::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 56 of file Base.php.
References fpoirotte\Pssht\Key\ECDSA\SHA2\Base\$Q.
fpoirotte\Pssht\Key\ECDSA\SHA2\Base::setRNG | ( | \fpoirotte\Pssht\Random\RandomInterface | $rng | ) |
Set the Random Number Generator to use when signing messages with this key.
fpoirotte::Pssht::Random::RandomInterface | $rng | New RNG to use. |
Definition at line 152 of file Base.php.
References fpoirotte\Pssht\Key\ECDSA\SHA2\Base\$Q, and fpoirotte\Pssht\Key\ECDSA\SHA2\Base\$rng.