Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

IEEE Transactions on Information Forensics and Security

Machine Learning Validation of a Physical Prime Random Number Generator

Maurício Jonas Ferreira, Nuno A. Silva, Armando N. Pinto, Nelson Jesus Muga

Published Jan 1, 2026• 0 citations
Publisher

Abstract

Random prime number generation is crucial for the implementation of several encryption and signature protocols in cryptographic applications. Recently, Quantum Random Number Generators (QRNGs) have emerged as a solution to obtain information-theoretically secure randomness, setting them apart from algorithmic generators. Nonetheless, their output is still prone to deterioration under a flawed implementation and thus requires continuous statistical validation. This process is uniquely challenging for prime number generators since they cannot be submitted to the traditional testing suites, which are primarily designed to test uniform pseudorandom sources. Here, we enable direct statistical testing of prime Random Number Generators (RNGs) by extending a validation framework based on an equiprobable binning of the prime distribution with a predictive machine learning model, which can independently learn correlations in the prime output. The validity of this framework is then verified through extensive cryptanalysis of a prime QRNG based on quadrature measurements of the vacuum state. The developed model successfully identifies flawed configurations of the prime QRNG for output lengths up to 128 bits. This assessment was additionally extended to a purely classical scheme derived from electronic noise measurements. Although no increase in the model’s predictive capacity is seen, our testing framework can nonetheless demonstrate that this classical source produces a conclusively biased prime distribution. In turn, the implemented QRNG remains resilient against this type of cryptanalysis.

DOI
10.1109/tifs.2026.3686995

Related papers

Statistical Validation of a Physical Prime Random Number Generator Based on Quantum Noise

Maurício Jonas Ferreira, Nuno A. Silva, Armando N. Pinto +1 more

Random prime numbers are an essential resource for many asymmetric cryptographic protocols. However, despite the emerging popularity of quantum random number generators (QRNGs) as sources of secure randomness, physical prime number generators have not yet been explored. In this work, we experimentally implement and characterize a vacuum-based probabilistic prime number generation scheme with an error probability of 3.5×10−15. By removing the quantum source (QS), an additional scheme based on electronic noise is derived, and a comparative analysis for increasing prime lengths is made. We observed that the QS significantly outperforms the classical scheme for small prime generation, where increases up to 585.0% in the diversity of unique primes obtained are seen. Moreover, we propose a length-agnostic statistical test for prime number sequences and apply it to the output of the uniformized randomness source, which was successful in revealing underlying biases in the output prime distributions. The resultant sequences were subsequently submitted to the NIST statistical test suite, where the quantum and classical sources passed, respectively, 86.96% and 45.34% of the total test set applied.

Applied Sciences•Nov 23, 2023•4 citations

Machine Learning Cryptanalysis of a Quantum Random Number Generator

Nhan Duy Truong, Jing Yan Haw, Syed M. Assad +2 more

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.

arXiv:1905.02342•IEEE Transactions on Information Forensics and Security•Jun 26, 2018•66 citations

Probable Prime Generation from a Quantum Randomness Source

Maurício Jonas Ferreira, André Carvalho, Nuno A. Silva +2 more

Quantum random number generators (QRNGs) are an increasingly popular method to obtain information-theoretically provable random keys for cryptographic applications. Here, we experimentally demonstrate a probable prime generation protocol using a vacuum-based QRNG and compare its output with the one yielded by an electronic noise source. The quantum source significantly outperformed the classical scheme for lengths smaller than 128 bits, with increases of up to 837.1% in the number of unique primes being reported. By mapping the input noise to a uniform distribution, this figure was additionally increased by up to 844.3% and the output statistical distribution for small primes significantly improved.

International Conference on Transparent Optical Networks•Jul 2, 2023•1 citation

Machine Learning-Based Randomness Analysis For a Auantum Random Number Generator

Wanlin Du, Ling Wang, Yuanzhe Zhu +1 more

Abstract Random numbers are critical to information security. Quantum random numbers are theoretically truly random and unpredictable. However, the measurement process of a quantum random number generator (QRNG) can be affected by environmental disturbances that compromise the integrity of the generated random numbers. A machine learning model is proposed to assess the stochasticity of the continuous variable QRNG under the influence of vacuum noise. The model is designed to detect the correlation between the randomness of the QRNG being corrupted under the influence of classical noise (electrical noise). In addition, our model detects a decrease in the randomness of the QRNG random numbers when the electrical noise intensity increases to a certain correlation. The results show that machine learning (ML) can be used as a measure of the quality of QRNG.

Journal of Physics Conference Series•Sep 1, 2024•0 citations

Characterization of a Quantum Random Number Generator Based on Vacuum Fluctuations

Maurício Jonas Ferreira, Nuno A. Silva, Armando N. Pinto +1 more

Quantum random number generators (QRNGs) are currently in high demand across a large number of cryptographic applications as secure sources of true randomness. In this work, we characterize the conditions from which randomness can be extracted in a QRNG based on homodyne measurements of vacuum fluctuations by assessing the impact of experimental limitations, such as the digitizer resolution or the presence of excess local oscillator (LO) noise due to an unbalanced detection. Moreover, we propose an estimation method to quantify the excess entropy contribution introduced by an unbalanced detection and analyze the implementation of the post-processing algorithm. Finally, we submitted the generated numbers to a set of statistical tests to assess the quality of its output randomness and verified that it passes the standard libraries.

Applied Sciences•Aug 12, 2021•18 citations

Quantify Randomness of Quantum Random Number with Transformer Network

Zhenwei Li, Feng Bao, Liangjie Cui +4 more

