Skip to main content

An Ultrafast Cryptographically Secure Pseudorandom Number Generator

  • Conference paper
  • First Online:
Information Security and Cryptology – ICISC 2022 (ICISC 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13849))

Included in the following conference series:

  • 6493 Accesses

Abstract

An ultrafast cryptographically secure pseudorandom number generator, referred to as MaD4, is presented in this paper. MaD4 maintains a small byte-oriented state, whose transition follows a pseudorandom permutation, and a large integer-oriented state, whose transition follows a pseudorandom mapping. The byte-oriented state is initialized from a secret key and then further used to bootstrap and initialize the integer-oriented state. After initialization, both states evolve, with the byte-oriented state serving as a source of entropy and periodically reseeding the integer-oriented state. The combination of slow byte-oriented operations and fast integer-oriented operations renders a nice balance between quality and speed. MaD4 generates high quality pseudorandom numbers as attested by standard statistical testing tools and runs at a speed close to half clock cycle per byte on an Intel Core i7 processor. With a large state space of 10520 bits, MaD4 has an expected period length around 1.00e+1783. It is designed to resist various known cryptographic attacks and withstand state compromise extension attacks as well.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.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

Notes

  1. 1.

    Seed and key are used interchangeably in this paper.

  2. 2.

    The Electronic Code Book (ECB) mode is used in the performance testing of AES. This is not a recommended mode due to its security weaknesses, but it is the simplest and the fastest mode, which enables us to find the upper limit of the speed of AES.

