Bill Frantz (frantz@netcom.com)
Tue, 2 Feb 1999 09:12:23 -0700
At 6:52 AM -0700 2/2/99, Perry E. Metzger wrote:
>Bruce Schneier <schneier@counterpane.com> writes:
>> At 11:41 PM 2/1/99 -0500, Perry E. Metzger wrote:
>> >Speaking of Montecarlo, I've been wondering for some time:
>> >
>> >Is RC4 a good PRNG for monte carlo types? I mean, its a very good PRNG
>> >-- is it good enough for *non*-cryptographic use?
>>
>> I would think so. If it has problems in Monte Carlo tests, that would be a
>> VERY interesting cryptographic result.
>
>That's what I've always thought -- if there is *any* bad property from
>a Monte Carlo point of view it will be far worse from a cryptography
>point of view. HOWEVER, that seems to imply that there is no point in
>using linear congruential generators, since RC4 is trivial to code and
>use (insignificantly harder than a LCPRNG), and is far better at being
>random!
LCPRNGs may be slightly faster on certain architectures. Most fast
computers can do a multiply in 1-2 cycles. A LCPRNG will take 3 memory
accesses, a multiply and a shift. RC4 takes 6 memory accesses and an add
(and probably an AND instruction as well). Random number generation time
can have a significant effect on the run time of a Monte Carlo simulation.
-------------------------------------------------------------------------
Bill Frantz | Macintosh: Didn't do every-| Periwinkle -- Consulting
(408)356-8506 | thing right, but did know | 16345 Englewood Ave.
frantz@netcom.com | the century would end. | Los Gatos, CA 95032, USA
The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:18:25