The random number generator (RNG) plays an essential role in lots of applications such as cryptographic. Unlike classical random number generators, quantum random number generators (QRNG) can in principle generate true random numbers because it is based on the inherent uncertainty of the quantum property. However, the presence of the environmental noise or the imperfect characteristics of the device can compromise the integrity of QRNG. To judge the quality of QRNG, we propose to apply the transformer based machine learning (ML) model to quantify the randomness of quantum random numbers. Through proper training, our transformer based ML model is able to predict randomness of given quantum random number sequence very closely to the maximum guess probability of its theoretical limit. Moreover, we also do comparisons between our present transformer based model with other ML model, such as the long short term memory network (LSTM) based model. Simulation results show that our present model can not only present a higher prediction accuracy, but also cost much less time and exhibit excellent performance in work efficiency. Furthermore, we also compare our present transformer based machine learning model with the traditional randomness detection standard, NIST-test-suite, and show advantages of our method.

International Conference on Intelligent Power and Systems (ICIPS)•Oct 20, 2023•3 citations
Random prime number generation is crucial for the implementation of several encryption and signature protocols in cryptographic applications. Recently, Quantum Random Number Generators (QRNGs) have emerged as a solution to obtain information-theoretically secure randomness, setting them apart from algorithmic generators. Nonetheless, their output is still prone to deterioration under a flawed implementation and thus requires continuous statistical validation. This process is uniquely challenging for prime number generators since they cannot be submitted to the traditional testing suites, which are primarily designed to test uniform pseudorandom sources. Here, we enable direct statistical testing of prime Random Number Generators (RNGs) by extending a validation framework based on an equiprobable binning of the prime distribution with a predictive machine learning model, which can independently learn correlations in the prime output. The validity of this framework is then verified through extensive cryptanalysis of a prime QRNG based on quadrature measurements of the vacuum state. The developed model successfully identifies flawed configurations of the prime QRNG for output lengths up to 128 bits. This assessment was additionally extended to a purely classical scheme derived from electronic noise measurements. Although no increase in the model’s predictive capacity is seen, our testing framework can nonetheless demonstrate that this classical source produces a conclusively biased prime distribution. In turn, the implemented QRNG remains resilient against this type of cryptanalysis.
Random prime numbers are an essential resource for many asymmetric cryptographic protocols. However, despite the emerging popularity of quantum random number generators (QRNGs) as sources of secure randomness, physical prime number generators have not yet been explored. In this work, we experimentally implement and characterize a vacuum-based probabilistic prime number generation scheme with an error probability of 3.5×10−15. By removing the quantum source (QS), an additional scheme based on electronic noise is derived, and a comparative analysis for increasing prime lengths is made. We observed that the QS significantly outperforms the classical scheme for small prime generation, where increases up to 585.0% in the diversity of unique primes obtained are seen. Moreover, we propose a length-agnostic statistical test for prime number sequences and apply it to the output of the uniformized randomness source, which was successful in revealing underlying biases in the output prime distributions. The resultant sequences were subsequently submitted to the NIST statistical test suite, where the quantum and classical sources passed, respectively, 86.96% and 45.34% of the total test set applied.
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.
Quantum random number generators (QRNGs) are an increasingly popular method to obtain information-theoretically provable random keys for cryptographic applications. Here, we experimentally demonstrate a probable prime generation protocol using a vacuum-based QRNG and compare its output with the one yielded by an electronic noise source. The quantum source significantly outperformed the classical scheme for lengths smaller than 128 bits, with increases of up to 837.1% in the number of unique primes being reported. By mapping the input noise to a uniform distribution, this figure was additionally increased by up to 844.3% and the output statistical distribution for small primes significantly improved.
Abstract Random numbers are critical to information security. Quantum random numbers are theoretically truly random and unpredictable. However, the measurement process of a quantum random number generator (QRNG) can be affected by environmental disturbances that compromise the integrity of the generated random numbers. A machine learning model is proposed to assess the stochasticity of the continuous variable QRNG under the influence of vacuum noise. The model is designed to detect the correlation between the randomness of the QRNG being corrupted under the influence of classical noise (electrical noise). In addition, our model detects a decrease in the randomness of the QRNG random numbers when the electrical noise intensity increases to a certain correlation. The results show that machine learning (ML) can be used as a measure of the quality of QRNG.
Quantum random number generators (QRNGs) are currently in high demand across a large number of cryptographic applications as secure sources of true randomness. In this work, we characterize the conditions from which randomness can be extracted in a QRNG based on homodyne measurements of vacuum fluctuations by assessing the impact of experimental limitations, such as the digitizer resolution or the presence of excess local oscillator (LO) noise due to an unbalanced detection. Moreover, we propose an estimation method to quantify the excess entropy contribution introduced by an unbalanced detection and analyze the implementation of the post-processing algorithm. Finally, we submitted the generated numbers to a set of statistical tests to assess the quality of its output randomness and verified that it passes the standard libraries.
The random number generator (RNG) plays an essential role in lots of applications such as cryptographic. Unlike classical random number generators, quantum random number generators (QRNG) can in principle generate true random numbers because it is based on the inherent uncertainty of the quantum property. However, the presence of the environmental noise or the imperfect characteristics of the device can compromise the integrity of QRNG. To judge the quality of QRNG, we propose to apply the transformer based machine learning (ML) model to quantify the randomness of quantum random numbers. Through proper training, our transformer based ML model is able to predict randomness of given quantum random number sequence very closely to the maximum guess probability of its theoretical limit. Moreover, we also do comparisons between our present transformer based model with other ML model, such as the long short term memory network (LSTM) based model. Simulation results show that our present model can not only present a higher prediction accuracy, but also cost much less time and exhibit excellent performance in work efficiency. Furthermore, we also compare our present transformer based machine learning model with the traditional randomness detection standard, NIST-test-suite, and show advantages of our method.