1Crypt::RSA::SS::PKCS1v1U5s(e3r)Contributed Perl DocumentCartyipotn::RSA::SS::PKCS1v15(3)
2
3
4
6 Crypt::RSA::SS::PKCS1v15 - PKCS #1 v1.5 signatures.
7
9 my $pkcs = new Crypt::RSA::SS::PKCS1v15 (
10 Digest => 'MD5'
11 );
12
13 my $signature = $pkcs->sign (
14 Message => $message,
15 Key => $private,
16 ) ⎪⎪ die $pss->errstr;
17
18 my $verify = $pkcs->verify (
19 Message => $message,
20 Key => $key,
21 Signature => $signature,
22 ) ⎪⎪ die $pss->errstr;
23
25 This module implements PKCS #1 v1.5 signatures based on RSA. See [13]
26 for details on the scheme.
27
29 new()
30
31 Constructor. Takes a hash as argument with the following key:
32
33 Digest
34 Name of the Message Digest algorithm. Three Digest algorithms are
35 supported: MD2, MD5 and SHA1. Digest defaults to SHA1.
36
37 version()
38
39 Returns the version number of the module.
40
41 sign()
42
43 Computes a PKCS #1 v1.5 signature on a message with the private key of
44 the signer. sign() takes a hash argument with the following mandatory
45 keys:
46
47 Message
48 Message to be signed, a string of arbitrary length.
49
50 Key Private key of the signer, a Crypt::RSA::Key::Private object.
51
52 verify()
53
54 Verifies a signature generated with sign(). Returns a true value on
55 success and false on failure. $self->errstr is set to "Invalid signa‐
56 ture." or appropriate error on failure. verify() takes a hash argument
57 with the following mandatory keys:
58
59 Key Public key of the signer, a Crypt::RSA::Key::Public object.
60
61 Message
62 The original signed message, a string of arbitrary length.
63
64 Signature
65 Signature computed with sign(), a string.
66
68 See ERROR HANDLING in Crypt::RSA(3) manpage.
69
71 See BIBLIOGRAPHY in Crypt::RSA(3) manpage.
72
74 Vipul Ved Prakash, <mail@vipul.net>
75
77 Crypt::RSA(3), Crypt::RSA::Primitives(3), Crypt::RSA::Keys(3),
78 Crypt::RSA::EME::OAEP(3)
79
80
81
82perl v5.8.8 2007-04-17 Crypt::RSA::SS::PKCS1v15(3)