FunctionPackage: exclToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
This page is new in 6.2

generate-rsa-keys

Arguments: &key verbose

Generate a pair of RSA keys and return a list of two items: the public key and the private key.

If verbose it true (the default) then generate-rsa-keys will print diagnostic information as it generates the keys. This function generates very large numbers and tries to find prime numbers near those numbers. This can take a long time (perhaps 15 minutes on a slow processor if finding a prime number proves difficult).

The crucial part of generating an RSA key is computing two large prime numbers. Testing whether a number is prime is done in a probabilist manner. This means that we can't say with 100% certainty that we've found prime numbers and if the key is generated with non-prime numbers then the RSA algorithm will fail to encrypt or decrypt certain values. A mitigating factor is that all RSA key generators use this probabilistic prime number test and one never hears of cases where it failed.

The resulting modulus value is approximately 1024 bits long.

See rsa-encrypt and rsa-decrypt.

See Support for RSA encryption in miscellaneous.htm for information on RSA encryption and RSA encryption support in Allegro CL. There are examples of RSA encryption and decryption in that section. Support for encryption in the same document discusses encryption support in Allegro CL in general.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page is new in the 6.2 release.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
This page is new in 6.2