# A Low-Complexity Start-Stop True Random Number Generator for FPGAs
## 2 A Start-Stop TRNG with Two ROs and a Phase Detector  
In an RO-based TRNG, the signal from RO is sampled in a flip-flop, using another signal with a lower frequency (Figure 1). Delay \(\tau\) is usually implemented as a chain of even-number inverters, a chain of latches, or even a delay line [17]. Using only one ring oscillator does not output a bit string that meets all the statistical tests, even for small sampling frequencies and strong post-processing. To overcome this drawback, [PERSON] et al. proposed summing the XOR signals from multiple ROs and then sampling the resulting string using a signal with frequency \(f_{L}\)[7]. As shown in [7], the minimum number of ROs is 116. Then, [PERSON] and [PERSON] noticed that the number of ROs used can be significantly reduced if we combine XOR bit streams produced by many low-quality random bit generators called elementary generators (Figure 2) [8]. The TRNG obtained can be considered a combined generator with the XOR combining function, similar to combined PRNG generators. Figure 1: Jitter oscillator sampling as a method of producing random bits. Figure 2: A combined TRNG composed of \(K\) elementary RO-based TRNGs from Figure 1.  
In [9], [PERSON] et al. demonstrated, through simulation experiments, that [PERSON] and [PERSON]'s generators can produce sequences passing all statistical tests even when ring oscillators lack jitter. As a result, a fully deterministic source can achieve favorable statistical properties in the bit streams produced by the combined TRNG of [PERSON] and [PERSON]. Therefore, before accepting a solution as a TRNG, it is essential to evaluate the true randomness, especially when utilizing ROs. The structure of the RO-based start-stop TRNG proposed in this paper is shown in Figure 3.  
The generator uses only two ROs and additional phase detectors. The outputs of the phase detectors are sampled with frequency \(f_{L}\), with the sampling signal coming from a quartz oscillator. Next, two bitstreams are combined with the XOR function. The start-stop operation provides an external signal EN. For EN = \"1\", ROs produce rectangular waves. For EN = \"0\", the generator does not operate. When enabled, the TRNG can provide a specified number of bits on demand, controlled by the number of impulses from the quartz oscillator. The output bits are post-processed using the SHA-1 function. The jittered signal from a single-ring oscillator can be written as a phase-modulated signal [49]:  
\[s(t)=P[\omega t+\varphi(t)], \tag{1}\]  
where \(P\) denotes the sequence of periodic square pulses, \(t\) represents time, \(\omega=2\pi f\) signifies the pulsation of the periodic signal with frequency \(f\), and \(\varphi\) denotes phase fluctuations (jitter). Utilizing Fourier series analysis of the \(s(t)\) signal reveals that the rectangular signal shares identical phase properties with its first harmonic [49]. This characteristic significantly simplifies the analysis of a signal affected by phase jitter. Consequently, a sinusoidal signal with jitter can be expressed as follows:  
\[s(t)=\sin(\omega t+\varphi(t)), \tag{2}\]  
or,  
\[s(t)=\sin{(\omega t)}\cos{(\varphi(t))}+\sin{(\varphi(t))}\cos(\omega t). \tag{3}\]  
Due to the slight variations in phase, the cosine of small angles approximates to one, and the sine approximates to the angle value. Thus, Equation (3) can be approximated as follows:  
\[s(t)=\sin{(\omega t)}+\varphi(t)\cos(\omega t). \tag{4}\]  
The signal from the \(k\)th ring oscillator is as follows:  
\[s_{k}(t)=\sin{(\omega_{k}t)}+\varphi_{k}(t)\cos(\omega_{k}t). \tag{5}\]  
As illustrated in Figure 3, the PD1 produces the signal outlined below:  
\[s_{1}(t)=\sin{(\omega_{1}t)}+(\varphi_{1}(t)+\varphi_{2}(t))\cos(\omega_{1}t), \tag{6}\]  
Figure 2:0 The proposed start–stop TRNG with phase detectors. where \(\omega_{1}\) is the pulsation of RO1. For PD2,  
Figure 2:1  
where \(\omega_{2}\) is the pulsation of RO2. Subsequently, signals \(s_{1}(t)\) and \(s_{2}(t)\) undergo sampling.