Added the collision test.
Improved the runs test and the blocks and gaps test.
Included the autocorrelation test in its windowed version (which gives the same result when the block size is 1 bit).
Also improved the parameter error checking.
Download the new Windows
GUI
which includes the new parameters.
2005-03-31
Added an improved version of the AMLS test. The old version was good only for few hundred sequences (NT in the source code). With the new statistics, the test is good for any number of sequences.
Changed the DFT test with a 2-D version; now it's even more sensitive.
Added three parameters (KSmin, ADmin and SLmax) to control whether the sequences are failing the tests while RaBiGeTe is running (please, refer to the documentation).
Download the new GUI
which includes the new parameters (and other improvements).
This new version of RaBiGeTe can be stopped by pressing the escape key. This way the program will show the overall results for the tested sequences and there won't be any memory leakage (which happens when CTRL-C is pressed).
Source code: added #define _PROVA_ to easily include/exclude all the generators and the debug code; slightly changed the module "RBG.cpp" to facilitate the inclusion of the hard coded generators to test (also added some remark); added the macro _FASTCALL_ (defined in the module "defi.h") for the calling convention which can be #defined as __fastcall to speed-up the executable (if the compiler support it).
2005-02-21 IMPORTANT UPDATE
The function to compute the discrete Fourier transform (used in the DFT test) gives wrong results when the sequence length is of some particular form (like, for example 4,671,488 bits) and the float type is used (which is the default in RaBiGeTe).
How to fix the problem
The easiest way is to change the module "REAL.h" writing only:
typedef double REAL;
but I can't guarantee that with that change the DFT function will work for any sequence length because I haven't written the DFT function and I don't know how it works.
The best way is to download the new version of RaBiGeTe which includes the fast and reliable FFTW library.
To take full advantage of FFTW speed, I introduced a new test parameter: DFToptimize (please, refer to the RaBiGeTe manual for a detailed description).
The new version of RaBiGeTe includes many other improvements; please, see the documentation for the complete list and details.
The GUI is now available for download:
RaBiGeTe_GUI
2004-09-20
Fixed the module "gamma.cpp" to run on both little-endian and big-endian CPU's.
Added the coupon collector's test.
Improved NOTM test: block size form 2 to 31 bits, templates created on the fly (with no memory allocation), changed the hard coded test parameters to be more stringent.
2004-08-28
Released new source code by Valerio Gionco which can be compiled under Windows, Linux and Solaris.
Released the executables for Windows, Linux/x86 and Solaris/SPARC.
Added the permutation test and few minor improvements.
2004-08-26
New release: C++ source code, executable, documentation and test vector.
2004-07-14
C source code withdrawn because of some bug.
2004-07-12
C source code by Dr. Brian Gladman available.
2004-06-01
C++ source code available.
What my program does
With RaBiGeTe the user can test a random or pseudo-random bit or number generator to see whether it has the characteristics expected in a true random generator.
RaBiGeTe runs under Windows (in the DOS prompt).
It includes the following tests:
Collision;
Runs (a stronger and generalized version);
Blocks'n'gaps (an improved version of the FIPS140 Runs test);
Windowed autocorrelation (which now includes the 1-bit block size version);
AMLS (an improved version of the old AMLS test);
DFT (the new 2-D version of my very sensitive test);
Coupon collector;
Non overlapping template matchings (improved version of the NIST test);
Permutation;
Short blocks generalized variant (my test. A generalized version of the poker and monobit tests);
Sparse occupancy bitstream (derived from the gorilla test of the Diehard suite);
Maurer (improved version of the Maurer's universal statistical test);
Autocorrelation;
Serial two-bit (FIPS140);
Long blocks (NIST BlockFrequency);
Cumulative sum (NIST);
Serial (NIST);
Rank for 6x8 matrices (Diehard);
Rank for 31x31 matrices (Diehard);
Rank for 32x32 matrices (Diehard);
GCD (Diehard);
Tough birthday spacings (Diehard).
RaBiGeTe is highly configurable along with the test parameters.
RaBiGeTe needs one or more binary file (supplied by the user) containing the bits to test. It is possible to use the wildcards to test several files.
The user enables the tests he likes and he changes the test parameters using a configuration file (I included "paraTST").
In a DOS prompt the user writes: "rabigete paraTST" (without quotation marks).
The program will save the p-values and the overall results in the file specified by the parameter "OutFile" (the default name is "_RaBiGeTe.txt").
Download
2005-07-11:
all the needed files to run
RaBiGeTe (1.41 MB).
The DFT test needs the library "fftw3.lib" and the include file "fftw3.h" in the archive "fftw-3.0.1-w32-pl1.zip" which can be downloaded
here
.
Linux note: the source code is compilable also under Linux with GCC. All you need to do is to link the FFTW library for Linux.
Feedback
To improve RaBiGeTeI need your suggestions.
Please, click
here
to email your suggestions or comments.
- Acknowledgements
I am grateful to Brian Gladman and to Valerio Gionco for their inputs during the development of RaBiGeTe.
Version history
Version
Documentation
RaBiGeTe
050711
/
Added the collision test;
runs test replaced with a stronger and generalized version;
improved the blocks and gaps test (which now generates 2 p-values);
autocorrelation test included in the windowed version (which gives the same result when the block size is 1 bit);
improved the parameter error checking; when an error is found the test is disabled;
now the timer starts from the 2^{nd} sequence to avoid the initialization phase of some test;
added the message "Testing the sequence #1...".
050331
Added the AMLS test;
changed the DFT test;
added the parameters KSmin, ADmin and SLmax for the partial overall values while RaBiGeTe is running;
specified that the pval_digits affects only the p-value formatting;
few minor changes.
Added an improved version of the AMLS test;
improved the DFT test with a 2-D version;
added the partial KS, AD and SL calculation while RaBiGeTe is running;
fixed a rounding error bug for the optimized n in the DFT test;
the user can break the program by pressing the escape key;
changed "Test #xx" in "Sequence #xx".
050221
Added the coupon collector's test, the NOTM test and the permutation test;
added the parameter IdlePriority;
revised §6.1 "Discrete Fourier Transform test";
revised §5 "How to test the number generators";
changed the minimum n for NOTM;
changed the file names in §3;
specified the syntax for InFile and OutFile parameters;
deleted the AMLS paragraph.
DFT function replaced with FFTW, added the parameter DFToptimize;
fixed a minor bug in short block test for big bit distances;
fixed a bug when parsing NOTM parameters with negative steps;
added another check in the coupon collector's test;
minimum group size for the permutation test increased to 2 numbers;
added the parameter IdlePriority;
added a warning message for p-value = -1 when showpvals = 0;
allowed sequence length = 0 when an input file is specified;
few minor improvements;
the parsing routine has been moved in a separate module;
added "DHcheck" in the command line to test the DH tests;
an "usage" message is showed when no parameters are passed.
040920
/
Added the coupon collector's test;
Improved NOTM test: block size form 2 to 31 bits, templates created on the fly (with no memory allocation), changed the parameters to be more stringent;
040828
/
Added the permutation test;
now also the sorted p-values are printed only if valid (!= -1);
changed the order of the sorted p-values by SL.
040826
Short blocks test changed with its generalized variant;
the step for the test parameters can be negative for increments of 2^{step};
added the parameters: TestName_pv and pval_digits;
added suffixes for multiples of 1000 for the sequence length;
changed the parameter filename with InFile;
changed the name of the gorilla test, now it is SOB;
added the description of the SOB test;
added a brief general explanation of the Maurer's test;
changed the version number convention (yymmdd).
AMLS test definitely withdrawn;
short blocks test replaced with its generalized variant;
the step for the test parameters can be negative for increments of 2^{step};
added the parameters: TestName_pv and pval_digits;
added suffixes for multiples of 1000 for the sequence length;
changed the parameter filename with InFile;
fixed a minor bug in the NOTM test;
optimized for the speed: two-bit test (~61%), runs test (~27%) and cusum;
changed the name of the gorilla test, now it is SOB;
the sequence length is now unsigned;
some minor improvements;
changed the version number convention (yymmdd).
2.01 2004-05-29
/
AMLS test disabled;
fixed a minor bug in Bday test.
2.0 2004-05-24
Added the windowed autocorrelation test;
added the wildcards for the bits file name;
added the test name meaning;
added the bits required for each test;
added sorting parameters by KS, AD, SL and the OutFile parameter;
added paragraph "Before starting" changing the program checking;
changed paragraph "Basic concepts";
changed the range for NOTM and added the number of the templates;
improved the program test procedure;
specified that the test parameters are positive and that for n and DFT max the number can be floating point;
added the meaning of the return values when the program ends;
deleted "the user can change" in all the parameters section;
changed the font size;
changed the paragraph numbering.
Added the windowed autocorrelation test;
added the ability to use wildcards for the bits file (filename parameter);
added results with sorted p-values;
added the range check for Rank 6x8 and NOTM;
added the OutFile parameter for the output file name (was "_RaBiGeTe.txt");
n and DTF max can be floating point numbers;
added the bits file name in the output file;
improved the file parameters parsing routine;
fixed memory leakage in Short Blk;
before the program ends, it shows "Results saved in: [OutFile]";
changed the format for the time (was [h:mm:ss.d] now is [hh:mm] or [mm:ss], but "Running time" is always [h:mm:ss.d]);
when n < 1024 the floating point n is no longer displayed in the header (was "n= 459 bits (459.000 b)" now is "n= 459 bits").
1.1 2004-04-07
Added the range for NOTM and Long blocks;
changed the max bit distance for autocorrelation (was max <= n/2);
added the test file "bits.bin".
Fixed the first template in NOTM for m=2 (was 00 instead of 01);
fixed test enable/disable;
fixed the seconds >= 60 in "End date" (now "Date end", e.g.: 20:12:71) and changed the format for the time (was [sec.d] now is [h:mm:ss.d]);
added some parameters checking;
the program no longer checks the parameters of a disabled test;