Pseudo-Random Number Generator Based on Logistic Chaotic System

In recent years, a chaotic system is considered as an important pseudo-random source to pseudo-random number generators (PRNGs). This paper proposes a PRNG based on a modified logistic chaotic system. This chaotic system with fixed system parameters is convergent and its chaotic behavior is analyzed and proved. In order to improve the complexity and randomness of modified PRNGs, the chaotic system parameter denoted by floating point numbers generated by the chaotic system is confused and rearranged to increase its key space and reduce the possibility of an exhaustive attack. It is hard to speculate on the pseudo-random number by chaotic behavior because there is no statistical characteristics and infer the pseudo-random number generated by chaotic behavior. The system parameters of the next chaotic system are related to the chaotic values generated by the previous ones, which makes the PRNG generate enough results. By confusing and rearranging the output sequence, the system parameters of the previous time cannot be gotten from the next time which ensures the security. The analysis shows that the pseudo-random sequence generated by this method has perfect randomness, cryptographic properties and can pass the statistical tests.


Introduction
With the rapid development of communication technology and the wide use of the Internet and mobile networks, people pay more and more attention to information security. The primary reference source for protecting data is cryptology [1]. Because of its high performance, the chaotic system has attracted a lot of attention from researchers [2].
There is an interesting relationship between chaos and cryptography. According to this relationship, many characteristics of chaotic systems such as the sensitivity of initial value/system parameters, ergodicity, deterministic dynamics, and structural complexity are considered to be the diffusion and confusion of keys [3][4][5][6]. Compared with traditional encryption systems, they have certain randomness [7,8]. As a result of this close relationship, several chaos-based cryptosystems have been put forward since 1990 [9].
On the one hand, the extreme sensitivity of chaotic systems to initial conditions makes chaotic systems very attractive for cryptographic applications, especially for pseudo-random number generators (PRNGs) [7,[9][10][11][12][13][14][15][16][17][18][19][20][21]. Several chaotic systems have been successfully used [8] and play an important role in many applications such as numerical simulations, the game industry, communication and stochastic computation [22]. On the other hand, PRNG is an important module in the development of cryptosystems to be robust against different types of security attacks. Some PRNGs have been implemented in personal computers and in embedded systems [4,23]. A PRNG is defined as an algorithm that can produce random number sequences whose main advantage is the rapidity and repeatability of a generating process, which is one of the most important components in stream 1 times.
Discarding the integer part of 1 could get a 15-decimal number, respectively arbitrary select 3 digits to form a 3-decimal number, 4 digits to form a 4-decimal number, 5 digits to form a 5-decimal number, all the way up to 15 digits to make up a 15-decimal number. A whole numerical sequence is obtained by taking each decimal number module 256 and converting it into a binary sequence, which is a pseudo-random sequence generated at the initial state. Also, 104 numbers of pseudo-random sequences can be generated by one chaotic iteration.

Generation of Normal Pseudo-Random Sequences (Taking the Nth Times as an Example)
Retain the fractional part of the floating point number −1 generated at the ( − 1)th, thus a 15 decimal number can be got and then rearrange it for once time. If the different number of positions after rearranging between the previous and next time is less than 12, it will be rearranged again until the condition is met. The 1st, 5th, 9th and 13th numbers are taken to form the decimal part with the integer part 0 as the initial value 0 of the chaotic system.
The 2nd, 6th, 10th, and 14th digits are taken as the preparatory system parameter ′ of the chaotic system. The flow chart of the generation of is shown in Figure 1. The algorithm description is also given together. The 3rd, 7th, 11th, and 15th digits are taken to form the 4-bit integeral ′ . To be within a better range, the flow chart of the iteration number 's generation is shown in Figure 2. The algorithm description is also given.  The 3rd, 7th, 11th, and 15th digits are taken to form the 4-bit integeral I N . To be within a better range, the flow chart of the iteration number I N 's generation is shown in Figure 2. The algorithm description is also given. range of 0 1 , more than 1000 is required to improve the randomness of the sequence 1 . The value of the initial seed parameter is arbitrary. According to logistic chaos equation, we can get 16 floating point numbers 1 by iterating for 1 times. Discarding the integer part of 1 could get a 15-decimal number, respectively arbitrary select 3 digits to form a 3-decimal number, 4 digits to form a 4-decimal number, 5 digits to form a 5-decimal number, all the way up to 15 digits to make up a 15-decimal number. A whole numerical sequence is obtained by taking each decimal number module 256 and converting it into a binary sequence, which is a pseudo-random sequence generated at the initial state. Also, 104 numbers of pseudo-random sequences can be generated by one chaotic iteration.

Generation of Normal Pseudo-Random Sequences (Taking the Nth Times as an Example)
Retain the fractional part of the floating point number −1 generated at the ( − 1)th, thus a 15 decimal number can be got and then rearrange it for once time. If the different number of positions after rearranging between the previous and next time is less than 12, it will be rearranged again until the condition is met. The 1st, 5th, 9th and 13th numbers are taken to form the decimal part with the integer part 0 as the initial value 0 of the chaotic system.
The 2nd, 6th, 10th, and 14th digits are taken as the preparatory system parameter ′ of the chaotic system. The flow chart of the generation of is shown in Figure 1. The algorithm description is also given together. The 3rd, 7th, 11th, and 15th digits are taken to form the 4-bit integeral ′ . To be within a better range, the flow chart of the iteration number 's generation is shown in Figure 2. The algorithm description is also given.

Performance Analysis
In this chapter, different perspectives will be discussed concerning the proposed scheme, including the logistic chaotic system, algorithm running process, safety analysis and differential analysis [2].

Logistic Chaotic System
Logistic chaotic system is a classical chaotic system, thus it has been widely used in data security and secure communication due to its complex dynamic behavior [3,24]. The mathematical expression of logistic equation is: (1) µ is the system parameter of the logistic equation, and the initial value of the system is set to x 0 (0 < x 0 < 1). When 3.5699 < µ < 4, the system goes into chaos [9,20]. As shown in Figure 3a, with the increase of µ, the system gradually enters into a chaotic state [20]. Figure 3b shows the Lyapunov exponent of logistic mapping when 3.5699 < µ < 4, the Lyapunov exponent is positive, and it can be determined that the system is in a chaotic state at this time [9]. As an inspiration, it is necessary to ensure that the parameter interval of the designed key flow generator is in a chaotic state, adopted system would have typical basic characteristics of chaos under this condition [24]. The selection of parameters in the algorithm can guarantee the µ during each cycle operation located in the interval [3.5699, 4], and the chaotic state of the system could be emerged without any accidents [22]. In this chapter, different perspectives will be discussed concerning the proposed scheme, including the logistic chaotic system, algorithm running process, safety analysis and differential analysis [2].

Logistic Chaotic System
Logistic chaotic system is a classical chaotic system, thus it has been widely used in data security and secure communication due to its complex dynamic behavior [3,24]. The mathematical expression of logistic equation is: is the system parameter of the logistic equation, and the initial value of the system is set to 0 (0 < 0 < 1). When 3.5699 < < 4, the system goes into chaos [9,20]. As shown in Figure 3a, with the increase of , the system gradually enters into a chaotic state [20]. Figure 3b shows the Lyapunov exponent of logistic mapping when 3.5699 < < 4 , the Lyapunov exponent is positive, and it can be determined that the system is in a chaotic state at this time [9]. As an inspiration, it is necessary to ensure that the parameter interval of the designed key flow generator is in a chaotic state, adopted system would have typical basic characteristics of chaos under this condition [24]. The selection of parameters in the algorithm can guarantee the during each cycle operation located in the interval [3.5699,4], and the chaotic state of the system could be emerged without any accidents [22]. Logistic chaotic system is extremely sensitive to initial values. No matter how close the two points are, orbits of logistic chaotic system may be separated under the effect of mapping on account of the extreme sensitive to initial value [13]. Table 1 shows that a very slight change of the initial value can lead to a great difference and the sensitivity of the logistic mapping to the initial value is very significant [20].  Logistic chaotic system is extremely sensitive to initial values. No matter how close the two points are, orbits of logistic chaotic system may be separated under the effect of mapping on account of the extreme sensitive to initial value [13]. Table 1 shows that a very slight change of the initial value can lead to a great difference and the sensitivity of the logistic mapping to the initial value is very significant [20]. Under the different system parameters µ, initial values x 0 , and iteration numbers I, the dynamic behaviors greatly differ from each other, which can be seen in Figure 4. Under the different system parameters , initial values 0 , and iteration numbers , the dynamic behaviors greatly differ from each other, which can be seen in Figure 4.  Table 2 [30 −31]. The first three rows of data in Table 2 correspond to the results under seed parameters shown in Figure 4. The above analysis of logistic chaotic system shows its sensitive dependence and unpredictability to initial value; the minor change in the parameters could result in a great change [32−34]. Although these values are limited between bounds, they are pseudo-random and do not converge after any value of iterations [24].

Sequence Analysis
The 15 number sequence would be generated by chaotic system in the proposed algorithm, then selects 3 digits to form a 3-decimal number randomly, 4 digits form a 4-decimal number and 5 digits form a 5-decimal number, all the way up to 15 digits making up a 15-decimal number. There are 13 integers in total: represents an arrangement of extracting m elements from n different elements. A full numerical sequence is obtained by modulating each decimal number to 256. Obviously, all values in this sequence are located in [0,255]. Several aspects are analyzed when seed parameters ( , 0 , ) equal to (3.8000,0.5000,1000).  Table 2 [30,31]. The first three rows of data in Table 2 correspond to the results under seed parameters shown in Figure 4. The above analysis of logistic chaotic system shows its sensitive dependence and unpredictability to initial value; the minor change in the parameters could result in a great change [32][33][34]. Although these values are limited between bounds, they are pseudo-random and do not converge after any value of iterations [24].

Sequence Analysis
The 15 number sequence would be generated by chaotic system in the proposed algorithm, then selects 3 digits to form a 3-decimal number randomly, 4 digits form a 4-decimal number and 5 digits form a 5-decimal number, all the way up to 15 digits making up a 15-decimal number. There are 13 integers in total: A 3 15 + A 4 15 + · · · + A 15 15 ≈ 3.55 × 10 12 A m n represents an arrangement of extracting m elements from n different elements. A full numerical sequence is obtained by modulating each decimal number to 256. Obviously, all values in this sequence are located in [0, 255]. Several aspects are analyzed when seed parameters (µ, x 0 , I) equal to (3.8000, 0.5000, 1000).

Rearrangement Analysis
Seed parameters (µ, x 0 , I) of the next chaotic system are extracted and formed after the rearrangement of the 15 real numerical sequence generated by the chaotic system in the proposed algorithm. The function of rearranging is to increase the sequence space and reduce the correlation between the previous chaotic behavior and the next. If the similarity between the rearranged sequence and the original sequence is large, the purpose is not achieved. This situation is considered in two ways: In the 15 digital sequence generated by chaotic sequence, a single real number iterates many times and more than one number iterates many times.

•
The different numbers between the rearranged sequence and the original sequence are less than 12.
As shown in Figure 5a,b, comparing the rearranged sequence and the original sequence for 10 7 times, the increase of the number of rearrangements cannot improve the difference degree no matter the times of rearranging. The distribution after limiting the degree of difference is shown in Figure 5c. Obviously it can be seen from the figure that the difference of the sequences has been improved, thus the correlation has been reduced.
algorithm. The function of rearranging is to increase the sequence space and reduce the correlation between the previous chaotic behavior and the next. If the similarity between the rearranged sequence and the original sequence is large, the purpose is not achieved. This situation is considered in two ways: •In the 15 digital sequence generated by chaotic sequence, a single real number iterates many times and more than one number iterates many times.
•The different numbers between the rearranged sequence and the original sequence are less than 12.
As shown in Figure 5a and Figure 5b, comparing the rearranged sequence and the original sequence for 10 7 times, the increase of the number of rearrangements cannot improve the difference degree no matter the times of rearranging. The distribution after limiting the degree of difference is shown in Figure 5c. Obviously it can be seen from the figure that the difference of the sequences has been improved, thus the correlation has been reduced.

Extraction Analysis
The information entropy [2] under different extraction methods for repeated extraction several times is shown in Table 3. The extraction method in Table 3 represents the number in the 15-digit numerical sequence. Table 3 shows the proposed method has little effect on the randomness. In this paper, the last three extraction methods in Table 3 are selected to extract the initial value, system initial value and iteration times of the next chaotic system.

Extraction Analysis
The information entropy [2] under different extraction methods for repeated extraction several times is shown in Table 3. The extraction method in Table 3 represents the number in the 15-digit numerical sequence.  Table 3 shows the proposed method has little effect on the randomness. In this paper, the last three extraction methods in Table 3 are selected to extract the initial value, system initial value and iteration times of the next chaotic system.

Modular Operation Analysis
(1) Distribution Analysis The algorithm is run on the basis of the seed parameters (3.8000, 0.5000, 1000), and the generated seed parameters are shown in Table 4. According to the algorithm, a whole numerical sequence is obtained by taking each decimal number modulo 256. By analyzing the sequence generated under the samples, the distribution is shown in Figure 6. The transverse coordinates in the graph represent the values of the obtained integer value sequence and the longitudinal coordinates represent the probability of the occurrence of the values.

Modular Operation Analysis
(1) Distribution Analysis The algorithm is run on the basis of the seed parameters (3.8000,0.5000,1000) , and the generated seed parameters are shown in Table 4. According to the algorithm, a whole numerical sequence is obtained by taking each decimal number modulo 256. By analyzing the sequence generated under the samples, the distribution is shown in Figure 6. The transverse coordinates in the graph represent the values of the obtained integer value sequence and the longitudinal coordinates represent the probability of the occurrence of the values. The standard deviation of each sample is shown in Table 5 which represents the degree of discretization of the data, and the standard deviation represents a large difference between most of the values and the average value. The distribution of 256 values in integer value sequence is not absolute average combined with the results of the distribution histogram and standard deviation, but its distribution is different from the Gaussian distribution, which is particularly prominent in some values, so it is considered that the distribution of values in integer value sequence is more uniform.  The standard deviation of each sample is shown in Table 5 which represents the degree of discretization of the data, and the standard deviation represents a large difference between most of the values and the average value. The distribution of 256 values in integer value sequence is not absolute average combined with the results of the distribution histogram and standard deviation, but its distribution is different from the Gaussian distribution, which is particularly prominent in some values, so it is considered that the distribution of values in integer value sequence is more uniform. (2) Entropy Analysis High values of entropy mean a robust PRNG, whereas low values of entropy mean a weak PRNG with a certain degree of predictability [26]. Information entropy is a quantitative metric measuring the disorder or randomness of integer value sequence. The more chaotic a sequence, the higher the information entropy [1,2]. When the distribution of sequence values is an equal probability distribution, that is, when the probability of each value between [0, 255] is 1/256, it has the maximum entropy of lg256 = 8 bit [5]. In Table 6, sample points were extracted for information entropy calculation according to the experimental samples in Table 4. It can be seen from Table 6 that the information entropy of randomly extracted sample points is close to the expected value of 8. It is demonstrated that the integer value sequence extracted by this algorithm has strong uncertainty, good randomness, and no clear statistical information.

Analysis of Pseudo-Random Sequences
In order to ensure the security of the cryptosystem, a good cryptosystem must be sensitive to the key [2,5,13,[35][36][37]. The chaotic sequence is very sensitive to the seed parameter (µ, x 0 , I), and its dynamic behavior is shown in Figure 4. The data in Table 2 are modified to make minor changes to one or more parameters of the chaotic system to generate new binary sequences. Let p as a different number between the previous and the next sequence, q as the length of the sequence, the ratio r = p/q [15] is calculated and shown in Table 7. It can be concluded from the data in the table that the generated sequence is sensitive to seed parameters.

The Key Space
A necessary condition for an encryption scheme to be secure is that the key space is large enough so as to frustrate brute-force attacks [38]. The analysis of key space can be from the following angles:

Initial value
In [39], it is shown that a difference of the order of 10 −30 in the initial value leads to different values after only 99 iterations. Thus, for this sensitivity order we can have 10 30 possible initial values between 0 and 1. Therefore, increasing the number of decimal places to be supported results in increasing the key space of the desired system and thus increasing its safety.

Iterations
In order to improve security, it is necessity to improve the key space; thus the number of iterations of each chaotic system is guaranteed to be 1000 at least [1,24].

Parameter extraction
According to the algorithm, the probability of the generation of the integer value sequence is 3.55 × 10 12 , the integer is transformed into binary sequence after module 256. When normalizing, the sequence of 15 integer values obtained last time is rearranged, and there are 1.3 × 10 12 possibilities. The process has a total of 1.3 × 10 12 × 3.55 × 10 12 = 4.615 × 10 24 possibilities, and the second time has the potential of 4.615 × 10 24 2 > 2 128 . On this basis, the seed parameters (µ, x 0 , I) of the next chaotic system are extracted. It not only expands the key space, but also realizes the independence of pseudo-random sequences.

Resistance to Attack
From the analysis of Section 3.2, it is found that the sequence after rearranging has little correlation with the original sequence generated by the chaotic system, and no statistical characteristics could be found. The attack can be considered from the following aspects: • Attack the seed parameters • Attack the sequence generated by the chaotic system • Attack the sequence after rearrangement For the first point, in the proposed scheme, the key component s are the initial status value x 0 , the system parameter µ and the number of iterations I, where set x 0 ∈ (0, 1), µ ∈ (3.5699, 4) and I > 1000. The precision of floating point numbers generated by the chaotic system is 10 −15 [20]. x 0 can be any one among those 10 15 possible values. Similarly, µ can be any values in the range of (4 − 3.5699) × 10 15 values. A sufficiently large key space is guaranteed in the proposed PRNG for practical applications under this condition.
For the second point, this attack is based on a known and determined sequence of integer value, due to the complex dynamic behavior of the logistic system, the analysis of the system by Section 3.1 can be concluded that the minor changes in the parameters of the chaotic system will result in a great change [13]. Therefore, the sequence generated by the chaotic system has no statistical properties which means cannot be attacked. This also stems from the excellent performance of the logistic chaotic system.
For the third point, the values generated by the initial chaotic iteration are rearranged, and the correlation between the previous and next chaotic iterations is reduced by extracting the parameters of the previous chaotic system. The output sequence of any secure PRNG must be highly random and completely independent [13]. There are 1.3 × 10 12 × 3.55 × 10 12 = 4.615 × 10 24 possibilities as a total during the process of rearrangement and extract, and the second time the attack has the potential of 4.615 × 10 24 2 > 2 128 , which represents an attacker's nth attack if it is an exhaustive attack is used to share 4.615 × 10 24 n possibilities. The key space is the total number of different keys that can be used in the procedure [2]. It is generally believed that the key space < 2 128 is not safe enough [13,40,41]. Consequently, it is difficult to speculate the previous chaotic sequence even attacker obtain the key of the next time.

NIST Analysis
Sequences are evaluated by the statistical test suite NIST. The suite contains a statistical package containing 15 tests to quantify and evaluate the randomness of number sequences generated by cryptographic random or pseudo-random number generators [7,9,13,20]. As shown in Table 8, the evaluation index indicates that the data generated by the PRNG based on the logistic chaotic system is the requirement to meet the randomness. The detection results show that the frequency is 0.556298, which indicates that the ratio of 0 and 1 in the generated sequence is relatively average [24], compared with 0.635558 in [7], 0.1329 in [16] and 0.629806 in [22], which is better than them respectively.

Conclusions
This paper proposes a PRNG based on a logistic chaotic system. Aiming at the security of chaotic system parameters in the process of generating pseudo-random number sequences, the floating point numbers generated by initial state chaotic systems are rearranged and extracted. The system parameters of the next chaotic system are generated on this basis. The next chaotic system's system parameters are extracted from the 15 number sequences generated by the previous time. The rearrangement increases the key space, which makes the system parameters of the chaotic system uncontrollable and has no statistical properties, and key space after increasing makes it difficult for exhaustive attacks. On the one hand, the pseudo-random sequence can be output infinitely, which is strong enough to meet all kinds of encryption needs. On the other hand, due to the perfect performance of the logistic chaotic system, the security of the output sequence is strong. The analysis of the characteristics of the logistic chaotic system and integer value sequence shows that the generated pseudo-random sequence has good randomness and independence from the aspects of the histogram, information entropy, numerical calculation, and proportional value.