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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Seed and key are used interchangeably in this paper.
- 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
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
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
Bernstein, D.J.: Salsa20/8 and Salsa20/12. eSTREAM, ECRYPT Stream Cipher Project (2006)
Bernstein, D.J., et al.: Chacha, a variant of salsa20. In: Workshop Record of SASC, vol. 8, pp. 3–5 (2008)
Biham, E., Dunkelman, O.: Differential cryptanalysis in stream ciphers. IACR Cryptology ePrint Archive 2007, p. 218 (2007)
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
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)
Boesgaard, M., Vesterager, M., Christensen, T., Zenner, E.: The stream cipher Rabbit. ECRYPT Stream Cipher Project Report 6 (2005)
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
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
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
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
Grosul, A.L., Wallach, D.S.: A related-key cryptanalysis of RC4. Technical report TR-00-358, Department of Computer Science, Rice University (2000)
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)
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
Knuth, D.E.: The Art of Computer Programming: Seminumerical Algorithms, 3rd edn, vol. 2. Addison Wesley Longman, Boston (1998)
Lavasani, A., Eghlidos, T.: Practical next bit test for evaluating pseudorandom sequences. Electr. Eng. 16(1), 19–33 (2009)
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)
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
Leitner, F.: Source code optimization (2009). http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf
Li, J.: Ultrafast pseudorandom number generation using pseudorandom permutations and mappings. Dissertation, City University of New York, ProQuest/UMI (2013). publication No. 3601931
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
Marsaglia, G.: The Marsaglia random number CDROM including the Diehard battery of tests of randomness (1995). New version http://www.csis.hku.hk/diehard/
Marsaglia, G., Tsang, W.W.: Some difficult-to-pass tests of randomness. J. Stat. Softw. 7(3), 1–9 (2002)
National Institute of Standards and Technology: Advanced encryption standard (AES) (2001). Federal Information Processing Standards Publication 197
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
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
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
Schneier, B.: Applied Cryptography. Protocols, Algorithms, and Source Code in C. Wiley, New York (1996)
Schrift, A.W., Shamir, A.: Universal tests for nonuniform distributions. J. Cryptol. 6(3), 119–133 (1993). https://doi.org/10.1007/BF00198461
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
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
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
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)
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
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)