How to Generator Prime Numbers in a short time ?



Hello everyone:

I want to generator a 1024-bit prime number as the key of RSA
algorithm.

At first, I set up a PrimeTable which contains 500 prime numbers
from 3 to 3259. Then I generator a random number, divided the numbers
in the PrimeTable , to see whether the random number is a
probablePrime.

If the random number passed the first test , then subjects that
number to certain tests of primality, called the Miller-Rabin and
Lucas-Lehmer tests.

After the number passed the two tests, it 99% to be a prime number.

But, the problem is , I should generator hundreds of random numbers;
then verify the numbers one by one . It takes too long to check every
numbers.

How can I generator a prime number in a short time ?

.



Relevant Pages

  • Re: Agduria dungeon generation
    ... stage of the algorithm and rise appropriate error, ... A NTAE generator doesn't have to have any ... NTAE will happily accept all valid inputs and RNG states and produce ...
    (rec.games.roguelike.development)
  • Re: Math.random
    ... That's not the only possible algorithm; ... without much difficulty implement a long shift-register generator; ... doublevalue or null/undefined/false for auto reseeding, ... I think 0 to 364 would be better; it goes well with zero-based arrays, ...
    (comp.lang.javascript)
  • Re: real random
    ... Feel free to post such an algorithm, ... it as a generator of a stream of numbers, ... You need a genuine source of entropy, ... By suggesting Fortuna (which gathers genuine entropy as it goes), ...
    (comp.lang.c)
  • Re: Agduria dungeon generation
    ... Depends entirely on the pseudo random number generator, ... algorithm don't suddenly change that probability. ... TAE isn't even obviously less ... algorithms but do understand their NTAE algorithms, ...
    (rec.games.roguelike.development)
  • Re: My cave room generator using wave functions
    ... for generating a generic cave room generator. ... algorithm, ... Randmonly choose n values to seed the wave function to be used. ... If the distance to the center is less than the radius of the room ...
    (rec.games.roguelike.development)