# A Low-Complexity Start-Stop True Random Number Generator for FPGAs
## 3 The Quality of Bit Streams Produced by the Proposed Generator  
The statistical properties analysis was preceded by entropy calculations for output sequences from Wold and Tan's generator using 2-, 3-, and 4-ring oscillators and the proposed generator with two oscillators and two phase detectors. Numerical values were obtained for five sampling frequencies with the TRNG implemented in Virtex 5 XC5 VLX50T, as shown in Table 1. The values differed by no more than 16% for other FPGA technologies. WTx represents a TRNG with the construction in Figure 2 using x ROs, while the generator in Figure 3 corresponds to the WT2D symbol. Next, whether the generators produced IID strings and whether the received strings passed the restart tests described by NIST [47] were checked. The results are shown in Table 2. Symbol Y denotes that the generator passed the tests. In additional studies, only the sampling frequencies for which the WTD2 generator produced IID strings that passed the restart tests from NIST SP-90B across all dominant FPGA technologies were considered. These have successfully integrated true random number generators (TRNGs) into Virtex 5, Spartan-3, Spartan-6, Artix-7, Cyclone V, and Max-10. The maximum output bit rate is limited to 10 Mbit/s. Exceeding this threshold results in output sequences that do not pass at least one of the NIST statistical tests from SP 800-22 and SP 90B. Nonetheless, for most cryptographic applications such as key generation, authentication vector generation, and Initial Vector (IV) generation, a bit rate of several Mbit/s is adequate. Initially, the statistical tests described in SP 800-22 were performed on \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \(f_{L}\) [MHz] & **25** & **15** & **10** & **5** & **1** \\ \hline WT2 & 0.228335 & 0.542281 & 0.654215 & 0.784981 & 0.894990 \\ WT3 & 0.893081 & 0.970915 & 0.995306 & 0.995389 & 0.998268 \\ WT4 & 0.994968 & 0.997237 & 0.999889 & 0.999311 & 0.998281 \\ WT2D & 0.999998 & 0.999999 & 0.999999 & 0.999999 & 0.999999 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The entropy of output sequences for five values of sampling frequency \(f_{L}\). \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \(f_{L}\) [MHz] & **25** & **15** & **10** & **5** & **1** \\ \hline
**Tests** & **IID** & **RES** & **IID** & **RES** & **IID** & **RES** & **IID** & **RES** & **IID** & **RES** \\ \hline WT2 & — & — & — & — & — & Y & — & Y & — & Y \\ WT3 & — & — & — & — & — & — & — & Y & — & Y \\ WT4 & — & — & — & Y & — & Y & Y & Y & Y \\ WT2D & — & — & — & Y & Y & Y & Y & Y & Y \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The results of tests described by NIST in SP 800-90B for five sampling frequencies \(f_{L}\). raw bits. Subsequently, the same bits were processed using the SHA-1 function from the Hashlib Python Library [51]. The SP 800-22 test suite comprises 15 statistical tests, some with multiple subtests. NIST proposed two testing approaches examining the proportion \(R_{\beta}\) of sequences that pass a statistical test and analyzing the distribution of \(p\)-values computed by the software, which examines the value of \(P_{T}\)[43]. A standard set of parameters proposed by NIST in version 2.1.1 was assumed during the tests. For the significance level \(\beta\) = 0.01 and 1000 tested sequences, each with a length of \(10^{6}\) bits, the minimal passing value for the proportion was approximately \(R_{\beta}\) = 0.9805. If \(P_{T}\geq 0.0001\), then \(p\)-values can be considered uniformly distributed. The NIST tests were performed for sampling frequencies of \(f_{L}\) = 10 MHz, 5 MHz, and 1 MHz. The final results are included in Tables 3-5. Symbol Y denotes that the generator produces sequences that pass all tests, including subtests, and that the distribution of \(p\)-values is uniform.