J. David Sexton
Konton2
Yasmarang is a pseudo-random bit generator proposed by Ilya O. Levin on May 25, 2004. See "Yasmarang: A pseudo random number generator." For the source code that I used to analyze Yasmarang's output, download yas.zip and unzip it. That will create a directory called "YasCode." This new directory should contain Marsaglia and Tsang's code (unaltered), my code, test results as text files, and a shell script or two.
To compile everything with a POSIX operating system, cd to the YasCode directory,
and type
cc YasMars.c RNGTest.c RNGUtil.c -lc -lm -O -o YasMars
cc KonStat2.c Konton2.c -lc -O -o KonStat2
cc Yasmarang.c -lc -O -o Yasmarang
cc Yasmarang2.c -lc -O -o Yasmarang2
or just type
./compile_everything
which executes a shell script containing the four lines above.
The results of running YasMars are in the file YasMars.txt.
Running Yasmarang creates a file called "Yasmarang.bin." Likewise, running Yasmarang2
creates a file called "Yasmarang2.bin." Running KonStat2 on these two files, with a test
sequence length of 128 megabytes (the size of "Yasmarang.bin" and "Yasmarang2.bin") results
in the output in the files Yasmarang.txt and
Yasmarang2.txt. To find out how to specify files for
for input to and output from KonStat2, type
./KonStat2 -h
See KonStat2.c for documentation of all the tests run by the program.
When I posted a message saying that Yasmarang was not equivalent to an LFSR shorter than 10000 bits long, I dropped a zero. It's not equivalent to an LFSR shorter than 100000 bits long! It doesn't look linear.
When I wrote that Yasmarang was biased at 4 bit positions, I was basing this on the test results from KonStat2. Note that the bias doesn't show up with a test sequence length much smaller than 128 megabytes. The results from Tsang's Collision Test suggest that other bit positions may have problems too.
The version of KonStat2.c in yas.zip is a revision that will never see the light of day elsewhere. To get the current release version (which is regularly updated) download konton2.zip. I have included Marsaglia and Tsang's code in yas.zip unaltered. Copyright law (and courtesy) would forbid doing otherwise. A patch for RNGTest.c is provided in RNGTestPatch.txt. This corrects some small problems in the Birthday Spacings Test. I frankly think there a must be a problem with the Maurer's Test implementation too, and I'd appreciate comments.
sci.crypt news group
sci.crypt news group via Google
International Association for Cryptologic
Research (IACR)
ePrint IACR Cryptology Archive
The Ciphers Page of the Open Directory Project
Prof. George Marsaglia's
famous DIEHARD suite of statistical tests of randomness
"Some difficult-to-pass tests of randomness" by Marsaglia and Tsang
The source code (in C) for Marsaglia's and Tsang's difficult-to-pass tests
The NIST's statistical tests for
cryptographic PRNGs