classpathx-crypto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-crypto] Primes and BigInteger


From: Marcel Winandy
Subject: [Classpathx-crypto] Primes and BigInteger
Date: Wed, 17 Apr 2002 15:00:45 +0200

Hello!

I've just read that you were wondering about some large primes for which
java.math.BigInteger.isProbablePrime() returns 'false'. Well, BigInteger
has indeed a bug in its primality test. BigInteger runs Miller-Rabin
first. If Miller-Rabin returns 'probable prime' for some number, a
second test will be made, using Lucas this time. And there is a bug in
that Lucas algorithm of BigInteger. I don't know exactly what is is,
because a friend of mine examined several primality test algorithms. He
found that bug in BigInteger and told me. However, it was a very silly
mistake as far as I remeber - something like +1 instead of -1. But the
consequences are enormous - as you have seen.

I hope it will help you.

Bye,
 Marcel
-- 
Marcel Winandy
EMail: address@hidden
http://www-student.informatik.uni-bonn.de/~winandy/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]