Cryptography Reference
In-Depth Information
12.3.2 Monobit Test
For a random sequence of 2500 bytes, or 20 000 bits, a test is made whether
approximately the same number of zeros and ones occurs. The test is passed with
error probability 10 6 if the number of ones (that is, set bits) in a sequence of
20 000 bits lies in the interval [9 654 , 10 346] (see [BSI2] and [FIPS]).
12.3.3 Poker Test
The poker test is a special case of the chi-squared test with ω =16 and n = 5000 .
A generated sequence of random numbers is divided into segments of four bits,
and the frequencies of the sixteen possible sequences of zeros and ones are
counted.
For an execution of the test, a sequence of 20 000 bits is divided into 5000
segments of four bits each. The frequencies h i , 0 ≤ i ≤ 15 , of the sixteen four-bit
arrangements are counted. For the test to be passed, the value
15
16
5000
h i 5000
X =
(12.11)
i =0
must lie, according to the specifications in [BSI2] and [FIPS], in the interval
[1 . 03 , 57 . 40] , which corresponds to an error probabi lit y of 10 6 . Measured values
outside the previously mentioned interval ω − 2 ω, ω +2 ω =[8 , 24] ,on
the other hand, are rejected with the higher error probability 0 . 02 .
12.3.4 Runs Test
A run is a sequence of identical bits (zeros or ones). The test counts the
frequencies of runs of various lengths and checks for deviations from expected
values. In a sequence of 20 000 bits, all runs of the same type (length and bit
value, e.g., runs of 2 ones) are counted. The test is passed if the numbers lie in the
intervals shown in Table 12-1 (error probability of 10 6 ).
12.3.5 Longruns Test
As an extension of the runs test, the longruns test checks whether there exists a
sequence of identical bits longer than a given length. The test is passed if there is
no run of length 34 or longer in a sequence of 20 000 bits.
 
Search WWH ::




Custom Search