clear-key-ring ()Clear the key ring.
decrypt  (d-key encrypt-list)Decrypt the list of numbers <encrypt-list> into a string. The key, <d-key>,
contains the numbers n and d which represent the RSA key decryption pair. It
also contains an Euler Phi number that is the value of the Euler Phi function
of n.
encrypt  (e-key text)Encrypt <text> into a list of numbers. Each number is formed by using the RSA
algorithm on a block of text. The key, <e-key>, contains the numbers n and e
which represent the RSA key encryption pair as well as the block size of the
text to encrypt.
file->key-ring  (file-name)Load rsa-keys structures from file, <file-name>, and place on the key ring.
find-decryption-key  (name)Get the rsa encryption structure associated with name, <name>.
find-encryption-key  (name)Get the rsa encryption structure associated with name, <name>.
find-keys  (name)Get an rsa-keys structure associated with name, <name>. This structure
contains the encryption and decryption keys.
generate-keys  (p q name &key e)Generate an rsa-key structure given the two primes, <p> and <q>.
generate-prime-pair  (len1 len2 &key (trials 100))Generate two probable primes p,q, of lengths <len1> and <len2>. If used for
RSA encryption, the lengths should differ by a wide margin. This function will
choose p and q so that gcd(p-1, q-1) is small. Use a larger value for <trials>
for more probable primes. It should also (but does not) ensure
that (p-1) and (q-1) both have large prime factors. This function can be
time consuming. This function takes 15-20 seconds on a Pentium IV 1.8 GHZ
when <len1> and <len2> are roughly 100. However, finding primes of lengths
150 and 170 takes 45 seconds, while finding primes of lengths 250 and 270
takes ever 3 minutes.
get-next-prob-prime  (p-start &key (trials 100))Find a probable prime starting at <p-start> (p-start assumed odd) and
incrementing by 2 until a probable prime is found. Test each value
using <trials> number of random values with the function prob-prime-p.
get-rand-rel-prime  (n)Generate a random number relatively prime to <n> larger than a third of
<n>, but less than a half of <n>.
key->key-ring  (rsa-keys)Put key, <rsa-keys> on the key ring. That is, store (associate) the
name of the rsa-keys structure, <rsa-keys>, with its name.
key-ring->file  (file-name)Write out the key ring of rsa-keys structures to the file, <file-name>.
make-new-keys  (len1 len2 name &key (trials 100))Make new RSA encryption/decryption pair returned as an rsa-keys structure.
The probable primes used will be randomly generated (use a larger value of
<trials> for more confidence in the primes) and have digit lengths of <len1> and
<len2> respectively. This function can be time consuming.
This function takes 15-20 seconds on a Pentium IV 1.8 GHZ when <len1> and
<len2> are roughly 100. However, finding primes of lengths
150 and 170 takes 45 seconds, while finding primes of lengths 250 and 270
takes ever 3 minutes.
prob-prime-p  (p &key (trials 100))Use Fermat's little theorem: a^(p-1) = 1 mod p if p is prime.
Raise <trials> random values to the (p-1) power and check that it is 1 mod <p>.
If this is true of all values, then <p> is likely prime. The probability
increases when the number of trials, <trials>, is larger.
remove-key-from-key-ring  (key-name)Remove the key named, <key-name>, from the key-ring.
rsa-decrypt-key  (struct)nil
rsa-encrypt-key  (struct)nil |