FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

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 probabilistic 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-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version