Skip to main content

Random Number Generator Based on Hopfield Neural Network with Xorshift and Genetic Algorithms

  • Conference paper
  • First Online:
Advances in Computational Intelligence (MICAI 2023)


Generating random numbers plays a fundamental role in matters of computer security. New high-security standards for data encryption have emerged with the increasing demand for secure communication, storage, and management of sensitive data on public networks. Data encryption techniques have expanded rapidly. In this paper, we present two methods of pseudorandom number generation; the first method combines the existing architectures of Hopfield neural networks and the XORShift algorithm, an the second is based on genetic algorithms. Our approaches pass the NIST and Diehard tests, which give us numbers that satisfy the statistical requirements. Compared with other architectures, the results demonstrated a robust consistency in the quality of the generated random numbers, which shows that it is a reliable method.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others


  1. Aydin, Ö., Kösemen, C.: XorshiftUL+: a novel hybrid random number generator for Internet of Things and wireless sensor network applications. Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi 26(5), 953–958 (2020)

    Google Scholar 

  2. Bassham III, L.E., et al.: SP 800-22 Rev. 1a. A statistical test suite for random and pseudorandom number generators for cryptographic applications. National Institute of Standards & Technology (2010)

    Google Scholar 

  3. Bouteghrine, B., Tanougast, C., Sadoudi, S.: A survey on chaos-based cryptosystems: implementations and applications. In: Skiadas, C.H., Dimotikalis, Y. (eds.) 14th Chaotic Modeling and Simulation International Conference, pp. 65–80. Springer, Cham (2022).

  4. Brown, R.G.: DieHarder: a GNU public licensed random number tester. Draft paper included as file manual/dieharder.tex in the dieharder sources. Last version dated 20 (2006)

    Google Scholar 

  5. Hameed, S.M., Ali, L.M.M.: Utilizing Hopfield neural network for pseudo-random number generator. In: 2018 IEEE/ACS 15th International Conference on Computer Systems and Applications (AICCSA), pp. 1–5. IEEE (2018)

    Google Scholar 

  6. Haykin, S.: Neural Networks and Learning Machines, 3/E. Pearson Education India (2009)

    Google Scholar 

  7. Hopfield, J.J.: Neural networks and physical systems with emergent collective computational abilities. Proc. Natl. Acad. Sci. 79(8), 2554–2558 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  8. Kietzmann, P., Schmidt, T.C., Wählisch, M.: A guideline on pseudorandom number generation (PRNG) in the IoT. ACM Comput. Surv. (CSUR) 54(6), 1–38 (2021)

    Article  Google Scholar 

  9. Liao, T.L., Wan, P.Y., Yan, J.J.: Design and synchronization of chaos-based true random number generators and its FPGA implementation. IEEE Access 10, 8279–8286 (2022)

    Article  Google Scholar 

  10. Liu, J., et al.: A hardware pseudo-random number generator using stochastic computing and logistic map. Micromachines 12(1), 31 (2020)

    Article  Google Scholar 

  11. Marroquin, W., Santisteban, J.: Generation of pseudo-random numbers based on network traffic. In: Martínez-Villaseñor, L., Herrera-Alcántara, O., Ponce, H., Castro-Espinoza, F.A. (eds.) MICAI 2020. LNCS (LNAI), vol. 12468, pp. 481–493. Springer, Cham (2020).

    Chapter  Google Scholar 

  12. Marsaglia, G.: Xorshift RNGs. J. Stat. Softw. 8, 1–6 (2003)

    Article  Google Scholar 

  13. Marsaglia, G.: The Marsaglia random number CDROM including the diehard battery of tests of randomness (2008).

  14. Riera, C., Roy, T., Sarkar, S., Stanica, P.: A hybrid inversive congruential pseudorandom number generator with high period. Eur. J. Pure Appl. Math. 14(1), 1–18 (2021)

    Article  MathSciNet  Google Scholar 

  15. Rukhin, A., et al.: NIST special publication 800-22 Revision 1a: a statistical test suite for random and pseudorandom number generators for cryptographic applications. NIST, US Department of Commerce, USA (2010)

    Google Scholar 

  16. Santisteban, J., Tejada-Cárcamo, J.: Unilateral Jaccard similarity coefficient. In: GSB@ SIGIR, pp. 23–27 (2015)

    Google Scholar 

  17. Wang, L., Cheng, H.: Pseudo-random number generator based on logistic chaotic system. Entropy 21(10), 960 (2019)

    Article  Google Scholar 

  18. Zhao, W., Chang, Z., Ma, C., Shen, Z.: A pseudorandom number generator based on the chaotic map and quantum random walks. Entropy 25(1), 166 (2023)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Julio Santisteban .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Lecca, C., Zegarra, A., Santisteban, J. (2024). Random Number Generator Based on Hopfield Neural Network with Xorshift and Genetic Algorithms. In: Calvo, H., Martínez-Villaseñor, L., Ponce, H. (eds) Advances in Computational Intelligence. MICAI 2023. Lecture Notes in Computer Science(), vol 14391. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-47764-5

  • Online ISBN: 978-3-031-47765-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics