Re: Fast generation of primes
From: Francois Grieu (fgrieu_at_francenet.fr)
Date: 04/05/04
- Next message: Rob Warnock: "Re: How much is Alice worth to Bob?"
- Previous message: lallous: "RC4 implementation question"
- In reply to: Tom St Denis: "Re: Fast generation of primes"
- Next in thread: Bill Unruh: "Re: Fast generation of primes"
- Reply: Bill Unruh: "Re: Fast generation of primes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 05 Apr 2004 12:38:04 +0200
In article <LRBbc.20442$jVF.5363@news04.bloor.is.net.cable.rogers.com>,
Tom St Denis <tom@securescience.net> wrote:
> Generate a table that correspond to each prime in the base called T.
>
> 1. pick random number N, make sure it's odd and the msb is set
> 2. for i = 1 to #T do
> 2.1 T[i] = N mod P[i]
> 3. while (not pass Miller-Rabin) do
> 3.1 do
> 3.1.1 N = N + 2, flag = false
> 3.1.2 for i = 1 to #T do
> 3.1.2.1 T[i] = T[i] + 2 (mod P[i]), if T[i] = 0 set flag = true
> 3.2 while flag = true
> 4. return N as probably prime
(...)
> there will be skew towards several primes
> [e.g. ones with the most distance between primes].
The problem is not to be feared if one first picks a random
even step >> log(N), rather than 2; this is necessary anyway
if the primes are to be conformant to ANSI X9.31,
which requires assurance that p-1 and p+1 both have
a randomly seeded prime factor >2^100.
Francois Grieu
- Next message: Rob Warnock: "Re: How much is Alice worth to Bob?"
- Previous message: lallous: "RC4 implementation question"
- In reply to: Tom St Denis: "Re: Fast generation of primes"
- Next in thread: Bill Unruh: "Re: Fast generation of primes"
- Reply: Bill Unruh: "Re: Fast generation of primes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|