Statistical testing of random number generators and their improvement using randomness extraction
Abstract: Random number generators (RNGs) are notoriously challenging to build and test, especially for cryptographic applications. While statistical tests cannot definitively guarantee an RNG's output quality, they are a powerful verification tool and the only universally applicable testing method. In this work, we design, implement, and present various post-processing methods, using randomness extractors, to improve the RNG output quality and compare them through statistical testing. We begin by performing intensive tests on three RNGs -- the 32-bit linear feedback shift register (LFSR), Intel's 'RDSEED,' and IDQuantique's 'Quantis' -- and compare their performance. Next, we apply the different post-processing methods to each RNG and conduct further intensive testing on the processed output. To facilitate this, we introduce a comprehensive statistical testing environment, based on existing test suites, that can be parametrised for lightweight (fast) to intensive testing.
- A statistical test suite for random and pseudorandom number generators for cryptographic applications, volume 22. US Department of Commerce, Technology Administration, National Institute of Standards and Technology, 2001.
- George Marsaglia. The Marsaglia random number CDROM including the Diehard battery of tests of randomness. http://www.stat.fsu.edu/pub/diehard, 2008.
- Dieharder. Duke University Physics Department Durham, NC, pages 27708–0305, 2018.
- TestU01: AC library for empirical testing of random number generators. ACM Transactions on Mathematical Software (TOMS), 33(4):1–40, 2007.
- John Walker. A Pseudorandom Number Sequence Test Program.
- Chris Doty-Humphrey. PractRand official site. http://pracrand.sourceforge.net, 2018.
- Cryptomite: A versatile and user-friendly library of randomness extractors. arXiv preprint arXiv:2402.09481, 2024.
- Juan Soto. Statistical testing of random number generators. In Proceedings of the 22nd national information systems security conference, volume 10, page 12. NIST Gaithersburg, MD, 1999.
- E. A. Tsvetkov. Empirical tests for statistical properties of some pseudorandom number generators. Mathematical Models and Computer Simulations, 3:697–705, 2011.
- Analysis of Intel’s Ivy Bridge digital random number generator. http://www.cryptography.com/public/pdf/Intel_TRNG_Report_20120312.pdf, 2012.
- The Intel random number generator. Cryptography Research Inc. white paper, 27:1–8, 1999.
- High performance physical random number generator. IET computers & digital techniques, 1(4):349–352, 2007.
- 640-Gbit/s fast physical random number generation using a broadband chaotic semiconductor laser. Scientific Reports, 7(1):45900, 2017.
- Fast physical random number generator using amplified spontaneous emission. Optics express, 18(23):23584–23597, 2010.
- Random number generation using inertial measurement unit signals for on-body IoT devices. 2018.
- Random number generator using sensors for drone. IEEE Access, 8:30343–30354, 2020.
- High speed continuous variable source-independent quantum random number generation. Quantum Science and Technology, 4(2):025013, 2019.
- Operation of an electrical-only-contact photonic integrated chip for quantum random number generation using laser gain-switching. Optics, 4(4):551–562, 2023.
- Quantum generators of random numbers. Scientific Reports, 11(1):16108, 2021.
- A 3.3-gb/s spad-based quantum random number generator. IEEE Journal of Solid-State Circuits, 2023.
- Quantum leap and crash: Searching and finding bias in quantum random number generators. ACM Transactions on Privacy and Security (TOPS), 23(3):1–25, 2020.
- IDÂ Quantique. Quantis: Quantum random number generator, 2004.
- Review of methodologies and metrics for assessing the quality of random number generators. Electronics, 12(3):723, 2023.
- Classification of random number generator applications in iot: A comprehensive taxonomy. Journal of Information Security and Applications, 71:103365, 2022.
- Ronen Shaltiel. An introduction to randomness extractors. In International colloquium on automata, languages, and programming, pages 21–41. Springer, 2011.
- A comparison of post-processing techniques for biased random number generators. In Information Security Theory and Practice. Security and Privacy of Mobile Devices in Wireless Communication: 5th IFIP WG 11.2 International Workshop, WISTP 2011, Heraklion, Crete, Greece, June 1-3, 2011. Proceedings 5, pages 175–190. Springer, 2011.
- Postprocessing for quantum random-number generators: Entropy evaluation and randomness extraction. Physical Review A, 87(6):062327, 2013.
- Ran Canetti. Universally composable security: A new paradigm for cryptographic protocols. In Proceedings 42nd IEEE Symposium on Foundations of Computer Science, pages 136–145. IEEE, 2001.
- Kerry McKay et al. Users guide to running the draft NIST SP 800-90B entropy estimation suite. NIST, Gaithersburg, MD, USA, Tech. Rep. SP, 2016.
- Certifiably biased: An in-depth analysis of a common criteria EAL4+ certified TRNG. IEEE Transactions on Information Forensics and Security, 13(4):1031–1041, 2017.
- Heartbeats do not make good pseudo-random number generators: An analysis of the randomness of inter-pulse intervals. Entropy, 20(2):94, 2018.
- A provable-security analysis of Intel’s secure key RNG. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 77–100. Springer, 2015.
- A systematic approach of NIST statistical tests dependencies. Journal of Electrical Engineering, Electronics, Control and Computer Science, 5(1):1–6, 2019.
- Correction of overlapping template matching test included in NIST randomness test suite. IEICE transactions on fundamentals of electronics, communications and computer sciences, 90(9):1788–1792, 2007.
- On the revision of NIST 800-22 test suites. Cryptology ePrint Archive, 2022.
- On the interpretation of results from the NIST statistical test suite. Science and Technology, 18(1):18–32, 2015.
- Markku-Juhani O Saarinen. NIST SP 800-22 and GM/T 0005-2012 tests: Clearly obsolete, possibly harmful.
- A bad day to die hard: Correcting the Dieharder battery. Journal of Cryptology, 35(1):1–20, 2022.
- Statistical analysis of the LFSR generators in the NIST STS test suite. Computer applications in electrical engineering, 11, 2013.
- Discussion on the full entropy assumption of the SP 800-90 series. Technical report, National Institute of Standards and Technology, 2022.
- Analysis and improvement of entropy estimators in NIST SP 800-90B for non-IID entropy sources. IACR Transactions on Symmetric Cryptology, pages 151–168, 2017.
- John Von Neumann. Various techniques used in connection with random digits. John von Neumann, Collected Works, 5:768–770, 1963.
- Randomness extraction from somewhat dependent sources. In 13th Innovations in Theoretical Computer Science Conference (ITCS 2022). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2022.
- Quantum-proof multi-source randomness extractors in the Markov model. arXiv preprint arXiv:1510.06743, 2015.
- A reference for randomness beacons: Format and protocol version 2. Technical report, National Institute of Standards and Technology, 2019.
- Practical randomness amplification and privatisation with implementations on quantum computers. Quantum, 7:969, 2023.
- True randomness from realistic quantum devices (2013). URL http://arxiv. org/abs/1311.4547.
- Improved randomness extraction from two independent sources. In Approximation, randomization, and combinatorial optimization. Algorithms and techniques, pages 334–344. Springer, 2004.
- Hugo Krawczyk. LFSR-based hashing and authentication. In Annual International Cryptology Conference, pages 129–139. Springer, 1994.
- Luca Trevisan. Construction of extractors using pseudo-random generators. In Proceedings of the thirty-first annual ACM symposium on Theory of computing, pages 141–148, 1999.
- Salil P Vadhan. Pseudorandomness. Foundations and Trends® in Theoretical Computer Science, 7(1–3):1–336, 2012.
- Bell nonlocality. Reviews of modern physics, 86(2):419, 2014.
- Certified randomness in quantum physics. Nature, 540(7632):213–219, 2016.
- Quantinuum. H1-1. https://www.quantinuum.com/, 1-4 Nov, 2021.
- Algorithm 806: SPRNG: A scalable library for pseudorandom number generation. ACM Transactions on Mathematical Software (TOMS), 26(3):436–461, 2000.
- A computer package for measuring the strength of encryption algorithms. Computers & Security, 13(8):687–697, 1994.
- Julio Hernandez-Castro Jamie Pont, Calvin Brierley. BitReps. https://github.com/jjp31/bitreps-1/tree/master.
- Cristiano Piras. RaBiGeTe—Random Bit Generators Tester. http://cristianopi.altervista.org/RaBiGeTe_MT/.
- Recommendation for the entropy sources used for random bit generation. NIST Special Publication, 800(90B):102, 2018.
- Design and implementation of multibit LFSR on FPGA to generate pseudorandom sequence number. In 2017 Devices for Integrated Circuit (DevIC), pages 346–349. IEEE, 2017.
- Implementation of random number generator using LFSR for high secured multi purpose applications. International Journal of Computer Science and Information Technologies, 3(1):3287–3290, 2012.
- Patrik Ekdahl. On LFSR based Stream Ciphers-analysis and design. Lund University, 2003.
- FPGA implementation of 8, 16 and 32 bit LFSR with maximum length feedback polynomial using VHDL. In 2012 International Conference on Communication Systems and Network Technologies, pages 769–773. IEEE, 2012.
- NÂ David Mermin. Extreme quantum entanglement in a superposition of macroscopically distinct states. Physical Review Letters, 65(15):1838, 1990.
- Randomness versus nonlocality in the Mermin-Bell experiment with three parties. Quantum, 2:82, 2018.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.