![]() |
![]()
| ![]() |
![]()
NAMECrypt::RSA::ES::OAEP - Plaintext-aware encryption with RSA. SYNOPSISmy $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; DESCRIPTIONThis module implements Optimal Asymmetric Encryption, a plaintext-aware encryption scheme based on RSA. The notion of plaintext-aware 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. Plaintext-aware schemes, such as OAEP, are semantically secure, non-malleable and secure against chosen-ciphertext attack. For more information on OAEP and plaintext-aware encryption, see [3], [9] & [13]. METHODSnew()Constructor. version()Returns the version number of the module. encrypt()Encrypts a string with a public key and returns the encrypted string on success. encrypt() takes a hash argument with the following mandatory keys:
decrypt()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:
ERROR HANDLINGSee ERROR HANDLING in Crypt::RSA(3) manpage. BIBLIOGRAPHYSee BIBLIOGRAPHY in Crypt::RSA(3) manpage. AUTHORVipul Ved Prakash, <mail@vipul.net> SEE ALSOCrypt::RSA(3), Crypt::RSA::Primitives(3), Crypt::RSA::Keys(3), Crypt::RSA::SSA::PSS(3)
|