# Private Weakly-Random Sequences from Human Heart Rate for Quantum Amplification

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Used Data and Their Preprocessing

#### 2.1.1. Discretization

#### 2.1.2. Cutting Out Trends

#### 2.2. Randomness Testing Method Details

#### Similar Tests Used in Previous Research

- frequencies are calculated instead of conditional values,
- average square deviation is used instead of maximal absolute deviation, and
- cyclic approach is used at the end of the sequence.

#### 2.3. Identifying $\epsilon $ from a Realization of a Source of Weak Randomness

**Lemma**

**1.**

**Proof.**

#### 2.4. Software Description

Algorithm 1: Estimation of epsilons. |

Data: Annotated data file from Holter device, maximal history length parameter ${h}_{max}$Result: Sequence of ${\epsilon}_{i}$ for $i\in \{0,\dots ,{h}_{max}\}$_{1} Read appropriate RR intervals from data file;_{2} Generate binary sequence from RR intervals using chosen discretization;_{3} Optionally: perform cutting out trends subroutine;_{4} Count the number of occurrences of each binary substring of length up to ${h}_{max}+1$;_{5} Calculate estimated epsilons given in Equation (6); |

#### Implementation

## 3. Results

#### 3.1. Identifying $\epsilon $ of Exemplary Raw Data for Cryptographic Purpose

#### 3.2. Identifying $\epsilon $ of Exemplary Manually Pre-Processed Data for Medical Purpose

#### 3.3. Comparison of Different Experimental Methods

## 4. Discussion

## Supplementary Materials

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A. Detailed Numerical Results

## References

