Paper 2022/061

A remark on the NIST 800-22 Binary Matrix Rank Test

Nicu Neculache, Vlad-Andrei Petcu, and Emil Simion


Statistical testing is a mechanism that has been included in various domains or fields, providing a method for making quantitative decisions about a particular sample. The statistical testing plays a big role in selecting and testing random and pseudorandom generators whose output may be used in the field of cryptography, specifically for the encryption, decryption and the keys or sub-keys generation. In this paper we study one of the NIST 800-22 random number generation tests. We give an overview for the statistical testing and its importance for cryptography, then we focus on one of the tests, specifically the Binary Matrix Rank Test. We provide a logical schema and a new code implementation in Python 3. Further we evaluate the test, by running it on a collection of well chosen test samples and gathering the results based on which we do an assumption. More exactly, we validate if the binary sequence input can be classified as random or not depending on the bits density.

Available format(s)
Publication info
Preprint. MINOR revision.
statistical testingrandom bit generatorbits densitybinary matrix rankP-value
Contact author(s)
petcuvlad92 @ gmail com
nnicu8 @ gmail com
emil simion @ upb ro
2022-01-19: revised
2022-01-18: received
See all versions
Short URL
Creative Commons Attribution


      author = {Nicu Neculache and Vlad-Andrei Petcu and Emil Simion},
      title = {A remark on the NIST 800-22 Binary Matrix Rank Test},
      howpublished = {Cryptology ePrint Archive, Paper 2022/061},
      year = {2022},
      note = {\url{}},
      url = {}
Note: In order to protect the privacy of readers, does not use cookies or embedded third party content.