Bit-Plane Specific Randomness Testing for Statistical Analysis of Ciphers

For a cipher system, the key-sequences generated by a random number generator must satisfy the randomness characteristics which can be analyzed statistically by various measures. Existing randomness analysis study considers key-sequence as a stream of bits as one-dimension. In the paper, we consider key-sequence of bits as a two-dimensional vector and propose new randomness tests based on bit-plane specific statistical measures. We obtain row-vector and column-vector measures by computing row-wise and column-wise frequency of ones, entropy, and adjacent row (column) correlation for every bit-plane. We apply chi-square goodness of fit on said vectors to compute p-values. A randomness test passes when p-values satisfy test criteria in each bit-plane. Statistical analysis is performed by applying proposed randomness tests on different data. Cipher data shows good randomness but random alphabetic data and plain image data show non-randomness due to presence of patterns. Proposed tests perform rigorous analysis by exploiting two-dimensional characteristics of data and seem very useful to perform statistical analysis of ciphers.