A FIPS 140 1 statistical tests for randomness

  • Slides: 5
Download presentation
A. FIPS 140 -1 statistical tests for randomness • AS 11. 16: Cryptographic modules

A. FIPS 140 -1 statistical tests for randomness • AS 11. 16: Cryptographic modules that implement a random or pseudorandom number generator shall incorporate the capability to perform statistical tests for randomness. • The four tests specified in FIPS PUB 140 -1 are recommended. However, alternative tests which provide equivalent or superior randomness checking may be substituted. If any of the tests fail, the module shall enter an error state. • A related assertion is AS 11. 02. (3 and 4) • 1. Monobit Test • 2. Poker Test • 3. Runs Test

Monobit Test • A single bit stream of 20, 000 consecutive bits of output

Monobit Test • A single bit stream of 20, 000 consecutive bits of output from the generator is subjected to each of the following tests. If any of the tests fail, then the module shall enter an error state. • Monobit Test: • (a) Count the number of ones in the 20, 000 bit stream. • Denote this quantity by X. • (b) The test is passed if 9, 654 < X < 10, 346.

Poker Test • Divide the 20, 000 bit stream into 5, 000 contiguous 4

Poker Test • Divide the 20, 000 bit stream into 5, 000 contiguous 4 bit segments. Count and store the number of occurrences of each of the 16 possible 4 bit values. Denote f(i) as the number of each 4 bit value i where 0 i 15. • Evaluate the following: • The test is passed if 1. 03 < X < 57. 4.

Runs Test • A run is defined as a maximal sequence of consecutive bits

Runs Test • A run is defined as a maximal sequence of consecutive bits of either all ones or all zeros. • The test is passed if the number of runs that occur (of lengths 1 through 6) is each within the corresponding interval specified below. This must hold for both the zeros and ones. Length of Run 1 2 3 4 5 6+ Required Interval 2, 267– 2, 733 1, 079 -1, 421 502 - 748 223 - 402 90 - 223

Long Run Test • A long run is defined to be a run of

Long Run Test • A long run is defined to be a run of length 34 or more (of either zeros or ones). • On the sample of 20, 000 bits, the test is passed if there are NO long runs. •