Machine Learning Cryptanalysis of a Quantum Random Number Generator
Nhan Duy Truong, Jing Yan Haw, Syed Muhamad Assad, Ping Koy Lam, Omid Kavehei
TL;DR
This work addresses the vulnerability of RNGs to adversarial environmental information by applying a predictive ML framework to a continuous-variable QRNG. Using a recurrent convolutional neural network, the authors quantify how deterministic classical noise can create learnable patterns in raw QRNG outputs and demonstrate that appropriate entropy extraction and post-processing suppress these patterns, restoring unpredictability. The study also tests ML on a congruential RNG and shows reduced predictability with longer periods, while QRNG outputs pass NIST randomness tests, validating the robustness of the approach as a benchmarking tool. Overall, ML provides a device-agnostic means to assess unpredictability and can guide design and processing choices to ensure cryptographic-quality randomness.
Abstract
Random number generators (RNGs) that are crucial for cryptographic applications have been the subject of adversarial attacks. These attacks exploit environmental information to predict generated random numbers that are supposed to be truly random and unpredictable. Though quantum random number generators (QRNGs) are based on the intrinsic indeterministic nature of quantum properties, the presence of classical noise in the measurement process compromises the integrity of a QRNG. In this paper, we develop a predictive machine learning (ML) analysis to investigate the impact of deterministic classical noise in different stages of an optical continuous variable QRNG. Our ML model successfully detects inherent correlations when the deterministic noise sources are prominent. After appropriate filtering and randomness extraction processes are introduced, our QRNG system, in turn, demonstrates its robustness against ML. We further demonstrate the robustness of our ML approach by applying it to uniformly distributed random numbers from the QRNG and a congruential RNG. Hence, our result shows that ML has potentials in benchmarking the quality of RNG devices.
