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


Manual Reference Pages  -  CRYPT::RSA::KEY (3)

.ds Aq ’

NAME

Crypt::RSA::Key - RSA Key Pair Generator.

CONTENTS

SYNOPSIS



    my $keychain = new Crypt::RSA::Key;
    my ($public, $private) = $keychain->generate (
                              Identity  => Lord Macbeth <macbeth@glamis.com>,
                              Size      => 2048, 
                              Password  => A day so foul & fair,
                              Verbosity => 1,
                             ) or die $keychain->errstr();



DESCRIPTION

This module provides a method to generate an RSA key pair.

METHODS

new()

Constructor.

generate()

generate() generates an RSA key of specified bitsize. It returns a list of two elements, a Crypt::RSA::Key::Public object that holds the public part of the key pair and a Crypt::RSA::Key::Private object that holds that private part. On failure, it returns undef and sets $self->errstr to appropriate error string. generate() takes a hash argument with the following keys:
<B>SizeB> Bitsize of the key to be generated. This should be an even integer > 48. Bitsize is a mandatory argument.
<B>PasswordB> String with which the private key will be encrypted. If Password is not provided the key will be stored unencrypted.
<B>IdentityB> A string that identifies the owner of the key. This string usually takes the form of a name and an email address. The identity is not bound to the key with a signature. However, a future release or another module will provide this facility.
<B>CipherB> The block cipher which is used for encrypting the private key. Defaults to ‘Blowfish’. Cipher could be set to any value that works with Crypt::CBC(3) and Tie::EncryptedHash(3).
<B>VerbosityB> When set to 1, generate() will draw a progress display on STDOUT.
<B>FilenameB> The generated key pair will be written to disk, in $Filename.public and $Filename.private files, if this argument is provided. Disk writes can be deferred by skipping this argument and achieved later with the write() method of Crypt::RSA::Key::Public(3) and Crypt::RSA::Key::Private(3).
<B>KFB> A string that specifies the key format. As of this writing, two key formats, ‘Native’ and ‘SSH’, are supported. KF defaults to ‘Native’.
<B>SKFB> Secret (Private) Key Format. Instead of specifying KF, the user could choose to specify secret and public key formats separately. The value for SKF can be a string (Native or SSH) or a hash reference that specifies a module name, its constructor and constructor arguments. The specified module is loaded with Class::Loader(3) and must be interface compatible with Crypt::RSA::Key::Private(3).
<B>PKFB> Public Key Format. This option is like SKF but for the public key.

ERROR HANDLING

See <B>ERROR HANDLINGB> in Crypt::RSA(3) manpage.

BUGS

There’s an inefficiency in the way generate() ensures the key pair is exactly Size bits long. This will be fixed in a future release.

AUTHOR

Vipul Ved Prakash, <mail@vipul.net>

SEE ALSO

Crypt::RSA(3), Crypt::RSA::Key::Public(3), Crypt::RSA::Key::Private(3), Crypt::Primes(3), Tie::EncryptedHash(3), Class::Loader(3)
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CRYPT::RSA::KEY (3) 2009-06-07

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