1Crypt::RSA::ES::PKCS1v1U5s(e3r)Contributed Perl DocumentCartyipotn::RSA::ES::PKCS1v15(3)
2
3
4

NAME

6       Crypt::RSA::ES::PKCS1v15 - PKCS #1 v1.5 padded encryption scheme based
7       on RSA.
8

SYNOPSIS

10           my $pkcs = new Crypt::RSA::ES::PKCS1v15;
11
12           my $ct = $pkcs->encrypt( Key => $key, Message => $message ) ||
13                       die $pkcs->errstr;
14
15           my $pt = $pkcs->decrypt( Key => $key, Cyphertext => $ct )   ||
16                       die $pkcs->errstr;
17

DESCRIPTION

19       This module implements PKCS #1 v1.5 padded encryption scheme based on
20       RSA.  See [13] for details on the encryption scheme.
21

METHODS

23   new()
24       Constructor.
25
26   version()
27       Returns the version number of the module.
28
29   encrypt()
30       Encrypts a string with a public key and returns the encrypted string on
31       success. encrypt() takes a hash argument with the following mandatory
32       keys:
33
34       Message
35           A string to be encrypted. The length of this string should not
36           exceed k-10 octets, where k is the octet length of the RSA modulus.
37           If Message is longer than k-10, the method will fail and set
38           $self->errstr to "Message too long."
39
40       Key Public key of the recipient, a Crypt::RSA::Key::Public object.
41
42   decrypt()
43       Decrypts cyphertext with a private key and returns plaintext on
44       success. $self->errstr is set to "Decryption Error." or appropriate
45       error on failure. decrypt() takes a hash argument with the following
46       mandatory keys:
47
48       Cyphertext
49           A string encrypted with encrypt(). The length of the cyphertext
50           must be k octets, where k is the length of the RSA modulus.
51
52       Key Private key of the receiver, a Crypt::RSA::Key::Private object.
53

ERROR HANDLING

55       See ERROR HANDLING in Crypt::RSA(3) manpage.
56

BIBLIOGRAPHY

58       See BIBLIOGRAPHY in Crypt::RSA(3) manpage.
59

AUTHOR

61       Vipul Ved Prakash, <mail@vipul.net>
62

SEE ALSO

64       Crypt::RSA(3), Crypt::RSA::Primitives(3), Crypt::RSA::Keys(3),
65       Crypt::RSA::SSA::PSS(3)
66
67
68
69perl v5.32.0                      2020-07-28       Crypt::RSA::ES::PKCS1v15(3)
Impressum