3
$\begingroup$

I am trying to use the statistical test suite software from NIST SP800-2.

First it asks for bitstream length.

Usage: ./assess <stream length>
   <stream length> is the length of the individual bit stream(s) to be processed

After file is given to program, it asks for;

How many bitstreams?

How can I determine that values? Let's say I have 1000000 32-bit ASCII sequence of 0s and 1s in a file like;

01111111000111000110010001111010
.
.
.
00110100001001100010111100000011

Which values will be appropriate for this?

$\endgroup$
4
  • 2
    $\begingroup$ This question should have been alive, why closed? $\endgroup$
    – Ender
    Apr 24 '20 at 11:00
  • 2
    $\begingroup$ @Ender I agree. Anybody that knows anything about cryptography knows that random number theory is extremely relevant to the subject. In fact, the title of the paper talking about the test suite is "A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications". I am severely unimpressed with whomever thought it was a good idea to close this as "off-topic." Nothing could be further from the truth. $\endgroup$ Oct 29 '20 at 20:20
  • 1
    $\begingroup$ I tried to edit it and add a context sentence in the hope that the moderators will re-open it. $\endgroup$
    – DurandA
    May 22 '21 at 1:25
  • $\begingroup$ Given that this question has +5 votes associated with it, I vote to re-open... @DurandA $\endgroup$
    – Paul Uszak
    May 22 '21 at 14:28
2
$\begingroup$

Look for the document "NIST Randomness Testing SP800-22b.pdf" (or more recent updates if available) in the NIST website.

My guess is that your sequences are way too short (32 bits long) and no kind of statistical convergence can be expected to occur, which is necessary for the test to work. I presume this may be the reason why you get the error message.

The section "sequence length", p.102 in the NIST document states:

The determination as to how long sequences should be taken for the purposes of statistical testing is difficult to address. If one examines the FIPS 140-1 statistical tests, it is evident that sequences should be about 20,000 bits long.

Coupled with this, you have 1 million such outputs. Depending on the conditions of how these outputs were obtained, you may want to concatenate them into longer outputs, in some principled manner.

$\endgroup$
1
  • $\begingroup$ I read several parts of this pdf but I might have been skipped that part. Then I have to find an optimal sequence length. $\endgroup$
    – ctulu
    Oct 24 '16 at 7:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.