GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Crypt::Perl::RSA::Generate(3) User Contributed Perl Documentation Crypt::Perl::RSA::Generate(3)

Crypt::Perl::RSA::Generate - RSA key generation

    use Crypt::Perl::RSA::Generate ();

    #$prkey is a Crypt::Perl::RSA::PrivateKey instance.
    my $prkey = Crypt::Perl::RSA::Generate::create(2048);

Unfortunately, this is quite slow in Perl—too slow, in fact, if you don’t have either Math::BigInt::GMP or Math::BigInt::Pari. The logic here will still run under pure Perl, but it’ll take too long to be practical.

The current Math::ProvablePrime backend is slated to be replaced with Math::Prime::Util; once that happens, pure-Perl operation should be much more feasible.

Crypt::OpenSSL::RSA - probably the fastest way to generate RSA keys in perl. (It relies on XS, so this project can’t use it.)
Use the "openssl" binary OpenSSL <http://openssl.org> directly, e.g., "my $rsa_pem = qx/openssl genrsa/". Most *NIX systems can do this.

NOTE: As of December 2016, Crypt::PK::RSA is NOT suitable for key generation because it can only generate keys with up to a 512-bit modulus.

2017-02-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.