Algorithm used by BigInteger prime generator?

Alex Nicolaou anicolao at
Thu Apr 22 12:56:01 PDT 1999

Alexandre Oliva wrote:
> On Apr 22, 1999, "John Keiser" <John.Keiser at> wrote:
> > Incidentally, as long as this method creates random BigIntegers, why does it
> > matter what algorithm is used?
> Given my Random generator, initialized with the same seed, I should be
> able to generate the same sequence of prime BigIntegers on any Java
> platform, otherwise WORA falls apart.  That's why the standard Random
> class is clearly specified, and that's why the algorithm for random
> big prime generation should too.

And in case you think this is totally bogus, it is often used as the
ultimate compression algorithm. For example, in a multi-player wargame
you might transmit to each client the random number seed and a sequence
number; each client can independantly generate the identical "random"
map whose transmission time might be non-trivial. This may be a terrible
application, but a lot of things done in the name of efficiency are
pretty terrible.


More information about the kaffe mailing list