Crypt::RSA::SSA::PSS - Probablistic Signature Scheme based on RSA.
my $pss = new Crypt::RSA::SSA::PSS; my $signature = $pss->sign ( Message => $message, Key => $private, ) || die $pss->errstr; my $verify = $pss->verify ( Message => $message, Key => $key, Signature => $signature, ) || die $pss->errstr;
PSS (Probabilistic Signature Scheme) is a provably secure method of creating digital signatures with RSA. "Provable" means that the difficulty of forging signatures can be directly related to inverting the RSA function. "Probablistic" alludes to the randomly generated salt value included in the signature to enchance security. For more details on PSS, see [4] & [13].
Constructor.
Computes a PSS signature on a message with the private key of the signer. In scalar context, sign() returns the computed signature. In array context, it returns the signature and the random salt. The signature can verified with verify() or verify_with_salt(). sign() takes a hash argument with the following mandatory keys:
Message to be signed, a string of arbitary length.
Private key of the signer, a Crypt::RSA::Key::Private object.
Verfies a signature generated with sign(). The salt is recovered from the signature and need not be passed. Returns a true value on success and false on failure. $self->errstr is set to "Invalid signature." or appropriate error on failure. verify() takes a hash argument with the following mandatory keys:
Public key of the signer, a Crypt::RSA::Key::Public object.
The original signed message, a string of arbitary length.
Signature computed with sign(), a string.
Verifies a signature given the salt. Takes the same arguments as verify() in addition to Salt, which is a 20-byte string returned by sign() in array context.
See ERROR HANDLING in Crypt::RSA(3) manpage.
See BIBLIOGRAPHY in Crypt::RSA(3) manpage.
Vipul Ved Prakash, <mail@vipul.net>
Crypt::RSA(3), Crypt::RSA::Primitives(3), Crypt::RSA::Keys(3), Crypt::RSA::EME::OAEP(3)
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
You forgot a '=back' before '=head1'
To install Crypt::RSA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::RSA
CPAN shell
perl -MCPAN -e shell install Crypt::RSA
For more information on module installation, please visit the detailed CPAN module installation guide.