lkml.org 
[lkml]   [1996]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: CONFIG_RANDOM (compromise?)
> It seems that most of the people who are flaming on this topic have no
> idea how weak a pseudo-random number generator really is. Only a few
> values is all you generally need before you can completely predict the
> output of such a best.

People seem to be too paranoid about the quality of pseudo random number
generators, but why don't you just ask the experts out there?

A friend of mine pointed me to the errata list of volume two of Donald
E. Knuth's "The Art of Computer Programming". There, DEK has suggested
a very good portable random number generator. It generates 30-bit
integers with the following properties:

- they pass all tests from Marsaglia's "diehard" suite of tests
for random number generators (but read the discussion of the
interpretation of the "birthday-spacing" test)
- they can be generated with portable signed 32-bit arithmetic
- it is faster than other lagged Fibonacci generators
- it can create at least 2^30 - 2 independent sequences

(Sorry, I don't have the period length and hand, but it's fairly long.
> 2^137 ?)

It is fairly small (certainly much much smaller than the current random
number generator that is being bashed), much better and faster than say
the well-known Marsaglia-Zaman generator, and of course much much better
that the linear congruential generator that I have seen somewhere in the
networking code. I give you an arbitrary number of generated numbers,
and you tell me the seed! (Ok, its not cryptography, but still rather
good. You can even increase the number of independent sequences with
standard methods.).

I can get the source and write an interface for the kernel, if you
like. Just let me know.

--
Ciao,
-ha

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Harald Anlauf | Phone: +49-6151-16-2972 (office)
TH Darmstadt | +49-6151-714673 (private)
Institut f. Kernphysik | Fax: +49-6151-16-2421
Schlossgartenstr. 9 | Internet: anlauf@crunch.ikp.physik.th-darmstadt.de
64289 Darmstadt | Harald.Anlauf@cern.ch
Germany | anlauf@slac.stanford.edu


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.061 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site