Crypt::RSA - RSA public-key cryptosystem.
$Revision: 1.24 $ (Beta) $Date: 2001/03/12 04:49:49 $
my $rsa = new Crypt::RSA; my ($public, $private) = $rsa->keygen ( ... ); my $cyphertext = $rsa->encrypt ( Message => $message, Key => $public Armour => 1, ) || die $rsa->errstr(); my $plaintext = $rsa->decrypt ( Cyphertext => $message, Key => $private Armour => 1, ) || die $rsa->errstr(); my $signature = $rsa->sign ( Message => $message, Key => $private ) || die $rsa->errstr(); my $verify = $rsa->verify ( Message => $message, Signature => $signature, Key => $public ) || die $rsa->errstr();
Crypt::RSA is a pure-perl, cleanroom implementation of the RSA public-key cryptosystem, written atop the blazingly fast number theory library Pari. As far as possible, Crypt::RSA conforms with PKCS #1, RSA Cryptography Specifications v2.1[13].
This implementation is structured as a bundle of modules that provide key pair generation and management, plaintext-aware encryption and digital signatures with appendix. Crypt::RSA is a DWIM wrapper around the other modules in the bundle.
This is beta, and largely untested, software. Please use at your own risk!
ASN.1 encoded formats are not supported yet.
Constructor.
As of this writing, Crypt::RSA is just a placeholder for the wrapper code, which will appear soon. In the meantime, please use the following modules directly:
RSA key pair generator.
RSA Public Key Management.
RSA Private Key Management.
Plaintext-aware encryption with RSA.
Probablistic Signature Scheme based on RSA.
All modules in the Crypt::RSA bundle use a common error handling method. When a method fails it returns a non-true value and sets $self->errstr to a string that explains the reason for the error. Private keys and plaintext representations passed to the method in question are wiped from memory.
Vipul Ved Prakash, <mail@vipul.net>
Thanks to Ilya Zakharevich for answering even the goofiest of my questions regarding Math::Pari with unwavering paitence. Shizukesa on #perl for clueing me into the error handling method used in this module and a-mused for good advice.
Copyright (c) 1998-2001, Vipul Ved Prakash. All rights reserved. This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Crypt::RSA::Primitives(3), Crypt::RSA::DataFormat(3), Crypt::RSA::Errorhandler(3), Crypt::RSA::Debug(3), Crypt::Primes(3), Crypt::Random(3), Crypt::CBC(3), Crypt::Blowfish(3), Tie::EncryptedHash(3), Math::Pari(3).
pac@lists.vipul.net is a mailing list for discussing development of asymmetric cryptography modules in perl. Please send Crypt::RSA related communications directly to the list address. Subscription interface for pac is at http://lists.vipul.net/mailman/listinfo/pac/
(Chronologically sorted.)
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install Crypt::RSA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::RSA
CPAN shell
perl -MCPAN -e shell install Crypt::RSA
For more information on module installation, please visit the detailed CPAN module installation guide.