# A Novel True Random Number Generator in Near Field Communication as Memristive Wireless Power Transmission

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Wireless Power Transfer and Memristor

- It generates less heat than transistors or switches.
- It is capable of storing charge and remember its last state.
- It is possible to develop chaotic behaviour.

#### Typical Functionality

## 3. Stability and Chaotic Behaviour

#### 3.1. Memristor State Variables

#### 3.2. Theoretical Analysis

#### 3.3. Wireless Power Transmission

## 4. The Proposed Circuit and Algorithm

#### 4.1. Magnetic Field

#### 4.2. Circuit Simulation

#### 4.3. Experiment

#### 4.4. Arduino True Number Generation

#### 4.5. Statistical Tests

**Entropy.**The amount of bits per character used to describe the information density of the file’s contents. The following findings, which came from analysing a JPEG-compressed picture file, show that the file is highly packed in information—basically random [32] (pp. 104–108). As a result, file compression is unlikely to lower the file’s size. The program’s C source code, on the other hand, has an entropy of around 4.9 bits per character, implying that optimum compression would reduce the file’s size by 38%.

**Monte Carlo.**Evaluating the Monte Carlo test, as stated in [33], is another easy approach to test for randomness. Blocks of successive 48-bit numbers are used to produce (x, y) pairs, with each coordinate being a 24-bit integer. As shown in Figure 20, in a square (edge r) and inscribed a circle (radius r), the ratio, q, of the circle area in the first quadrant to the square area yields $q=\pi /4$. Calculating $\pi =4q$, we can obtain the ratio q by extracting pairs of random points (x,y) from our sequence. We may estimate q by counting the number of points that fall inside the circle and dividing that number by the total number of points. If the sequence is near to random, the value calculated for $\pi $ will approach the correct value of $\pi $ for extremely long streams (this approximation converges very slowly).

**Chi-Square.**The chi-square test is the most widely used test for data unpredictability, and it is particularly sensitive to pseudorandom sequence generator mistakes. For the stream of bytes in the file, the chi-square distribution is computed and expressed as an absolute number and a percentage, indicating how often a genuinely random sequence would surpass the estimated value [34]. We interpret the percentage as the likelihood that the sequence being tested is not random [35] (pp. 30–35). The sequence is almost likely not random if the proportion is more than 99% or less than 1%. The sequence is suspicious if the proportion is between 99% and 95%, or between 1% and 5%. The sequence is “almost suspicious” if it has a percentage between 90% and 95% and a percentage between 5% and 10%.

**Arithmetic mean.**Summing all the bytes in the file and dividing by the file length yields this result. This should be around 127.5 if the data are close to random (0.5 for −b option output). The values are consistently high or low if the mean deviates from this value.

**Serial correlation coefficient.**This value indicates how much each byte in the file is dependent on the previous byte. This number (which might be positive or negative) will, of course, be close to zero for random sequences. The serial correlation coefficient of a non-random byte stream, such as a C-based programme, will be on the order of 0.5. Serial correlation coefficients for highly predictable data, such as uncompressed bitmaps, will approach 1, as it is further described in Reference [35] (pp. 64–65).