- Bera, M.N.; Acín, A.; Kuś, M.; Mitchell, M.W.; Lewenstein, M. Randomness in quantum mechanics: Philosophy, physics and technology. Rep. Prog. Phys.
**2017**, 80, 124001. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Bennett, C.H.; Brassard, G. Quantum Cryptography: Public Key Distribution and Coin Tossing. In Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing, Bangalore, India, 9–12 December 1984; IEEE Computer Society Press: New York, NY, USA, 1984; pp. 175–179. [Google Scholar]
- Becker, G.T.; Regazzoni, F.; Paar, C.; Burleson, W.P. Stealthy Dopant-Level Hardware Trojans. In Cryptographic Hardware and Embedded Systems—CHES 2013; Springer: Berlin/Heidelberg, Germany, 2013; pp. 197–214. [Google Scholar] [CrossRef]
- Trevisan, L. Extractors and pseudorandom generators. J. ACM
**2001**, 48, 860–879. [Google Scholar] [CrossRef] - Raz, R. Extractors with weak random seeds. In Proceedings of the Thirty-Seventh Annual ACM Symposium on Theory of Computing—STOC ’05, Baltimore, MD, USA, 22–24 May 2005; Association for Computing Machinery: New York, NY, USA, 2005; pp. 11–20. [Google Scholar] [CrossRef]
- Santha, M.; Vazirani, U.V. Generating quasi-random sequences from semi-random sources. J. Comput. Syst. Sci.
**1986**, 33, 75–87. [Google Scholar] [CrossRef] [Green Version] - Brunner, N.; Cavalcanti, D.; Pironio, S.; Scarani, V.; Wehner, S. Bell nonlocality. Rev. Mod. Phys.
**2014**, 86, 419–478. [Google Scholar] [CrossRef] [Green Version] - Colbeck, R.; Renner, R. Free randomness can be amplified. Nat. Phys.
**2012**, 8, 450–453. [Google Scholar] [CrossRef] - Grudka, A.; Horodecki, K.; Horodecki, M.; Horodecki, P.; Pawłowski, M.; Ramanathan, R. Free randomness amplification using bipartite chain correlations. Phys. Rev. A
**2014**, 90, 032322. [Google Scholar] [CrossRef] [Green Version] - Colbeck, R. Quantum and Relativistic Protocols For Secure Multi-Party Computation. Ph.D. Thesis, University of Cambridge, Cambridge, UK, 2006. [Google Scholar]
- Colbeck, R.; Kent, A. Private randomness expansion with untrusted devices. J. Phys. A Math. Theor.
**2011**, 44, 095305. [Google Scholar] [CrossRef] - Chung, K.M.; Shi, Y.; Wu, X. Physical Randomness Extractors: Generating Random Numbers with Minimal Assumptions. arXiv
**2014**, arXiv:1402.4797. [Google Scholar] - Miller, C.A.; Shi, Y. Robust Protocols for Securely Expanding Randomness and Distributing Keys Using Untrusted Quantum Devices. J. ACM
**2016**, 63, 1–63. [Google Scholar] [CrossRef] [Green Version] - Acín, A.; Masanes, L. Certified randomness in quantum physics. Nature
**2016**, 540, 213–219. [Google Scholar] [CrossRef] [PubMed] - Gallego, R.; Masanes, L.; Torre, G.D.L.; Dhara, C.; Aolita, L.; Acín, A. Full randomness from arbitrarily deterministic events. Nat. Commun.
**2013**, 4, 3654. [Google Scholar] [CrossRef] - Brandão, F.G.S.L.; Ramanathan, R.; Grudka, A.; Horodecki, K.; Horodecki, M.; Horodecki, P.; Szarek, T.; Wojewódka, H. Realistic noise-tolerant randomness amplification using finite number of devices. Nat. Commun.
**2016**, 7, 11345. [Google Scholar] [CrossRef] [Green Version] - Ramanathan, R.; Brandão, F.G.; Horodecki, K.; Horodecki, M.; Horodecki, P.; Wojewódka, H. Randomness Amplification under Minimal Fundamental Assumptions on the Devices. Phys. Rev. Lett.
**2016**, 117, 230501. [Google Scholar] [CrossRef] [Green Version] - Wojewodka, H.; Brandao, F.G.S.L.; Grudka, A.; Horodecki, K.; Horodecki, M.; Horodecki, P.; Pawlowski, M.; Ramanathan, R.; Stankiewicz, M. Amplifying the Randomness of Weak Sources Correlated With Devices. IEEE Trans. Inf. Theory
**2017**, 63, 7592–7611. [Google Scholar] [CrossRef] [Green Version] - Kessler, M.; Arnon-Friedman, R. Device-Independent Randomness Amplification and Privatization. IEEE J. Sel. Areas Inf. Theory
**2020**, 1, 568–584. [Google Scholar] [CrossRef] - Seepers, R.M.; Strydis, C.; Sourdis, I.; De Zeeuw, C.I. On Using a Von Neumann Extractor in Heart-Beat-Based Security. In Proceedings of the 2015 IEEE Trustcom/BigDataSE/ISPA, Helsinki, Finland, 20–22 August 2015; Volume 1, pp. 491–498. [Google Scholar] [CrossRef]
- Altawy, R.; Youssef, A.M. Security Tradeoffs in Cyber Physical Systems: A Case Study Survey on Implantable Medical Devices. IEEE Access
**2016**, 4, 959–979. [Google Scholar] [CrossRef] - Li, T.; Zhou, M. ECG Classification Using Wavelet Packet Entropy and Random Forests. Entropy
**2016**, 18, 285. [Google Scholar] [CrossRef] - Zheng, G.; Fang, G.; Shankaran, R.; Orgun, M.A. Encryption for Implantable Medical Devices Using Modified One-Time Pads. IEEE Access
**2015**, 3, 825–836. [Google Scholar] [CrossRef] - Kiyono, K.; Struzik, Z.; Aoyagi, N.; Yamamoto, Y. Multiscale probability density function analysis: Non-Gaussian and scale-Invariant fluctuations of healthy human heart rate. IEEE Trans. Biomed. Eng.
**2006**, 53, 95–102. [Google Scholar] [CrossRef] - Yamamoto, Y.; Hughson, R. On the fractal nature of heart rate variability in humans: Effects of data length and beta-adrenergic blockade. Am. J. Physiol. Regul. Integr. Comp. Physiol.
**1994**, 266, R40–R49. [Google Scholar] [CrossRef] - Ivanov, P.C.; Amaral, L.A.N.; Goldberger, A.L.; Havlin, S.; Rosenblum, M.G.; Struzik, Z.R.; Stanley, H.E. Multifractality in human heartbeat dynamics. Nature
**1999**, 399, 461–465. [Google Scholar] [CrossRef] [Green Version] - Shaffer, F.; Ginsberg, J.P. An Overview of Heart Rate Variability Metrics and Norms. Front. Public Health
**2017**, 5, 258. [Google Scholar] [CrossRef] [Green Version] - Sassi, R.; Cerutti, S.; Lombardi, F.; Malik, M.; Huikuri, H.V.; Peng, C.K.; Schmidt, G.; Yamamoto, Y.; Reviewers, D.; Gorenek, B.; et al. Advances in heart rate variability signal analysis: Joint position statement by the e-Cardiology ESC Working Group and the European Heart Rhythm Association co-endorsed by the Asia Pacific Heart Rhythm Society. EP Eur.
**2015**, 17, 1341–1353. [Google Scholar] [CrossRef] [PubMed] - Ortiz-Martin, L.; Picazo-Sanchez, P.; Peris-Lopez, P.; Tapiador, J. Heartbeats Do Not Make Good Pseudo-Random Number Generators: An Analysis of the Randomness of Inter-Pulse Intervals. Entropy
**2018**, 20, 94. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Chattopadhyay, E.; Zuckerman, D. Explicit two-source extractors and resilient functions. Ann. Math.
**2019**, 189, 653. [Google Scholar] [CrossRef] - Arnon-Friedman, R.; Portmann, C.; Scholz, V.B. Quantum-Proof Multi-Source Randomness Extractors in the Markov Model. In Proceedings of the 11th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2016), Berlin, Germany, 27–29 September 2016; Broadbent, A., Ed.; Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik: Dagstuhl, Germany, 2016; Volume 61, pp. 2:1–2:34. [Google Scholar] [CrossRef]
- Rohe, M. RANDy—A True-Random Generator Based On Radioactive Decay; Fortgeschrittenenpraktikum; Security and Cryptography Research Group Saarland University: Saarbrücken, Germany, 2003. [Google Scholar]
- Horodecki, P.; University of Gdansk, Gdańsk, Poland. Personal communication, 2021.
- Aguilar, E.A.; Ramanathan, R.; Kofler, J.; Pawłowski, M. Completely device-independent quantum key distribution. Phys. Rev. A
**2016**, 94, 022305. [Google Scholar] [CrossRef] [Green Version] - Kahn, D. The Codebreakers: The Story of Secret Writing; Macmillan: New York, NY, USA, 1967. [Google Scholar]
- Brown, R.G.; Eddelbuettel, D.; Bauer, D. Dieharder: A Random Number Test Suite. Available online: https://webhome.phy.duke.edu/~rgb/General/dieharder.php (accessed on 6 September 2021).
- Bouda, J.; Krhovjak, J.; Matyas, V.; Svenda, P. Towards True Random Number Generation in Mobile Environments. In Identity and Privacy in the Internet Age; Springer: Berlin/Heidelberg, Germany, 2009; pp. 179–189. [Google Scholar] [CrossRef] [Green Version]
- Bassham, L.E.; Rukhin, A.L.; Soto, J.; Nechvatal, J.R.; Smid, M.E.; Barker, E.B.; Leigh, S.D.; Levenson, M.; Vangel, M.; Banks, D.L.; et al. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; Special Publication (NIST SP), Technical Report 800-22; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2010. [Google Scholar] [CrossRef]
- Martínez, A.; Solis, A.; Rojas, R.D.H.; U’Ren, A.; Hirsch, J.; Castillo, I.P. Advanced Statistical Testing of Quantum Random Number Generators. Entropy
**2018**, 20, 886. [Google Scholar] [CrossRef] [Green Version] - Caludet, C. Borel normality and algorithmic randomness. In Developments in Language Theory; World Scientific: Singapore, 1994; pp. 113–129. [Google Scholar]
- de Bruijn, N.G. Acknowledgement of Priority to C. Flye Sainte-Marie on the Counting of Circular Arrangements of 2
^{n}Zeros and Ones that Show Each n-Letter Word Exactly Once; Technical Report 75-WSK-06; Technological University Eindhoven: Eindhoven, The Netherlands, 1975. [Google Scholar] - Makowiec, D.; Kaczkowska, A.; Wejer, D.; Zarczynska-Buchowiecka, M.; Struzik, Z.R. Chronographic imprint of age-induced alterations in heart rate dynamical organization. Front. Physiol.
**2015**, 6, 201. [Google Scholar] [CrossRef] [Green Version] - Makowiec, D.; Wdowczyk, J. Patterns of Heart Rate Dynamics in Healthy Aging Population: Insights from Machine Learning Methods. Entropy
**2019**, 21, 1206. [Google Scholar] [CrossRef] [Green Version]