References

  1. Barker, E., Kelsey, J.: Recommendation for Random Number Generation Using Deterministic Random Bit Generators. National Institute of Standards and Technology (2012). NIST Special Publication 800-90A

    Google Scholar 

  2. Berbain, C., et al.: Sosemanuk, a fast software-oriented stream cipher. In: Robshaw, M., Billet, O. (eds.) New Stream Cipher Designs. LNCS, vol. 4986, pp. 98–118. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68351-3_9

    Chapter  Google Scholar 

  3. Bernstein, D.J.: Salsa20/8 and Salsa20/12. eSTREAM, ECRYPT Stream Cipher Project (2006)

    Google Scholar 

  4. Bernstein, D.J., et al.: Chacha, a variant of salsa20. In: Workshop Record of SASC, vol. 8, pp. 3–5 (2008)

    Google Scholar 

  5. Biham, E., Dunkelman, O.: Differential cryptanalysis in stream ciphers. IACR Cryptology ePrint Archive 2007, p. 218 (2007)

    Google Scholar 

  6. Biryukov, A., Shamir, A.: Cryptanalytic time/memory/data tradeoffs for stream ciphers. In: Okamoto, T. (ed.) ASIACRYPT 2000. LNCS, vol. 1976, pp. 1–13. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44448-3_1

    Chapter  Google Scholar 

  7. Blum, M., Micali, S.: How to generate cryptographically strong sequences of pseudo random bits. In: Foundations of Computer Science, 1982, 23rd Annual Symposium on Foundations of Computer Science, pp. 112–117. IEEE (1982)

    Google Scholar 

  8. Boesgaard, M., Vesterager, M., Christensen, T., Zenner, E.: The stream cipher Rabbit. ECRYPT Stream Cipher Project Report 6 (2005)

    Google Scholar 

  9. Chardin, T., Fouque, P.-A., Leresteux, D.: Cache timing analysis of RC4. In: Lopez, J., Tsudik, G. (eds.) ACNS 2011. LNCS, vol. 6715, pp. 110–129. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21554-4_7

    Chapter  Google Scholar 

  10. Chen, K., et al.: Dragon: a fast word based stream cipher. In: Park, C., Chee, S. (eds.) ICISC 2004. LNCS, vol. 3506, pp. 33–50. Springer, Heidelberg (2005). https://doi.org/10.1007/11496618_5

    Chapter  Google Scholar 

  11. Coppersmith, D., Halevi, S., Jutla, C.: Cryptanalysis of stream ciphers with linear masking. In: Yung, M. (ed.) CRYPTO 2002. LNCS, vol. 2442, pp. 515–532. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45708-9_33

    Chapter  Google Scholar 

  12. Fog, A.: Instruction tables: lists of instruction latencies, throughputs and micro-operation breakdowns for Intel, AMD and VIA CPUs. Copenhagen University College of Engineering (2011). http://www.agner.org/optimize/instruction_tables.pdf

  13. Grosul, A.L., Wallach, D.S.: A related-key cryptanalysis of RC4. Technical report TR-00-358, Department of Computer Science, Rice University (2000)

    Google Scholar 

  14. Hernandez, J., Sierra, J., Mex-Perera, C., Borrajo, D., Ribagorda, A., Isasi, P.: Using the general next bit predictor like an evaluation criteria. In: Proceedings of NESSIE Workshop (2000)

    Google Scholar 

  15. Jenkins, R.J.: ISAAC. In: Gollmann, D. (ed.) FSE 1996. LNCS, vol. 1039, pp. 41–49. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-60865-6_41

    Chapter  Google Scholar 

  16. Knuth, D.E.: The Art of Computer Programming: Seminumerical Algorithms, 3rd edn, vol. 2. Addison Wesley Longman, Boston (1998)

    Google Scholar 

  17. Lavasani, A., Eghlidos, T.: Practical next bit test for evaluating pseudorandom sequences. Electr. Eng. 16(1), 19–33 (2009)

    MATH  Google Scholar 

  18. L’Ecuyer, P., Simard, R.: Testu01: a C library for empirical testing of random number generators. ACM Trans. Math. Softw. (TOMS) 33(4), 22 (2007)

    MathSciNet  MATH  Google Scholar 

  19. Lee, J.-K., Lee, D.H., Park, S.: Cryptanalysis of Sosemanuk and SNOW 2.0 using linear masks. In: Pieprzyk, J. (ed.) ASIACRYPT 2008. LNCS, vol. 5350, pp. 524–538. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-89255-7_32

    Chapter  Google Scholar 

  20. Leitner, F.: Source code optimization (2009). http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf

  21. Li, J.: Ultrafast pseudorandom number generation using pseudorandom permutations and mappings. Dissertation, City University of New York, ProQuest/UMI (2013). publication No. 3601931

    Google Scholar 

  22. Mantin, I.: A practical attack on the fixed RC4 in the WEP mode. In: Roy, B. (ed.) ASIACRYPT 2005. LNCS, vol. 3788, pp. 395–411. Springer, Heidelberg (2005). https://doi.org/10.1007/11593447_21

    Chapter  MATH  Google Scholar 

  23. Marsaglia, G.: The Marsaglia random number CDROM including the Diehard battery of tests of randomness (1995). New version http://www.csis.hku.hk/diehard/

  24. Marsaglia, G., Tsang, W.W.: Some difficult-to-pass tests of randomness. J. Stat. Softw. 7(3), 1–9 (2002)

    Article  Google Scholar 

  25. National Institute of Standards and Technology: Advanced encryption standard (AES) (2001). Federal Information Processing Standards Publication 197

    Google Scholar 

  26. Nyberg, K., Wallén, J.: Improved linear distinguishers for SNOW 2.0. In: Robshaw, M. (ed.) FSE 2006. LNCS, vol. 4047, pp. 144–162. Springer, Heidelberg (2006). https://doi.org/10.1007/11799313_10

    Chapter  Google Scholar 

  27. Rukhin, A., Soto, J., Nechvatal, J., et al.: A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications. National Institute of Standards and Technology (2001). NIST special publication 800–22

    Google Scholar 

  28. Sadeghiyan, B., Mohajeri, J.: A new universal test for bit strings. In: Pieprzyk, J., Seberry, J. (eds.) ACISP 1996. LNCS, vol. 1172, pp. 311–319. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0023309

    Chapter  Google Scholar 

  29. Schneier, B.: Applied Cryptography. Protocols, Algorithms, and Source Code in C. Wiley, New York (1996)

    MATH  Google Scholar 

  30. Schrift, A.W., Shamir, A.: Universal tests for nonuniform distributions. J. Cryptol. 6(3), 119–133 (1993). https://doi.org/10.1007/BF00198461

    Article  MathSciNet  MATH  Google Scholar 

  31. Watanabe, D., Biryukov, A., De Cannière, C.: A distinguishing attack of SNOW 2.0 with linear masking method. In: Matsui, M., Zuccherato, R.J. (eds.) SAC 2003. LNCS, vol. 3006, pp. 222–233. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24654-1_16

    Chapter  Google Scholar 

  32. Webster, A.F., Tavares, S.E.: On the design of S-boxes. In: Williams, H.C. (ed.) CRYPTO 1985. LNCS, vol. 218, pp. 523–534. Springer, Heidelberg (1986). https://doi.org/10.1007/3-540-39799-X_41

    Chapter  Google Scholar 

  33. Wu, H.: The stream cipher HC-128. In: Robshaw, M., Billet, O. (eds.) New Stream Cipher Designs. LNCS, vol. 4986, pp. 39–47. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68351-3_4

    Chapter  Google Scholar 

  34. Yao, A.C.: Theory and application of trapdoor functions. In: Foundations of Computer Science, 1982, 23rd Annual Symposium on Foundations of Computer Science, pp. 80–91. IEEE (1982)

    Google Scholar 

  35. Zheng, J., Li, J.: MARC: modified ARC4. In: Garcia-Alfaro, J., Cuppens, F., Cuppens-Boulahia, N., Miri, A., Tawbi, N. (eds.) FPS 2012. LNCS, vol. 7743, pp. 33–44. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37119-6_3

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jianliang Zheng .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 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

Zheng, J., Li, J. (2023). An Ultrafast Cryptographically Secure Pseudorandom Number Generator. In: Seo, SH., Seo, H. (eds) Information Security and Cryptology – ICISC 2022. ICISC 2022. Lecture Notes in Computer Science, vol 13849. Springer, Cham. https://doi.org/10.1007/978-3-031-29371-9_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-29371-9_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-29370-2

  • Online ISBN: 978-3-031-29371-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics