PHP Interface Trianglman\Sqrl\Ed25519\CryptoInterface

Author: johnj
Show file Open project: trianglman/sqrl

Public Methods

Method Description
checkvalid ( string $s, string $m, string $pk ) : boolean Validates a signature matches a given message
publickey ( string $sk ) : string Generates the public key of a given private key
signature ( string $m, string $sk, string $pk ) : string Signs a string with the private key

Method Details

checkvalid() public method

Validates a signature matches a given message
public checkvalid ( string $s, string $m, string $pk ) : boolean
$s string The message signature
$m string The original message
$pk string The public key to verify the signature
return boolean

publickey() public method

Generates the public key of a given private key
public publickey ( string $sk ) : string
$sk string the secret key
return string

signature() public method

Signs a string with the private key
public signature ( string $m, string $sk, string $pk ) : string
$m string The message to sign
$sk string The secret key to sign the message with
$pk string The public key that will be able to verify the signature
return string