<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3-mathml3.dtd">
<article xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" dtd-version="1.3" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Comput. Sci.</journal-id>
<journal-title-group>
<journal-title>Frontiers in Computer Science</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Comput. Sci.</abbrev-journal-title>
</journal-title-group>
<issn pub-type="epub">2624-9898</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fcomp.2025.1642566</article-id>
<article-version article-version-type="Version of Record" vocab="NISO-RP-8-2008"/>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Original Research</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Entropy measurement and online quality control of bit streams by a true random bit generator</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Gerolimetto Fabrello</surname> <given-names>Cesare</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="software" vocab-term-identifier="https://credit.niso.org/contributor-roles/software/">Software</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<uri xlink:href="https://loop.frontiersin.org/people/2962764"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Rossi</surname> <given-names>Valeria</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="software" vocab-term-identifier="https://credit.niso.org/contributor-roles/software/">Software</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<uri xlink:href="https://loop.frontiersin.org/people/3174691"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Witek</surname> <given-names>Kamil</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="software" vocab-term-identifier="https://credit.niso.org/contributor-roles/software/">Software</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Trombetta</surname> <given-names>Alberto</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<uri xlink:href="https://loop.frontiersin.org/people/554704"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Baszczyk</surname> <given-names>Mateusz</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Dorosz</surname> <given-names>Piotr</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Kucewicz</surname> <given-names>Wojciech</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
</contrib>
<contrib contrib-type="author">
<name><surname>Caccia</surname> <given-names>Massimo</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &amp; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-review-editing/">Writing &#x2013; review &#x00026; editing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Funding acquisition" vocab-term-identifier="https://credit.niso.org/contributor-roles/funding-acquisition/">Funding acquisition</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
</contrib>
</contrib-group>
<aff id="aff1"><label>1</label><institution>Dipartimento di Scienze e Alta Tecnologia, Universit&#x000E0; degli Studi dell&#x00027;Insubria</institution>, <city>Como</city>, <country country="it">Italy</country></aff>
<aff id="aff2"><label>2</label><institution>Random Power s.r.l.</institution>, <city>Milano</city>, <country country="it">Italy</country></aff>
<aff id="aff3"><label>3</label><institution>AGH University of Science and Technology</institution>, <city>Krak&#x000F3;w</city>, <country country="pl">Poland</country></aff>
<author-notes>
<corresp id="c001"><label>&#x0002A;</label>Correspondence: Cesare Gerolimetto Fabrello, <email xlink:href="mailto:cesare.gerolimetto@randompower.eu">cesare.gerolimetto@randompower.eu</email></corresp>
</author-notes>
<pub-date publication-format="electronic" date-type="pub" iso-8601-date="2025-10-07">
<day>07</day>
<month>10</month>
<year>2025</year>
</pub-date>
<pub-date publication-format="electronic" date-type="collection">
<year>2025</year>
</pub-date>
<volume>7</volume>
<elocation-id>1642566</elocation-id>
<history>
<date date-type="received">
<day>06</day>
<month>06</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>15</day>
<month>09</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2025 Gerolimetto Fabrello, Rossi, Witek, Trombetta, Baszczyk, Dorosz, Kucewicz and Caccia.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Gerolimetto Fabrello, Rossi, Witek, Trombetta, Baszczyk, Dorosz, Kucewicz and Caccia</copyright-holder>
<license>
<ali:license_ref start_date="2025-10-07">https://creativecommons.org/licenses/by/4.0/</ali:license_ref>
<license-p>This is an open-access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License (CC BY)</ext-link>. The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</license-p>
</license>
</permissions>
<abstract>
<p>Generating random bit streams is required in various applications, most notably in cyber-security, which is essential for Internet of Everything applications to enable secure communication between interconnected devices. Ensuring high-quality and robust randomness is crucial to mitigate risks associated with predictability and system compromise. True random numbers provide the highest levels of unpredictability. However, known systematic biases that can emerge from physical imperfections, environmental variations, and device aging in the processes exploited for random number generation must be carefully monitored. This article reports the implementation and characterization of an online procedure for the detection of anomalies in a true random bit stream. It is based on the NIST adaptive proportion and repetition count tests, complemented by statistical analysis relying on the Monobit and RUNS tests. The procedure is implemented in firmware through dedicated hardware accelerators processing configurable-length sequences, with automated anomaly detection triggering alerts after three consecutive threshold violations. The implementation is performed simultaneously with bit stream generation and also provides an estimate of the entropy of the source. A statistical analysis of the results from the NIST procedure to evaluate the symbols of the bit-stream as independently and identically distributed is also performed, leading to a computation of the minimum entropy of the source that cross-checks the previously mentioned estimate. The experimental validation of the approach is performed up the bit streams generated by a quantum, silicon-based entropy source.</p></abstract>
<kwd-group>
<kwd>statistical</kwd>
<kwd>test</kwd>
<kwd>QRNG</kwd>
<kwd>TRNG</kwd>
<kwd>entropy</kwd>
<kwd>min-entropy</kwd>
</kwd-group>
<funding-group>
<funding-statement>The author(s) declare that financial support was received for the research and/or publication of this article. This activity is part of the project named <italic>In-silico quantum generation of random bit streams (Random Power)</italic> which has received funding from the European Union&#x00027;s Horizon 2020 Research and Innovation Programme within the ATTRACT cascade grant project, under the contract no.101004462). The European Commission&#x00027; support does not constitute an endorsement of the contents, which only reflect the views of the authors. The Commission is not responsible for any use of the information therein.</funding-statement>
</funding-group>
<counts>
<fig-count count="15"/>
<table-count count="5"/>
<equation-count count="18"/>
<ref-count count="31"/>
<page-count count="18"/>
<word-count count="13099"/>
</counts>
<custom-meta-group>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Computer Security</meta-value>
</custom-meta>
</custom-meta-group>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<label>1</label>
<title>Introduction</title>
<p>The use of massive amounts of random numbers is a critical issue in security-related techniques and tools for protecting and sharing data in open, distributed environments (<xref ref-type="bibr" rid="B14">Gennaro, 2006</xref>; <xref ref-type="bibr" rid="B24">Seyhan and Akleylek, 2022</xref>), as well as their deployment in large statistical and numerical simulations (<xref ref-type="bibr" rid="B6">Cowan, 2016</xref>).</p>
<p>The need for high-quality random numbers has driven the search for new, more reliable, and robust approaches for their generation. Current solutions are divided into two main categories: true random number generators (TRNGs) and pseudo random number generators (PRNGs). TRNGs are driven by observables connected to stochastic, chaotic, or quantum natural phenomena. The latter, where unpredictability is rooted in the laws of nature, guarantees the highest level of security; they are identified as quantum random number generators (QRNGs). PRNGs, also known as deterministic random bit generators (DRBGs), are deterministic algorithms implemented in software or firmware which, given an initial value known as a seed, emulate the properties of TRNGs; therefore, unpredictability in the generated sequences is irreducibly constrained.</p>
<p>TRNGs are not immune to systematic deviations: known biases can arise from device imperfections, environmental variations (temperature, voltage), or hardware aging, which may reduce entropy if left undetected. Recent studies have emphasized this vulnerability. For example, Zhang B. et al. (<xref ref-type="bibr" rid="B30">2025</xref>) demonstrated that classical fluctuations can subtly compromise QRNG outputs despite passing standard statistical batteries. Likewise, IoT deployments have suffered from reduced entropy due to slow or unstable randomness harvesting (<xref ref-type="bibr" rid="B12">Fox, 2021</xref>). These cases highlight that even quantum or physical sources of entropy require continuous online quality control.</p>
<p>In parallel, PRNGs provide an efficient way to emulate randomness for simulations and general computational tasks. However, their deterministic nature makes them unsuitable for applications where unpredictability is essential, such as cryptography. This distinction reinforces the necessity of employing TRNGs or QRNGs in the domain of cybersecurity (<xref ref-type="bibr" rid="B17">Herrero-Collantes and Garcia-Escartin, 2017</xref>).</p>
<p>Proving randomness poses challenges regarding diagnostic statistical methods and their implementation. The open problem can, therefore, be stated as follows: <italic>how can one efficiently guarantee, in real time, that a TRNG or QRNG remains unbiased and unpredictable under realistic operating conditions?</italic> Current efforts address this challenge in two ways. On the one hand, heavy statistical test suites such as NIST SP800-22 (<xref ref-type="bibr" rid="B22">Rukhin et al., 2001</xref>) or TestU01 (<xref ref-type="bibr" rid="B18">L&#x00027;Ecuyer and Simard, 2007</xref>) provide high sensitivity but require large data volumes and offline computation, making them unsuitable for online monitoring. On the other hand, lighter &#x0201C;health tests&#x0201D; recommended by NIST SP800-90B (<xref ref-type="bibr" rid="B27">Turan et al., 2018</xref>) provide rapid detection but are limited in scope, targeting catastrophic failures rather than gradual entropy degradation. More recent TRNG architectures have optimized throughput and resource efficiency at the hardware level (<xref ref-type="bibr" rid="B21">Piscopo et al., 2025</xref>), but generally focus less on embedding comprehensive online quality monitoring. Bridging this gap is the objective of this work.</p>
<p><underline>Our contributions:</underline> In this article, we present an anomaly detection procedure based on a sample of outputs from the NIST health tests, namely the repetition count test (RCT) and the adaptive proportion test (APT), complemented by the Monobit and RUNS statistics. More precisely, two main contributions enhance the analysis of source entropy.</p>
<p>Unlike the lightweight NIST health tests, which flag and discard individual failing sequences, our framework extends the tests into a distribution-based analysis. By accumulating outcomes over multiple sequences, it distinguishes ordinary statistical fluctuations from persistent deviations, enabling online detection of long-term drifts and supporting entropy estimation consistent with NIST&#x00027;s min-entropy bounds.</p>
<p>As a premise to the assessment of the diagnostic developed, the procedure to test the symbols of the dataset as independently and identically distributed (IID) and consequently compute the minimum entropy of the source described in (<xref ref-type="bibr" rid="B27">Turan et al. 2018</xref>) is analyzed.</p>
<p>Firstly, results obtained from the Monobit and RUNS tests are given a statistical interpretation by measuring the shift of the average of a sample from the expected value for an unbiased sequence of bits, instead of the traditional approach that analyzes single-bit strings and outputs a result for each one of them.</p>
<p>Secondly, an innovative method is proposed to estimate a lower bound on the source entropy based on the measured RCT failure frequency, overcoming limitations of traditional approaches that require significant amounts of storage and additional computations.</p>
<p>The procedures were software-tested and firmware implemented, embedded in the entropy extractor of a proprietary silicon-based QRNG embodiment, to maximize efficiency and guarantee online execution without impacting the bit-generation rate. This article also provides detailed descriptions of the FPGA-based hardware implementations of these statistical tests, structured as finite state machines that enable online anomaly detection and continuous quality monitoring of the generated random bit streams.</p>
<p>The article is organized as follows: in Section 2, some of the most relevant related work is briefly mentioned; in Section 3, the QRNG system architecture and firmware implementation are described; in Section 4, the IID procedure is described and analyzed; in Section 5, a short introduction to the statistical tests is presented; Section 6 describes the procedure relying on the aforementioned statistical tests, and the experimental results obtained using a silicon-based QRNG are reported; finally, conclusions and outlook are drawn in Section 8.</p>
<p>This article represents an extended version of the research initially presented at the 2024 IEEE Cyber-Security and Resilience Conference (<xref ref-type="bibr" rid="B5">Gerolimetto Fabrello et al., 2024</xref>). Here, we elaborate on the firmware implementation of the statistical tests and IID procedures, as well as the calculation of min-entropy, all of which serve as premises for the developed procedures.</p></sec>
<sec id="s2">
<label>2</label>
<title>Related work</title>
<p>The earliest quantum bit generators relied on analyzing series of pulses originating from a detector by alpha, beta, or gamma particles emitted by unstable radioactive nuclei. Such pulses are unpredictable, statistically independent, and uncorrelated, allowing for bit extraction through various techniques (<xref ref-type="bibr" rid="B10">Figotin et al., 2004</xref>). Nevertheless, using radioactive sources comes with several drawbacks, including the need for shielding for radiation protection and limitations imposed by the detector characteristics in terms of limited throughput and radiation-induced damage. All of these factors hinder the widespread adoption of such technologies.</p>
<p>In recent years, the field of QRNGs has witnessed significant advances driven by the unique properties of quantum phenomena using various instruments and methods. A comprehensive review can be found in (<xref ref-type="bibr" rid="B17">Herrero-Collantes and Garcia-Escartin 2017</xref>). Further developments include high-throughput implementations such as mesh-topology XOR ring oscillator TRNGs validated by NIST and AIS-31 tests (<xref ref-type="bibr" rid="B19">Lu et al., 2025</xref>), DSP-based compact FPGA designs assessed with NIST and Dieharder (<xref ref-type="bibr" rid="B13">Frustaci et al., 2024</xref>), and state-switchable oscillators verified through NIST evaluations (<xref ref-type="bibr" rid="B28">Wu, 2025</xref>), as well as highly parameterized FPGA-based designs with Keccak post-processing and compliance with NIST 800-90B health tests (<xref ref-type="bibr" rid="B21">Piscopo et al., 2025</xref>). More experimental proposals, such as dynamic hybrid TRNG architectures (Zhang Y. et al., <xref ref-type="bibr" rid="B31">2025</xref>), report partial validation but primarily target throughput and area efficiency, aiming to balance entropy quality with performance.</p>
<p>Generation methods can result in the production of sequences of binary symbols or larger alphabets. Regardless of the mechanism, the significant impact of the randomness quality of both PRNGs and TRNGs in security applications emerged from several use cases. A well-known example that surfaced in 2008 (<xref ref-type="bibr" rid="B7">Debian Security Team, 2008</xref>) concerns a critical vulnerability within the Debian Linux release of OpenSSL, resulting in low entropy during cryptographic key generation. Despite being discovered and promptly fixed, the response was sluggish, and certificate authorities persisted in issuing authentications with weak keys even after the vulnerability was disclosed (<xref ref-type="bibr" rid="B29">Yilek et al., 2009</xref>).</p>
<p>More recent work, such as (<xref ref-type="bibr" rid="B12">Fox 2021</xref>), reports that errors in cryptographic key generation in IoT devices&#x02014;due to a slow rate of random bit harvesting&#x02014;went unnoticed, leading to a significant loss of entropy affecting the security of billions of devices. Almost surely, such vulnerabilities could have been promptly detected by implementing online randomness quality estimation methods. This need is actually recognized by NIST, which prescribes in the DRBG (<xref ref-type="bibr" rid="B1">Barker and Kelsey, 2015</xref>) and TRNG (<xref ref-type="bibr" rid="B2">Barker et al., 2012</xref>) procedures the implementation of &#x0201C;health tests,&#x0201D; namely quality assessments of possibly limited sensitivity but rapid execution.</p>
<p>Besides NIST, a noteworthy addition to randomness testing is reported in (<xref ref-type="bibr" rid="B26">S&#x000FD;s et al. 2017</xref>). The method is designed to detect biases in the random bit-stream by employing Boolean functions, extending the approach of the Monobit statistics detailed in Section 5. These results require a lower volume of data compared to the standard NIST and Dieharder Statistical Test Suites while maintaining a significant level of reliability. Other work on testing randomness and its improvement through post-processing can be found in (<xref ref-type="bibr" rid="B11">Foreman et al. 2024</xref>).</p>
<p>Recent studies involving randomness testing through AI have also been proposed, for example (<xref ref-type="bibr" rid="B9">Feng and Hao 2020</xref>) and (<xref ref-type="bibr" rid="B15">Goel et al. 2024</xref>).</p></sec>
<sec id="s3">
<label>3</label>
<title>QRNG embodiment</title>
<p>The QRNGs developed as part of the <italic>In-silico Quantum Generation of Random Bit Streams (Random Power!)</italic> project are implemented in two primary embodiments: a single generator board (SGB) and an enhanced 64&#x000D7; generator board configuration, whose specifications are reported in <xref ref-type="table" rid="T1">Table 1</xref>. The overall objective of the project is to demonstrate a scalable, low-cost hardware platform for entropy generation and continuous quality control, suitable for applications ranging from secure communications to big data infrastructures. Unlike algorithmic generators, which are deterministic, the proposed devices extract entropy from physical phenomena (<xref ref-type="bibr" rid="B4">Caccia et al., 2020</xref>).</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Table of specifications for the two embodiments of the silicon-based QTRNG under consideration on which the online health tests were firmware implemented: the single generator board and the 64 &#x000D7; x generator board.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th/>
<th valign="top" align="left"><bold>Single generator board</bold></th>
<th valign="top" align="left"><bold>64 &#x000D7; generator board</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Dimensions (cm<sup>2</sup>)</td>
<td valign="top" align="left">8 &#x000D7; 3.5</td>
<td valign="top" align="left">11.1 &#x000D7; 31.2 &#x000D7; 2.0</td>
</tr> <tr>
<td valign="top" align="left">No. of generators</td>
<td valign="top" align="left">1 array</td>
<td valign="top" align="left">64 arrays</td>
</tr> <tr>
<td valign="top" align="left">Raw bitstream</td>
<td valign="top" align="left">100 kbps</td>
<td valign="top" align="left">32 Mbps</td>
</tr> <tr>
<td valign="top" align="left">NIST DRBG output (SP800-90 A, B, C)</td>
<td valign="top" align="left">NA</td>
<td valign="top" align="left">1 Gbps</td>
</tr> <tr>
<td valign="top" align="left">Control</td>
<td valign="top" align="left">Xilinx Spartan 7</td>
<td valign="top" align="left">Xilinx KRIA K26 SOM</td>
</tr> <tr>
<td valign="top" align="left">I/O</td>
<td valign="top" align="left">USB or bits-on-pin</td>
<td valign="top" align="left">Eth or PCI-Express</td>
</tr> <tr>
<td valign="top" align="left">Power supply</td>
<td valign="top" align="left">USB (5V, 0.5A)</td>
<td valign="top" align="left">12V, 8A</td>
</tr> <tr>
<td valign="top" align="left">Power consumption</td>
<td valign="top" align="left">&#x0003C; 2.5W</td>
<td valign="top" align="left">20W</td>
</tr> <tr>
<td valign="top" align="left">Encryption of the bit-stream</td>
<td valign="top" align="left">No</td>
<td valign="top" align="left">Encryption and authentication (AES256)</td>
</tr> <tr>
<td valign="top" align="left">Specific features</td>
<td valign="top" align="left">&#x000B7; Firmware implemented online sanity checks (Monobit, RUNs)</td>
<td valign="top" align="left">&#x000B7; Firmware implemented online sanity checks (Monobit, RUNs, APT, RCT)</td>
</tr>
 <tr>
<td/>
<td valign="top" align="left">&#x000B7; Auxiliary post-processing through SHA256 function</td>
<td valign="top" align="left">&#x000B7; Run control through Trusted Execution Environment</td>
</tr>
 <tr>
<td/>
<td/>
<td valign="top" align="left">&#x000B7; Temperature control through Peltier cooler</td>
</tr>
 <tr>
<td/>
<td/>
<td valign="top" align="left">&#x000B7; FIPS-140-3 compliant by design</td>
</tr></tbody>
</table>
</table-wrap>
<p>Bit streams are generated by analyzing the time series of self-amplified endogenous pulses in Silicon PhotoMultipliers (SiPMs). These pulses originate from stochastically generated charge carriers in an array of p-n junctions operated beyond their breakdown voltage, mimicking the statistics of radioactive decay events. The physical mechanism is well modeled in semiconductor theory: charge carriers randomly crossing potential barriers enter a high electric field region and trigger an avalanche multiplication by impact ionization in the Geiger-M&#x000FC;ller regime. A full description of the underlying processes can be found in reviews of SiPM physics (<xref ref-type="bibr" rid="B20">McKay, 1954</xref>; Senitzki B., <xref ref-type="bibr" rid="B23">1958</xref>; <xref ref-type="bibr" rid="B16">Haitz, 1965</xref>). Using SiPMs as entropy sources ensures compactness and robustness: pulses are large (millions of electrons) and short (tens of nanoseconds), which enables precise time-tagging and efficient bit extraction without the need for additional post-processing.</p>
<p>The hardware implementation of these principles is shown in <xref ref-type="fig" rid="F1">Figure 1</xref>. Each board integrates the SiPM detector array, biasing, temperature control and/or compensation features, a proprietary time-to-digital converter (TDC), and a field-programmable gate array (FPGA) responsible for bit extraction and health monitoring.</p>
<fig position="float" id="F1">
<label>Figure 1</label>
<caption><p>General overview of FPGA-based QTRNGs developed by RandomPower (<xref ref-type="bibr" rid="B4">Caccia et al., 2020</xref>). The stochastic impulses are generated by the SiPM. A dedicated analog circuitry (substituted by a dedicated chip in the 64&#x000D7;) implements the triggering logic, generating a digital signal that is fed directly into the FPGA. Inside the FPGA, it is timestamped by a dedicated TDC, and the timestamps are then analyzed by the bit generator to produce four-bit symbols. Optional post-processing, in the form of a SHA-256 whitening accelerator, can be applied to remove any residual bias if needed. After passing through the Health Test accelerator (implementing Monobit, RUNS, APT, and RCT), the bit-stream can be routed through a NIST-compliant DRBG. The resulting output may then be directed to the USB interface (in the case of the SGB) or to the Ethernet/PCIe interface (in the case of the 64 &#x000D7; ). ARM TrustZone ensures isolation of the control logic and allows only approved applications to manage the process. The main difference between the 64&#x000D7; and the SGB is highlighted in light blue: the 64&#x000D7; integrates a temperature controller and thermoelectric module to stabilize the array at a specified temperature.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0001.tif">
<alt-text content-type="machine-generated">Diagram of an FPGA-based system architecture. It features a SiPM array under a light-tight cover connected to an analog frontend. Components include temperature probes, a temperature controller, and a bias voltage generator. Signal processing involves TDCs, a bit generator, NIST post-processing, health tests, and a DRBG. A control module interfaces with a CPU running Linux within ARM TrustZone isolation or input section. An output data stream handler connects to USB, PCIe, and Ethernet controllers. The MGB/64x section is highlighted.</alt-text>
</graphic>
</fig>
<p>The prototype implementation replaces discrete commercial TDCs with an embedded FPGA TDC IP Core. The inclusion of the TDC within the FPGA fabric, as shown in <xref ref-type="fig" rid="F1">Figure 1</xref>, allows for on-the-fly updates and tweaks as the device development improves. This design was chosen to increase throughput and upgradability and to reduce costs and possible attack surfaces (<xref ref-type="bibr" rid="B8">Fagan et al., 2025</xref>). Generally, the process of time stamping is performed with external TDCs; however, this increases complexity and decreases flexibility. Additionally, the temperature-dependent calibration logic allows for removing the non-linearities generated by temperature shifts.</p>
<p>The FPGA TDC converts electrical impulses to random bit streams by analyzing inter-arrival times of nine-pulse series to generate four-bit sequences, resulting in an alphabet of 2<sup>4</sup> &#x0003D; 16 possible symbols for each cycle.</p>
<p>It is worth noting that correlations during the generation process, dead times of the QRNG during time stamping of the pulses, and external factors, such as thermal runaways, may introduce time-dependent anomalies in the generation of bits or symbols, making the implementation of efficient, near real-time health tests a very relevant tool for assessing the quality of the generated sequences.</p>
</sec>
<sec id="s4">
<label>4</label>
<title>The IID procedure</title>
<p>The main metric for the evaluation of the randomness of a bit-stream is given by the measure of the minimum entropy, which is described in document (<xref ref-type="bibr" rid="B27">Turan et al., 2018</xref>) and is subject to the assumption that the symbols that make up the stream are independently and identically distributed (the IID hypothesis in the following). The NIST procedure to assess the latter, detailed in Chapter 5 of the same document, is based on a bootstrapping method performed on eleven statistical tests that can be grouped into the excursion test statistic, statistics on runs, statistics on collisions, periodicity and covariance tests, and the compression test. The pseudo-codes as described in NIST documentation for a representative from each category are outlined below in <xref ref-type="statement" rid="algo1">Algorithms 1</xref>&#x02013;<xref ref-type="statement" rid="algo5">5</xref>, respectively.</p>
<statement content-type="algorithm" id="algo1">
<label>Algorithm 1</label>
<title>Excursion test statistic.</title>
<p><inline-graphic xlink:href="fcomp-07-1642566-i0001.tif"/></p>
</statement>
<statement content-type="algorithm" id="algo2">
<label>Algorithm 2</label>
<title>Number of directional runs.</title>
<p><inline-graphic xlink:href="fcomp-07-1642566-i0002.tif"/></p>
</statement>
<statement content-type="algorithm" id="algo3">
<label>Algorithm 3</label>
<title>Average collision test.</title>
<p><inline-graphic xlink:href="fcomp-07-1642566-i0003.tif"/></p>
</statement>
<statement content-type="algorithm" id="algo4">
<label>Algorithm 4</label>
<title>Periodicity test.</title>
<p><inline-graphic xlink:href="fcomp-07-1642566-i0004.tif"/></p>
</statement>
<statement content-type="algorithm" id="algo5">
<label>Algorithm 5</label>
<title>Compression test statistic.</title>
<p><monospace><bold>Input</bold>: A sequence <italic>S</italic> &#x0003D; (<italic>s</italic><sub>1</sub>, <italic>s</italic><sub>2</sub>, &#x02026;, <italic>s</italic><sub><italic>L</italic></sub>)</monospace></p> 
<p><monospace><bold>Output</bold>: Test statistic <italic>T</italic></monospace></p>
<p><monospace>1 Encode <italic>S</italic> as a space-separated string of values <italic>e.g</italic>., <italic>S</italic> &#x0003D; (144, 21, 139, 0, 0, 15) &#x02192; &#x0201C;144 21 139 0 0 15&#x0201D; </monospace></p>
<p><monospace>2 Compress the string using the <monospace>bzip2</monospace> compression algorithm (see <ext-link ext-link-type="uri" xlink:href="http://www.bzip.org/">http://www.bzip.org/</ext-link></monospace></p>
<p><monospace>3 Let <italic>T</italic> be the length of the compressed string in bytes</monospace></p> 
<p><monospace>4 <bold>return</bold> <italic>T</italic></monospace></p>
</statement>
<p>A sequence of length <italic>n_symbols</italic> is taken as input for the above statistical tests. The outcomes (hereinafter referred to as <italic>Tx</italic>) are taken as reference and used to compare the results of the aforementioned tests on a shuffled set of the input sequence obtained via Fisher-Yates shuffle algorithm: whenever the latter (here called <italic>Ti</italic>) are greater than <italic>Tx</italic>, a counter <italic>C0</italic> is updated; if they are equal to <italic>Tx</italic>, a second counter <italic>C1</italic> is updated. Such counters are evaluated independently for each test, and a number <italic>n_sequences</italic> of shuffled sequences is tested. The symbols are validated as IID if, for every test, both <italic>C</italic>0&#x02265;0.0005&#x0002A;<italic>n</italic>_<italic>sequences</italic> and <italic>C</italic>1&#x0002B;<italic>C</italic>0 &#x02264; 0.9995&#x0002A;<italic>n</italic>_<italic>sequences</italic> (i.e., if the reference value <italic>Tx</italic> does not lie in the upper or lower 0.05% of the total population of <italic>Ti</italic>.). This is actually a generalization inferred from the parameters provided in the NIST documentation, as the standard procedure considers only the fixed values <italic>n_symbols</italic>= 10<sup>6</sup> and <italic>n_sequences</italic>= 10<sup>4</sup>, with thresholds for IID validation of <italic>C</italic>0&#x02265;5 and <italic>C</italic>1&#x0002B;<italic>C</italic>0 &#x02264; 9995. The procedure is outlined in <xref ref-type="statement" rid="algo6">Algorithm 6</xref>.</p>
<statement content-type="algorithm" id="algo6">
<label>Algorithm 6</label>
<title>Permutation based procedure to test the IID Assumption.</title>
<p><inline-graphic xlink:href="fcomp-07-1642566-i0005.tif"/></p>
</statement>
<p>For a fixed test, the population of the <italic>Ti</italic> considering <italic>n_symbols</italic>= 10<sup>3</sup> and <italic>n_sequences</italic>= 10<sup>5</sup> is shown as a histogram in <xref ref-type="fig" rid="F2">Figure 2</xref>. The reference value <italic>Tx</italic> is marked by a red line.</p>
<fig position="float" id="F2">
<label>Figure 2</label>
<caption><p>Histogram of the Ti population for the excursion test on 10<sup>5</sup> sequences of 10<sup>3</sup> symbols each. The reference value Tx associated with the input sequence is marked by a vertical red line, and the mean and standard deviation of the population are reported on the graph.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0002.tif">
<alt-text content-type="machine-generated">Histogram showing the distribution of T values for an excursion test, with occurrences on the y-axis and T values on the x-axis. The mean is one hundred twenty-six point eight nine and the standard deviation is thirty-eight point eight one. A red line indicates the reference value of one hundred forty-five point seven seven. Bars peak around one hundred.</alt-text>
</graphic>
</fig>
<p>One can already get a qualitative assessment by observing that the reference value <italic>Tx</italic> is not as far toward an edge of the axes to disprove the IID assumption. As far as that is concerned, however, <italic>Tx</italic> could just as well fall within the greater 10% of the <italic>Ti</italic> population: the outcome of the Boolean conclusion on IID behavior would be the same, but the probability for the counter <italic>C0</italic> to increase at each iteration would be greatly affected. This aspect was taken into consideration in the statistical analysis developed in the following, which is not a part of any NIST documentation.</p>
<p>The IID tests described by NIST, albeit concise and simple, cannot be easily evaluated in terms of a theoretical distribution of their outcomes. To perform a critical statistical study of the results, understand the NIST procedure, and test the implementation done, an approach similar in spirit to what is done by NITS in the IID evaluation itself is developed. Instead of comparing the distribution of the values <italic>Ti</italic> obtained in a single run, the distribution of the counter <italic>C0</italic> across multiple runs is considered. The latter is assumed to be binomial, with a probability of success <italic>p</italic> (i.e., the increase of <italic>C0</italic>) given by the relative value of the reference result <italic>Tx</italic>.</p>
<p>In this section, the parameters for a single run (i.e., a single value of <italic>C0</italic>) are <italic>n_symbols</italic> = 10<sup>3</sup> and <italic>n_sequences</italic> = 200, repeated a number <italic>n_iterations</italic> = 500 of times. These values are chosen to fully use one of the 250MB files generated by our QRNG in the following steps while leaving some buffer, keeping both the population of the histogram and the space of the results <italic>Ti</italic>, respectively, high and wide enough for the results to be meaningful. The reason for including this buffer will become clear shortly, as an additional test introduced later requires it. The same parameters were maintained for consistency in the analysis.</p>
<p><xref ref-type="fig" rid="F3">Figure 3A</xref> displays the results for the excursion test: the blue dots outline the distribution of the measured <italic>C0</italic> (each is accompanied by its binomial error), while the red line represents the theoretical binomial distribution they are supposed to follow. The box on the graph reports the mean and standard deviation of the dataset, the probability of success <italic>p</italic> for the increase of the counter <italic>C0</italic> (computed as the relative position of the reference value <italic>Tx</italic> with respect to the population <italic>Ti</italic>, i.e., in which percentile of the population stands the red line in <xref ref-type="fig" rid="F2">Figure 2</xref>, and used to compute the theoretical binomial distribution), and the value of the reduced &#x003C7;<sup>2</sup> for the dataset under the null hypothesis of them following the red binomial distribution.</p>
<fig position="float" id="F3">
<label>Figure 3</label>
<caption><p><bold>(A)</bold> Distribution of 500 counters C0 for the excursion test, each computed over 200 sequences of 10<sup>3</sup> symbols and evaluated with respect to the value of the input sequence. The observed distribution is shown by blue dots with binomial error bars, and its mean and standard deviation are reported in the box. The probability of increase of the counter C0 <italic>p</italic>, computed a priori, is used to plot the theoretical expected binomial distribution in red. The reduced chi-square of the data with respect to this binomial is reported in the box. <bold>(B)</bold> Distribution of 500 counters C0 for the excursion test, each computed over 200 sequences of 10<sup>3</sup> symbols and evaluated with respect to the value of the previous sequence considering disjointed pairs. The observed distribution is shown by blue dots with binomial error bars, and its mean and standard deviation are reported in the box. The probability of increase of the counter C0 <italic>p</italic>, equal to 0.5 by construction, is used to plot the theoretical expected binomial distribution in red. The reduced chi-square of the data with respect to this binomial is reported in the box.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0003.tif">
<alt-text content-type="machine-generated">Two histograms compare the distribution of C0 for test excursions using Tx and Tj methods. A) Tx method: Mean is 146.15, standard deviation 6.28, p-value 0.731, chi-squared/ndf 0.35. Data points in blue, binomial fit in red. B) Tj method: Mean is 49.73, standard deviation 4.96, p-value 0.500, chi-squared/ndf 0.19. Data points in blue, binomial fit in red. Both graphs exhibit similar shapes, with varying means and standard deviations.</alt-text>
</graphic>
</fig>
<p>Throughout the previous analysis, the fact that the value <italic>Tx</italic> was taken as reference for all the following ones put the input sequence in a very special position. As it was briefly mentioned, such value is effectively picked at random, thus having the potential of skewing significantly the binomial distribution of the counter <italic>C0</italic>, whose probability of success parameter <italic>p</italic> can vary significantly with the sole requirement of being 0.0005 &#x02264; <italic>p</italic> &#x02264; 0.9995. To bypass the special role given to the first sequence and have a predictable and uniform value for <italic>p</italic> throughout the tests and the tested files, a second ratio for the increase of <italic>C0</italic> is developed, to which we refer as <italic>TjNorm</italic>. Instead of having a fixed reference, the sequences are evaluated in pairs: given a statistical test, the counter <italic>C0</italic> is increased whenever the result on the <italic>jth</italic> sequence is greater than the one on the <italic>jth</italic>&#x0002B;1 sequence. If such results turn out to be equal, the pair is discarded, so that the results are normalized and the probability of increase of the counter <italic>C0</italic> is <italic>p</italic> &#x0003D; 0.5 in each iteration. The need to provide some buffer to account for the fact that some sequences will probably be ignored forces us to lower either the values of <italic>n_symbols, n_sequences</italic>, or <italic>n_iterations</italic> from those that would fit in the 250 MB file analyzed.</p>
<p>With this new method, <xref ref-type="fig" rid="F3">Figure 3B</xref> was plotted, with parameters <italic>n_symbols</italic> = 10<sup>3</sup>, <italic>n_sequences</italic> = 200 and <italic>n_iterations</italic> = 500. These values were chosen giving priority to <italic>n_iterations</italic> being high enough for the statistical interpretation to be relevant and to <italic>n_symbols</italic> = 10<sup>3</sup> being high enough so that the space of the results of the tests (i.e., what was previously called the <italic>Ti</italic>) would be wide enough. This is the equivalent of <xref ref-type="fig" rid="F3">Figure 3A</xref> and it is to be interpreted in the same way. Just a caveat: the mean value of the distribution is correctly 50, with <italic>n_sequences</italic> = 200 and <italic>p</italic> &#x0003D; 0.5, because, as the sequences are evaluated in pairs, they give an effective halved number of values of <italic>C0</italic> compared to their previous &#x0201C;Tx method&#x0201D; counterpart.</p>
<p>After a bitstream has been validated as IID, its minimum entropy can be easily calculated as <italic>H</italic>_<italic>min</italic> &#x0003D; &#x02212;log(<italic>p</italic><sub><italic>max</italic></sub>), where <italic>p</italic><sub><italic>max</italic></sub> is the frequency of the symbol that is the most likely to occur. The NIST prescription described in (<xref ref-type="bibr" rid="B27">Turan et al. 2018</xref>), chapter 6, actually considers a lower bound on this quantity by taking the highest bound on <italic>p</italic><sub><italic>max</italic></sub> at 2.576 sigma CL (corresponding to a <italic>z</italic> value at 0.995). <xref ref-type="fig" rid="F4">Figure 4</xref> shows the frequencies of the symbols compared to the uniform distribution (red dashed line) for a 250MB file generated by our QRNG; each is accompanied by its binomial error. The resulting minimum entropy is 3.9997 &#x000B1; 0.0002, where the uncertainty was obtained by propagating the binomial uncertainty of <italic>p</italic><sub><italic>max</italic></sub>, and the lower bound on it, as computed following NIST standards, is 3.9991. Both are displayed on the graph.</p>
<fig position="float" id="F4">
<label>Figure 4</label>
<caption><p>Scatterplot of the frequencies of the four-bit symbols in a 250MB file generated by the QRNG under consideration and consequent evaluation of the minimum entropy. Each frequency is accompanied by a binomial error bar and the expected uniform distribution is plotted as a red dashed line. The minimum entropy <italic>H</italic><sub><italic>min</italic></sub> and the estimation for minimum entropy according to NIST guidelines <italic>H</italic><sub><italic>min</italic></sub><italic>NIST</italic> are reported. The first is accompanied by an uncertainty obtained by propagating the binomial uncertainty on <italic>p</italic><sub><italic>max</italic></sub>, while the second is a lower bound estimate that considers an upper bound on <italic>p</italic><sub><italic>max</italic></sub> at 99.5% CL.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0004.tif">
<alt-text content-type="machine-generated">Chart titled &#x00022;Min-Entropy and Symbol Distribution&#x00022; showing frequencies of symbols zero to fifteen. It features blue data points with error bars and a red dashed line indicating uniform distribution. Values range from 0.06247 to 0.06252. The min-entropy \( H_{\text{min}} \) is 3.9997 with a standard deviation of 0.0002, and \( H_{\text{min}} \) NIST is 3.9991.</alt-text>
</graphic>
</fig>
<p>The Python implementation of the procedure for evaluating the IID assumption, the statistical analysis performed to assess it (which can also serve value as validation of the implementation) and the computation of the minimum entropy is made available in a public GitHub repository.<xref ref-type="fn" rid="fn0001"><sup>1</sup></xref></p></sec>
<sec id="s5">
<label>5</label>
<title>Standard online statistical tests</title>
<p>The anomaly detection procedure, presented in Section 6, is based on a set of four wellknown and recognized tests, operating on single sets of bits or symbols. The Monobit and RUNS tests were selected from the numerous tests within the NIST test suite based on their simplicity, which is essential for a firmware implementation, and the complementary information they offer. Specifically, the Monobit test assesses the asymmetry of bit distribution within a bit-string, whereas the RUNS test quantifies the occurrence of bit-flips. Due to their minimal correlation, these tests maximize the information inferred from the data. These two tests find their natural generalization to symbols of multiple bits, respectively, in the adaptive proportion and the repetition count tests, which are defined by NIST in (<xref ref-type="bibr" rid="B27">Turan et al. 2018</xref>) and used to assess the eligibility of a sequence to seed a DRBG.</p>
<sec>
<label>5.1</label>
<title>Symmetry tests</title>
<sec>
<label>5.1.1</label>
<title>Monobit</title>
<p>The Monobit test (<xref ref-type="bibr" rid="B22">Rukhin et al., 2001</xref>) asserts the asymmetry between zeros and ones in a bit sequence. Given a set of <italic>n</italic> bits, the stochastic variable is defined as</p>
<disp-formula id="EQ1"><mml:math id="M7"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mi>n</mml:mi></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(1)</label></disp-formula>
<p>where <italic>x</italic><sub><italic>i</italic></sub> &#x0003D; 2&#x003F5;<sub><italic>i</italic></sub>&#x02212;1, &#x003F5;<sub><italic>i</italic></sub> is the bit state and <italic>n</italic><sub>1</sub> is the number of 1s in the bit sequence. Provided that the bit values are independent and identically distributed, the number of bits set to 1 follows the binomial probability density function:</p>
<disp-formula id="EQ2"><mml:math id="M8"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>B</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>,</mml:mo><mml:mi>p</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>n</mml:mi><mml:mo>!</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>!</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>!</mml:mo></mml:mrow></mml:mfrac><mml:msup><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:msup><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:mi>p</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(2)</label></disp-formula>
<p>with <italic>p</italic> being the probability of generating 1. If both values are equally probable, then <inline-formula><mml:math id="M9"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></inline-formula>, with standard deviation <inline-formula><mml:math id="M10"><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msqrt><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msqrt></mml:math></inline-formula>. The Monobit test fails whenever a sequence has a value <italic>S</italic><sub><italic>n</italic></sub> that exceeds an alarm level <inline-formula><mml:math id="M11"><mml:mi>k</mml:mi><mml:msqrt><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msqrt></mml:math></inline-formula>, where k is defined according to the sensitivity and false alarm rate set by the user.</p></sec>
<sec>
<label>5.1.2</label>
<title>Adaptive proportion test</title>
<p>The APT expands upon the binary checks performed by the Monobit test to include an alphabet of <italic>m</italic> symbols. As defined in the NIST documentation (<xref ref-type="bibr" rid="B27">Turan et al., 2018</xref>), the stream is divided into sequences of length <italic>n</italic>. The frequency of the occurrence of the first symbol is checked against the hypothesis of a binomial distribution with <italic>p</italic> &#x0003D; 1/<italic>m</italic>.</p>
<p>Specifications for the sequence length to be considered are specific to the alphabet used and are provided by NIST. For binary sequences, the recommended length is <italic>n</italic> &#x0003D; 1, 024, while for non-binary sequences, it is suggested to use <italic>n</italic> &#x0003D; 512. Within each sequence, the occurrences of the first symbol are counted and compared to a cut-off threshold corresponding to a defined failure probability. The cut-off threshold can be calculated relying on the binomial cumulative distribution function, assuming an equal probability for each of the <italic>m</italic> symbols to be generated.</p></sec></sec>
<sec>
<label>5.2</label>
<title>RUNS tests</title>
<sec>
<label>5.2.1</label>
<title>RUNS</title>
<p>This test counts the number of series of consecutive identical bits in a sequence of specified length, as shown in <xref ref-type="fig" rid="F5">Figure 5</xref>. It is worth noting that this quantity can be measured by the number of bit flips plus one.</p>
<fig position="float" id="F5">
<label>Figure 5</label>
<caption><p>The RUNS test counts the number of sequences of consecutive identical bits in a bit-stream. In this figure, a sequence of <italic>n</italic> &#x0003D; 16 bits containing a total of seven runs is shown.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0005.tif">
<alt-text content-type="machine-generated">Binary sequence diagram showing bits grouped by the arrows. The sequence 1111101001110001. The first group of ones is marked as 5 bits, followed by a zero and a one as 1 bit. The sequence continues with 3 bits of ones, 3 bits of zeros, and ends with one bit of 1.</alt-text>
</graphic>
</fig>
<p>This test complements the Monobit: for a given value of <italic>n</italic><sub>1</sub>, it measures the expected number of bit flips in the sequence under the hypothesis of a &#x0201C;fair coin.&#x0201D; The underlying probability distribution is the probability of having runs of a specific length conditioned on the number of ones in the sequence with <italic>p</italic> &#x0003D; 1/2. By defining</p>
<disp-formula id="E3"><mml:math id="M12"><mml:mrow><mml:mi>&#x003C0;</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:math></disp-formula>
<p>as the fraction of bits set to 1, the average number of runs and the variance are given by (<xref ref-type="bibr" rid="B3">Bradley 1968</xref>)</p>
<disp-formula id="EQ4"><mml:math id="M13"><mml:mtable columnalign='left'><mml:mtr><mml:mtd><mml:mtext>&#x000A0;&#x000A0;</mml:mtext><mml:mover accent='true'><mml:mi>R</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:mi>n</mml:mi><mml:mi>&#x003C0;</mml:mi><mml:mo stretchy='false'>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x02212;</mml:mo><mml:mi>&#x003C0;</mml:mi><mml:mo stretchy='false'>)</mml:mo><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msubsup><mml:mi>&#x003C3;</mml:mi><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mi>n</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mfrac><mml:mo>&#x000D7;</mml:mo><mml:mo stretchy='false'>[</mml:mo><mml:mn>2</mml:mn><mml:mi>&#x003C0;</mml:mi><mml:mo stretchy='false'>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x02212;</mml:mo><mml:mi>&#x003C0;</mml:mi><mml:mo stretchy='false'>)</mml:mo><mml:mo stretchy='false'>(</mml:mo><mml:mn>2</mml:mn><mml:mi>n</mml:mi><mml:mi>&#x003C0;</mml:mi><mml:mo stretchy='false'>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x02212;</mml:mo><mml:mi>&#x003C0;</mml:mi><mml:mo stretchy='false'>)</mml:mo><mml:mo>&#x02212;</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy='false'>]</mml:mo><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(3)</label></disp-formula>
<p>corresponding to the first and second moments of the underlying probability distribution function. Ultimately, the purpose of this test is to determine whether the oscillation between sub-sequences of identical bits is too fast or too slow compared to the expectations (<xref ref-type="bibr" rid="B25">Soto and Bassham, 2000</xref>). As for the Monobit, whenever a sequence exceeds a threshold value <inline-formula><mml:math id="M14"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>&#x000B1;</mml:mo><mml:mi>k</mml:mi><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, the test is considered failed.</p></sec>
<sec>
<label>5.2.2</label>
<title>Repetition count test</title>
<p>The RCT also relies on the concept of runs, generalizing the test to sequences of symbols. However, instead of counting the number of symbol changes, it focuses on the length of consecutive identical instances.</p>
<p>The probability &#x003B1; of having at least <italic>C</italic> consecutive equal symbols can be written as:</p>
<disp-formula id="EQ5"><mml:math id="M15"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mtable style="text-align:axis;" equalrows="false" columnlines="none" equalcolumns="false" class="array"><mml:mtr><mml:mtd><mml:mi>&#x003B1;</mml:mi><mml:mo>=</mml:mo><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x02265;</mml:mo><mml:mi>C</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>C</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msubsup><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>C</mml:mi></mml:mrow></mml:msubsup></mml:mtd></mml:mtr></mml:mtable></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(4)</label></disp-formula>
<p>where <italic>k</italic> is the length of the runs, <italic>p</italic><sub><italic>i</italic></sub> stands for the probability associated with the <italic>i</italic>-th symbol of the alphabet, and (1&#x02212;<italic>p</italic><sub><italic>i</italic></sub>) represents the probability of the symbol generated before the current one being different, resetting the counter of the length of the run. Assuming <italic>p</italic><sub>1</sub> &#x02265; <italic>p</italic><sub>2</sub> &#x02265;....&#x02265; <italic>p</italic><sub><italic>m</italic></sub>, <xref ref-type="disp-formula" rid="EQ5">Equation 4</xref> can be given an upper bound by:</p>
<disp-formula id="EQ6"><mml:math id="M16"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>&#x003B1;</mml:mi><mml:mo>=</mml:mo><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x02265;</mml:mo><mml:mi>C</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x02264;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x000B7;</mml:mo><mml:msubsup><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>C</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mi>H</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>C</mml:mi></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(5)</label></disp-formula>
<p>where <italic>H</italic> is the min-entropy defined as <italic>H</italic> &#x0003D; &#x02212;log<sub>2</sub>(max{<italic>p</italic><sub><italic>i</italic></sub>}) (<xref ref-type="bibr" rid="B27">Turan et al., 2018</xref>). Once the value of &#x003B1; is defined, the cut-off threshold <italic>C</italic> can then be computed as:</p>
<disp-formula id="EQ7"><mml:math id="M17"><mml:mrow><mml:mi>C</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:mo>&#x02308;</mml:mo><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mi>H</mml:mi></mml:mfrac><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:msub><mml:mi>g</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo stretchy='false'>(</mml:mo><mml:mi>m</mml:mi><mml:mo>&#x02212;</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy='false'>)</mml:mo><mml:mo>&#x02212;</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:msub><mml:mi>g</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo stretchy='false'>(</mml:mo><mml:mi>&#x003B1;</mml:mi><mml:mo stretchy='false'>)</mml:mo></mml:mrow><mml:mo>]</mml:mo></mml:mrow></mml:mrow><mml:mo>&#x02309;</mml:mo></mml:mrow></mml:mrow></mml:math><label>(6)</label></disp-formula>
<p>It should be noted that <xref ref-type="disp-formula" rid="EQ7">Equation 6</xref> differs from the original NIST prescription as a consequence of the implementation, which is based on the assumption that the symbols are being analyzed sequentially. Consequently, it embodies the viewpoint of the &#x0201C;observer symbol,&#x0201D; which must differ from the preceding one and match the subsequent <italic>C</italic>&#x02212;1 symbols.</p>
<p>NIST recommends choosing the &#x003B1; parameter between 2<sup>&#x02212;20</sup> and 2<sup>&#x02212;40</sup>, equivalent to, respectively, a 5&#x003C3; and a 7&#x003C3; confidence level, presuming a Gaussian distribution of the measured quantities. In this work, a value of &#x003B1; &#x0003D; 2<sup>&#x02212;20</sup> is chosen.</p></sec></sec></sec>
<sec id="s6">
<label>6</label>
<title>Anomaly detection procedure and experimental results</title>
<p>The anomaly detection framework proposed in this work departs in scope and intent from the health tests described in the previous section. NIST defines the repetition count and adaptive proportion tests as lightweight monitors intended solely to detect catastrophic failures of the entropy source, with each failure leading to the rejection of the sequence under test. In contrast, our procedure extends these tests, together with the Monobit and RUNS statistics, into a statistical framework that evaluates series of test outcomes. Rather than discarding each failing sequence, we accumulate results to distinguish between sporadic fluctuations, statistically expected in any random source, and persistent deviations that indicate a systematic bias. This shift from single-sequence rejection to distribution-based monitoring enables online detection of long-term drifts in source quality while simultaneously supporting an estimation of entropy that can be cross-checked against NIST&#x00027;s min-entropy bounds.</p>
<p>Once a sample of results from the health tests on <italic>N</italic> series of <italic>n</italic> bits (or symbols) is collected, procedures are developed and commissioned with the aim of identifying long-term drift or otherwise assessing the randomness quality.</p>
<p>The inter-failure sequence number (<inline-formula><mml:math id="M18"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>) is introduced, which represents the average measured number of sequences between two failures. This measure is employed as a qualifier for the tests.</p>
<sec>
<label>6.1</label>
<title>Monobit</title>
<p>The diagnostic power of the Monobit on single bit-strings can be assessed as the capability to detect anomalies in the number of ones <italic>n</italic><sub>1</sub> in a sequence of <italic>n</italic> random bits, as those result in an absolute value of <italic>S</italic><sub><italic>n</italic></sub> in excess of <italic>k&#x003C3;</italic><sub><italic>S</italic><sub><italic>n</italic></sub></sub>, where <italic>k</italic> determines the confidence level. This condition can be written as:</p>
<disp-formula id="EQ8"><mml:math id="M19"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>&#x02265;</mml:mo><mml:mi>k</mml:mi><mml:mi>&#x003C3;</mml:mi><mml:mspace width="2.77695pt" class="tmspace"/><mml:mo>&#x021D2;</mml:mo><mml:mspace width="2.77695pt" class="tmspace"/><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>2</mml:mn><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x02265;</mml:mo><mml:mi>k</mml:mi><mml:mi>&#x003C3;</mml:mi></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mtext>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;</mml:mtext><mml:mspace width="2.77695pt" class="tmspace"/><mml:mo>&#x021D2;</mml:mo><mml:mspace width="2.77695pt" class="tmspace"/><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>&#x02265;</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:msqrt><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msqrt><mml:mo>&#x0002B;</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(7)</label></disp-formula>
<p>If <italic>j</italic> bits are forced to one, the alarm is triggered whenever the number of ones in the remaining <italic>n</italic>&#x02212;<italic>j</italic> random bit string <inline-formula><mml:math id="M20"><mml:msubsup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is</p>
<disp-formula id="EQ9"><mml:math id="M21"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msubsup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x02265;</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:msqrt><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msqrt><mml:mo>&#x0002B;</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>-</mml:mo><mml:mi>j</mml:mi><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(8)</label></disp-formula>
<p>The rate at which this happens can be computed as the tail of the distribution of <inline-formula><mml:math id="M22"><mml:msubsup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> and represents the true positive probability (TPP) for Monobit fails; on the other hand, the false positive probability (FPP) is associated with the statistical distribution of <italic>n</italic><sub>1</sub> for an unbiased string. The comparison between these two quantities over a sequence of <italic>n</italic> &#x0003D; 32 bits at varying confidence levels (ranging from 0 to 4&#x003C3;) is illustrated in <xref ref-type="fig" rid="F6">Figure 6</xref>. Notably, the sensitivity is close to 50% unless the number of biased bits grows to a significant fraction. On the other hand, the analysis of a series of <italic>S</italic><sub><italic>n</italic></sub> values can lead to a procedure enhancing the TPP, thus providing a basis for anomaly detection with single-bit precision.</p>
<fig position="float" id="F6">
<label>Figure 6</label>
<caption><p>Sensitivity scan of the Monobit test across different confidence levels for a sequence of length <italic>n</italic> &#x0003D; 32 bits with a number <italic>j</italic> of biased bits ranging from 1 to 10. For a fixed number of biased bits, the corresponding curve is obtained by plotting the false positive probability vs true positive probability for a <italic>k&#x003C3;</italic> threshold, with <italic>k</italic> varying from 0 to 4. To meaningfully distinguish between a true positive and a false positive warning for bias on a single sequence, the number of corrupted bits must be a significant fraction of the total. This brings us to consider the mean of the Monobit results over a series of sequences as the relevant statistics.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0006.tif">
<alt-text content-type="machine-generated">ROC curve graph showing true positive probability versus false positive probability for sequence n equals 32 with j equals 1 to 10 biased bits. Two lines represent biased bits: 1 (black dashed) and 10 (pink dashed), with a shaded area between them indicating variation.</alt-text>
</graphic>
</fig>
<p>This consideration can be extended to all the tests described in the previous section, driving the shift in focus from the assessment of a single string to the statistical analysis of a series of <italic>N</italic> sequences of <italic>n</italic> random bits. This approach is aimed at an online differentiation between systemic failures, which indicate a bias in the source of bits, and occasional failures caused by statistical fluctuations.</p>
<p>The observable considered is <inline-formula><mml:math id="M25"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>, the average value of <italic>S</italic><sub><italic>n</italic></sub> over <italic>N</italic> sequences, which is expected to be Gaussian distributed because of the central limit theorem. A bias model is introduced by setting <italic>j</italic> bits to 1 and, as outlined in <xref ref-type="fig" rid="F7">Figure 7</xref>, two potential bias indicators can be considered: a normalized shift of the average value and a variation in the fraction of events in the distribution&#x00027;s tails. Presuming every sequence to be biased, the dependence of the shift on the number <italic>j</italic> of biased bits is linearly dependent on <italic>j</italic>, in fact</p>
<disp-formula id="EQ10"><mml:math id="M26"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x0002B;</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>-</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msup><mml:mo>&#x0002B;</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mtext>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;</mml:mtext><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>2</mml:mn><mml:msubsup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msubsup><mml:mo>-</mml:mo><mml:msup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mi>j</mml:mi></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(9)</label></disp-formula>
<p>and <inline-formula><mml:math id="M27"><mml:mi>E</mml:mi><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>j</mml:mi></mml:math></inline-formula>, eventually scaled by the fraction of biased sequences in the series. On the other hand, the fraction of events in the tail is expected to be non-linearly dependent on <italic>j</italic>, since it is the integral of the normalized <inline-formula><mml:math id="M28"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> distribution above the threshold value <italic>k</italic>. The sensitivity of the two measures is presented in <xref ref-type="fig" rid="F8">Figure 8</xref> for an exemplary sequence length <italic>n</italic> &#x0003D; 32 as the number of biased bits changes. The biasing frequency ranges from every sequence to one in every thousand, across series of <italic>N</italic> &#x0003D; 2<sup>5</sup> sequences. Results prove that the <inline-formula><mml:math id="M29"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> shift estimator outperforms the method of counting events in the tails. Setting a <italic>k</italic> &#x0003D; 3 confidence level, the effect of a single biased bit can be detected for tampering frequencies higher than one in 10 sequences, while at least five biased bits are required when one in 100 sequences is biased, and sensitivity is limited for lower frequencies unless a higher statistic is considered.</p>
<fig position="float" id="F7">
<label>Figure 7</label>
<caption><p>Exemplary distributions of the normalized mean outcomes <inline-formula><mml:math id="M23"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> of the Monobit test for an unbiased (in blue) and biased (in red) bit stream. The bias introduces an asymmetry between the 0s and the 1s that results in a shift of the distribution from the expected. Two metrics can be considered to distinguish the two: the shift in the mean value of the distribution and the number of events in the tails over a fixed threshold, here illustrated by the dashed line.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0007.tif">
<alt-text content-type="machine-generated">Graph showing the distribution of normalized \( S_n \). It features two bell curves, one blue and one red, centered around zero on the x-axis labeled \( \bar{S}_n / \sigma_{S_n} \). The y-axis represents amplitude, ranging from 0 to 0.4. A vertical dashed line is present at 1 on the x-axis.</alt-text>
</graphic>
</fig>
<fig position="float" id="F8">
<label>Figure 8</label>
<caption><p>Comparison between the sensitivity of the estimators in the detection of a bias for the Monobit test: the shift of the mean value of <inline-formula><mml:math id="M24"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> (in blue) is evaluated against the variation in the number of anomalies expected (in orange), calculated as the integral of the distribution of events in the tails over the 3&#x003C3; limit, when a number of bits is forced to 1. The comparison is performed with the bias being introduced in every sequence <bold>(A)</bold>, once every 10 sequences <bold>(B)</bold>, and once every 100 sequences <bold>(C)</bold>. The value of the pull function with respect to the unbiased sequence for the two estimators consistently identifies the shift on the mean value of <italic>S</italic><sub><italic>n</italic></sub> as the most sensitive.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0008.tif">
<alt-text content-type="machine-generated">Three line graphs labeled A, B, and C show the relationship between the number of biased bits and the pull function. Graph A with Bias Frequency 1 has higher pull function values, while B (0.1) and C (0.01) show progressively lower values. Each graph includes two lines, blue indicating the number of events in the tail, and increases linearly. The orange line indicates the shift from the mean. The blue line is always larger than the orange line.</alt-text>
</graphic>
</fig>
<p>The features of the <inline-formula><mml:math id="M32"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> distribution are the basis of the online assessment of the quality of the bit-stream produced by the generator. If the <inline-formula><mml:math id="M33"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> of the current series exceeds the 3&#x003C3; threshold, a false positive warning is raised. The threshold was chosen as a trade-off with the sensitivity to the errors detected. If it is set too low, too many False Flags will be detected, while too high a threshold might not detect actual malfunctions. Therefore, the trade-off was set to a threshold of 3&#x003C3;, corresponding to a 99.9% confidence level or false flag probability of 10<sup>&#x02212;3</sup>. The joint probability of having two consecutive uncorrelated warnings is approximately 10<sup>&#x02212;6</sup>, while the probability of three is 10<sup>&#x02212;9</sup>. Therefore, the likelihood of such occurrences is negligible unless a bias in the generation process is present.</p>
<p>A 1 Gb sample is partitioned into series, each with <italic>N</italic> &#x0003D; 2<sup>17</sup> sequences of <italic>n</italic> &#x0003D; 32 bits. As shown in <xref ref-type="fig" rid="F9">Figure 9</xref>, the <inline-formula><mml:math id="M39"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> trace plot during online production indicates no catastrophic failures of the entropy source, despite a single warning being triggered by statistical fluctuations. The strength of this method lies in its ability to detect systematic failures of the entropy source during online generation and to promptly alert the user of the malfunctions.</p>
<fig position="float" id="F9">
<label>Figure 9</label>
<caption><p>Trace plot of the computed mean of the Monobit statistics <inline-formula><mml:math id="M30"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> during online production over a number of series of <italic>N</italic> &#x0003D; 2<sup>17</sup> sequences of <italic>n</italic> &#x0003D; 32 unbiased bits each for a total of 1 Gb. The orange horizontal lines represent the 3&#x003C3; confidence level of deviation from the expected value that act as thresholds: a value of <inline-formula><mml:math id="M31"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> outside the range raises a warning; three consecutive warnings signal a catastrophic failure in the bit generation.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0009.tif">
<alt-text content-type="machine-generated">Trace plot of evaluated \( \bar{S}_n \) versus series number. Blue asterisks represent \( \bar{S}_n \) values fluctuating around zero, with an orange line denoting the \( 3\sigma \) confidence level. Values range approximately from -0.06 to 0.06.</alt-text>
</graphic>
</fig>
<p>Moreover, a retrospective analysis is performed on the properties of the distribution of the number of sequences in between two failures (inter-failure sequence number, ISN). The average value of ISN clearly depends on the threshold value over which a failure is declared, as reported in <xref ref-type="table" rid="T2">Table 2</xref>, so to have a large statistic of failures, the analysis is performed by setting <italic>k</italic> &#x0003D; 1. Results are shown in <xref ref-type="fig" rid="F10">Figure 10</xref>, where the trend is fitted with the model</p>
<disp-formula id="EQ11"><mml:math id="M40"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:mi>x</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>p</mml:mi><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:mi>p</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(10)</label></disp-formula>
<p>which describes the probability <italic>P</italic> of having the next failure after <italic>x</italic> sequences, with <italic>p</italic> being the failure probability. Results are statistically compliant with the hypothesis of an unbiased distribution, as confirmed by the total number of failing sequences in 1 Gb of data (measured to be 74.6 &#x000B1; 2.6 against an expected value of 77).</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p>Expected ISN (i.e., <inline-formula><mml:math id="M34"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>) given <italic>k&#x003C3;</italic> CL in a normal distribution.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th valign="top" align="left"><bold><italic><italic>k</italic></italic></bold></th>
<th valign="top" align="center"><bold>2-tailed failure probability</bold></th>
<th valign="top" align="center"><bold><inline-formula><mml:math id="M35"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">1</td>
<td valign="top" align="center">0.317</td>
<td valign="top" align="center">3.15</td>
</tr> <tr>
<td valign="top" align="left">3</td>
<td valign="top" align="center">2.7 &#x000D7; 10<sup>&#x02212;3</sup></td>
<td valign="top" align="center">370.4</td>
</tr> <tr>
<td valign="top" align="left">5</td>
<td valign="top" align="center">5.7 &#x000D7; 10<sup>&#x02212;7</sup></td>
<td valign="top" align="center">1.7 &#x000D7; 10<sup>6</sup></td>
</tr> <tr>
<td valign="top" align="left">7</td>
<td valign="top" align="center">2.56 &#x000D7; 10<sup>&#x02212;12</sup></td>
<td valign="top" align="center">3.9 &#x000D7; 10<sup>11</sup></td>
</tr></tbody>
</table>
</table-wrap>
<fig position="float" id="F10">
<label>Figure 10</label>
<caption><p>Normalized occurrences of the <italic>ISN</italic>, i.e., the number of sequences between two consecutive failures, with the threshold set at 1&#x003C3; for <bold>(A)</bold> the Monobit test, <bold>(B)</bold> the RUNS test, and <bold>(C)</bold> the RCT test. The blue datapoints are fitted with the orange line, and the goodness of fit is evaluated via the reduced chi-square. The mean value of the dataset <inline-formula><mml:math id="M36"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> is then compared with the value computed from the fit <italic>ISN</italic><sub><italic>fit</italic></sub>. The <italic>ISN</italic> for the Monobit test <bold>(A)</bold> and for the RUNS test <bold>(B)</bold> are evaluated over 1 Gb of random bits generated with the QRNG under consideration and fitted assuming that the probability for it to be equal to <italic>x</italic> is <italic>P</italic>(<italic>ISN</italic> &#x0003D; <italic>x</italic>) &#x0003D; <italic>p</italic>(1&#x02212;<italic>p</italic>)<sup><italic>x</italic>&#x02212;1</sup>, with <italic>p</italic> being the failure probability reported on the graph. Both <italic>ISN</italic><sub><italic>fit</italic></sub> and <inline-formula><mml:math id="M37"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> are compatible with the expected value for an unbiased bitstream. The <italic>ISN</italic> for the RCT test <bold>(C)</bold> is evaluated over a sample of 100 Gb of random bits and fitted assuming an exponential trend. Both <italic>ISN</italic><sub><italic>fit</italic></sub> and <inline-formula><mml:math id="M38"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> are compatible with the expected value for an unbiased bitstream.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0010.tif">
<alt-text content-type="machine-generated">Thee graphs labeled A, B, and C show inter-failure distributions on normalized data, plotting probability against inter-failure numbers. All graphs display a decaying curve with data points. Graph A and B includes statistical values: failure probability, average ISN, ISN fit, chi-squared values, and an expected value of 3.15. Graph C lists average ISN value, ISN fit, and an expected value of 1. Each chart features a distinct probability range and curve shape.</alt-text>
</graphic>
</fig></sec>
<sec>
<label>6.2</label>
<title>RUNS</title>
<p>As for the Monobit, a collection of RUNS values was used to define a diagnostic tool for biases and systematic failures by analyzing samples of <italic>N</italic> sequences of <italic>n</italic> bits. It is reasonable to assume that the considerations previously outlined for the Monobit persist, so the analysis is focused on the shift of the average of the measured number of runs from the expected mean. As the latter depends on the actual number of ones <italic>n</italic><sub>1</sub> present in the sequence, a normalized shift is considered instead: For each sequence, the measured number of runs <italic>R</italic><sub><italic>m</italic></sub> is replaced by the <italic>z</italic>-score</p>
<disp-formula id="EQ12"><mml:math id="M41"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(11)</label></disp-formula>
<p>which is expected to exhibit a Gaussian behavior by the central limit theorem. Unbiased series of <italic>N</italic> sequences are expected to be centered around <inline-formula><mml:math id="M42"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></inline-formula>.</p>
<p>Following the same approach as the Monobit test, the investigation of the sensitivity of the RUNS test is performed by introducing a bias in the number of runs in the sequences. By defining</p>
<disp-formula id="EQ13"><mml:math id="M43"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mtext>&#x000A0;&#x000A0;</mml:mtext><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:mfrac><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:msub><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(12)</label></disp-formula>
<p>presuming the sequence to be biased, an average change by &#x00394;<italic>R</italic> in the number of runs will induce a variation</p>
<disp-formula id="EQ14"><mml:math id="M44"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mtext>&#x00394;</mml:mtext><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mtext>&#x00394;</mml:mtext><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(13)</label></disp-formula>
<p>which can be identified as long as <inline-formula><mml:math id="M45"><mml:mo>|</mml:mo><mml:mtext>&#x00394;</mml:mtext><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>|</mml:mo><mml:mo>&#x02265;</mml:mo><mml:mi>k</mml:mi><mml:mo>&#x000B7;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:math></inline-formula> where <italic>k</italic> is set according to the required confidence level. The threshold at <italic>k</italic> standard deviations from the expected value of number of runs in a series is, therefore,</p>
<disp-formula id="EQ15"><mml:math id="M46"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mo>|</mml:mo><mml:mtext>&#x00394;</mml:mtext><mml:mi>R</mml:mi><mml:mo>|</mml:mo><mml:mo>&#x02265;</mml:mo><mml:mi>k</mml:mi><mml:mo>&#x000B7;</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(14)</label></disp-formula>
<p>The shift of the <italic>z</italic>-score due to the bias, with a frequency of once every 10 sequences, could be detected with single-bit precision at a confidence level of up to 5&#x003C3;. As reported in <xref ref-type="table" rid="T3">Table 3</xref>, this level of accuracy in sensitivity is maintained for sequences up to 128 bits long, while for longer sequences&#x02014;or equivalently for a lower frequency of the bias&#x02014;the sensitivity is limited and the test requires a larger deviation &#x00394;<italic>R</italic> from the expected average to spot the bias.</p>
<table-wrap position="float" id="T3">
<label>Table 3</label>
<caption><p>Sensitivity of the RUNS test at 5&#x003C3; CL for &#x00394;<italic>R</italic> variations of the number of runs, by analyzing 10<sup>5</sup> unbiased sequences and computing the average &#x003C3;.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th valign="top" align="left"><bold>Length <italic>n</italic></bold></th>
<th valign="top" align="center"><bold>Avg. &#x003C3;</bold></th>
<th valign="top" align="center"><bold><inline-formula><mml:math id="M47"><mml:mfrac><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:math></inline-formula></bold></th>
<th valign="top" align="center"><bold><italic><inline-formula><mml:math id="M48"><mml:mtext>&#x00394;</mml:mtext><mml:msub><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>:</mml:mo><mml:mn>5</mml:mn><mml:mfrac><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:math></inline-formula></italic></bold></th>
<th valign="top" align="center"><bold><italic><inline-formula><mml:math id="M49"><mml:msub><mml:mrow><mml:mfrac><mml:mrow><mml:mtext>&#x00394;</mml:mtext><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow></mml:mfrac></mml:mrow><mml:mrow><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>:</mml:mo><mml:mfrac><mml:mrow><mml:mn>5</mml:mn></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:math></inline-formula></italic></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">32</td>
<td valign="top" align="center">2.695</td>
<td valign="top" align="center">0.009</td>
<td valign="top" align="center">0.043</td>
<td valign="top" align="center">0.016</td>
</tr> <tr>
<td valign="top" align="left">64</td>
<td valign="top" align="center">3.906</td>
<td valign="top" align="center">0.012</td>
<td valign="top" align="center">0.062</td>
<td valign="top" align="center">0.016</td>
</tr> <tr>
<td valign="top" align="left">128</td>
<td valign="top" align="center">5.590</td>
<td valign="top" align="center">0.018</td>
<td valign="top" align="center">0.088</td>
<td valign="top" align="center">0.016</td>
</tr> <tr>
<td valign="top" align="left">256</td>
<td valign="top" align="center">7.953</td>
<td valign="top" align="center">0.025</td>
<td valign="top" align="center">0.126</td>
<td valign="top" align="center">0.016</td>
</tr></tbody>
</table>
</table-wrap>
<p>Experimental results from the online evaluation of the <italic>z</italic>-score are displayed on the trace plot of <xref ref-type="fig" rid="F11">Figure 11</xref>. In the absence of catastrophic failures, the computed <italic>z</italic>-scores remain within the expected confidence level, except for the expected statistical fluctuations.</p>
<fig position="float" id="F11">
<label>Figure 11</label>
<caption><p>Trace plot of the <italic>z</italic>-scores with associated error bars for the RUNS test computed online during production over 307 series of <italic>N</italic> &#x0003D; 2<sup>17</sup> sequences of <italic>n</italic> &#x0003D; 32 unbiased bits. The red dashed line indicates the expected value for a random bitstream and the orange lines mark the warning thresholds at 3&#x003C3;. With this choice, 0.3% of the population is expected to generate warnings: the observed count of 1 warning over 307 series aligns with this expectation.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0011.tif">
<alt-text content-type="machine-generated">Chart titled "Unbiased Sequence" showing a plot of Average Z-Score versus Series number from 0 to 300. Data points appear concentrated around a Z-Score of zero, with a mean value of 0.0006 plus or minus 0.0002, indicating minimal deviation.</alt-text>
</graphic>
</fig>
<p>Further analysis is conducted by measuring the ISN, employing the same dataset and setup parameters as the Monobit test. The results of the dataset provided by the considered architecture are statistically compliant with the hypothesis of an unbiased distribution, and are reported in <xref ref-type="fig" rid="F10">Figure 10</xref>.</p>
<p>These findings indicate that, similarly to the Monobit test, the RUNS test is reliable for the online identification of systematic failures of the system during production. These failures cause the distribution to shift significantly from the expected value and can be detected with a relatively small sample size.</p></sec>
<sec>
<label>6.3</label>
<title>Repetition count test</title>
<p>The repetition count test is approached in a statistical framework by examining the properties of the distribution of the ISN, with the aim of assessing the quality of the bit-stream in terms of the min-entropy H. Due to the large amount of data necessary, this analysis is conducted retrospectively, rather than being performed online. However, it implies no extra computational costs since it uses data already collected from tests required by NIST specifications for the DRBG procedure.</p>
<p>As per NIST recommendations, the failure probability &#x003B1; is set to 2<sup>&#x02212;20</sup>; this, together with the previously mentioned fact that the architecture under scrutiny provides four-bit symbols, sets the threshold for the number of consecutive identical symbols to <italic>C</italic> &#x0003D; 6, as reported in <xref ref-type="table" rid="T4">Table 4</xref>. Failures within a defined window are, therefore, expected to be driven by the Poisson distribution, with the number of sequences between two occurrences being exponentially distributed.</p>
<table-wrap position="float" id="T4">
<label>Table 4</label>
<caption><p>Exemplary cut-off thresholds for multiple <italic>H</italic> and &#x003B1; values, given <italic>m</italic> &#x0003D; 16.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th valign="top" align="left"><bold><italic>H</italic></bold></th>
<th valign="top" align="center"><bold>&#x003B1;</bold></th>
<th valign="top" align="center"><bold><italic>C</italic></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">2</td>
<td valign="top" align="center">2<sup>&#x02212;20</sup></td>
<td valign="top" align="center">12</td>
</tr> <tr>
<td valign="top" align="left">2</td>
<td valign="top" align="center">2<sup>&#x02212;40</sup></td>
<td valign="top" align="center">22</td>
</tr> <tr>
<td valign="top" align="left">4</td>
<td valign="top" align="center">2<sup>&#x02212;20</sup></td>
<td valign="top" align="center">6</td>
</tr> <tr>
<td valign="top" align="left">4</td>
<td valign="top" align="center">2<sup>&#x02212;40</sup></td>
<td valign="top" align="center">11</td>
</tr></tbody>
</table>
</table-wrap>
<p>Over 100 Gb of random bits generated by each of four silicon-based QRNG boards are considered, divided into three sets for each board. To avoid floating-point approximation problems associated with exponentials with extremely low numbers, the measures were scaled with respect to the expected <inline-formula><mml:math id="M50"><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>/</mml:mo><mml:mi>&#x003B1;</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mn>6</mml:mn><mml:mo>&#x000B7;</mml:mo><mml:mn>4</mml:mn><mml:mo>-</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:msub><mml:mrow><mml:mi>g</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>15</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> obtained by applying <xref ref-type="disp-formula" rid="EQ7">Equation 6</xref> with <italic>C</italic> &#x0003D; 6 and <italic>H</italic> &#x0003D; 4. As a matter of fact, the observed ISNs, normalized over the number of failures, conform with the exponential hypothesis, as shown by the fit in <xref ref-type="fig" rid="F10">Figure 10</xref>, with the computed parameter for the exponential distribution consistently falling within the 99.7% confidence interval of the expected value for an unbiased source.</p>
<p>The measured entropy <italic>H</italic> and an estimation of the min-entropy are evaluated starting from <inline-formula><mml:math id="M51"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>. The measured entropy is obtained by substituting in <xref ref-type="disp-formula" rid="EQ7">Equation 6</xref> the measured average failure rate <inline-formula><mml:math id="M52"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>/</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>, as <italic>C</italic> is fixed, and the uncertainty is computed by propagating the error:</p>
<disp-formula id="EQ16"><mml:math id="M53"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mi>H</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>C</mml:mi><mml:mo class="qopname">ln</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(15)</label></disp-formula>
<p>As the statistic on the number of failures is sufficiently large, the <inline-formula><mml:math id="M54"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> is assumed to approximately follow a Gaussian distribution with standard deviation equal to <inline-formula><mml:math id="M55"><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msqrt><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi><mml:mi>a</mml:mi><mml:mi>i</mml:mi><mml:mi>l</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msqrt></mml:math></inline-formula>, where <italic>n</italic><sub><italic>fails</italic></sub> denotes the total number of failures in the sample. To determine a lower bound on the min-entropy, a shift of <inline-formula><mml:math id="M56"><mml:mn>3</mml:mn><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:math></inline-formula> to the right of the average is considered to recover the largest possible true value of &#x003B1; (hereby denoted as <inline-formula><mml:math id="M57"><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo>&#x0007E;</mml:mo></mml:mover></mml:math></inline-formula>) compatible with a 99.7% confidence to the observed one:</p>
<disp-formula id="EQ17"><mml:math id="M58"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo>&#x0007E;</mml:mo></mml:mover></mml:mrow></mml:mfrac><mml:mo>=</mml:mo><mml:mover accent="false"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo>&#x0007E;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>-</mml:mo><mml:mn>3</mml:mn><mml:msub><mml:mrow><mml:mi>&#x003C3;</mml:mi></mml:mrow><mml:mrow><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>N</mml:mi></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(16)</label></disp-formula>
<p>This value is then substituted in <xref ref-type="disp-formula" rid="EQ7">Equation 6</xref> to get the corresponding limit on the entropy. The results are reported in <xref ref-type="fig" rid="F12">Figure 12</xref>, where different cut-off thresholds <italic>C</italic> &#x0003D; 6, 7, 8 are considered. Notably, the measured entropy does not consistently adhere to its physical constraints, reflecting the heuristic nature of the collected data, where the number of failures fluctuates. The reported min-entropy estimation represents the minimum entropy value that aligns with the measured outcome, computed by applying the aforementioned 3&#x003C3; shift of the measured value. Taking <italic>C</italic> &#x0003D; 6, this lower bound consistently falls between 3.989 and 3.998 for each of the subsets of samples considered for all the boards. With an increase in the cut-off threshold, the probability of encountering a failing run diminishes, thus resulting in a larger uncertainty.</p>
<fig position="float" id="F12">
<label>Figure 12</label>
<caption><p>The plots exhibit the measured entropy, labeled as &#x0002A;, with the related uncertainty, and the min-entropy estimation, labeled as &#x000D7;, which corresponds to the lower bound on the measured entropy given a 99.7% confidence. The theoretical limit <italic>H</italic> &#x0003D; 4 for a perfectly entropic stream of four-bit symbols is marked by the blue continuous line. The values were computed on 100 Gb of data produced with generators &#x00023;46847 (red), &#x00023;46848 (green), &#x00023;46851 (orange), and &#x00023;46855 (purple), divided into three sets [reported in <bold>(A&#x02013;C)</bold>, respectively], by running the RCT test with three values of the cut-off threshold <italic>C</italic>. For <italic>C</italic> &#x0003D; 6, the min entropy estimations consistently fall between 3.989 and 3.998. Increasing the cut-off threshold diminishes the number of failures, thus increasing the error.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0012.tif">
<alt-text content-type="machine-generated">Plot showing &#x00022;Measured Vs. Expected Failures&#x00022; with &#x00022;Failure Probability&#x00022; on the y-axis and &#x00022;Cut-off Threshold C&#x00022; on the x-axis. A blue line represents the Binomial CDF, and orange crosses indicate Measured Fail Probability. The plot shows a decreasing trend from 1 to 0 probability around thresholds 20 to 40.</alt-text>
</graphic>
</fig></sec>
<sec>
<label>6.4</label>
<title>Adaptive proportion test</title>
<p>The analysis of the APT follows the same statistical approach as the RCT to estimate the min-entropy. As defined by NIST guidelines, the data are partitioned into sequences of <italic>n</italic> &#x0003D; 512 symbols. The number of occurrences of the first symbol within each sequence is counted, and the test is failed if the count exceeds a set threshold <italic>C</italic>. The failure probability, therefore, follows a binomial cumulative distribution function (B_cdf):</p>
<disp-formula id="EQ18"><mml:math id="M59"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>P</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x02265;</mml:mo><mml:mi>C</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>B</mml:mi><mml:mtext>_</mml:mtext><mml:mi>c</mml:mi><mml:mi>d</mml:mi><mml:mi>f</mml:mi><mml:mstyle mathsize="1.61em"><mml:mrow><mml:mo stretchy="false">(</mml:mo></mml:mrow></mml:mstyle><mml:mi>C</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>p</mml:mi><mml:mstyle mathsize="1.61em"><mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mstyle><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math><label>(17)</label></disp-formula>
<p>where <italic>p</italic> is the probability of occurrence of the selected symbol, and the &#x02212;1 in the first and second arguments is due to the first symbol being fixed and already accounted for. Assuming an unbiased bit-stream, <inline-formula><mml:math id="M60"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mn>16</mml:mn></mml:mrow></mml:mfrac></mml:math></inline-formula>. Instances where the frequency of occurrences for the first symbol falls below a lower threshold are also considered. In such cases, the corresponding binomial cdf is included in <xref ref-type="disp-formula" rid="EQ18">Equation 17</xref> to compute the overall failure probability. In this setting, given the failure probability &#x003B1; &#x0003D; 2<sup>&#x02212;20</sup> and <italic>m</italic> &#x0003D; 16, the test is deemed unsuccessful if the count of a symbol exceeds <italic>C</italic>&#x02265;62 or is smaller than <italic>C</italic> &#x02264; 8. The observed results, obtained by varying the cut-off threshold, are plotted in <xref ref-type="fig" rid="F13">Figure 13</xref> and compared with the theoretical binomial cumulative distribution, to which they comply.</p>
<fig position="float" id="F13">
<label>Figure 13</label>
<caption><p>The performance of the APT for different values of the cut-off threshold over the unbiased bit-stream generated with our QRNG is reported in orange. The datapoints consistently lie within 3&#x003C3; from the expected value given by the binomial cumulative distribution function, which is plotted in blue.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0013.tif">
<alt-text content-type="machine-generated">Three graphs labeled A, B, and C show measured entropy versus estimated min-entropy across different cut-off thresholds of six, seven, and eight. Each graph includes data points with error bars for four datasets, labeled 46847, 46848, 46851, and 46855. The x-axis represents the cut-off threshold, and the y-axis represents entropy values ranging from 3.75 to 4.15. Vertical dotted lines separate different regions of thresholds. Data points vary slightly across graphs, indicating changes in measured entropy for each threshold and dataset.</alt-text>
</graphic>
</fig>
<p>The failure probability is linked to the probability of occurrence of a symbol <italic>p</italic>, which yields the bit-stream entropy as <italic>H</italic> &#x0003D; &#x02212;log<sub>2</sub>(<italic>p</italic>). <xref ref-type="fig" rid="F14">Figure 14</xref> displays an estimated <italic>p</italic> &#x0003D; 0.0627 &#x000B1; 0.0002 based on measured failures and binomial error. <xref ref-type="table" rid="T5">Table 5</xref> provides a summary of the measured entropy values and their uncertainties. By taking the weighted average for each set from each board, the lower bound on the entropy within a 99.7% confidence level is H(&#x00023;46847) = 3.9917, H(&#x00023;46848) = 3.9724, H(&#x00023;46851) = 3.9842, and H(&#x00023;46855) = 3.9824.</p>
<fig position="float" id="F14">
<label>Figure 14</label>
<caption><p>The estimation of the entropy <italic>H</italic> of the bit-stream as a sequence of four-bit symbols is computed by evaluating the probability <italic>p</italic> of occurrence of the most frequent symbol as the measured number of failures of the RCT on the bit-stream. The observed number of failures is traced back by the red continuous line to the corresponding <italic>p</italic> on the cumulative distribution function that governs the RCT (in blue). The result is accompanied by an uncertainty obtained by tracing back a one sigma binomial error on the observed number of failures (red dashed lines). The computed <italic>p</italic> is <italic>p</italic> &#x0003D; 0.0627 &#x000B1; 0.0002. The purple line marks the expected fails for the theoretical limit <italic>H</italic> &#x0003D; 4. Taking the &#x0002B;3 sigma value for the number of failures gives a lower bound for the entropy of the bit-stream of 3.983 at a 99.7% confidence level.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0014.tif">
<alt-text content-type="machine-generated">Plot illustrating measured versus expected failures. The x-axis represents symbol probability, and the y-axis represents the number of failures. A blue line shows the cumulative distribution function. A solid red line indicates measured failures, and a dashed red line marks the confidence level. A vertical blue line denotes expected failures. The graph shows intersections and deviations of these lines within the probability range of approximately 0.0625 to 0.0629, with failure counts between 110 and 140.</alt-text>
</graphic>
</fig>
<table-wrap position="float" id="T5">
<label>Table 5</label>
<caption><p>A comprehensive report on the measured entropy for the RCT and APT for &#x003B1; &#x0003D; 2<sup>&#x02212;20</sup>, showing that all values fall within the theoretical entropy limit, considering statistical fluctuations during the generation process, and assuming an unbiased bit-stream.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th valign="top" align="left"><bold>Sets\boards</bold></th>
<th valign="top" align="center" colspan="2"><bold>&#x00023;46847</bold></th>
<th valign="top" align="center" colspan="2"><bold>&#x00023;46848</bold></th>
<th valign="top" align="center" colspan="2"><bold>&#x00023;46851</bold></th>
<th valign="top" align="center" colspan="2"><bold>&#x00023;46855</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td/>
<td valign="top" align="center"><bold>RCT</bold></td>
<td valign="top" align="center"><bold>APT</bold></td>
<td valign="top" align="center"><bold>RCT</bold></td>
<td valign="top" align="center"><bold>APT</bold></td>
<td valign="top" align="center"><bold>RCT</bold></td>
<td valign="top" align="center"><bold>APT</bold></td>
<td valign="top" align="left"><bold>RCT</bold></td>
<td valign="top" align="center"><bold>APT</bold></td>
</tr> <tr>
<td valign="top" align="left">Set 1</td>
<td valign="top" align="center">3.997 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M61"><mml:mn>4</mml:mn><mml:mo>.</mml:mo><mml:mn>00</mml:mn><mml:msubsup><mml:mrow><mml:mn>7</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>010</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>014</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="center">3.999 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M62"><mml:mn>3</mml:mn><mml:mo>.</mml:mo><mml:mn>99</mml:mn><mml:msubsup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>011</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>009</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="center">3.999 &#x000B1; 0.002</td>
<td valign="top" align="center"><inline-formula><mml:math id="M63"><mml:mn>4</mml:mn><mml:mo>.</mml:mo><mml:mn>00</mml:mn><mml:msubsup><mml:mrow><mml:mn>4</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>008</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>010</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="left">4.001 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M64"><mml:mn>3</mml:mn><mml:mo>.</mml:mo><mml:mn>95</mml:mn><mml:msubsup><mml:mrow><mml:mn>5</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>009</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>011</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
</tr> <tr>
<td valign="top" align="left">Set 2</td>
<td valign="top" align="center">4.005 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M65"><mml:mn>4</mml:mn><mml:mo>.</mml:mo><mml:mn>02</mml:mn><mml:msubsup><mml:mrow><mml:mn>4</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>011</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>016</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="center">3.998 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M66"><mml:mn>3</mml:mn><mml:mo>.</mml:mo><mml:mn>99</mml:mn><mml:msubsup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>009</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>008</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="center">3.999 &#x000B1; 0.002</td>
<td valign="top" align="center"><inline-formula><mml:math id="M67"><mml:mn>3</mml:mn><mml:mo>.</mml:mo><mml:mn>99</mml:mn><mml:msubsup><mml:mrow><mml:mn>7</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>007</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>008</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="left">4.004 &#x000B1; 0.002</td>
<td valign="top" align="center"><inline-formula><mml:math id="M68"><mml:mn>4</mml:mn><mml:mo>.</mml:mo><mml:mn>00</mml:mn><mml:msubsup><mml:mrow><mml:mn>4</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>008</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>010</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
</tr> <tr>
<td valign="top" align="left">Set 3</td>
<td valign="top" align="center">4.000 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M69"><mml:mn>4</mml:mn><mml:mo>.</mml:mo><mml:mn>00</mml:mn><mml:msubsup><mml:mrow><mml:mn>6</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>009</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>012</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="center">4.002 &#x000B1; 0.003</td>
<td valign="top" align="center"><inline-formula><mml:math id="M70"><mml:mn>3</mml:mn><mml:mo>.</mml:mo><mml:mn>99</mml:mn><mml:msubsup><mml:mrow><mml:mn>4</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>009</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>011</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="center">4.000 &#x000B1; 0.002</td>
<td valign="top" align="center"><inline-formula><mml:math id="M71"><mml:mn>3</mml:mn><mml:mo>.</mml:mo><mml:mn>99</mml:mn><mml:msubsup><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>007</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>008</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
<td valign="top" align="left">3.997 &#x000B1; 0.002</td>
<td valign="top" align="center"><inline-formula><mml:math id="M72"><mml:mn>4</mml:mn><mml:mo>.</mml:mo><mml:mn>01</mml:mn><mml:msubsup><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>009</mml:mn></mml:mrow><mml:mrow><mml:mo>&#x0002B;</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mn>012</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td>
</tr> <tr>
<td valign="top" align="left">Weighted Avg.</td>
<td valign="top" align="center">4.001 &#x000B1; 0.002</td>
<td valign="top" align="center">4.011 &#x000B1; 0.007</td>
<td valign="top" align="center">3.991 &#x000B1; 0.002</td>
<td valign="top" align="center">3.992 &#x000B1; 0.005</td>
<td valign="top" align="center">3.999 &#x000B1; 0.001</td>
<td valign="top" align="center">3.997 &#x000B1; 0.004</td>
<td valign="top" align="left">4.006 &#x000B1; 0.002</td>
<td valign="top" align="center">4.003 &#x000B1; 0.005</td>
</tr> <tr>
<td valign="top" align="left">99.5% CL</td>
<td valign="top" align="center">3.996</td>
<td valign="top" align="center">3.993</td>
<td valign="top" align="center">3.987</td>
<td valign="top" align="center">3.978</td>
<td valign="top" align="center">3.996</td>
<td valign="top" align="center">3.986</td>
<td valign="top" align="left">3.997</td>
<td valign="top" align="center">3.991</td>
</tr> <tr>
<td valign="top" align="left">min-H NIST</td>
<td valign="top" align="center" colspan="2">3.999</td>
<td valign="top" align="center" colspan="2">3.999</td>
<td valign="top" align="center" colspan="2">3.998</td>
<td valign="top" align="center" colspan="2">3.999</td>
</tr></tbody>
</table>
<table-wrap-foot>
<p>The last row reports the min-entropy estimated according to the entropy source validation program by NIST (<xref ref-type="bibr" rid="B27">Turan et al., 2018</xref>). The estimated values through the proposed method are lower due to the larger error.</p>
</table-wrap-foot>
</table-wrap>
<p>The investigation on the APT could be extended by evaluating the occurrences of every symbol in the alphabet under consideration. In fact, such an integration is further validated by the fact that the minimum entropy is linked to the occurrence rate of the most probable symbol. Likewise, the failure probability for each symbol is assumed to be binomial. However, potential correlations between the symbols could significantly affect the number of failures recorded. Assessing these correlations and defining precise thresholds is necessary and will be addressed in future work.</p></sec></sec>
<sec id="s7">
<label>7</label>
<title>FPGA implementation of the anomaly detection procedure</title>
<p>The anomaly detection procedure outlined in Sections 5 and 6 was firmware implemented, enabling direct integration of statistical tests within the bit generation logic and facilitating online performance monitoring alongside bit generation; this minimizes latency and maintains the generation rate. These tests are run in real time as finite-state machines and provide early warning of anomalies without interrupting the bit stream. The tests included are:</p>
<list list-type="bullet">
<list-item><p><bold>Monobit (frequency) test:</bold> checks the balance of zeros and ones in the output stream. A significant deviation from 50% indicates bias in the entropy source.</p></list-item>
<list-item><p><bold>RUNS test:</bold> counts the number of consecutive identical bits (&#x0201C;runs&#x0201D;). Deviations from the expected distribution may indicate correlations between successive bits, due to after-pulsing or hardware faults.</p></list-item>
<list-item><p><bold>Adaptive proportion test (APT):</bold> monitors the number of occurrences of the first symbol within a sliding window. This test is sensitive to sudden changes in the probability distribution that the Monobit test alone may not catch.</p></list-item>
<list-item><p><bold>Repetition count test (RCT):</bold> detects long runs of identical symbols, which may be due to hardware lock-ups or failure modes that cause the output to get stuck.</p></list-item>
</list>
<p>Together, these tests provide complementary coverage: monobit and APT focus on balance and drift, while RUNS and RCT catch temporal correlations and catastrophic failures. Unlike traditional off-line test suites, this real-time monitoring allows the generator to signal degradation in real time without off-chip latency, enabling online entropy estimation and system-level corrective actions.</p>
<p>The hardware-implemented blocks responsible for statistical test computations are structured as FSMs, which operate as sequential logic units where each state depends on both the previous state and current computational outcomes. The following section details the FSM implementations used to perform the tests. The descriptions will reference the block diagram presented in <xref ref-type="fig" rid="F15">Figure 15</xref>.</p>
<fig position="float" id="F15">
<label>Figure 15</label>
<caption><p>Block diagrams of the hardware-implemented statistical tests. Each accelerator is realized as a Finite-State Machine with Datapath. The <bold>(A)</bold> RUNS accelerator is the most complex one, since the result depends not only on the parameters but also on the current tested bits, which makes it unfeasible to use pre-calculated values in every step. The <bold>(B)</bold> Monobit accelerator, thanks to its simpler test statistic, does not suffer from these drawbacks. The <bold>(C)</bold> APT and <bold>(D)</bold> RCT accelerators are by far the simplest ones, requiring only counting operations and comparison to predefined thresholds. For the RUNS and Monobit tests, the standard NIST implementation computes a <italic>p</italic>-value using the error function (erfc). In our hardware implementation, this step is omitted. Instead, the raw test statistics are directly compared against &#x003C3;-based thresholds derived from the Gaussian approximation of the expected distribution. Consequently, the test reduces to verifying whether the statistic lies within &#x000B1;<italic>k&#x003C3;</italic>, where <italic>k</italic> determines the confidence level, corresponding to the same acceptance region that would be obtained from the erfc-based <italic>p</italic>-value.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fcomp-07-1642566-g0015.tif">
<alt-text content-type="machine-generated">Diagrams illustrating four different algorithms: A) RUNS, B) MONOBIT, C) APT, and D) RCT. Each diagram contains components like adders, multipliers, FSMs (Finite State Machines), and memory units, showing data flow and logic connections. Labels and mathematical expressions describe the operations and parameters in each algorithm.</alt-text>
</graphic>
</fig>
<p>To improve computational performance and reduce FPGA resource usage, floating-point arithmetic was replaced with fixed-point arithmetic. Fixed-point operations are inherently more efficient for FPGA implementations as they require less logic (and thus lower power consumption), are easier to pipeline, and simplify algorithm integration.</p>
<p>The main contribution of this implementation is the focus on monitoring shifts in the mean of the failure distribution, as explained in Section 6. This adjustment reduces computational overhead while better supporting the goal of identifying distribution drift rather than extreme deviations.</p>
<p>To implement this approach, the system detects three consecutive failures (adjustable from 1 to 16). Assuming these failures are uncorrelated and with a 3&#x003C3; confidence threshold (0.001 false positive rate), the probability is <italic>P</italic> &#x0003D; 10<sup>&#x02212;9</sup>. At a 32 Mbit/s generation rate and 64 kbits per test iteration, this corresponds to one false alarm every 69 days on average.</p>
<p>Regarding resource usage, the APT and RCT implementations collectively require approximately 300 Look-Up Table (LUT) elements (0.3% of K26&#x00027;s available resources), 90 registers(&#x0003C; 0.1%), and three block RAM units (2.1%). The Monobit utilizes 480 LUTs (0.4%), 260 registers (0.1%), and 1 block RAM unit (0.7%). Comparatively, the RUNS implementation demands significantly higher resources, using 1,730 LUTs (1.5%), 1,900 registers (0.8%), and three block RAM units (2.1%).</p>
<sec>
<label>7.1</label>
<title>RUNS test</title>
<p>The FSM controlling the RUNS test operates by processing incoming bit sequences and monitoring their statistical properties in real time. The system is configured with two key parameters: the sequence length <italic>n</italic> and the number of sequences to analyze <italic>N</italic>.</p>
<p>During operation, the FSM analyzes each bit sequence through several steps. In reference to <xref ref-type="fig" rid="F15">Figure 15A</xref>, block (r1) counts the incoming symbols by counting the number of clock cycles during which the symbol bus is valid, while block (r2) accumulates the number of ones in each sequence by summing 4 bits from the symbol bus, and block (r3) calculates the number of runs by detecting transitions between consecutive bits. This operation is executed by a module the calculates the number of bit flips in a single symbol. It also remembers the last bit to account for a possible flip between consecutive symbols. These measurements are then used to compute a standardized test statistic <italic>z</italic>, according to <xref ref-type="disp-formula" rid="EQ12">Equation 11</xref>, which quantifies how much the observed pattern deviates from expected random behavior.</p>
<p>Among the NIST statistical tests, Monobit, APT, and RCT are easily adapted to firmware as they are based on bit or symbol counting. However, the RUNS test requires complex mathematical operations to compute the normalized <italic>z</italic> value, as the quantities needed for its evaluation vary with each sequence. This prevents the use of pre-calculated constants and significantly increases computational complexity for firmware implementation.</p>
<p>As a result, two dedicated Xilinx IP cores were used as firmware accelerators: fixed-point CORDIC to calculate the square root of a variable using iterative shift and add/subtract operations, and fixed-point divider (Xilinx Divider generator) to compute the inverse of a variable using the iterative high radix division algorithm. Both accelerators introduce processing latency but offer predictable execution times.</p>
<p>The division operations are performed by simple bit shifting. This is the reason why input parameters (in terms of <italic>n</italic> and <italic>N</italic>) were carefully limited. Multiplying by parameters is performed by simple bit shifting operations. Multiplications that involve unpredictable operands (symbolized by darkened circles) are performed by Lookup Tables. Carefully placed result latching regions separate pipeline stages and decrease synthesis and implementation timing requirements.</p>
<p>Block (r4) maintains a running average of these <italic>z</italic> values, while block (r5) continuously compares them against configurable statistical thresholds. When three consecutive measurements fall outside the acceptable range, the system triggers an anomaly detection flag, allowing external control systems to respond by halting data generation and alerting the administrators.</p>
<p>The implementation supports a flexible configuration for different sequence lengths, ranging from 2<sup>5</sup> to 2<sup>11</sup> bits, and can analyze between 4 and over 2 million sequences, providing adaptability for different testing requirements and performance constraints.</p></sec>
<sec>
<label>7.2</label>
<title>Monobit test</title>
<p>The implementation of the Monobit test on firmware follows a similar pipeline to the RUNS. Block (m1) counts the number of ones in each generated symbol.</p>
<p>The Monobit test FSM operates in a similar way to the RUNS pipeline. The system processes sequences using the same configurable parameters: sequence length <italic>n</italic> and number of sequences <italic>N</italic>.</p>
<p>During execution, block (m1) counts the number of ones in each incoming symbol sequence, while block (m2) controls the FSM execution steps based on symbol reception events. The logic constantly calculates the Sn value, but it is treated as valid only when the required number of bits has been processed, which is typical for FPGA logic designs. The system then computes the average bias across all sequences according to <xref ref-type="disp-formula" rid="EQ1">Equation 1</xref>, which measures how far the proportion of ones deviates from the expected value. Block (m3) compares these computed averages against predefined statistical thresholds expressed as multiples of standard deviations. The system tracks consecutive threshold violations and raises a hardware failure flag when three consecutive measurements exceed the threshold, indicating potential bias in the generation process.</p>
<p>Raw results, as well as summary statistics, are buffered in FIFO memory for access by other firmware components. Similar to the RUNS, the implementation supports sequence lengths from 2<sup>2</sup> to 2<sup>11</sup> bits and can analyze between 4 and over 2 million sequences, with the constraint that both parameters should have matching parity (both even or both odd powers) to maintain even thresholds and simplify computational operations.</p></sec>
<sec>
<label>7.3</label>
<title>Adaptive proportion test</title>
<p>The adaptive proportion test (APT) FSM monitors sequences for excessive repetitions of symbols that could indicate biased bit generation. The system operates on fixed-length sequences of 512 symbols to detect statistical anomalies, as recommended by NIST (<xref ref-type="bibr" rid="B27">Turan et al., 2018</xref>).</p>
<p>During operation, block (a1) locks the first symbol of each sequence as a reference. Block (a2) then systematically compares each of the following 511 symbols against this locked reference, incrementing an internal counter whenever a match is detected. This process continues until the complete 512-symbol sequence has been analyzed. Upon completion of each sequence, block (a3) evaluates whether the total count of matching symbols exceeds the predetermined statistical threshold. When the count falls outside acceptable boundaries, the system asserts an anomaly flag, signaling potential bias toward a particular symbol value that could compromise randomness quality.</p>
<p>It is worth noting that the counter is reset to one because the first occurrence should also be counted.</p></sec>
<sec>
<label>7.4</label>
<title>Repetition count test</title>
<p>The repetition count test (RCT) FSM continuously monitors the bit stream for excessive consecutive repetitions of identical symbols, similarly to the RUNS but operated at the symbol level.</p>
<p>During operation, block (c1) processes each incoming symbol in the data stream. Block (c2) maintains a one-cycle delay register that enables comparison between consecutive symbols by storing the previous symbol value. The system then compares the current symbol against the delayed previous symbol, incrementing an internal repetition counter when consecutive matches are detected.</p>
<p>The counter resets to one whenever consecutive symbols differ, ensuring accurate tracking of only continuous repetition sequences. Additionally, the counter undergoes a forced reset after every 512 symbols to remain consistent with NIST specifications.</p>
<p>Block (c3) provides immediate anomaly detection by continuously monitoring the repetition counter against a configurable threshold. When consecutive repetitions exceed the specified limit, the system immediately raises an anomaly flag without waiting for sequence completion.</p></sec></sec>
<sec sec-type="conclusions" id="s8">
<label>8</label>
<title>Conclusion</title>
<p>Starting from four wellknown and recognized tests (the Monobit, the RUNS, the repetition count test, and the adaptive proportion test) for the assessment of the eligibility of a string of random bits to seed a DRBG, a method for the online evaluation of the source of randomness is developed. While originally every failing sequence was discarded, here such results are considered in a statistical framework to distinguish between the effect of an actual systematic bias in the bit generation and extreme values that are compatible with ordinary statistical fluctuations.</p>
<p>The sensitivity and effectiveness of bit-wise tests are assessed by introducing a bias model by deliberately forcing the value of some of the bits in the test sequences. On series of 2<sup>5</sup> sequences of 32 bits, the Monobit-like test is able to identify the tampering of a single bit done once every 10 sequences with a 99.7% confidence level and can go up to spotting a bias once every 100 sequences if the bits forced are in groups of 5. On series of 2<sup>17</sup> sequences of 32 bits, the RUNS-like test is able to pinpoint the presence of a biased bit in 10 sequences with a 5&#x003C3; confidence level.</p>
<p>The symbol-wise tests, based on the RCT and the APT, are used to provide an online estimation of the entropy of the bit stream. Four different boards implementing our QRNG are evaluated, yielding consistent lower bounds of 3.989 and 3.983 at 3&#x003C3; for four-bit symbols. Such results are compatible with the calculation of the min-entropy carried out on the boards according to NIST specifications described in (<xref ref-type="bibr" rid="B27">Turan et al. 2018</xref>). As this calculation relies on the symbols of the bitstream being independently and identically distributed, the dataset under study was validated as such and the procedure to do so analyzed. While the official procedure does certainly result in a more precise assessment, this method has the advantage of providing an early-stage, online evaluation of a lower bound for the entropy of the random bit generator without any additional burden, as the data used are those provided for the health test.</p>
<p>For all the tests, the concept of inter-sequence failure number (ISN) is introduced and used to evaluate the performance of our QRNG on a statistical basis. As the nature of this observable requires a significant amount of data (much more than the anomaly detection procedure developed on the Monobit and RUNS tests), the tests are implemented in firmware to minimize the lag on bit-harvesting.</p>
<p>The procedures presented in this work, while effective, are subject to several limitations. First, the analysis assumes that the generated data are representative of typical operating conditions; environmental stress tests (temperature extremes, voltage variations) were not performed. As a result, the stability of the proposed methods under such conditions remains to be assessed. Second, the choice of thresholds (e.g., 3&#x003C3;, &#x003B1; &#x0003D; 2<sup>&#x02212;20</sup>) reflects a balance between sensitivity and false-alarm probability. These values, although consistent with NIST recommendations, retain a degree of heuristic tuning and could require re-optimization for alternative use cases. However, this flexibility can be considered a strength of the proposed methodology, as these values can be adjusted by the user depending on the sensitivity, false positive rate, and reaction time required by the specific application.</p>
<p>Finally, we remark that the proposed tests yield significant results starting from a relatively small sample of generated bits. This opens the way for highly optimized implementations of entire test suites using FPGAs, which would enable a resource-efficient randomness assessment of generated bit-streams without significantly slowing down the harvesting process.</p></sec>
</body>
<back>
<sec sec-type="data-availability" id="s9">
<title>Data availability statement</title>
<p>The datasets presented in this article are not readily available because datasets were binary files of random bits generated with a TRNG. Requests to access the datasets should be directed to Massimo Caccia, <email>massimo.caccia&#x00040;randompower.eu</email>.</p>
</sec>
<sec sec-type="author-contributions" id="s10">
<title>Author contributions</title>
<p>CG: Data curation, Formal analysis, Investigation, Software, Visualization, Writing &#x02013; original draft, Writing &#x02013; review &#x00026; editing. VR: Data curation, Formal analysis, Investigation, Software, Visualization, Writing &#x02013; original draft, Writing &#x02013; review &#x00026; editing. KW: Data curation, Investigation, Software, Visualization, Writing &#x02013; original draft, Writing &#x02013; review &#x00026; editing. AT: Project administration, Supervision, Validation, Writing &#x02013; review &#x00026; editing. MB: Resources, Writing &#x02013; review &#x00026; editing. PD: Resources, Writing &#x02013; review &#x00026; editing. WK: Project administration, Supervision, Resources, Writing &#x02013; review &#x00026; editing. MC: Conceptualization, Formal analysis, Funding acquisition, Investigation, Methodology, Project administration, Supervision, Validation, Writing &#x02013; review &#x00026; editing.</p>
</sec>
<ack><p>The authors would like to thank Filippo Bonazzi, Olivia Riccomi, and Matteo Huang for their contribution to the implementation of the IID procedure and analysis.<xref ref-type="fn" rid="fn0002"><sup>2</sup></xref></p></ack>
<sec sec-type="COI-statement" id="conf1">
<title>Conflict of interest</title>
<p>CG, VR, KW, MB, and MC were employed by Random Power s.r.l.</p>
<p>The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="ai-statement" id="s12">
<title>Generative AI statement</title>
<p>The author(s) declare that no Gen AI was used in the creation of this manuscript.</p>
<p>Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.</p></sec>
<sec sec-type="disclaimer" id="s13">
<title>Publisher&#x00027;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Barker</surname> <given-names>E.</given-names></name> <name><surname>Kelsey</surname> <given-names>J.</given-names></name></person-group> (<year>2015</year>). <source>Recommendation for Random Number Generation Using Deterministic Random Bit Generators</source>. <publisher-loc>Gaithersburg, MD</publisher-loc>: <publisher-name>National Institute of Standards and Technology</publisher-name>. doi: <pub-id pub-id-type="doi">10.6028/NIST.SP.800-90Ar1</pub-id></mixed-citation>
</ref>
<ref id="B2">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Barker</surname> <given-names>E.</given-names></name> <name><surname>Kelsey</surname> <given-names>J.</given-names></name> <name><surname>McKay</surname> <given-names>K.</given-names></name> <name><surname>Roginsky</surname> <given-names>A.</given-names></name> <name><surname>S&#x000F6;nmez Turan</surname> <given-names>M.</given-names></name></person-group> (<year>2012</year>). <source>Recommendation for Random Bit Generator (RBG) Constructions</source>. <publisher-loc>Gaithersburg, MD</publisher-loc>: <publisher-name>NIST special publication</publisher-name>. U.S. Department of Commerce, National Institute of Standards and Technology.</mixed-citation>
</ref>
<ref id="B3">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Bradley</surname> <given-names>J. V.</given-names></name></person-group> (<year>1968</year>). <source>Distribution-Free Statistical Tests</source>. <publisher-loc>Englewood Cliffs, NJ</publisher-loc>: <publisher-name>Prentice-Hall</publisher-name>, <fpage>283</fpage>&#x02013;<lpage>310</lpage>.</mixed-citation>
</ref>
<ref id="B4">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Caccia</surname> <given-names>M.</given-names></name> <name><surname>Malinverno</surname> <given-names>L.</given-names></name> <name><surname>Paolucci</surname> <given-names>L.</given-names></name> <name><surname>Corridori</surname> <given-names>C.</given-names></name> <name><surname>Proserpio</surname> <given-names>E.</given-names></name> <name><surname>Abba</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2020</year>). <article-title>In-silico generation of random bit streams</article-title>. <source>Nucl. Instrum. Methods Phys. Res. A</source> <volume>980</volume>:<fpage>164480</fpage>. doi: <pub-id pub-id-type="doi">10.1016/j.nima.2020.164480</pub-id></mixed-citation>
</ref>
<ref id="B6">
<mixed-citation publication-type="web"><person-group person-group-type="author"><name><surname>Cowan</surname> <given-names>G.</given-names></name></person-group> (<year>2016</year>). <article-title>&#x0201C;Review of particle physics, 2016-2017,&#x0201D;</article-title> in <source>The Monte Carlo Techniques</source>. Particle Data Group, 537. Available online at: <ext-link ext-link-type="uri" xlink:href="https://cds.cern.ch/record/2241948/files/openaccess_cpc_40_10_100001.pdf">https://cds.cern.ch/record/2241948/files/openaccess_cpc_40_10_100001.pdf</ext-link></mixed-citation>
</ref>
<ref id="B7">
<mixed-citation publication-type="web"><person-group person-group-type="author"><collab>Debian Security Team</collab></person-group> (<year>2008</year>). <source>[DSA 1571-1] New Openssl Packages Fix Predictable Random Number Generator</source>. Debian Security Advisory. Available online at: <ext-link ext-link-type="uri" xlink:href="https://lists.debian.org/debian-security-announce/2008/msg00152.html">https://lists.debian.org/debian-security-announce/2008/msg00152.html</ext-link></mixed-citation>
</ref>
<ref id="B8">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Fagan</surname> <given-names>M.</given-names></name> <name><surname>Megas</surname> <given-names>K. N.</given-names></name> <name><surname>Cuthill</surname> <given-names>B.</given-names></name> <name><surname>Marron</surname> <given-names>J.</given-names></name> <name><surname>Hoehn</surname> <given-names>B.</given-names></name></person-group> (<year>2025</year>). <source>Foundational Cybersecurity Activities for IOT Product Manufacturers</source>. <publisher-loc>Gaithersburg, MD</publisher-loc>: <publisher-name>NIST Internal Report NISTIR 8259r1 ipd, National Institute of Standards and Technology</publisher-name>. Initial Public Draft.</mixed-citation>
</ref>
<ref id="B9">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Feng</surname> <given-names>Y.</given-names></name> <name><surname>Hao</surname> <given-names>L.</given-names></name></person-group> (<year>2020</year>). <article-title>Testing randomness using artificial neural network</article-title>. <source>IEEE Access</source> <volume>8</volume>, <fpage>163685</fpage>&#x02013;<lpage>163693</lpage>. doi: <pub-id pub-id-type="doi">10.1109/ACCESS.2020.3022098</pub-id></mixed-citation>
</ref>
<ref id="B10">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Figotin</surname> <given-names>A.</given-names></name> <name><surname>Vitebskiy</surname> <given-names>I.</given-names></name> <name><surname>Popovich</surname> <given-names>V.</given-names></name> <name><surname>Stetsenko</surname> <given-names>G.</given-names></name> <name><surname>Molchanov</surname> <given-names>S.</given-names></name> <name><surname>Gordon</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2004</year>). <source>Random Number Generator Based on the Spontaneous Alpha-Decay</source>. US Patent 6,745,217.</mixed-citation>
</ref>
<ref id="B11">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Foreman</surname> <given-names>C.</given-names></name> <name><surname>Yeung</surname> <given-names>R.</given-names></name> <name><surname>Curchod</surname> <given-names>F. J.</given-names></name></person-group> (<year>2024</year>). <article-title>Statistical testing of random number generators and their improvement using randomness extraction</article-title>. <source>Entropy</source> <volume>26</volume>:<fpage>1053</fpage>. doi: <pub-id pub-id-type="doi">10.3390/e26121053</pub-id><pub-id pub-id-type="pmid">39766682</pub-id></mixed-citation></ref>
<ref id="B12">
<mixed-citation publication-type="web"><person-group person-group-type="author"><name><surname>Fox</surname> <given-names>B.</given-names></name></person-group> (<year>2021</year>). You&#x00027;<italic>re Doing IoT RNG: The Crack in the Foundation of IoT</italic>. Blog Post. Available online at: <ext-link ext-link-type="uri" xlink:href="https://bishopfox.com/blog/youre-doing-iot-rng">https://bishopfox.com/blog/youre-doing-iot-rng</ext-link></mixed-citation>
</ref>
<ref id="B13">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Frustaci</surname> <given-names>F.</given-names></name> <name><surname>Spagnolo</surname> <given-names>F.</given-names></name> <name><surname>Corsonello</surname> <given-names>P.</given-names></name> <name><surname>Perri</surname> <given-names>S.</given-names></name></person-group> (<year>2024</year>). <article-title>A high-speed and low-power dsp-based trng for fpga implementations</article-title>. <source>IEEE Trans. Circuits Syst. II: Express Briefs</source> <volume>71</volume>, <fpage>4964</fpage>&#x02013;<lpage>4968</lpage>. doi: <pub-id pub-id-type="doi">10.1109/TCSII.2024.3421323</pub-id></mixed-citation>
</ref>
<ref id="B14">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gennaro</surname> <given-names>R.</given-names></name></person-group> (<year>2006</year>). <article-title>Randomness in cryptography</article-title>. <source>Secur. Privacy IEEE</source> <volume>4</volume>, <fpage>64</fpage>&#x02013;<lpage>67</lpage>. doi: <pub-id pub-id-type="doi">10.1109/MSP.2006.49</pub-id></mixed-citation>
</ref>
<ref id="B5">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Gerolimetto Fabrello</surname> <given-names>C.</given-names></name> <name><surname>Rossi</surname> <given-names>V.</given-names></name> <name><surname>Witek</surname> <given-names>K.</given-names></name> <name><surname>Trombetta</surname> <given-names>A.</given-names></name> <name><surname>Caccia</surname> <given-names>M.</given-names></name></person-group> (<year>2024</year>). <article-title>&#x0201C;On-line anomaly detection and qualification of random bit streams,&#x0201D;</article-title> in <source>2024 IEEE International Conference on Cyber Security and Resilience (CSR)</source> (<publisher-loc>London</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>897</fpage>&#x02013;<lpage>904</lpage>. doi: <pub-id pub-id-type="doi">10.1109/CSR61664.2024.10679431</pub-id></mixed-citation>
</ref>
<ref id="B15">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Goel</surname> <given-names>R.</given-names></name> <name><surname>Xiao</surname> <given-names>Y.</given-names></name> <name><surname>Ramezani</surname> <given-names>R.</given-names></name></person-group> (<year>2024</year>). <article-title>&#x0201C;Transformer models as an efficient replacement for statistical test suites to evaluate the quality of random numbers,&#x0201D;</article-title> in <source>2024 International Symposium on Networks, Computers and Communications (ISNCC)</source> (<publisher-loc>Washington DC</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1</fpage>&#x02013;<lpage>6</lpage>. doi: <pub-id pub-id-type="doi">10.1109/ISNCC62547.2024.10758985</pub-id></mixed-citation>
</ref>
<ref id="B16">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Haitz</surname> <given-names>R. H.</given-names></name></person-group> (<year>1965</year>). <article-title>Mechanism contributing to the noise pulse rate of avalanche diodes</article-title>. <source>J. Appl. Phys</source>. <volume>36</volume>, <fpage>3123</fpage>&#x02013;<lpage>3131</lpage>. doi: <pub-id pub-id-type="doi">10.1063/1.1702936</pub-id></mixed-citation>
</ref>
<ref id="B17">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Herrero-Collantes</surname> <given-names>M.</given-names></name> <name><surname>Garcia-Escartin</surname> <given-names>J. C.</given-names></name></person-group> (<year>2017</year>). <article-title>Quantum random number generators</article-title>. <source>Rev. Mod. Phys</source>. <volume>89</volume>:<fpage>015004</fpage>. doi: <pub-id pub-id-type="doi">10.1103/RevModPhys.89.015004</pub-id></mixed-citation>
</ref>
<ref id="B18">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>L&#x00027;Ecuyer</surname> <given-names>P.</given-names></name> <name><surname>Simard</surname> <given-names>R. J.</given-names></name></person-group> (<year>2007</year>). <article-title>Testu01: a C library for empirical testing of random number generators</article-title>. <source>ACM Trans. Math. Softw</source>. 33, <volume>22</volume>:<fpage>1</fpage>&#x02013;<lpage>22</lpage>.40. doi: <pub-id pub-id-type="doi">10.1145/1268776.1268777</pub-id></mixed-citation>
</ref>
<ref id="B19">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lu</surname> <given-names>Y.</given-names></name> <name><surname>Xu</surname> <given-names>E.</given-names></name> <name><surname>Liu</surname> <given-names>Y.</given-names></name> <name><surname>Chen</surname> <given-names>J.</given-names></name> <name><surname>Liang</surname> <given-names>H.</given-names></name> <name><surname>Huang</surname> <given-names>Z.</given-names></name> <etal/></person-group>. (<year>2025</year>). <article-title>Ultra-high efficiency trng ip based on mesh topology of coupled-xor</article-title>. <source>IEEE Trans. Circuits Syst. I: Regul. Pap</source>. <volume>72</volume>, <fpage>2754</fpage>&#x02013;<lpage>2767</lpage>. doi: <pub-id pub-id-type="doi">10.1109/TCSI.2025.3555325</pub-id></mixed-citation>
</ref>
<ref id="B20">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>McKay</surname> <given-names>K. G.</given-names></name></person-group> (<year>1954</year>). <article-title>Avalanche breakdown in silicon</article-title>. <source>Phys. Rev</source>. <volume>94</volume>, <fpage>877</fpage>&#x02013;<lpage>884</lpage>. doi: <pub-id pub-id-type="doi">10.1103/PhysRev.94.877</pub-id></mixed-citation>
</ref>
<ref id="B21">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Piscopo</surname> <given-names>V.</given-names></name> <name><surname>Dolmeta</surname> <given-names>A.</given-names></name> <name><surname>Mirigaldi</surname> <given-names>M.</given-names></name> <name><surname>Martina</surname> <given-names>M.</given-names></name> <name><surname>Masera</surname> <given-names>G.</given-names></name></person-group> (<year>2025</year>). <article-title>A high-entropy true random number generator with parameterizable architecture on fpga</article-title>. <source>Sensors</source> <volume>25</volume>:<fpage>1678</fpage>. doi: <pub-id pub-id-type="doi">10.3390/s25061678</pub-id><pub-id pub-id-type="pmid">40292708</pub-id></mixed-citation></ref>
<ref id="B22">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Rukhin</surname> <given-names>A.</given-names></name> <name><surname>Soto</surname> <given-names>J.</given-names></name> <name><surname>Nechvatal</surname> <given-names>J.</given-names></name> <name><surname>Smid</surname> <given-names>M.</given-names></name> <name><surname>Barker</surname> <given-names>E.</given-names></name></person-group> (<year>2001</year>). <source>A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications</source>. <publisher-loc>Gaithersburg, MD</publisher-loc>: <publisher-name>NIST Special Publication 800-22, 163</publisher-name>. doi: <pub-id pub-id-type="doi">10.6028/NIST.SP.800-22</pub-id></mixed-citation>
</ref>
<ref id="B23">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Senitzki</surname> <given-names>B. M. J.</given-names></name></person-group> (<year>1958</year>). <article-title>Breakdown in silicon</article-title>. <source>Phys. Rev</source>. <volume>110</volume>, <fpage>612</fpage>&#x02013;<lpage>620</lpage>. doi: <pub-id pub-id-type="doi">10.1103/PhysRev.110.612</pub-id></mixed-citation>
</ref>
<ref id="B24">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Seyhan</surname> <given-names>K.</given-names></name> <name><surname>Akleylek</surname> <given-names>S.</given-names></name></person-group> (<year>2022</year>). <article-title>Classification of random number generator applications in IOT: a comprehensive taxonomy</article-title>. <source>J. Inf. Secur. Appl</source>. <volume>71</volume>:<fpage>103365</fpage>. doi: <pub-id pub-id-type="doi">10.1016/j.jisa.2022.103365</pub-id></mixed-citation>
</ref>
<ref id="B25">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Soto</surname> <given-names>J.</given-names></name> <name><surname>Bassham</surname> <given-names>L.</given-names></name></person-group> (<year>2000</year>). <source>Randomness Testing of the Advanced Encryption Standard Finalist Candidates</source>. <publisher-loc>Gaithersburg, MD</publisher-loc>: <publisher-name>NIST</publisher-name>. doi: <pub-id pub-id-type="doi">10.6028/NIST.IR.6483</pub-id></mixed-citation>
</ref>
<ref id="B26">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>S&#x000FD;s</surname> <given-names>M.</given-names></name> <name><surname>Klinec</surname> <given-names>D.</given-names></name> <name><surname>Svenda</surname> <given-names>P.</given-names></name></person-group> (<year>2017</year>). <article-title>&#x0201C;The efficient randomness testing using boolean functions,&#x0201D;</article-title> in <source>Proceedings of the 14th International Joint Conference on e-Business and Telecommunications (ICETE 2017)</source> - <italic>Volume 4: SECRYPT, Madrid, Spain, July 24-26, 2017</italic>, eds. P. Samarati, M. S. Obaidat, and E. Cabello (Set&#x000FA;bal: SciTePress), <fpage>92</fpage>&#x02013;<lpage>103</lpage>. doi: <pub-id pub-id-type="doi">10.5220/0006425100920103</pub-id></mixed-citation>
</ref>
<ref id="B27">
<mixed-citation publication-type="book"><person-group person-group-type="author"><name><surname>Turan</surname> <given-names>M.</given-names></name> <name><surname>Barker</surname> <given-names>E.</given-names></name> <name><surname>Kelsey</surname> <given-names>J.</given-names></name> <name><surname>McKay</surname> <given-names>K. A.</given-names></name> <name><surname>Baish</surname> <given-names>M. L.</given-names></name> <name><surname>Boyle</surname> <given-names>M.</given-names></name></person-group> (<year>2018</year>). <source>Recommendation for the Entropy Sources Used for Random Bit Generation.</source> <publisher-loc>Gaithersburg, MD</publisher-loc>: <publisher-name>National Institute of Standards and Technology</publisher-name>. 84. doi: <pub-id pub-id-type="doi">10.6028/NIST.SP.800-90B</pub-id><pub-id pub-id-type="pmid">39851635</pub-id></mixed-citation></ref>
<ref id="B28">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wu</surname> <given-names>S.</given-names></name></person-group> (<year>2025</year>). <article-title>Lightweight high-throughput true random number generator via state-switchable ring oscillators</article-title>. <source>J. Syst. Archit</source>. <volume>100</volume>:<fpage>02305</fpage> doi: <pub-id pub-id-type="doi">10.1016/j.vlsi.2024.102305</pub-id></mixed-citation>
</ref>
<ref id="B29">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Yilek</surname> <given-names>S.</given-names></name> <name><surname>Rescorla</surname> <given-names>E.</given-names></name> <name><surname>Shacham</surname> <given-names>H.</given-names></name> <name><surname>Enright</surname> <given-names>B.</given-names></name> <name><surname>Savage</surname> <given-names>S.</given-names></name></person-group> (<year>2009</year>). <article-title>&#x0201C;When private keys are public: results from the 2008 debian openssl vulnerability,&#x0201D;</article-title> in <source>Proceedings of the 9th ACM SIGCOMM Internet Measurement Conference, IMC 2009, Chicago, Illinois, USA, November 4-6, 2009</source>, eds. A. Feldmann and L. Mathy (New York, NY: ACM), <fpage>15</fpage>&#x02013;<lpage>27</lpage>. doi: <pub-id pub-id-type="doi">10.1145/1644893.1644896</pub-id></mixed-citation>
</ref>
<ref id="B30">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>B.</given-names></name> <name><surname>Li</surname> <given-names>L.</given-names></name> <name><surname>Xu</surname> <given-names>Y.</given-names></name> <name><surname>Tan</surname> <given-names>X.</given-names></name> <name><surname>Shi</surname> <given-names>J.</given-names></name> <name><surname>Huang</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>2025</year>). <article-title>Practical attack on a quantum random number generator via classical fluctuations</article-title>. <source>Phys. Rev. Appl</source>. <volume>24</volume>:<fpage>014008</fpage>. doi: <pub-id pub-id-type="doi">10.1103/k3c9-ngt1</pub-id></mixed-citation>
</ref>
<ref id="B31">
<mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>Y.</given-names></name> <name><surname>Zhong</surname> <given-names>K.</given-names></name> <name><surname>Zhong</surname> <given-names>J.</given-names></name></person-group> (<year>2025</year>). <article-title>Dh-trng: dynamic hybrid true random number generator for ultra-high throughput and energy efficiency</article-title>. <source>arXiv [preprint</source>]. arXiv:2502.01066. doi: <pub-id pub-id-type="doi">10.48550/arXiv.2502.01066</pub-id></mixed-citation>
</ref>
</ref-list>
<fn-group>
<fn fn-type="custom" custom-type="edited-by" id="fn0003">
<p>Edited by: <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2773002/overview">Nicholas Kolokotronis</ext-link>, University of Peloponnese, Greece</p>
</fn>
<fn fn-type="custom" custom-type="reviewed-by" id="fn0004">
<p>Reviewed by: <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2571100/overview">Sercan Aygun</ext-link>, University of Louisiana at Lafayette, United States; <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/3141292/overview">Vaibhavi Tiwari</ext-link>, Montclair State University, United States</p>
</fn>
</fn-group>
<fn-group>
<fn id="fn0001"><label>1</label><p><ext-link ext-link-type="uri" xlink:href="https://github.com/RandomPower/IID_validations">https://github.com/RandomPower/IID_validations</ext-link></p></fn>
<fn id="fn0002"><label>2</label><p><ext-link ext-link-type="uri" xlink:href="https://github.com/RandomPower/IID_validation">https://github.com/RandomPower/IID_validation</ext-link></p></fn>
</fn-group>
</back>
</article>