On the design of a family of CI pseudo-random number generators

On the design of a family of CI pseudo-random number generators


Chaos and its applications in the field of secure communications have attracted a lot of attention. Chaos-based pseudo-random number generators are critical to guarantee security over open networks as the Internet. We have previously demonstrated that it is possible to define such generators with good statistical properties by using a tool called “chaotic iterations”, which depends on an iteration function. An approach to find update functions such that the associated generator presents a random-like and chaotic behavior is proposed in this research work. To do so, we use the vectorial Boolean negation as a prototype and explain how to modify this iteration function without deflating the good properties of the associated generator. Simulation results and basic security analysis are then presented to evaluate the randomness of this new family of generators.


Chaos; Pseudo-random number generator; Statistical tests; Internet security; Iteration function.


1 Introduction

Security has become a topic of increasing importance in communications because the Internet and personal communications systems are now accessible worldwide. To guarantee this security, chaotic systems have many advantages as unpredictability or disorder-like, and they are especially used when complex sequences are required [5, 8, 11]. This is why chaotic systems are frequently used to design new pseudo-random number generators (PRNGs)  [5, 9].Following this approach, we have previously proposed a PRNG based on chaotic iterations. A short overview of our recent researches in this field is given hereafter.

In Ref. [3], it is proven that chaotic iterations (CIs), a suitable tool for fast computing iterative algorithms, satisfies the topological chaos property, as defined by Devaney [6]. The chaotic behavior of CIs is used in [1], to obtain an unpredictable PRNG that depends on two logistic maps. The resulted PRNG shows better statistical properties than each individual component alone. Additionally, various chaos properties have been established. These chaos properties, inherited from CIs, are not possessed by the two inputted generators. We have shown that, in addition of being chaotic, this generator can pass the NIST battery of tests, widely considered as a comprehensive and stringent battery of tests for cryptographic applications [13]. Then we have achieved to improve the speed of the former generator in [2, 4], by using ISAAC and XORshift instead of the two logistic maps. These generators can pass the batteries DieHARD [10] and TestU01 [14].

In these previous researches, the iteration function of CIs was always the vectorial Boolean negation. We propose now to enlarge the set of iteration functions such that the associated CI-based generator is both chaotic and random-like. The well-known NIST and DieHARD tests are finally used to evaluate the statistical behavior of this new family of generators.

The rest of this paper is organized as follows. In the next section, some basic definitions concerning CIs and our PRNG are recalled. In Section 3 is explained how it is possible to change the iteration function of the generator without losing the good properties of our PRNG. NIST and DieHARD batteries are passed in Section 4 to all of these generators. The paper ends with a conclusion section where our contribution is summarized and intended future work is presented.

2 Review of Basics

This section is devoted to basic notations and terminologies in the fields of chaotic iterations and PRNGs.

2.1 Notations

the term of a sequence
the component of a vector
strategy a sequence which elements belong in
the set of all strategies
the set of positive integers {1,2,3,…}

2.2 Chaotic iterations

Definition 1

Let be an “iteration” function and . Then, the so-called chaotic iterations are defined by [12] and

In other words, at the iteration, only the th cell is “iterated”.

2.3 Mapping matrix

Chaotic iterations introduced above can be described by using the mapping matrix defined bellow.

Definition 2

Let be an iteration function, then its associated mapping matrix is the matrix of size whose element is the integer having the following binary decomposition: , where (resp. ) is the th binary digit of (resp. of ).

The relation between and chaotic iterations of can be understood as follows. If the current state of the system is and the strategy is , then the next state (under the chaotic iterations of ) will be . Finally, the vector is called vector of images. An example is shown for the vectorial Boolean negation in Table  1.

