Modification of the Logistic Map Using Fuzzy Numbers with Application to Pseudorandom Number Generation and Image Encryption

A modification of the classic logistic map is proposed, using fuzzy triangular numbers. The resulting map is analysed through its Lyapunov exponent (LE) and bifurcation diagrams. It shows higher complexity compared to the classic logistic map and showcases phenomena, like antimonotonicity and crisis. The map is then applied to the problem of pseudo random bit generation, using a simple rule to generate the bit sequence. The resulting random bit generator (RBG) successfully passes the National Institute of Standards and Technology (NIST) statistical tests, and it is then successfully applied to the problem of image encryption.


Introduction
The field of chaos theory expands to numerous applications related to cryptography, secure communications, engineering, physics, economics, robotics, control, and many more; see, for example, References [1][2][3][4][5] and the references therein. Chaotic systems, being deterministic systems with a high sensitivity to initial conditions and parameter changes, constitute an excellent basis for efficiently modelling complex natural phenomena, as well as adding complexity to security related applications.
Due to the aforementioned applicability of chaotic systems, there is an ongoing demand for introducing novel chaotic systems. This is usually done by considering an existing chaotic system and modifying it, either by slightly altering a term in the system's differential/difference equations, or by adding more nonlinear terms, or even by adding more variables and changing the system to a higher dimension.
The logistic map [6] is one of the most well-known one-dimensional discrete time chaotic systems and one of the most heavily modified chaotic systems; see, for example, References [7][8][9][10][11][12][13][14][15][16][17]. The map has only one parameter and a simple structure, which makes it suitable for many applications. In this work, we propose a modified version of the classic logistic map by employing fuzzy triangular numbers to modify its behavior. The idea of passing the values of the logistic map through a fuzzy number is mathematically very simple, yet it leads to a significant improvement of the chaotic behavior of the map, with many chaos related phenomena appearing, like antimonotonicity and crisis. Fuzzy logic and fuzzy sets are themselves a large field of study with innumerable applications in engineering and more [18][19][20]. Specifically in dynamical systems, fuzzy sets have been combined with chaotic systems in fuzzy dynamical systems; see, for example, References [15,[21][22][23][24][25][26][27][28]. In the proposed modification of the logistic map, the values of the map in each iteration are passed through a triangular fuzzy number, which is a simple linear function that takes values on the interval [0, 1]. The resulting map presents more complex chaos related phenomena compared to the classic map as mentioned above, as well as achieves a higher value for its Lyapunov exponent. Furthermore, to showcase the applicability of the map to chaos related applications, the problems of pseudo random bit generation [4,5,10,11,13,[29][30][31][32][33][34][35][36][37][38][39][40][41][42][43] and image encryption [4,7,9,14,15,33,35,39,[44][45][46][47][48] are considered. It is seen that the bit sequence generated from the modified map using a simple rule passes all 15 tests of the National Institute of Standards and Technology (NIST) statistical test suite [49]. The bit sequence generated is then applied to the problem of image encryption, and the resulting encrypted image is analysed for security using methods like histogram analysis, correlation, and information entropy.
It is important to note that this approach can be easily applied to any other one-dimensional chaotic system, as well as further modified by considering different types of fuzzy numbers, like trapezoidal, Gaussian, quadratic, exponential, or their combination. Thus, it is our belief that this approach for modifying a chaotic system will lead to more interesting works in the future.
The rest of the work is structured as follows: Section 2 presents some preliminaries on fuzzy numbers and the logistic map. In Section 3, the modified logistic map is proposed and its dynamical behavior is explored. Section 4 studies the application of the map in random number generation. The use of the produced bit sequence to the problem of image encryption is presented in Section 5. Finally, Section 6 concludes the paper with a discussion on future works.

Fuzzy Numbers
This section presents some preliminaries on fuzzy numbers; see [18][19][20] for a full presentation. There are slightly varying definitions for a fuzzy number, but in this work we consider a fuzzy number as a function f : X → [0, 1] defined over a set X ⊆ R, such that:

•
It is a normal fuzzy set, that is, there exists at least one x ∈ X, such that f (x) = 1.
Note that some works define fuzzy numbers as having exactly one x 0 , such that f (x 0 ) = 1. The fuzzy numbers considered here are defined as f : [0, 1] → [0, 1] and have the following triangular form: where z denotes the peak of the triangular fuzzy number. Examples for different values of z are shown in Figure 1. For example, for the fuzzy number f 0.5 (x), it holds that f 0.5 (0.4) = 0.8, which can be interpreted as the number 0.4 being equal to 0.5 with truth index 0.8.

The Logistic Map
The logistic map [6] is one of the most well-known discrete time 1D chaotic systems with a single parameter, described by where r is the system parameter that takes values in the interval [0, 1], as well as x 0 ∈ [0, 1]. For different values of the parameter r, the following three dynamics are observed: For 1 ≤ r ≤ 3, the previous point loses its stability and another fixed point appears x = 1/r. • For 3 ≤ r ≤ 4 the system exhibits a rich behavior, going to chaos following a period doubling route. Figure 2 shows the bifurcation diagram of the logistic map, and Figure 3 shows the diagram of its Lyapunov exponent, given by [50] which confirms the aforementioned dynamical behavior for various values of parameter r.

Implementation of Fuzzy Numbers to Logistic Map
We propose the following fuzzy number logistic map, described by where r the bifurcation parameter, and f z denotes the fuzzy triangular function described above, centered at z. Thus, this modified logistic map has two parameters that can be tuned to affect the system's behavior.
To unmask the dynamical behavior of the system, its bifurcation diagram is plotted with respect to parameter r. Examples for various values of z are given in Figures 4-8, where many interesting phenomena are observed. First, it is easily seen in Figure 4 that for the two end values z = 0 and z = 1, the behavior of the system is very similar to the classic logistic map, having periodic behavior for values up until around 3.7, and then traversing to chaos through a period doubling route. For intermediate values of the parameter z, the system exhibits chaotic behavior for a range of parameter values r. The phenomenon of period doubling route to chaos appears in all cases, but also crisis phenomena are observed, where the system exits from chaos abruptly. The chaotic behavior is verified by the corresponding diagram of the Lyapunov Exponent (LE) of the system. Note that for z = 0 and z = 1, the diagram of the LE is the same as with the classic logistic map.
It is also very important to note that in many cases the Lyapunov exponent achieves a maximum value that is higher than 1, which is a lot higher than the value of the classic logistic map, which achieves a maximum value of around 0.7. This is clearly seen in Figure 9, which depicts the Lyapunov exponents of the system for various parameter values.
Similarly, considering the bifurcation diagrams of the system (4) with respect to parameter z unveils even more interesting phenomena, as seen in Figures 10-15. Again, crisis phenomena appear where the system suddenly enters to, or exists from, chaos. In addition, for some values of the parameter r, the phenomenon of antimonotonicity appears, where the system enters chaos through a period doubling route and also exits from chaos following a reverse period halving route (Figures 13 and 14). Lastly, the phenomenon of constant chaos appears when the bifurcation parameter is set to r = 4 ( Figure 15). This means that the system will be chaotic for all values of the triangular fuzzy number chosen.
In addition, Figures 16 and 17 give a closer look at the bifurcation diagrams with respect to z, for r = 3.98 and r = 1.4, where the chaotic regions are interrupted by small windows of periodic behavior.

Application to Random Bit Generation
To showcase the high implementability and robustness of the proposed chaotic system, the application to random bit generation is considered. The proposed chaotic random bit generator is created by taking the value of x i in each iteration, discarding its first 10 decimal digits, and then comparing the resulting number with a threshold value, chosen here as 0.5. The bit value 1 is produced if the number is greater or equal to the threshold, and the bit value 0 is produced if it is not. Thus, the RBG tactic has the following form: To test if the generated sequence is truly random, the FIPS (Federal Information Processing Standards) tests of the National Institute of Standards and Technology (NIST 800-22) are used [49]. All 15 given tests are considered. Each test results in a p-value, for which if p ≥ a the test is considered successful, where a is the level of significance chosen.
The tests were applied to 20 sequences of 1.000.000 bits each, for a = 0.01, generated for three different parameter values: (r = 4, z = 0.5), (r = 2, z = 0.3), and (r = 3.4, z = 0.8). The results are shown in Tables 1-3, where it is seen that the sequence passes all tests for all three cases. For tests that have multiple case runs, the result of the last run is printed. The choice of multiple parameter values further showcases the versatility of the map.
In addition, Figure 18 shows the sensitivity of the system to initial conditions and parameters. It is seen that small changes lead to different trajectories and bit sequence after a very short number of iterations. In addition, Figure 19 depicts the autocorrelation and cross-correlation plots for a bit sequence of length 10 4 , generated for parameter values (r = 4, z = 0.5). For random sequences, the auto-correlation should have a delta like form, and the cross-correlation should be close to zero [5,13]. This is indeed verified. For the cross-correlation, two random bit sequences were generated, where the initial conditions of the two chaotic maps used are chosen as x 0 and y 0 = x 0 + 10 −16 . Finally, Figure 20 depicts the percentage of 1s in the bit sequence, with respect to the sequence length. This diagram shows that there exits 0-1 balancedness in the sequence, which is another desired property.      As for the key space, it is known that a system should have a key space larger than 2 100 to resist brute force attacks [51], although some more recent works require a lower bound of 2 128 [5,38,48]. The proposed system has two key parameters r and z, as well as the initial value x 0 . Assuming z = 4, for which the system exhibits constant chaos, the key space for a 16-digit accuracy is 10 16 × 10 16 = 10 32 ≈ (10 3 ) 10.6 ≈ (2 10 ) 10.6 = 2 106 , which is higher than the minimum value 2 100 , but lower than 2 128 . An upper bound for the key space though can be computed by considerinrg the full spectrum of both parameters, which gives 10 16 × 10 16 × 10 16 ≈ 2 160 . Since the system is not chaotic for every combination of r, z, the real key space is between these two values.

Application to Image Encryption
The proposed RBG is further applied to the problem of image encryption, using the method proposed in [4]. The design consists of the following steps: Step 1. An m × n grayscale image is read as a matrix whose elements represent the gray value of each pixel, taking integer values in 0-255. The values are then converted to binary numbers and the matrix columns are reshaped to a single row vector A.
Step 2. The resulting binary row vector A is combined with a binary vector B of equal length produced by the proposed RBG using the XOR command, resulting in the encrypted message C = A ⊕ B.
Step 3. The encrypted sequence C can be transmitted safely and the original image can be reconstructed at the receiver end by taking A = C ⊕ B and following the reverse procedure of Step 1.
The above procedure is showcased using a 512 × 512 image of Lenna. The original image and the encrypted and decrypted ones are shown in Figure 21.
In order to study the security of the encryption design, several tests are performed on the encrypted image. First, the histograms of the original and encrypted images are computed, as shown in Figure 22. In contrast to the original image, the encrypted image has a uniform histogram, which makes it strong against statistical attacks.
Next, the correlation between adjacent vertical, horizontal and diagonal pixels is tested for the original and encrypted images and the results are shown in Figure 23. Here, 10000 randomly selected pairs of adjacent pixels are taken, and it is seen that in contrast to the original image, adjacent pixels in the encrypted one are uncorrelated. This is also verified by the values of the correlation coefficient γ shown in Table 4, were it is observed that for the encrypted image the value is close to zero. The correlation coefficient is computed using the following formulas: cov(x, y) γ(x, y) = cov(x, y) where x, y are the gray values of two adjacent pixels, and N the number of adjacent pairs of pixels considered. Finally, the information entropy is computed, which measures the randomness of a given signal, given by where p(s i ) is the possibility of appearance for the symbol s i . The information entropy of an encrypted image should be close to 8. The information entropy of the original image is 7.4450, while for the encrypted image is 7.9670, so the encrypted image has a value closer to 8, which means that the information signal is safer against entropy attacks.

Conclusions
In this work, the logistic map was modified through the use of fuzzy triangular numbers, to give a new modified logistic map that exhibits a plethora of chaos related phenomena, for different parameter values. It was shown that the modified logistic map also reaches a higher Lyapunov exponent compared to the logistic map. The map was then applied to the problem of random bit generation, yielding positive results. It is important to note that this simple technique to increase the complexity of a chaotic map can easily be implemented to many other chaotic systems. In addition, using different fuzzy numbers other than triangular can lead to many modifications of this technique. These are both promising research topics for future works.