**Figure 1.**Values of ε for the group of women, aged 19–89, shown in increasing order of age (without cutting trends). The bottom line of the rectangular shape denotes the first quartile, the top one denotes the third quartile, and the middle one denotes the second quartile (median). The minimal and maximal values (the 0th and 4th quartiles) are depicted as top and bottom whiskers for each age group.

**Figure 2.**Values of ε for the group of men, aged 21–88, shown in increasing order of age. The bottom line of the rectangular shape denotes the first quartile, the top one denotes the third quartile, and the middle one denotes the second quartile (median). The minimal and maximal values (the 0th and 4th quartiles) are depicted as top and bottom whiskers for each age group.

**Figure 3.**Values of ε for the group of women aged 21–88 shown in increasing order of age for the same length of data (cut to the minimal length among all persons). Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1.

**Figure 4.**Values of ε for the group of men aged 21–88 shown in increasing order of age for the same length of data (cut to the minimal length among all persons). Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1.

**Figure 5.**Values of ε for the group of women aged 19–89 shown in increasing order of age, after post-processing according to cutting out trends with pattern (3, 3). Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1.

**Figure 6.**Values of ε for the group of men aged 21–88 shown in increasing order of age, after post-processing according to cutting out trends with pattern (3, 3). Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1.

**Figure 7.**Values of ε for the group of women aged 19–89 shown in increasing order of age, after manual preprocessing by a medical expert. Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1.