## 5. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Wei, X.; Wang, Z.; Dai, H. A critical review of wireless power transfer via strongly coupled magnetic resonances. Energies
**2014**, 7, 4316–4341. [Google Scholar] [CrossRef][Green Version] - Abou Houran, M.; Yang, X.; Chen, W. Magnetically coupled resonance WPT: Review of compensation topologies, resonator structures with misalignment, and EMI diagnostics. Electronics
**2018**, 7, 296. [Google Scholar] [CrossRef][Green Version] - Kuka, S.; Ni, K.; Alkahtani, M. A Review of Methods and Challenges for Improvement in Efficiency and Distance for Wireless Power Transfer Applications. Power Electron. Drives
**2019**, 5, 1–25. [Google Scholar] [CrossRef] - Hou, J.; Chen, Q.; Wong, S.C.; Chi, K.T.; Ruan, X. Analysis and control of series/series-parallel compensated resonant converter for contactless power transfer. IEEE J. Emerg. Sel. Top. Power Electron.
**2014**, 3, 124–136. [Google Scholar] - Miller, J.M.; Onar, O.C.; Chinthavali, M. Primary-side power flow control of wireless power transfer for electric vehicle charging. IEEE J. Emerg. Sel. Top. Power Electron.
**2014**, 3, 147–162. [Google Scholar] [CrossRef] - Diekhans, T.; De Doncker, R.W. A dual-side controlled inductive power transfer system optimized for large coupling factor variations and partial load. IEEE Trans. Power Electron.
**2015**, 30, 6320–6328. [Google Scholar] [CrossRef] - Wu, J.; Zhao, C.; Lin, Z.; Du, J.; Hu, Y.; He, X. Wireless Power and Data Transfer via a Common Inductive Link Using Frequency Division Multiplexing. IEEE Trans. Ind. Electron.
**2015**, 62, 7810–7820. [Google Scholar] [CrossRef][Green Version] - Zhang, Z.; Chau, K.; Liu, C.; Qiu, C.; Lin, F. An efficient wireless power transfer system with security considerations for electric vehicle applications. J. Appl. Phys.
**2014**, 115, 17A328. [Google Scholar] [CrossRef][Green Version] - Zhang, Y.; Lu, T.; Zhao, Z.; He, F.; Chen, K.; Yuan, L. Selective Wireless Power Transfer to Multiple Loads Using Receivers of Different Resonant Frequencies. IEEE Trans. Power Electron.
**2015**, 30, 6001–6005. [Google Scholar] [CrossRef] - Chua, L.O.; Kang, S.M. Memristive devices and systems. Proc. IEEE
**1976**, 64, 209–223. [Google Scholar] [CrossRef] - Stanley Williams, R. How we found the missing memristor. In Chaos, CNN, Memristors and Beyond: A Festschrift for Leon Chua with DVD-ROM, Composed by Eleonora Bilotta; World Scientific: Singapore, 2013; pp. 483–489. [Google Scholar]
- Vaidyanathan, S.; Volos, C. Advances in Memristors, Memristive Devices and Systems; Springer: Berlin/Heidelberg, Germany, 2017; Volume 701. [Google Scholar]
- Bao, B.; Jiang, T.; Xu, Q.; Chen, M.; Wu, H.; Hu, Y. Coexisting infinitely many attractors in active band-pass filter-based memristive circuit. Nonlinear Dyn.
**2016**, 86, 1711–1723. [Google Scholar] [CrossRef] - Iu, H.H.C.; Yu, D.S.; Fitch, A.L.; Sreeram, V.; Chen, H. Controlling Chaos in a Memristor Based Circuit Using a Twin-T Notch Filter. IEEE Trans. Circuits Syst. I Regul. Pap.
**2011**, 58, 1337–1344. [Google Scholar] [CrossRef] - Xu, Q.; Lin, Y.; Bao, B.; Chen, M. Multiple attractors in a non-ideal active voltage-controlled memristor based Chua’s circuit. Chaos, Solitons Fractals
**2016**, 83, 186–200. [Google Scholar] [CrossRef] - Bao, H.; Wang, N.; Wu, H.; Song, Z.; Bao, B. Bi-stability in an improved memristor-based third-order Wien-bridge oscillator. IETE Tech. Rev.
**2019**, 36, 109–116. [Google Scholar] [CrossRef] - Bao, B.; Bao, H.; Wang, N.; Chen, M.; Xu, Q. Hidden extreme multistability in memristive hyperchaotic system. Chaos Solitons Fractals
**2017**, 94, 102–111. [Google Scholar] [CrossRef] - Bao, H.; Wang, N.; Bao, B.; Chen, M.; Jin, P.; Wang, G. Initial condition-dependent dynamics and transient period in memristor-based hypogenetic jerk system with four line equilibria. Commun. Nonlinear Sci. Numer. Simul.
**2018**, 57, 264–275. [Google Scholar] [CrossRef] - Chen, M.; Yu, J.; Bao, B. Finding hidden attractors in improved memristor-based Chua’s circuit. Electron. Lett.
**2015**, 51, 462–464. [Google Scholar] [CrossRef] - Hameed, S.; Hameed, B.; Hussain, S.A.; Khalid, W. Lightweight Security Middleware to Detect Malicious Content in NFC Tags or Smart Posters. In Proceedings of the 2014 IEEE 13th International Conference on Trust, Security and Privacy in Computing and Communications, Beijing, China, 24–26 September 2014; pp. 900–905. [Google Scholar] [CrossRef]
- Zhuang, Z.; Zhang, J.; Geng, W. Analysis and Optimization to an NFC Security Authentication Algorithm Based on Hash Functions. In Proceedings of the 2014 International Conference on Wireless Communication and Sensor Network, Wuhan, China, 13–14 December 2014; pp. 240–245. [Google Scholar] [CrossRef]
- Chattha, N.A. NFC—Vulnerabilities and defense. In Proceedings of the 2014 Conference on Information Assurance and Cyber Security (CIACS), Rawalpindi, Pakistan, 12–13 June 2014; pp. 35–38. [Google Scholar] [CrossRef]
- Aliexpress. NFC Door Lock. Available online: http://aliexpress.com (accessed on 30 June 2021).
- Li, W.; Yang, X. A Parallel and Reconfigurable United Architecture for Fibonacci and Galois LFSR. In Proceedings of the 2015 7th International Conference on Intelligent Human-Machine Systems and Cybernetics, Hangzhou, China, 22–23 August 2015; Volume 1, pp. 203–206. [Google Scholar] [CrossRef]
- Essaid, M.; Akharraz, I.; Saaidi, A.; Mouhib, A. A New Image Encryption Scheme Based on Confusion-Diffusion Using an Enhanced Skew Tent Map. Procedia Comput. Sci.
**2018**, 127, 539–548. [Google Scholar] [CrossRef] - Bagini, V.; Bucci, M. A Design of Reliable True Random Number Generator for Cryptographic Applications. In Cryptographic Hardware and Embedded Systems; Koç, Ç.K., Paar, C., Eds.; Springer: Berlin/Heidelberg, Germany, 1999; pp. 204–218. [Google Scholar]
- Chen, W.; Che, W.; Yan, N.; Tan, X.; Min, H. Ultra-low power truly random number generator for RFID tag. Wirel. Pers. Commun.
**2011**, 59, 85–94. [Google Scholar] [CrossRef] - Abunahla, H.; Shehada, D.; Yeun, C.Y.; OKelly, C.J.; Jaoude, M.A.; Mohammad, B. Novel microscale memristor with uniqueness property for securing communications. In Proceedings of the 2016 IEEE 59th International Midwest Symposium on Circuits and Systems (MWSCAS), Abu Dhabi, United Arab Emirates, 16–19 October 2016; pp. 1–4. [Google Scholar] [CrossRef]
- Yang, F.; Mou, J.; Sun, K.; Cao, Y.; Jin, J. Color Image Compression-Encryption Algorithm Based on Fractional-Order Memristor Chaotic Circuit. IEEE Access
**2019**, 7, 58751–58763. [Google Scholar] [CrossRef] - Wolf, A.; Swift, J.B.; Swinney, H.L.; Vastano, J.A. Determining Lyapunov exponents from a time series. Phys. D Nonlinear Phenom.
**1985**, 16, 285–317. [Google Scholar] [CrossRef][Green Version] - Publication, F.I.P.S. Security Requirements for Cryptographic Modules. Available online: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf (accessed on 30 June 2021).
- Hamming, R.W. Coding and Information Theory; Prentice-Hall, Inc.: Hoboken, NJ, USA, 1986; pp. 104–108. [Google Scholar]
- Howes, L.; Thomas, D. Chapter 37. Efficient Random Number Generation and Application Using CUDA. Available online: https://developer.nvidia.com/gpugems/gpugems3/part-vi-gpu-computing/chapter-37-efficient-random-number-generation-and-application (accessed on 30 June 2021).
- Walker, J. Chi-Square Calculator. Available online: http://www.fourmilab.ch/rpkp/experiments/analysis/chiCalc.html (accessed on 30 June 2021).
- Knuth, D.E. Art of Computer Programming, Volume 2: Seminumerical Algorithms; Addison-Wesley Professional: Reading, MA, USA, 2014; pp. 35–65. [Google Scholar]

