## 3 Materials and Methods
As expected, the distribution fit a binomial distribution:

\[p(k)=\binom{n}{k}p^{k}(1-p)^{n-k} \tag{2}\]

where \(n=\{8,16,32,64\}\) and \(p=1/2\). The experimental mean value of \(k\) is \(\{4.0008,8.0015,16.0031,32.0062\}\), which is nearly the expected value (\(E(k)=np=\{8,16,32,64\}\times(1/2)=\{4,8,16,32\}\)). From all this, it can be concluded that the advantage for an adversary to predict values using ECG signals from a different individual was zero. Apart from using the ECG of a different user, the attacker may be tempted to capture ECG signals from a distance. In [40], [PERSON] et al. showed how IPI-values (R-peaks) can be eavesdropped without touching the target individual and using a camera. Fortunately, this approach is totally uselessness

Figure 5: Hamming distance distribution. against our proposal since the whole ECG signal (P-wave, QRS-complex and T-wave) was used and there is no way to predict or capture an entire ECG signal from a distance. ### Performance Analysis

Apart from the poor randomness quality of IPI-based approaches [33], the throughput is also a bottleneck. Generally, in this sort of approach, four random bits (LSB) are extracted after the observation of two heart-beats [27; 31]. In order to improve efficiency, in a recent proposal, [PERSON] et al. were able to extract 16 bits per IPI value [34]. Despite all efforts, IPI-based approaches suffer from low throughput. Luckily, our approach was much more efficient since it was possible to extract several random bytes per each heart-beat. In Table 6, the performance of existing approaches is summarized. To facilitate the understanding of these values, in Columns 3 and 4, a healthy individual whose heart-beats between 60- and 100-times per minute (i.e., [1-0.6] s per beat) is assumed. The particular number of bits that can be extracted from an ECG-window (including only one R-peak) depends on the heart rate of the individual. Figure 6 shows the average value of bits extracted per heart-beat for each of the 199 subjects belonging to the dataset. The overall average value of all these values is the value shown in Table 6.

Compared to previous proposals, the advantages of our solution were two-fold. On the one hand, one heart-beat (ECG-window) is only needed to extract random bits; note that IPI approaches require two heart-beats since a difference between two R-peaks is computed. On the other hand, the throughput has increased drastically (with a 2200% increase in the worst-case scenario). Therefore, our proposal was able to generate random bits at a moderately high throughput rate. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Approach** & **Efficiency** & **Throughput (60 PPMs)** & **Throughput (100 PPMs)** \\ \hline IPI-based approaches [27; 31] & 4 bits/2 heart-beats & 2 bits /second & 3.3 bits/second \\ \hline [PERSON] et al. [34] & 16 bits/2 heart-beats & 8 bits/second & 13.33 bits/second \\ \hline Our approach & 23 bytes/heart-beat & 184 bits/second & 306 bits/second \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance analysis. Figure 6: Throughput analysis. ### Wavelet Family Analysis

The wavelet decomposition of the ECG signal represents the core function of the proposed RNG. Up to this point, the experimentation has been conducted using the Daubechies family (the number of vanishing moments is set to four; \(N=4\)). For completeness, we have evaluated the RNG with other families (i.e., Haar, coiflets, symlets, discrete Meyer, biorthogonal) to discern which alternatives were the most appropriate for the generation of randomness. A file of 100 MB has been generated in each case and then evaluated using the ENT, DIEHARDER and NIST randomness test suites. Table 7 summarizes the overall average results. As already mentioned, Daubechies was our first approach since this is the common mother wavelet used for the analysis of the ECG signal [41; 42; 43].