Paul Koning wrote:
Depending on how deep you want to dig, if you like
primes, you should
get yourself some cryptography textbooks. A good primer, without a
lot of serious math, is Bruce Schneier's "Applied Cryptography". If
you want to understand the math in depth, get "Handbook of Applied
Cryptography" (I think that's the correct title) by Menezes et al. I
have both, though I'm stuck at around chapter 2 in the latter because
the math goes beyond what I know.
I think Knuth has a discussion of the M-R test -- surely you have
Knuth, right? If not, you need to fix that.
The M-R test is a "probabilistic primality test" -- a fast way of
testing a number for being prime that has a certain probability of
giving the wrong answer. You can do the test repeatedly, and if the
tests are done right so they are independent, the test will become
more and more accurate. This test is generally used in crypto
programs because it is fast.
There are also tests for primality that are exact rather than
probabilistic -- those are MUCH slower. For multi-thousand-bit
numbers, people use M-R unless they absolutely, positively require a
guarantee of primality and can afford the hours or days of CPU time
investment. An example: the Diffie-Hellman parameters for the IKE key
exchange protocol (part of IPsec) were subjected to the full primality
test, not just M-R.
Jerome Fine replies:
Interesting - THANK YOU!! I did a google on the
topic. While my interest at the moment is really
limited to small primes (currently defined as less
than 1000 digits although at present I will initially
limit myself to 32 bits), I might want to look elsewhere
in the future. I had sort of noticed the M-R in
looking at google for the very largest primes which
are currently almost 10 million decimal digits, but
had not attempted to really understand the M-R test.
Sincerely yours,
Jerome Fine
--
If you attempted to send a reply and the original e-mail
address has been discontinued due a high volume of junk
e-mail, then the semi-permanent e-mail address can be
obtained by replacing the four characters preceding the
'at' with the four digits of the current year.