**Figure 1.**Memsistive circuit developed by L. Chua [10].

**Figure 2.**Non-ideal active voltage-controlled memristor equivalent realisation. This circuit is active and only ${C}_{0}$ has charge storing qualities.

**Figure 3.**Some security applications of NFC technology. Commercial products of a security safe lock with a NFC system opening key. A BMW door opening and NFC house handle. Image collected from a car shop in UK and web source [23].

**Figure 4.**The cryptosystem model applied in high-level security: on the left, the transmitter lock and the receiver in the Card Key.

**Figure 7.**The figure shows the operating point (OP) of the system, the coupling value and the total inductance.

**Figure 8.**(

**a**) Transmitter coil caved in the core in order to increase directionality. (

**b**) Receiver coil and flat core to enhance energy harvesting.

**Figure 9.**(

**a**) Magnetic field intensity H spread in the air, where it can be seen as the vast green color (0 dB). (

**b**) Magnetic field vector B spread in the air, where it can be seen as the vast green color (0 dB).

**Figure 10.**The power transmitted has a significant chaotic behaviour and usually a value lower than 0.2 mW.

**Figure 12.**The behaviour in the transmitter (Chua circuit) is a well-known double-attractor phase portrait. This plot is the characteristic of the voltage in the receiver coil (inductor and compensation capacitor)—voltage on the receiver memristor.

