Input File Format for NIST Test for Randomness

376 views Asked by At

I wish to check the randomness of the 32-bits numbers generated via. a random number generator. I have 1000 numbers of 32-bits each. How should I create my ASCII file? What is the value for the bitstream in .\assess bitstream command? Is it '1000*32' or '1000' or '32'?

Reference: https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-22r1a.pdf

1

There are 1 answers

0
Salman  Shamil On

The individual tests (there are 15 different tests) that are conducted in NIST take a bit sequence and compute a P-value for this sequence which is used to decide randomness. Now, different tests have different lower limits for the sequence length (n). The minimum value for n ranges from 100 to 1,000,000 in the tests available on NIST.

So if you want to run a test, you need at least 100 bits in your sequence. And finally, you need multiple sequences for each test to decide randomness reliably (e.g., 100 or 1000 sequences each with n bits). All these sequences will be tested individually and the proportion of sequences that passed the tests will be reported at the end.

Here is an example. I have 100,000,000 (100M) bits randomly generated from some source. I run the NIST test dividing them into 100 sequences, each with 1,000,000 bits. Therefore, the NIST command in my case would be:

./assess 1000000

Later the program will put a prompt for the number of sequences and I will have to enter 100 there.

You can also use different lengths for different tests by running them separately.