

 
Manual Reference Pages  CRYPT::RSA::ES::OAEP (3)
.ds Aq ’
NAME
Crypt::RSA::ES::OAEP  Plaintextaware encryption with RSA.
CONTENTS
SYNOPSIS
my $oaep = new Crypt::RSA::ES::OAEP;
my $ct = $oaep>encrypt( Key => $key, Message => $message ) 
die $oaep>errstr;
my $pt = $oaep>decrypt( Key => $key, Cyphertext => $ct ) 
die $oaep>errstr;
DESCRIPTION
This module implements Optimal Asymmetric Encryption, a plaintextaware
encryption scheme based on RSA. The notion of plaintextaware implies it’s
computationally infeasible to obtain full or partial information about a
message from a cyphertext, and computationally infeasible to generate a
valid cyphertext without knowing the corresponding message.
Plaintextaware schemes, such as OAEP, are semantically secure,
nonmalleable and secure against chosenciphertext attack. For more
information on OAEP and plaintextaware encryption, see [3], [9] & [13].
METHODS
BInew()
Constructor.
BIversion()
Returns the version number of the module.
BIencrypt()
Encrypts a string with a public key and returns the encrypted string
on success. encrypt() takes a hash argument with the following
mandatory keys:

<B>MessageB>

A string to be encrypted. The length of this string should not exceed k42
octets, where k is the octet length of the RSA modulus. If Message is
longer than k42, the method will fail and set $self>errstr to Message
too long. This means the key must be at least _336_ bits long if you are
to use OAEP.

<B>KeyB>

Public key of the recipient, a Crypt::RSA::Key::Public object.


BIdecrypt()
Decrypts cyphertext with a private key and returns plaintext on
success. $self>errstr is set to Decryption Error. or appropriate
error on failure. decrypt() takes a hash argument with the following
mandatory keys:

<B>CyphertextB>

A string encrypted with encrypt(). The length of the cyphertext must be k
octets, where k is the length of the RSA modulus.

<B>KeyB>

Private key of the receiver, a Crypt::RSA::Key::Private object.

<B>VersionB>

Version of the module that was used for creating the Cyphertext. This is
an optional argument. When present, decrypt() will ensure before
proceeding that the installed version of the module can successfully
decrypt the Cyphertext.


ERROR HANDLING
See ERROR HANDLING in Crypt::RSA(3) manpage.
BIBLIOGRAPHY
See BIBLIOGRAPHY in Crypt::RSA(3) manpage.
AUTHOR
Vipul Ved Prakash, <mail@vipul.net>
SEE ALSO
Crypt::RSA(3), Crypt::RSA::Primitives(3), Crypt::RSA::Keys(3),
Crypt::RSA::SSA::PSS(3)
perl v5.20.3  CRYPT::RSA::ES::OAEP (3)  20090607 
Visit the GSP FreeBSD Man Page Interface. Output converted with manServer 1.07. 