**Figure 13.**Time step of the chaotic behaviour when the receiver is disconnected (highlighted in yellow): the LC voltage ${V}_{LC}$ and memristor voltage ${V}_{M}$ in receiver and transmitter, in purple and green, respectively. At the disconnection (in the 3rd graph), the receiver memristor holds its last status as shown in the 4th graph in blue.

**Figure 14.**Data transmission at 3Kbps; it is possible to notice the time of switching (highlighted in yellow) of the chaotic behaviour in the LC, the memristor voltage and the internal status in the 4th graph.

**Figure 15.**The schematic of the memristor wireless power transfer circuit and the adaptive circuit for the TRNG in the laptop.

**Figure 17.**No chaotic waveform will generate near to zero random numbers. On the left is the XY plot of the transmitter (

**bottom**) and receiver (

**top**). On the right is the ADC input voltage and the execution of the Python code with number generation.

**Figure 18.**A chaotic waveform will generate true random numbers. On the left is the XY plot of the transmitter (

**bottom**) and receiver (

**top**). On the right is the ADC input voltage and the execution of the Python code with number generation.

**Figure 19.**The bitmap generated form the sequence of numbers sampled, which has no pattern and appears to be indistinguishable from white noise to the human eye.

**Figure 20.**Monte Carlo test; blocks of successive 48-bit numbers are used to produce (x,y) pairs, with each coordinate being a 24-bit integer.

**Figure 21.**The ent give us the results of five different tests. The test results after (

**a**) two hours and (

**b**) more than 2 days results confirm that our sequences are true random numbers.

WTP (NFC) | M-WPT | |
---|---|---|

Power | Transmitted (Harvested) | Harvested |

Data | Oscillation | Chaos |

Distance | Over 30 cm (10 cm) | 10 cm |

Operating Frequency | Up to 13.5 MHz | Up to 7 KHz |

Control | Timing, Switches and Data Algorithm | Data |

Receivers | Many | Only one |

Memristor Equivalent | |||
---|---|---|---|

Parameter | Value | Parameter | Value |

${R}_{1}$ | 4 k$\mathsf{\Omega}$ | ${R}_{5}$ | 2 k$\mathsf{\Omega}$ |

${R}_{2}$ | 10 k$\mathsf{\Omega}$ | ${C}_{0}$ | 1 nF |

${R}_{3}$ | 1.4 k$\mathsf{\Omega}$ | ${g}_{1}$ | 1 |

${R}_{4}$ | 2 k$\mathsf{\Omega}$ | ${g}_{2}$ | 0.1 |

Chua’s Parameter | Transmitter | Receiver | Value |
---|---|---|---|

${C}_{1}$ | ${C}_{MT}$ | ${C}_{MR}$ | 6.8 nF |

${C}_{2}$ | ${C}_{T}$ | ${C}_{R}$ | 68 nF |

${R}_{E}$ | ${R}_{T}$ | ${R}_{R}$ | 2.18 k$\mathsf{\Omega}$ |

L | ${L}_{T}$ | ${L}_{R}$ | 8 mH |

M | 3.8 mH |

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**

Kuka, C.S.; Hu, Y.; Xu, Q.; Chandler, J.; Alkahtani, M. A Novel True Random Number Generator in Near Field Communication as Memristive Wireless Power Transmission. *J* **2021**, *4*, 764-783.
https://doi.org/10.3390/j4040052

**AMA Style**

Kuka CS, Hu Y, Xu Q, Chandler J, Alkahtani M. A Novel True Random Number Generator in Near Field Communication as Memristive Wireless Power Transmission. *J*. 2021; 4(4):764-783.
https://doi.org/10.3390/j4040052

**Chicago/Turabian Style**

Kuka, Colin Sokol, Yihua Hu, Quan Xu, James Chandler, and Mohammed Alkahtani. 2021. "A Novel True Random Number Generator in Near Field Communication as Memristive Wireless Power Transmission" *J* 4, no. 4: 764-783.
https://doi.org/10.3390/j4040052