**Figure 8.**Values of ε for the group of men aged 21–88 shown in increasing order of age, after manual preprocessing by a medical expert. Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1.

**Figure 9.**Collective values of ε for all persons (regardless of age and sex) for four experiments presented in our work. For description see Section 3.3 Depiction of statistical quantities (0–4th quartile) as described in caption of Figure 1. Additionally, bold dots in the figure represent average values.

Pattern | (0, 0) | (2, 2) | (3, 3) | (4, 4) | (5, 5) | (6, 6) |
---|---|---|---|---|---|---|

size (m) | 24,447,658 | 3,820,864 | 1,191,328 | 488,968 | 241,072 | 120,997 |

ε | 0.21884 | 0.20976 | 0.20972 | 0.190349 | 0.201891 | 0.185005 |

ε_{cut} | NA | 0.22117 | 0.134322 | 0.105582 | 0.104898 | 0.0934031 |

ε − ε_{cut} | NA | −0.01141 | 0.0753987 | 0.0847669 | 0.0969931 | 0.0916016 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Stankiewicz, M.; Horodecki, K.; Sakarya, O.; Makowiec, D.
Private Weakly-Random Sequences from Human Heart Rate for Quantum Amplification. *Entropy* **2021**, *23*, 1182.
https://doi.org/10.3390/e23091182

**AMA Style**

Stankiewicz M, Horodecki K, Sakarya O, Makowiec D.
Private Weakly-Random Sequences from Human Heart Rate for Quantum Amplification. *Entropy*. 2021; 23(9):1182.
https://doi.org/10.3390/e23091182

**Chicago/Turabian Style**

Stankiewicz, Maciej, Karol Horodecki, Omer Sakarya, and Danuta Makowiec.
2021. "Private Weakly-Random Sequences from Human Heart Rate for Quantum Amplification" *Entropy* 23, no. 9: 1182.
https://doi.org/10.3390/e23091182