\backslashboxpq    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
9 10 11 12 13 14 15 0 1 2 3 4 5 6
5 6 7 0 1 2 3 12 13 14 15 8 9 10
3 0 1 6 7 4 5 10 11 8 9 14 15 12
0 3 2 5 4 7 6 9 8 11 10 13 12 15
   (15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
Table 1: The matrix associated to

2.4 Chaotic iterations as PRNG

Algorithm 2.4 recalls the basic design procedure of our generator. The internal state is , the output array is , and . Parameters and are constants, PRNG1 picks its values into , and PRNG2 takes a random integer into . We have previously established that must be greater than (see [1]). Finally, until now, .


the internal state ( bits) \KwOuta state of bits \For   return An arbitrary round of

This generator may utilize any reasonable PRNGs as inputs. For demonstration purposes, two XORshift are adopted here for both PRNG1 and PRNG2. Table 2 gives an illustrative example using these PRNGs, where and = (14, 14, 12, 12, 10, 10, 9, 9, 6, 6, 4, 4, 2, 2, 1, 0).

4 5 4
2 4 2 3 4 1 1 4 4 3 2 3 3
1 1 1 1 1 1 0 1 1 1 1 1 1
(x) 0 1 1 0 0 0 0 0 0 0 0 1 1
1 1 1 1 0 0 0 0 0 0 1 1 0
0 0 0 0 1 1 0 1 1 1 0 0 0
4 0 0 4 6 6 7 15 7 7 7 7 5 1 3 1 1
0 0 0 0
1 1 1 0
0 1 1 0
0 0 1 1

Binary Output:

Integer Output:

Table 2: Application example

3 Description of the selection scheme

In this section is explained how the iteration function can be replaced without losing chaos and randomness.

3.1 Strong connectivity and chaos

Let . Its iteration graph is the directed graph defined as follows. The set of vertices is , and , contains an arc labeled from to . We have proven in [7] that:

Theorem 1

The generator is chaotic according to Devaney if and only if the graph is strongly connected.

Theorem 1 only focus on the topological chaos property. However, it is possible to find chaotic sequences with bad statistical properties, in particular when the iteration function is unbalanced.

3.2 Obtaining Balanced Maps

We now explain how to find balanced iterate functions.

Theorem 2

Let and be the (balanced) vectorial Boolean negation: .

If , a vector of images of a balanced iterate function , is such that its th component differs from by only its bit (starting from the right), then .


As only differs from by its bit, we have: Therefore, the value of the mapping matrix of can be computed as follows:


The values in are uniformly distributed. However, in the new matrix , there are twice the value and no in the -th row: the uniform distribution is lost. To restore the balance, one of the two values must be found and replaced by . Let be a variable such that and .

As the th bits in and are equal, we have:


We can thus transform the equation as follows:


Moreover, from , we obtain:


According to Equations (3) and (4), we have:




and according to Equation (5), we thus have:


Now, from Equation (2), we can set that:


By using both Equations (7) and (8), we obtain:


Finally, from Equation (5), we can conclude that:


With such equations (namely, Eq. (9) and (10)), the balance of the new table can be obtained by computing the mapping values. In other words, there is a bijection from the set A of the inputs into the set B of values.

Let us give an example. In Table 1 is given the mapping matrix for the vectorial Boolean negation, with . Obviously, the values in are uniformly distributed: each integer from 0 to 15 occurs once per row. Now, if we desire to set as 14, then : there will be two and no in the fourth row of . Due to the previous study, we know that must be set to 15 too, which leads to : the balance is recovered.

To sum up, we can determine whether the modification of a bit in the vector of images of the negation function preserves the balance of the outputs or not, by using the following rule (necessary condition):

  • if ,

  • then ,

  • and also .

This rule, we name it “Balance Iteration Mapping Rule”, can be used as a criterion to find iterate functions leading to good CI PRNGS, as it is depicted in Algorithm 3.2. Let us finally remark that, with such a process, it is possible to find new iteration functions by changing more than 1 couple of values in the vectorial Boolean negation . Indeed it is obvious that 2, 3, 4, and even 8 couples of values can be changed using the Balance Iteration Mapping Rule. For instance, Table 3 contains 8 vectors of images obtained by using Algorithm 3.2 one or more times. All of these functions satisfy the hypothesis of Theorem 1 too, and thus their dynamical systems behave chaotically.


a vector of images \KwOuta vector of images or 0 \For \For



return 0;


return 0;

return The Balance Iteration Mapping Rule.

Name Map
Table 3: New vectors of images
Frequency (Monobit) Test 0.102526 0.017912 0.171867 0.779188 0.971699 0.275709 0.137282 0.699313
Frequency Test within a Block 0.085587 0.657933 0.779188 0.897763 0.851383 0.383827 0.262249 0.122325
Cumulative Sums (Cusum) Test* 0.264576 0.185074 0.228927 0.736333 0.462694 0.169816 0.391715 0.729111
Runs Test 0.739918 0.334538 0.798139 0.834308 0.153763 0.719747 0.534146 0.262249
Test for the Longest Run of Ones in a Block 0.678686 0.474986 0.637119 0.037566 0.366918 0.739918 0.236810 0.759756
Binary Matrix Rank Test 0.816537 0.534146 0.249284 0.883171 0.739918 0.037566 0.798139 0.867692
Discrete Fourier Transform (Spectral) Test 0.798139 0.474986 0.014550 0.366918 0.595549 0.115387 0.798139 0.153763
Non-overlapping Template Matching Test* 0.489304 0.507177 0.477005 0.557597 0.452278 0.505673 0.541034 0.497140
Overlapping Template Matching Test 0.514124 0.171867 0.162606 0.816537 0.319084 0.678686 0.534146 0.798139
Maurer’s “Universal Statistical” Test 0.249284 0.171867 0.096578 0.419021 0.171867 0.798139 0.115387 0.275709
Approximate Entropy Test 0.236810 0.514124 0.262249 0.816537 0.474986 0.080519 0.000001 0.779188
Random Excursions Test* 0.353142 0.403219 0.229832 0.481025 0.317506 0.602978 0.362746 0.416274
Random Excursions Variant Test* 0.412987 0.369181 0.313171 0.513679 0.274813 0.391166 0.454157 0.341012
Serial Test* (m=10) 0.304324 0.102735 0.270033 0.384058 0.456684 0.125973 0.404429 0.253197
Linear Complexity Test 0.759756 0.153763 0.883171 0.171867 0.366918 0.319084 0.678686 0.075719
Success 15/15 15/15 15/15 15/15 15/15 15/15 15/15 15/15
Diehard Test pass pass pass pass pass pass pass pass
Table 4: Results through NIST SP 800-22 and DieHARD batteries of tests ( values)

4 Statistical analysis

A good random number generator must be indistinguishable from a random sequence through any statistical test. As an illustration of the theory presented in this paper, we have used various batteries of tests in order to evaluate the quality of our proposed pseudo random number generator, when iterating functions of Table 3. These batteries are the well-known and stringent DIEHARD [10] and NIST [13] statistical test suites.

We can conclude from Table 4 that all of the generators based on the new iterate functions have successfully passed both the NIST and DieHARD batteries of tests. These results show the good statistical properties of the proposed PRNGs, and thus the interest of the theoretical approach presented in this paper.

5 Conclusion and future work

In previous researches, we have presented a pseudo-random number generator based on chaotic iterations. It depends on an iteration function, formerly fixed to the negation function. We have previously established a characterization of functions leading to a chaotic behavior for the associated generator. However, this characterization allows unbalanced functions, whose generator cannot pass statistical tests. We have proposed in this paper an algorithm that can find iteration functions leading to a chaotic generator statistically irreproachable. This algorithm has been used to find 8 functions such that their generators are both chaotic and able to pass the NIST and DIEHARD statistical batteries of tests.

In future work, we will continue to explore conditions that improve the randomness of the associated CI PRNGs. New statistical tests will be used to compare these PRNGs to existing ones, and a cryptanalysis of our generator will be proposed. Finally, new applications in computer science will be proposed, especially in the Internet security field.


  1. Jacques Bahi, Christophe Guyeux, and Qianxue Wang. A novel pseudo-random generator based on discrete chaotic iterations. In INTERNET’09, 1-st Int. Conf. on Evolving Internet, pages 71–76, Cannes, France, August 2009.
  2. Jacques Bahi, Christophe Guyeux, and Qianxue Wang. A pseudo random numbers generator based on chaotic iterations. application to watermarking. In WISM 2010, Int. Conf. on Web Information Systems and Mining, volume 6318 of LNCS, pages 202–211, Sanya, China, October 2010.
  3. Jacques M. Bahi and Christophe Guyeux. Hash functions using chaotic iterations. Journal of Algorithms & Computational Technology, 4(2):167–181, 2010.
  4. Jacques M. Bahi, Christophe Guyeux, and Qianxue Wang. Improving random number generators by chaotic iterations. application in data hiding. In ICCASM 2010, Int. Conf. on Computer Application and System Modeling, pages V13–643–V13–647, Taiyuan, China, October 2010.
  5. S. Behnia, A. Akhavan, A. Akhshani, and A. Samsudin. A novel dynamic model of pseudo random number generator. Journal of Computational and Applied Mathematics, 235(12):3455–3463, 2011.
  6. Robert L. Devaney. An Introduction to Chaotic Dynamical Systems. Addison-Wesley, Redwood City, CA, 2nd edition, 1989.
  7. Christophe Guyeux. Le désordre des itérations chaotiques et leur utilité en sécurité informatique. PhD thesis, Université de Franche-Comté, 2010.
  8. Yue Hu, Xiaofeng Liao, Kwok wo Wong, and Qing Zhou. A true random number generator based on mouse movement and chaotic cryptography. Chaos, Solitons & Fractals, 40(5):2286–2293, 2009.
  9. N. Liu. Pseudo-randomness and complexity of binary sequences generated by the chaotic system. Communications in Nonlinear Science and Numerical Simulation, 16(2):761–768, 2011.
  10. George Marsaglia. Diehard: a battery of tests of randomness. http://www.stat.fsu.edu/pub/diehard/, 1996.
  11. L. De Micco, C.M. Gonzaez, H.A. Larrondo, M.T. Martin, A. Plastino, and O.A. Rosso. Randomizing nonlinear maps via symbolic dynamics. Physica A: Statistical Mechanics and its Applications, 387(14):3373–3383, 2008.
  12. F. Robert. Discrete Iterations: A Metric Study, volume 6. Springer Series in Computational Mathematics, 1986.
  13. A. Rukhin, J. Soto, J. Nechvatal, M. Smid, E. Barker, S. Leigh, M. Levenson, M. Vangel, D. Banks, A. Heckert, J. Dray, and S. Vo. A statistical test suite for the validation of random number generators and pseudo random number generators for cryptographic applications. NIST Special Publication 800-22, 2010.
  14. Richard Simard and Université De Montréal. Testu01: A software library in ansi c for empirical testing of random number generators. software user’s guide. ACM Transactions on Mathematical Software, 2002.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description