1Crypt::RSA::SS::PSS(3)User Contributed Perl DocumentationCrypt::RSA::SS::PSS(3)
2
3
4
6 Crypt::RSA::SS::PSS - Probabilistic Signature Scheme based on RSA.
7
9 my $pss = new Crypt::RSA::SS::PSS;
10
11 my $signature = $pss->sign (
12 Message => $message,
13 Key => $private,
14 ) || die $pss->errstr;
15
16 my $verify = $pss->verify (
17 Message => $message,
18 Key => $key,
19 Signature => $signature,
20 ) || die $pss->errstr;
21
23 PSS (Probabilistic Signature Scheme) is a provably secure method of
24 creating digital signatures with RSA. "Provable" means that the
25 difficulty of forging signatures can be directly related to inverting
26 the RSA function. "Probabilistic" alludes to the randomly generated
27 salt value included in the signature to enhance security. For more
28 details on PSS, see [4] & [13].
29
31 new()
32 Constructor.
33
34 version()
35 Returns the version number of the module.
36
37 sign()
38 Computes a PSS signature on a message with the private key of the
39 signer. In scalar context, sign() returns the computed signature. In
40 array context, it returns the signature and the random salt. The
41 signature can verified with verify() or verify_with_salt(). sign()
42 takes a hash argument with the following mandatory keys:
43
44 Message
45 Message to be signed, a string of arbitrary length.
46
47 Key Private key of the signer, a Crypt::RSA::Key::Private object.
48
49 verify()
50 Verifies a signature generated with sign(). The salt is recovered from
51 the signature and need not be passed. Returns a true value on success
52 and false on failure. $self->errstr is set to "Invalid signature." or
53 appropriate error on failure. verify() takes a hash argument with the
54 following mandatory keys:
55
56 Key Public key of the signer, a Crypt::RSA::Key::Public object.
57
58 Message
59 The original signed message, a string of arbitrary length.
60
61 Signature
62 Signature computed with sign(), a string.
63
64 Version
65 Version of the module that was used for creating the Signature.
66 This is an optional argument. When present, verify() will ensure
67 before proceeding that the installed version of the module can
68 successfully verify the Signature.
69
70 verify_with_salt()
71 Verifies a signature given the salt. Takes the same arguments as
72 verify() in addition to Salt, which is a 20-byte string returned by
73 sign() in array context.
74
76 See ERROR HANDLING in Crypt::RSA(3) manpage.
77
79 See BIBLIOGRAPHY in Crypt::RSA(3) manpage.
80
82 Vipul Ved Prakash, <mail@vipul.net>
83
85 Crypt::RSA(3), Crypt::RSA::Primitives(3), Crypt::RSA::Keys(3),
86 Crypt::RSA::EME::OAEP(3)
87
88
89
90perl v5.32.1 2021-01-27 Crypt::RSA::SS::PSS(3)