Re: Testing randomness
[email protected] (Matthias Bauer) Thu, 23 Oct 2003 17:13:09 +0200
| Newsgroups | perl.crypto |
|---|---|
| Message-ID | <[email protected]> |
Hi, > I recently released Net::Random to the CPAN. It retrieves data from > online sources of truly random data (so they claim). I'm quite happy to > believe that those data really are random, but I'm not so happy to > believe that the results of my module are random, because I do some > processing of the data to ensure that the user only gets random values > in a range he has specified. Any error in my code - off-by-one errors > for instance - could introduce bias. > > So, how do I test that the data I produce is random? The NIST had a whole working group on randomness. And they published their report and a statistical test suite at http://csrc.nist.gov/rng/rng2.html Another famous test is Marsaglia's Diehard: http://www.stat.fsu.edu/pub/diehard/ Generating randomness is a hard problem, see for example Peter Gutmann's publications (e.g. http://www.cs.auckland.ac.nz/~pgut001/pubs/usenix98.pdf). Best regards, Matthias