Skip to main content

Revisiting BoolTest – On Randomness Testing Using Boolean Functions

  • Conference paper
  • First Online:
Progress in Cryptology – INDOCRYPT 2022 (INDOCRYPT 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13774))

Included in the following conference series:

  • 433 Accesses

Abstract

Pseudo-random number generation is crucial in cryptology and other areas related to information technology. In a broad sense, the security of a protocol relies on the ‘randomness’ provided by the pseudo-random number generators. It is thus important to examine whether a random-looking stream has some kind of non-randomness in it. Here we consider that a binary stream is divided into blocks of a certain length m and we try to identify an m-bit Boolean function in this regard that is optimal to provide the highest Z-score for the output stream generated by the said function. In this regard, we show certain limitations of the BoolTest strategy by Sýs et al (2017) and present combinatorial results related to identifying the most suitable Boolean functions. We show that the existing works related to BoolTest identify the Boolean functions that are sub-optimal, constrained by the low degree in the Algebraic Normal Form. Our results find out the best Boolean function in this regard that will produce the maximum Z-score and the complexity is \(O(N\log N)\) on the amount of random-looking stream of length N that we read during the evaluation process. We present substantial experimental evidence corresponding to our theoretical ideas. While we solve certain combinatorial problems related to BoolTest, the caveat is, this test is not sufficient to conclude on randomness or non-randomness of a given stream of data.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Brown, R.G., Eddelbuettel, D., Bauer, D.: Dieharder: a random number test suite (Version 3.31.1) (2014). https://webhome.phy.duke.edu/rgb/General/dieharder.php

  2. Daemen, J., Rijmen, V.: AES proposal: Rijndael (1998). https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/aes-development/rijndael-ammended.pdf

  3. Gustafson, H., Dawson, E., Nielsen, L., Caelli, W.: A computer package for measuring the strength of encryption algorithms. Comput. Secur. 13(8), 687–697 (1994)

    Article  Google Scholar 

  4. Mantin, I., Shamir, A.: A practical attack on broadcast RC4. In: Matsui, M. (ed.) FSE 2001. LNCS, vol. 2355, pp. 152–164. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45473-X_13

    Chapter  Google Scholar 

  5. Marsaglia, G.: The Marsaglia random number CDROM including the diehard battery of tests of randomness; National Science Foundation: Alexandria, VA, USA (1995). https://en.wikipedia.org/wiki/Diehard_tests, https://web.archive.org/web/20160125103112/,http://stat.fsu.edu/pub/diehard/

  6. Rukhin, A., et al.: A statistical test suite for random and pseudorandom number generators for cryptographic applications. https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-22r1a.pdf (2010). Random Bit Generation, NIST, https://csrc.nist.gov/projects/random-bit-generation

  7. Sýs, M., Klinec, D., Svenda, P.: The efficient randomness testing using Boolean functions. In: 14th International Conference on Security and Cryptography (Secrypt 2017), pp. 92–103. SciTePress (2017). https://www.scitepress.org/papers/2017/64251/64251.pdf

  8. Sýs, M., Klinec, D., Kubicek, K., Svenda, P.: BoolTest: the fast randomness testing strategy based on Boolean functions with application to DES, 3-DES, MD5, MD6, and SHA-256. E-Business and Telecommunications (2019). https://crocs.fi.muni.cz/public/papers/secrypt2017selected

  9. Walker, J.: Pseudorandom number sequence test program (2018). https://www.fourmilab.ch/random/

  10. The GNU MP Bignum Library. Available at: https://gmplib.org/. Accessed 6 Sept 2022

Download references

Acknowledgment

The authors like to acknowledge the anonymous reviewers for the detailed comments that improved the editorial as well as the technical presentation of the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bikshan Chatterjee .

Editor information

Editors and Affiliations

Appendix : Implementation Details

Appendix : Implementation Details

For large block sizes, the Z-score would be very large and it would not be possible to store the results accurately in 64 bits data elements of C programming compilers. For example, the highest Z-score for a block size of 256 might be of the order of \(10^{38}\). It would require \(\sim 126\) bits to represent such integers up to \(10^{38}\). To maintain accuracy, we instead use the GNU multi-precision library (GMP) for the calculations [10].

figure e
figure f

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chatterjee, B., Parikh, R., Maitra, A., Maitra, S., Roy, A. (2022). Revisiting BoolTest – On Randomness Testing Using Boolean Functions. In: Isobe, T., Sarkar, S. (eds) Progress in Cryptology – INDOCRYPT 2022. INDOCRYPT 2022. Lecture Notes in Computer Science, vol 13774. Springer, Cham. https://doi.org/10.1007/978-3-031-22912-1_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-22912-1_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-22911-4

  • Online ISBN: 978-3-031-22912-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics