Cryptographically Secured Pseudo-Random Number Generators: Analysis and Testing with NIST Statistical Test Suite
Abstract
:1. Introduction
2. Classification of Random Numbers
- Physical generators (true random number generators, TRNGs) are physical devices that use external sources to generate random numbers. The more widely generators used are based on electrical circuits equipped with a noise source that is amplified, sampled, and compared with a reference signal to produce sequences of bits. These random bits are joined together to form bytes, integers, or real numbers as required. The output sequences of TRNGs can be used directly as random sequences or can be used as input to a pseudo-random number generator.
- Arithmetic generators (pseudo-random number generators, PRNGs): these are deterministic algorithms that run on computers. There are two main sub-types, linear and nonlinear.
3. Key Aspects of Pseudo-Random Number Generators
4. Description of Cryptographically Secure Pseudo-Random Number Generators
4.1. Blum–Blum–Shub (BBS) Generator
- states that s has been randomly chosen from the set S.
- N is a Blum integer, (i.e., , where p and q are prime and verify ).
- n is the size in bits of N.
- is the set of Jacobi’s integers symbol +1 modulus N (The Jacobi’s symbol is an arithmetic function that takes two arguments and returns an integer value from the interval [−1,1]. In [55], a more detailed definition and the way to obtain these integers can be seen).
- .
- , .
- y denotes the smallest residue in absolute value of y modulus N.
- denotes the i-th least significant bit of y, .
- , referred to as the absolute of Rabin’s function (Rabin’s function [56] is a public-key cryptosystem whose decryption is equivalent to factorization).
- Update as follows: , where .
- Extract the bit .
- For , consider .
- Update as follows: .
4.2. LFSR Generators
4.3. /dev/random Generator
4.4. AES Generator
- SubBytes transformation: it is a byte substitution using a two-dimensional, nonlinear, invertible matrix, called S-box. The construction of the matrix is made in two steps:
- The inverse of each byte is obtained, the element is assigned to itself.
- The following transformation is applied in :
Once the matrix is obtained, the byte of the status array is replaced by the corresponding byte in the S-box matrix. - ShiftRows transformation: the last three status rows are moved, and the first row remains unchanged. The transformation is:
- MixColumns transformation: in this step, the state columns are multiplied by an invertible polynomial of the form:Specifically, the polynomial used in the AES algorithm is:
- AddRoundKey transformation: a RoundKey is added to the state. RoundKeys are extracted from the key and stored in a linear array of dimension (). The first four words (a word is a group of 32 bits that are treated as a single element or as a 4-byte array) of the array are equal to that of the key, and the remaining ones are generated by the S-box matrix and multiplying by , where and .
4.5. Yarrow Generator
- The entropy accumulator computes the hash function of the inputs to the fast pool; let be this result.
- Determine for , where h is the hash function.
- Update the key: , where first k bits of .
- is updated, where is a triple-DES (data encryption standard) algorithm (algorithms are methods for encrypting information, and the triple-DES variant is more secure to attacks). A construction of these algorithms and how they differ from the basic DES can be seen in [70]).
4.6. Fortuna Generator
- Initialization: both the key and the counter are set to 0, indicating that the generator has not yet been updated.
- Update: in this operation, the internal state is updated with a new string. A hash function is used to update the key, performing an exhaustive mix of the input string together with the existing key. The counter is also incremented by one unit, in this case a 16-byte integer.
- Block generation: a number of blocks with random output are generated using AES encryption with the key and the counter. This operation has an initial condition in which it is determined if the counter is non-zero to use the encryption algorithm. The output of this part is 16-byte blocks.
- Generate random data: a pseudo-random byte string with the length required by the user is obtained. To reduce the statistical deviation with respect to a truly random output, the length of the output string is limited to . Once the output is obtained, the key is modified with the block generating operation, and a 32-byte key is obtained.
4.7. Trifork Generator
4.8. Trit Generators
- The internal state of the vector, U, is initialized. Using vector initialization and in the secret key , it is considered:
- The sequence is generated progressively, , where are the parts of the generated sequence.
- (a)
- To generate each of the , the following steps are executed:
- New values for .
- New values for .
- New values for .
- New values for .
- (b)
- The vectors y are concatenated, obtaining .
- For the case of the NIST STS, 100 sequences consisting of trits from each generator were simulated. Subsequently, these terns are converted to bits and the test is applied. In this case, the TritGen generator failed the test most of the time. The authors conclude that the standard bit sequence tests do not work properly in evaluating the trit sequences.
- In the test modified by the authors, five sequences of trits were obtained in each generator. In this case, the TritGen generator showed better results than the C++ generator.
Algorithm 1 Pseudo-code TriGen v.2.0 [73] |
|
5. Experimental Analysis
5.1. Materials and Methodology
- Significance level (): 0.01;
- Size of the block in the frequency test within a block: 128;
- Size of the length in bits of each template in the non-overlapping template matching test: 9;
- Length in bits of the template in the overlapping template matching test: 9;
- The length of each block in the approximate entropy test: 10;
- The length in bits of each block in the serial test: 16;
- The length in bits of a block in the linear complexity test: 500;
- Maximum number of templates: 40.
5.2. Results
6. Conclusions
- The Blum–Blum–Shub generator passed the NIST test suite with solvency, both in randomness and in the uniform distribution. In computational terms, it performed well, being a good pseudo-random number generator for cryptographic applications.
- Generators based on linear feedback shift register (LFSR), such as the Shrinkage generator, Self-Shrinkage generator and Alternating Step generator (ASG) were the slowest in computational terms among the generators analyzed. As for the application of the test battery, they have managed to pass the tests, although in the case of the Shrinkage and Self-Shrinkage generators, some tests were not passed due to the proportion of sequences necessary to be considered acceptable. Even so, it is concluded that with these generators, random sequences with uniform distribution are obtained, and these generators are suitable for the field of cryptography.
- The /dev/random generator, the one used in the Linux system, is the fastest in computational terms. This may be due to a higher optimization in its processes. In the test results, it was able to pass all of them with flying colors, both in terms of randomness and in terms of the uniform distribution. All this makes this generator suitable for the generation of cryptographically secure pseudo-random numbers.
- The AES generator obtained good results in both tests and computational cost. In the latter, it is the fastest of the algorithms implemented in R. Randomness and uniform distribution have been verified, making this generator suitable for cryptography.
- In the case of the Sober-128 generator, the execution time was reduced. Even so, the results of the test battery were satisfactory in both randomness and uniform distribution of the generated sequences. This makes this algorithm suitable for the generation of cryptographically secure pseudo-random numbers.
- Both the Yarrow generator and its predecessor, Fortuna, performed well in computational terms, the latter being slightly better. As for the results of the battery of tests, both algorithms managed to pass them with solvency; however, in the case of the Yarrow generator, it is the case that in a comparison test of non-overlapping templates, the proportion of accepted sequences was not sufficient. In spite of this, it is concluded that both generators yield random sequences with uniform distribution. In view of the results, it would be better to use the Fortuna generator for the generation of random numbers in cryptography.
- The Trifork generator, based on the delayed Fibonacci generators, obtained good results in the battery of tests, having in all of them an acceptance rate within the defined confidence interval. In computational terms, the result is satisfactory, so it can be concluded that this generator is suitable for the generation of secure pseudo-random numbers for cryptography.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A. Codes
References
- Chen, I.T.; Tsai, J.M.; Tzeng, J. Audio random number generator and its application. In Proceedings of the 2011 International Conference on Machine Learning and Cybernetics, Guilin, China, 10–13 July 2011; Volume 4, pp. 1678–1683. [Google Scholar]
- Dhaou, I.B.; Skhiri, H.; Tenhunen, H. Study and Implementation of a Secure Random Number Generator for DSRC Devices. In Proceedings of the 2017 9th IEEE-GCC Conference and Exhibition (GCCCE), Manama, Bahrain, 8–11 May 2017; pp. 1–9. [Google Scholar]
- Nguyen-Duc, A.; Viet Do, M.; Quan, L.; Nguyen Khac, K.; Nguyen Quang, A. On the adoption of static analysis for software security assessment-A case study of an open-source e-government project. Comput. Secur. 2021, 111, 102470. [Google Scholar] [CrossRef]
- Choi, J. Physical Layer Security for Channel-Aware Random Access with Opportunistic Jamming. IEEE Trans. Inf. Forensics Secur. 2017, 12, 2699–2711. [Google Scholar] [CrossRef]
- Tang, J.; Jiao, L.; Zeng, K.; Wen, H.; Qin, K.Y. Physical Layer Secure MIMO Communications Against Eavesdroppers with Arbitrary Number of Antennas. IEEE Trans. Inf. Forensics Secur. 2021, 16, 466–481. [Google Scholar] [CrossRef]
- Gedam, S.; Beaudet, S. Monte Carlo simulation using Excel(R) spreadsheet for predicting reliability of a complex system. In Proceedings of the Annual Reliability and Maintainability Symposium, 2000 Proceedings, International Symposium on Product Quality and Integrity (Cat. No.00CH37055), Los Angeles, CA, USA, 24–27 January 2000; pp. 188–193. [Google Scholar]
- Gergely, A.M.; Crainicu, B. A succinct survey on (Pseudo)-random number generators from a cryptographic perspective. In Proceedings of the 2017 5th International Symposium on Digital Forensic and Security (ISDFS), Tirgu Mures, Romania, 26–28 April 2017; Volume 42, pp. 1–6. [Google Scholar]
- Wang, P.; You, F.; He, S. Design of Broadband Compressed Sampling Receiver Based on Concurrent Alternate Random Sequences. IEEE Access 2019, 7, 135525–135538. [Google Scholar] [CrossRef]
- Benedetti, R.; Andreano, M.S.; Piersimoni, F. Sample selection when a multivariate set of size measures is available. Stat. Methods Appl. 2019, 28, 1–25. [Google Scholar] [CrossRef]
- D’Ovidio, M.; Polito, F. Discussion on the paper “On simulation and properties of the stable law” by L. Devroye and L. James. Stat. Methods Appl. 2014, 23, 359–363. [Google Scholar] [CrossRef]
- 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. SP 800-22 Rev. 1a; A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; National Institute of Standards & Technology: Gaithersburg, MD, USA, 2010. [Google Scholar]
- Tuncer, T.; Avaroglu, E. Random number generation with LFSR based stream cipher algorithms. In Proceedings of the 2017 40th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 22–26 May 2017; Volume 42, pp. 171–175. [Google Scholar]
- Marsaglia, G.; Zaman, A. A new class of random number generators. Ann. Appl. Probab. 1991, 1, 462–480. [Google Scholar] [CrossRef]
- Warnock, T. Random-number generators. Los Alamos Sci. 1987, 15, 137–141. [Google Scholar]
- Rubinstein, R.Y.; Kroese, D.P. Simulation and the Monte Carlo Method, 3rd ed.; John Wiley & Sons: Hoboken, NJ, USA, 2016. [Google Scholar]
- Altiok, T.; Melamed, B. Simulation Modeling and Analysis with ARENA; Elsevier: Amsterdam, The Netherlands, 2007. [Google Scholar]
- Barak, B.; Shaltiel, R.; Tromer, E. True Random Number Generators Secure in a Changing Environment. In Cryptographic Hardware and Embedded Systems, Proceedings of the Cryptographic Hardware and Embedded Systems-CHES 2003, Cologne, Germany, 8–10 September 2003; Walter, C.D., Koç, Ç.K., Paar, C., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2003; Volume 2779, pp. 166–180. [Google Scholar]
- Sunar, B. True random number generators for cryptography. In Cryptographic Engineering; Springer: Berlin/Heidelberg, Germany, 2009; pp. 55–73. [Google Scholar]
- Almaraz Luengo, E. A brief and understandable guide to pseudo-random number generators and specific models for security. Stat. Surv. 2022, 16, 137–181. [Google Scholar] [CrossRef]
- Santha, M.; Vazirani, U.M. Generating quasi-random sequences from semi-random sources. J. Comput. Syst. Sci. 1986, 33, 75–87. [Google Scholar] [CrossRef]
- Niederreiter, H. Random Number Generation and Quasi-Monte Carlo Methods; SIAM: Philadelphia, PA, USA, 1992. [Google Scholar]
- Chaitin, G.J. On the length of programs for computing finite binary sequences. J. ACM 1966, 13, 547–569. [Google Scholar] [CrossRef]
- Schindler, W. Random number generators for cryptographic applications. In Cryptographic Engineering; Koç, K.E., Ed.; Springer: Boston, MA, USA, 2009; pp. 5–23. [Google Scholar]
- ISO/IEC 18031:2011; Information Technology. International Organization for Standardization: Geneva, Switzerland, 2011. Available online: https://www.iso.org/standard/54945.html (accessed on 1 January 2022).
- Marsaglia, G. The Marsaglia Random Number CDROM Including the Diehard Battery of Tests of Randomness. 1995. Available online: https://web.archive.org/web/20160220101002/http://stat.fsu.edu/pub/diehard/ (accessed on 1 January 2022).
- Brown, R.G.; Eddelbuettel, D.; Bauer, D. Dieharder: A Random Number Test Suite (Version 3.31.1). 2014. Available online: https://webhome.phy.duke.edu/~rgb/General/dieharder.php (accessed on 1 January 2022).
- Practically Random: C++ Library of Statistical Tests for Rngs. 2010. Available online: https://sourceforge.net/projects/pracrand (accessed on 1 January 2022).
- Walker, J. ENT: A Pseudorandom Number Sequence Test Program. 2008. Available online: https://www.fourmilab.ch/random/ (accessed on 1 January 2022).
- FIPS PUB 140-2; Security Requirements for Cryptographic Modules Share to Facebook. National Institute of Standards and Technology (NIST): Gaithersburg, MD, USA, 2001. Available online: https://csrc.nist.gov/publications/detail/fips/140/2/final (accessed on 1 January 2022).
- FIPS 140-3; Security Requirements for Cryptographic Modules. National Institute of Standards and Technology (NIST): Gaithersburg, MD, USA, 2019.
- Almaraz Luengo, E.; Leiva, M.; García Villalba, L.J.; Hernandez-Castro, J.; Hurley-Smith, D. Critical Analysis of Hypothesis Tests in Federal Information Processing Standard (140-2). Entropy 2022, 24, 613. [Google Scholar] [CrossRef]
- Almaraz Luengo, E.; Alaña, B.; García Villalba, L.J.; Hernandez-Castro, J. Weaknesses in ENT Battery Design. Appl. Sci. 2022, 12, 4230. [Google Scholar] [CrossRef]
- Almaraz Luengo, E.; García Villalba, L.J. Recommendations on Statistical Randomness Test Batteries for Cryptographic Purposes. ACM Comput. Surv. 2021, 54, 1–34. [Google Scholar] [CrossRef]
- Almaraz Luengo, E.; Leiva, M.; García Villalba, L.J.; Hurley-Smith, D.; Hernandez-Castro, J. Sensitivity and uniformity in statistical randomness tests. J. Inf. Secur. Appl. 2022, 70, 103322. [Google Scholar] [CrossRef]
- Ryabko, B. Time-adaptive statistical test for random number generators. Entropy 2020, 22, 630. [Google Scholar] [CrossRef]
- Simion, E. Entropy and Randomness: From Analogic to Quantum World. IEEE Access 2020, 8, 74553–74561. [Google Scholar] [CrossRef]
- Demirhan, H.; Bitirim, N. Statistical Testing of Cryptographic Randomness. J. Stat. Stat. Actuar. Sci. 2016, 9, 1–11. [Google Scholar]
- Crocetti, L.; Nannipieri, P.; Di Matteo, S.; Fanucci, L.; Saponara, S. Review of Methodologies and Metrics for Assessing the Quality of Random Number Generators. Electronics 2023, 12, 723. [Google Scholar] [CrossRef]
- Dodis, Y.; Pointcheval, D.; Ruhault, S.; Vergniaud, D.; Wichs, D. Security analysis of pseudo-random number generators with input: /dev/random is not robust. In CCS’13, Proceedings of the 2013 ACM SIGSAC Conference on Computer and Communications Security, Berlin, Germany, 4–8 November 2013; Association for Computing Machinery: New York, NY, USA, 2013; Volume 42, pp. 647–658. [Google Scholar]
- Dodis, Y.; Shamir, A.; Stephens-Davidowitz, N.; Wichs, D. How to Eat Your Entropy and Have It Too-Optimal Recovery Strategies for Compromised RNGs. In Advances in Cryptology-CRYPTO; Lecture Notes in Computer Science; Garay, J.A., Gennaro, R.E., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 37–54. [Google Scholar]
- Abdalla, M.; Belaïd, S.; Pointcheval, D.; Ruhault, S.; Vergnaud, D. Robust Pseudo-Random Number Generators with Input Secure Against Side-Channel Attacks, 2015. Cryptology ePrint Archive, Report 2015/1219. Available online: https://eprint.iacr.org/2015/1219 (accessed on 1 January 2022).
- Kelsey, J.; Schneier, B.; Wagner, D.; Hall, C. Cryptanalytic attacks on pseudorandom number generators. In Fast Software Encryption; Lecture Notes in Computer Science; Vaudenay, S.E., Ed.; Springer: Berlin/Heidelberg, Germany, 1998; Volume 1372, pp. 168–188. [Google Scholar]
- Kelsey, K.; Schneier, B.; Ferguson, N. Yarrow-160: Notes on the design and analysis of the yarrow cryptographic pseudorandom number generator. In Selected Areas in Cryptography; Lecture Notes in Computer Science; Heys, H., Adams, C.E., Eds.; Springer: Berlin/Heidelberg, Germany, 1999; Volume 1758, pp. 13–33. [Google Scholar]
- Shamir, A. On the generation of Cryptographically Strong Pseudorandom Sequences. ACM Trans. Comput. Syst. 1983, 1, 38–44. [Google Scholar] [CrossRef]
- Rivest, R.; Shamir, A.; Adleman, L. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef]
- Micali, S.; Schnorr, C.P. Efficient, perfect polynomial random number generator. J. Cryptol. 1991, 3, 157–172. [Google Scholar] [CrossRef]
- Blum, L.; Blum, M.; Shub, M. A simple unpredictablepseudorandom numbergenerator. SIAM J. Comput. 1986, 15, 364–383. [Google Scholar] [CrossRef]
- Anyanwu, N.; Deng, L.Y.; Dasgupta Dipankar, D. Design of Cryptographically Strong generator By Transforming Linearly Generated Sequences. Int. J. Comput. Sci. Secur. 2009, 3, 186–200. [Google Scholar]
- Deng, L.Y.; Xu, H.Q. A System of High-dimensional, Efficient, Long-cycle and Portable Uniform Random Number Generators. ACM Trans. Model. Comput. Simul. 2003, 13, 299–309. [Google Scholar] [CrossRef]
- Ãzkaynak, F. Cryptographically secure random number generator with chaotic additional input. Nonlinear Dyn. 2014, 78, 2015–2020. [Google Scholar] [CrossRef]
- Vajargah, B.F.; Asghari, R. A Novel Pseudo-Random Number Generator for Cryptographic Applications. Indian J. Sci. Technol. 2016, 9, 1–5. [Google Scholar] [CrossRef]
- Vajargah, B.F.; Asghari, R. A pseudo random number generator based on chaotic henon map (CHCG). Int. J. Mechatron. Electr. Comput. Technol. 2015, 5, 2120–2129. [Google Scholar]
- Williams, B.; Hiromoto, R.E.; Carlson, A. A Design for a Cryptographically Secure Pseudo Random Number Generator. In Proceedings of the 2019 10th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications (IDAACS), Metz, France, 18–21 September 2019; Volume 2, pp. 864–869. [Google Scholar] [CrossRef]
- Sidorenko, A.; Schoenmakers, B. Concrete security of the Blum-Blum-Shub pseudorandom generator. In Cryptography and Coding; Lecture Notes in Computer Science; Smart, N.P., Ed.; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3796, pp. 355–375. [Google Scholar]
- Rousseau, G. On the Jacobi symbol. J. Number Theory 1994, 48, 109–111. [Google Scholar] [CrossRef]
- Rabin, M.O. Digitalized Signatures and Public-Key Functions as Intractable as Factorization; Technical Report; Massachusetts Institute of Technology: Cambridge, MA, USA, 1979. [Google Scholar]
- Tibouchi, M. Security Reduction. Encyclopedia of Cryptography and Security; van Tilborg, H.C.A., Jajodia, S.E., Eds.; Springer: Boston, MA, USA, 2011; Volume 42, pp. 1167–1168. [Google Scholar]
- Fischlin, R.; Schnorr, C.P. Stronger security proofs for RSA and Rabin bits. J. Cryptol. 2000, 13, 221–244. [Google Scholar] [CrossRef]
- Vazirani, U.V.; Vazirani, V.V. Efficient and secure pseudo-random number generation. In Advances in Cryptology—CRYPTO 1984, Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 19–22 August 1984; Lecture Notes in Computer Science; Blakley, G.R., Chaum, D.E., Eds.; Springer: Berlin/Heidelberg, Germany, 1984; Volume 196, pp. 193–202. [Google Scholar]
- Coppersmith, D.; Krawczyk, H.; Mansour, Y. The shrinking generator. In Advances in Cryptology—CRYPTO’93, Proceedings of the 13th Annual International Cryptology Conference, Santa Barbara, CA, USA, 22–26 August 1993; Stinson, D.R., Ed.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1994; Volume 773, pp. 22–39. [Google Scholar]
- Meier, W.; Staffelbach, O. The self-shrinking generator. Advances in Cryptology—EUROCRYPT’94, Proceedings of the Workshop on the Theory and Application of Cryptographic Techniques, Perugia, Italy, 9–12 May 1994; Lecture Notes in Computer Science; De Santis, A.E., Ed.; Springer: Berlin/Heidelberg, Germany, 1994; Volume 950, pp. 287–295. [Google Scholar]
- Ganther, C.G. Alternating step generators controlled by de Bruijn sequences. In Advances in Cryptology—EUROCRYPT’87, Proceedings of the Workshop on the Theory and Application of Cryptographic Techniques, Amsterdam, The Netherlands, 13–15 April 1987; Lecture Notes in Computer, Science; Chaum, D., Price, W.L.E., Eds.; Springer: Berlin/Heidelberg, Germany, 1988; Volume 304, pp. 5–14. [Google Scholar]
- Melia-Segua, J.; Garca-Alfaro, J.; Herrera-Joancomarta, J. J3Gen: A PRNG for low-cost passive RFID. Sensors 2013, 13, 3816–3830. [Google Scholar] [CrossRef] [PubMed]
- Zhang, H.; Wang, Y.; Wang, B.; Wu, X. Evolutionary random sequence generators based on LFSR. Wuhan Univ. J. Nat. Sci. 2007, 12, 75–78. [Google Scholar] [CrossRef]
- Che, W.; Deng, H.; Tan, W.; Wang, J. A random number generator for application in RFID tags. In Networked RFID Systems and Lightweight Cryptography: Raising Barriers to Product Counterfeiting; Cole, P., Ranasinghe, D., Eds.; Springer: Berlin/Heidelberg, Germany, 2008; pp. 279–287. [Google Scholar]
- Röck, A. Pseudorandom Number Generators for Cryptographic Applications. Master’s Thesis, Faculty of Natural Sciences, Paris-Lodron University, Salzburg, France, 2005. [Google Scholar]
- 197; Advanced Encryption Standard (AES). Federal Information Processing Standards Publication: Gaithersburg, MD, USA, 2001.
- Daemen, J.; Rijmen, V. The Design of Rijndael; Springer: New York, NY, USA, 2002; Volume 2. [Google Scholar]
- Rhee, M.Y. Internet Security Cryptographic Principles, Algorithms and Protocols; John Wiley & Sons: Hoboken, NJ, USA, 2003. [Google Scholar]
- Coppersmith, D.; Johnson, D.B.; Matyas, S.M. A proposed mode for triple-DES encryption. IBM J. Res. Dev. 1995, 40, 253–262. [Google Scholar] [CrossRef]
- Ferguson, N.; Schneier, B. Practical Cryptography; Practical Cryptography: Indianapolis, IN, USA, 2003; Volume 141, pp. 161–184. [Google Scholar]
- Orue, A.B.; Montoya, F.; Hernandez Encinas, L. Trifork, a new pseudorandom number generator based on lagged Fibonacci maps. J. Comput. Sci. Eng. 2010, 2, 46–51. [Google Scholar]
- Hu, Z.; Gnatyuk, S.; Okhrimenko, T.; Tynymbayev, S.; Iavich, M. High-Speed and Secure PRNG for Cryptographic Applications. Int. J. Comput. Netw. Inf. Secur. 2020, 12, 1–10. [Google Scholar] [CrossRef]
- Ali, A.; Ali, E.; Ahsan Habib, M.; Nadim, M.; Kusaka, T.; Nogami, Y. Pseudo random ternary sequence and its autocorrelation property over finite field. Int. J. Comput. Netw. Inf. Secur. 2017, 11, 54–63. [Google Scholar] [CrossRef]
Generator | Characteristics | Statistical Properties | Security Parameters |
---|---|---|---|
BBS |
|
|
|
LFSR |
|
|
|
/dev/random |
|
|
|
AES |
|
|
|
Yarrow |
|
|
|
Fortuna |
|
|
|
Trifork |
|
|
|
Generator | Time (In Seconds) |
---|---|
BBS | 37.15 |
Shrinkage | 88.7 |
Self-Shrinkage | 85.62 |
ASG | 61.42 |
/dev/random | 2.88 |
AES | 5.03 |
Sober-128 | 3.84 |
Yarrow | 3.56 |
Fortuna | 3.16 |
Trifork | 58.42 |
Generator | Pros | Cons |
---|---|---|
Conceptually simple | Special conditions are required for the parameters | |
BBS | Easy implementation in any environment | Slow running |
If the seed is guessed, all the outputs are known | ||
Simple and easy to understand design | High computational cost | |
LFSR | Fast implementation in computational terms | Weak linear algorithm against initial state recovery attacks |
Easy to include in other generators | Vulnerable to some attacks if not combined with other generators | |
Computationally efficient | Slow in low entropy contexts | |
/dev/random | Optimally implemented in Linux | Dependent on entropy quality |
Secure against various cryptographic attacks | ||
AES | Simple implementation if the necessary packages are available in the programming language | Complex design |
Fast execution | Weak if internal condition is compromised | |
Secure against several cryptographic attacks | ||
Implemented in Linux | Conceptually complex | |
Sober-128 | Fixes shortcomings of LFSR generators | Vulnerable to attack if LFSR generator is known |
Not vulnerable to algebraic attacks and key attacks | ||
Yarrow | Secure against iterative and backtracking attacks | Complex design |
Implemented in Linux | Entropy estimators need to be defined | |
Implemented in Linux | Complex implementation depending on the programming environment | |
Fortuna | Solves the problem of entropy estimators | The seed control file can cause memory problems |
Computationally efficient | ||
Fast and easy implementation | Conceptually complicated if no previous knowledge is present | |
Trifork | Corrects deficiencies of delayed Fibonacci generators | Slow running |
Can be used in other generators |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 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
Almaraz Luengo, E.; Román Villaizán, J. Cryptographically Secured Pseudo-Random Number Generators: Analysis and Testing with NIST Statistical Test Suite. Mathematics 2023, 11, 4812. https://doi.org/10.3390/math11234812
Almaraz Luengo E, Román Villaizán J. Cryptographically Secured Pseudo-Random Number Generators: Analysis and Testing with NIST Statistical Test Suite. Mathematics. 2023; 11(23):4812. https://doi.org/10.3390/math11234812
Chicago/Turabian StyleAlmaraz Luengo, Elena, and Javier Román Villaizán. 2023. "Cryptographically Secured Pseudo-Random Number Generators: Analysis and Testing with NIST Statistical Test Suite" Mathematics 11, no. 23: 4812. https://doi.org/10.3390/math11234812
APA StyleAlmaraz Luengo, E., & Román Villaizán, J. (2023). Cryptographically Secured Pseudo-Random Number Generators: Analysis and Testing with NIST Statistical Test Suite. Mathematics, 11(23), 4812. https://doi.org/10.3390/math11234812