## 3 Materials and Methods
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**FamilyTest** & **ENT** & **DIEHARDER** & **NIST** \\ \hline Daubechies (\(N=4\)) & PASS (6/6) & PASS (15/15) & PASS (15/15) \\ \hline Haar & PASS (6/6) & (12 PASS-2 WEAK–1 FAILED)/15 & PASS (15/15) \\ \hline Coiflets (\(N=3\)) & PASS (6/6) & (14 PASS-1 WEAK) /15 & PASS (15/15) \\ \hline Symlets (\(N=4\)) & PASS (6/6) & (13 PASS-2 WEAK) /15 & PASS (15/15) \\ \hline Discrete Meyer & PASS (6/6) & PASS (15/15) & PASS (14/15) \\ \hline Biorthogonal (\(N_{r(d)}=3\)) & PASS (6/6) & (13 PASS-2 WEAK) /15 & PASS (12/15) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Wavelet family analysis. patient is comfortably at home. In short, the new health-tracking or IoT medical devices aim to improve the quality life of citizens by improving our performance/habits or treating a disease. The benefits associated with continuous monitoring of our vital signals for medical or performance purposes are well-known. Nevertheless, the situation is very risky if security is not included on-board (and preferably by design) in these sensors/devices within a WSN. Therefore, sensors in a BAN that monitor our vital signals can be used with a dual purpose. On the one hand, the main goal is to improve the health of the user. Besides, additional goals do not have to compromise this primary goal; note that some sensors are critical for the treatment of certain medical conditions (e.g., heart attacks or epileptic seizures). On the other hand, the wireless connectivity of the devices makes the incorporation of security protection mechanisms mandatory; RNGs, such as the one designed in this article, can help in this task. An authentication protocol is one of the most common solutions to provide an adequate security level for sensors with limited capabilities (computation, storage and energy). For this purpose, RNGs may be necessary for the generation of random numbers included in a cryptographic protocol or for the seed(s) employed in a key generation algorithm. As mentioned, in the context of random number generation, TRNGs exploit a physical phenomenon from which they extract entropy. Based on this principle, this article explores whether the randomness from cardiac signals can be extracted. In detail, a wavelet decomposition has been used to extract randomness from an ECG-window. To the best of our knowledge, this is the first time that this approach has been proposed. From the analysis carried out, it is concluded that the output of the proposed ECG-based TRGN behaves as a random variable. In addition, our TRNG offers a high throughput that has nothing to do with the low throughput of IPI-based approaches. As future work, the proposal can be tested with other vital signals such as respiration, blood pressure or even an electroencephalogram. There is also room to study in depth the entropy extraction problem in a transformed domain. All authors contributed equally to this work in all tasks. This work has been supported by the CAM Grant S2013/ICE-3095 (CIBERDIINE: Cybersecurity, Data, and Risks) and by the MINECO Grant TIN2016-79095-C2-2-R (SMOG-DEV--Security mechanisms for fog computing: advanced security for devices). This research has been also supported by the Interdisciplinary Research Funds (Higher Colleges of Technology, United Arab Emirates) under Grant No. 103104. The authors would like to thank the anonymous reviewers for their valuable comments and suggestions to improve the quality of the article. The authors declare no conflict of interest. ## References

* [PERSON] and [PERSON] (2018) [PERSON]; [PERSON] IoT security: Review, blockchain solutions, and open challenges. _Future Gener. Comput. Syst._**2018**, _82_, 395-411. [CrossRef]
* [PERSON] and [PERSON] (2018) [PERSON]; [PERSON] Depletion-of-Battery Attack: Specificity, Modelling and Analysis. _Sensors_**2018**, _18_, 1849. [CrossRef] [PubMed]
* [PERSON] and [PERSON] (2015) [PERSON]; [PERSON]; [PERSON] Security and privacy issues in implantable medical devices: A comprehensive survey. _J. Biomed. Inform._**2015**, _55_, 272-289.