A Three-Dimensional Infinite Collapse Map with Image Encryption

Chaos is considered as a natural candidate for encryption systems owing to its sensitivity to initial values and unpredictability of its orbit. However, some encryption schemes based on low-dimensional chaotic systems exhibit various security defects due to their relatively simple dynamic characteristics. In order to enhance the dynamic behaviors of chaotic maps, a novel 3D infinite collapse map (3D-ICM) is proposed, and the performance of the chaotic system is analyzed from three aspects: a phase diagram, the Lyapunov exponent, and Sample Entropy. The results show that the chaotic system has complex chaotic behavior and high complexity. Furthermore, an image encryption scheme based on 3D-ICM is presented, whose security analysis indicates that the proposed image encryption scheme can resist violent attacks, correlation analysis, and differential attacks, so it has a higher security level.


Introduction
The 21st century is a new era of leapfrog development of information technology. Information technology, led by big data, artificial intelligence (AI), and computer network technology, has become a key factor in the development of a country's political, military, economic, cultural, and educational undertaking. We usually use digital images as a widely used data format, since it carries a great amount of information in a visualized manner [1]. Billions of digital images are stored, copied, and transmitted every day through third-party platforms or insecure channels. An increasing attention is being paid by researchers to image security [2][3][4]. Some work such as information hiding, watermarking, and image encryption is done to protect the security of digital images [5,6]. Among them, image encryption is the most direct way to transform the plaintext image into noise-like information.
Chaos is the inherent randomness of deterministic system and a special motion of nonlinear dynamic system, which exists widely in nature. The application of chaos in cryptography has become a hot research field, owing to its unpredictability and sensitivity to initial values. Chaotic systems can generate pseudo-random sequences with low correlation and high complexity [7][8][9][10][11][12][13][14][15]. An image encryption scheme generally contains two parts: confusion and diffusion. The confusion characteristic is obtained by randomly separating the adjacent pixels of the plaintext image, and the diffusion characteristic is obtained by diffusing the slight differences of the plaintext image to all the pixels of the ciphertext image. Fan et al. [16] proposed a new image encryption scheme, and a self-synchronous chaotic stream cipher was applied to the new scheme. Alawida et al. presented an image encryption based on a hybrid digital chaotic system in 2019 [17]. Alvarez et al. proposed some basic requirements for cryptosystems based on chaos [18]. The key sequences generated by chaotic systems exhibit many excellent cryptographic properties. In addition, the method of applying chaos to cryptography is easy to realize, and the algorithm has fast processing speed, large key space, and high security, which is very suitable for processing large amounts of data and greatly simplifies the design process of traditional sequential cryptography [19,20]. In an encryption scheme based on chaos, the security level mainly relies on the complexity of chaotic maps. However, the initial conditions and orbits of 1D chaotic maps can be easily predicted due to their simple trajectories and few variables [21,22]. Furthermore, when the system parameters are in a certain interval, the chaotic dynamics behavior will weaken or disappear [23,24]. In order to enhance the dynamic characteristics and complexity of the chaotic system, several HD chaotic maps with hyperchaotic properties were proposed [25,26]. However, some HD chaotic maps exhibit weak chaotic performance in certain intervals [14,23,24,26]. Thus, it makes sense to design a chaotic map with unpredictable and robust chaotic performance.
The contributions and novelties of this paper are summarized as follows: (1) a threedimensional (3D) hyperchaotic map, called the 3D infinite collapse map (3D-ICM), is proposed in this paper. Quantitative evaluation criteria are used to study the chaotic characteristics of 3D-ICM, such as the Lyapunov exponent and Sample entropy. The results of the evaluation criteria show that 3D-ICM shares more complex chaotic dynamical behaviors than existing 3D chaotic maps. (2) We also propose an image encryption scheme based on the 3D-ICM. Both confusion and diffusion operations are based on sequences produced by the 3D-ICM. The simulation results show that the scheme can efficiently encrypt various types of images. Furthermore, different encryption schemes to encrypt the same image were given. Compared with other schemes, this scheme has faster encryption speed. Finally, security analysis shows that the scheme can also resist various attacks including brute-force attack, statistic attack, correlation analysis, and differential attack, which indicates the image encryption scheme has a high level of security.
The rest of this paper is organized as follows. The 3D-ICM and the evaluation of its chaotic performance are presented in Section 2. Section 3 introduces an image encryption scheme and gives the simulation results of different images. Section 4 analyzes the security of the proposed image encryption scheme. Finally, some conclusions are drawn in Section 5.

The 3D Infinite Collapse Map
In order to overcome the above weakness of the low dimensional discrete-time chaotic map, linear combinations of the output values of existing chaotic systems are proposed to enhance the chaotic characteristics in [13,14]. Because the linear combination cannot change the output value of the original system, only the linear combination of these values, the performance of the presented system is not very good. Thus, a great deal of literature has been devoted to the study of the nonlinear transformations of chaotic output sequences [7,8,21,[24][25][26]. However, these transformations are based on 1D and 2D chaotic systems. In order to further enhance its chaotic characteristics, this section mainly introduces the 3D infinite collapse map (3D-ICM), and the chaos characteristics are studied from the following three aspects: (1) the attractor; (2) the Lyapunov exponent (LE); (3) Sample Entropy (SE).

Mathematical Definition
An infinite collapse map (ICM) was introduced [27], and the mathematical definition of 1D-ICM is as follows: where the control parameter is a = 0, and x is the state variable of the system. Onedimensional chaotic systems can be easily predicted by implementing some estimation technologies due to its simple structure. A 2D-ICM integrates two 1D-ICMs with different parameters [28]. In order to further enhance the complexity of chaotic systems, a 3D-ICM is proposed. The mathematical definition of 3D-ICM is as follows: where a, b, and c are control parameters of the system; x, y, and z are the state variables of the system. In this paper, a, b, c ∈ R and a = 0, b = 0, c = 0. As shown in Formula (2), 3D-ICM consists of three 1D-ICMs with different system parameters. When a = 0, the mathematical definition of 3D-ICM is the same as that of 2D-ICM. Thus, 2D-ICM is a special case of 3D-ICM.

Attractor
The phase diagram of a chaotic system refers to a set of numbers to which the system can evolve under given initial values. In the case of 3D chaotic systems, their attractors can be characterized by a larger number of points occupying a region in a threedimensional phase space. To visualize the attractors of 3D chaotic systems, the initial value (0.7, −0.3, 0.8) and iteration times i = 20,000 are selected. A comparison of chaotic attractors of 3D-ICM and other 3D chaotic maps is given in Figure 1. As is depicted in Figure 1, the output sequence of 3D-ICM almost fills the entire phase space range of (−1, 1), which shows that 3D-ICM has the better ergodicity property than 3D-DHCS and 3D-Henon.

Lyapunov Exponent
In the theory of nonlinear dynamics, the Lyapunov exponent (LE) is an important chaotic characteristic that is used to describe the infinitesimal deviation of orbit in phase space by a quantitative method. The sensitivity to initial conditions is an important characteristic of chaos, that is, two orbits in phase space that are close to each other will separate exponentially over time. The LE represents a measure of the mean convergence or mean divergence of similar orbitals in phase space. The larger the value of LE is, the faster the phase space trajectory diverges. This means that the more sensitive it is to the initial conditions, the more chaotic the system is. The Lyapunov exponents of an n-dimensional chaotic system is calculated as follows: Let the Jacobian matrix of n-dimensional chaotic system be J. Given the initial value (x 1 (0), x 2 (0), · · · , x k (0)), and we can obtain a series of values The Jacobian matrix of the first n is as follows: . (3) J k can be obtained from the following equation: The Lyapunov exponents of an n-dimensional chaotic system can be obtained as follows: where λ 1 λ 2 , · · · , λ k are the eigenvalues of matrix J k . As Figure 2a illustrates, the three Les of the 3D-ICM are greater than 0 in all parameter spaces. From the attractor in the last subsection, we know that the 3D-ICM is globally bounded. What is more, the three Les are all greater than 0 in this subsection, thus the 3D-ICM is a hyperchaotic system. As is depicted in Figure 2b, the LE of the 3D-ICM is larger than the Les of the other ICM, which indicates that the 3D-ICM is chaotic map with more complex chaotic dynamical behaviors.

Sample Entropy
At present, the approximate entropy (ApEn) Algorithm [31] is widely used to measure the complexity of chaotic sequences. However, since the ApEn algorithm avoids errors by counting the number of templates that match its own data, if the threshold value is small, there will be a large number of template matches, resulting in the phenomenon that the effect of deviation is not obvious, so there is a margin for error. In 2000, a new quantization algorithm of time series complexity, called Sample Entropy (SE), was proposed [32], which is an improved algorithm of ApEn. The SE of a time series {x 1 , x 2 , · · · , x N } is defined by as follows: where dimension m and distance r are usually set as 2 and 0.2 × SD, respectively. SD represents the standard deviation of the tested time series, and A and B are the number of vectors, which are Chebyshev distance between X m (i) and X m (j). As Figure 3a illustrates, the three Ses of the 3D-ICM are greater than 0 in all parameter spaces. Figure 3b compares the Ses of existing chaotic maps. It can be observed that the 3D-ICM has much larger Ses than others, which indicates 3D-ICM has more complex output sequences. It can be known from the above analysis that the trajectories of the 3D-ICM are difficult to predict over time owing to its complex chaotic properties. Which indicates that the 3D-ICM shares a much larger region, better ergodicity, and more unpredictable chaotic behaviors than others in terms of the results of the attractor, LE, and SE. In the next section, the 3D-ICM will be applied in image encryption.

An Image Encryption Scheme Based on 3D-ICM
An image encryption scheme based on the 3D-ICM is presented in this section. The structure of the image encryption scheme is shown in Figure 4. The security key produces the initial conditions for the 3D-ICM to generate a chaotic output sequence. The proposed scheme is mainly based on the basic concepts of confusion and diffusion. The confusion part can effectively separate adjacent pixels of an image into different positions, while the diffusion part can change the pixels' values using a reversible transform. Multiple rounds of confusion and diffusion were carried out to obtain a higher level of security. In this paper, two rounds of confusion and diffusion are used to compromise security and computational efficiency. The decryption process is the inverse of the encryption process. As for the color image, we first only need to divide the color image into three channels of R, G, and B, and then perform confusion and diffusion processing on these three channels. We then only need to recombine the three encrypted channels to obtain the result: the encrypted color image. Decryption is the reverse process of encryption.

Key Distribution
The initial conditions of the 3D-ICM are determined by the security key. When the key space of the cryptosystem based on chaotic maps is more than 2 100 , it can resist brute-force attacks [29]. The algorithm's key length is set to 256 bits in this paper, so the algorithm's key space is 2 256 , which demonstrates it can resist brute-force attacks. Figure 5 illustrates the structural framework of the security key. We can see from Figure 5 that it contains nine parts {a, b, c, x 0 , y 0 , z 0 , T, C 1 , C 2 }, where {a, b, c, x 0 , y 0 , z 0 } are the initial states, T is the perturbation parameter in order to disturb the initial conditions, and C = {C 1 , C 2 } contains two coefficients for the perturbation parameter. Each parameter a, b, c, x 0 , y 0 , z 0 , T, C 1 , C 2 has a length of 32 bits. The 32-bit binary strings in the security key {s 1 , s 2 , · · · , s 40 } are used to produce decimal 9 parameters using the IEEE 754 format. Thus, the initial conditions of the 3D-ICM for the two rounds can be calculated as follows: (7) Figure 5. The structure of the security key.

Confusion Part
A novel confusion method, using three chaotic matrices to randomly separate the adjacent pixels of an image into different positions, is presented in this part. The confusion operation should be carried out in a square matrix, L 2 × L 2 , where parameter L is the block size. If the plaintext image which will be processed has a size X × Y, the length of L 2 is obtained as follows: The detail confusion process algorithm is described in Algorithm 1.

1.
Truncate the plaintext image as size L 2 × L 2 , where L 2 is calculated using Equation (8).

2.
Generate three chaotic sequences, X, Y, and z, where these lengths are L 2 × L 2 .

3.
Reshape the sequences X, Y, and z in columns into L 2 × L 2 . matrices, denoted as X L , Y L , and Z L .

4.
Matrices S1 = X L × Y L and S2 = X L × Z L can be obtained.

5.
Sort S 1 and S 2 in ascending order, and obtain their index vectors I 1 and I 2 . 6.
The pixel locations of the plaintext image P are rearranged using the index matrix I i , where i = {1,2}.

7.
The confusion image F is obtained.
A numerical example is presented in Figure 6. Matrices X L and X L are reshaped by the chaotic sequences X and Y, whose length are 4 2 . It can be observed that almost every pixel is scrambled after a round confusion. Figure 7 presents a comparison plaintext image P and confusion image F. The histogram of F is the same as that of P due to the confusion process only changing the positions of the image's pixels.

Diffusion Part
By changing the value of pixel points, the diffusion part achieves the result that the small differences in the plaintext image are diffused to almost all pixels of the ciphertext image. The chosen plaintext attack is used to attack an encryption scheme via examining how a small difference affects the encryption performances of a cryptosystem. An excellent diffusion part can help cryptosystems to defeat the attack. To obtain a much higher level of security, a diffusion scheme relying on an index matrix related to chaotic sequence is presented. In one round of encryption, the matrix S 1 and its index matrix I 1 are used for confusion, firstly, while the other matrix S 2 and its index matrix I 2 are used for diffusion. Figure 8 shows a numerical example of the scheme. Suppose that confusion result F, chaotic matrix Y L , and the current pixel can randomly be changed using the previous one and the chaotic sequence. The pixel value of diffusion image can be obtained by: where α is the floor operation to obtain the greatest integer, which is not larger than α. As Figure 9 illustrates, the histogram of the diffuse image is evenly distributed, which is completely different from the plaintext image and the confused image. In the first round of encryption, the matrix S 1 and its index matrix I 1 are used for confusion, while the other matrix S 2 , its index matrix I 2 , and chaotic sequence Y are used for diffusion. Furthermore, in the second round of encryption, the matrix S 2 and its index matrix I 2 are used for confusion, while the other matrix S 1 , its index matrix I 1 , and chaotic sequence Z are used for diffusion. The two rounds of confusion and diffusion operations are applied to the proposed image encryption scheme to obtain the final image. The decryption process is generally the inverse operation of the encryption process. Thus, the process of diffusion can be described as follows: What is more, the original image can be obtained using the inverse operation of confusion.

Simulation Results
In an image encryption scheme, different types of images should be encrypted into ciphertext images with a high security level. Figure 10 presents the different types of images encrypted by the proposed method. All plaintext images include three grayscale images and a color image. These ciphertext images are random-like images with uniformly distributed, which indicates the proposed method can effectively encrypt different types of images. In addition, an image encryption scheme should have high encryption efficiency. The proposed encryption scheme can achieve a higher encryption efficiency owing to confusion and diffusion having lower computational complexity. The complete numerical experiments are performed in Matlab R2018a in a workstation with Intel(R) Core (TM) i7-1180H CPU @ 2.3 GHz with 16.0 GB RAM memory under Windows 10 OS. Table 1 compares the required time between the proposed encryption scheme and existing encryption schemes in encrypting same image. Here, images in USC-SIPI Miscellaneous dataset are used in this paper. It can be observed that the proposed encryption scheme has faster encryption speeds than existing encryption schemes for the same image. Therefore, the proposed method exhibits lower time complexity.

Security Analysis
Some analysis such as key security analysis, histogram analysis, correlation analysis, and differential attack, are presented to indicate the even better performance of the proposed image encryption scheme.

Key Security Analysis
An image encryption scheme should firstly have a large enough key space to resist brute-force attacks. The scheme proposed in this paper has a key space of 2 256 since the key length is 256 bits. Secondly, it is very sensitive to the initial key, otherwise the incorrect keys, which are slightly different from the initial key, can also obtain the plaintext information. Figure 11 shows the key sensitivity results. The same plaintext image is encrypted and decrypted by two keys K 1 and K 2 with one bit difference. Each key can decrypt the original image. If the other key is used for decryption, the original image information cannot be obtained. Thus, the proposed scheme is sensitive to its keys in both the encryption and decryption processes. Figure 11. Key sensitivity analysis: (a) the plaintext image; (b) the ciphertext image E 1 encrypted by K 1 ; (c) the ciphertext image E 2 encrypted by K 2 ; (d) the decrypted image using correct key; (e) the decrypted D 1 from E 1 using K 2 ; (f) the decrypted D 2 from E 2 using K 1 .

Histogram Analysis
Histograms can illustrate the distributions of pixel values of image. The histogram of the original and the encrypted images are presented in Figure 10. It can be clearly observed that the distributions of the encrypted images are random and very different from the distributions of the original images. When verifying the security of encrypted images, histogram analysis is necessary, but insufficient to verify the uniformity of encrypted images. In order to further evaluate the uniformity of the histogram of the encrypted images, we use the chi-square test in this paper. Its statistic χ 2 value can be defined as: where E i is value of the current pixel, and Z is the expected occurrence frequencies of each pixel. When α = 0.05, χ 2 0.05 = 293.2478. A small χ 2 value means the much more uniform distribution of the histogram of an image. The encryption image can pass the chi-square assessment when the calculated χ 2 value of a ciphertext image does not exceed 293.2478 [28]. The chi-square values of virous encryption images are shown in Table 2. Obviously, all results do not exceed 293.2478, which shows that the distributions of the histogram of the encrypted images using the proposed encryption scheme are uniformly distributed.

Correlation Analysis
There is a strong correlation between each pixel of the digital image, which means that there is a small difference in the gray value between each pixel in a large area of the digital image. The pixel correlation of an image includes three directions: horizontal, vertical, and diagonal. One of the goals of an encrypted image is to reduce the correlation between adjacent pixels. The lower the correlation between pixels, the better the encryption algorithm, the better the encryption effect, and the higher the security. The correlation of two pixels sequences can be defined by: where u and v are adjacent pixels values, and r uv is the correlation coefficient of the adjacent pixels. When r uv → 1, which indicates that adjacent pixels are highly correlated, and when r uv → 0, which demonstrates that adjacent pixels are low correlated [33]. In other words, when testing the relationship number of the phase encrypted image, the closer the value is to 0, the lower the correlation is. The 3000 pairs of adjacent pixels, from the original and encrypted images of three directions in horizontal, vertical, and diagonal directions are randomly selected. The distributions of these pairs are shown in Figure 12. As Figure 12 illustrates, the pixels of the plaintext image are close to the diagonal line, while the pixels of the ciphertext image are randomly distributed. Table 3 presents the comparison results of the correlations of adjacent pixel from plaintext and ciphertext images. Here, we use Lena with size of 512 × 512. It can be observed that the r uv values of the proposed method are closer to 0 compared to the other schemes.

Differential Attack
Diffusion is an important property in the process of image encryption. When the pixel position or value of the original image changes a little, this change will spread to the whole image in an unpredictable way under the diffusion operation. In general, the attacker will modify one or several pixels in the original image, and then observe the changes of the results to find some meaningful relationship between the original image and the encrypted image. A good encryption algorithm, if a small change in the original image causes a great change in the scrambling and diffusion effect of the encrypted image, then the efficiency of differential attack is relatively low. In order to evaluate the ability of an image encryption scheme to resist differential attack, we use the number of pixels change rate (NPCR) and unified averaged changed intensity (UACI) tests [35]. Suppose that C 1 and C 2 represent two encrypted images, respectively. NPCR and UACI can be described as follows: U ACI(C 1 , where C 1 and C 2 are two encrypted images, whose original images have only one pixel change, and D(m, n) represents the number of different pixels of the encrypted images C 1 and C 2 . The ideal expectations of NPCR and UACI are NPCR E = 99.6094 and U ACI E = 33.463507, respectively [35]. In this test, one pixel from each original image is randomly chosen, and its value is changed to generate another original image. The mean values of NPCR and UACI of serval encryption schemes are shown in Table 4.  Table 4. The mean values of NPCR and UACI of serval encryption schemes are shown in Table 5. Obviously, compared with the results of other references, the synthesis results of the algorithm in this paper are closer to the ideal expected value, which shows that the proposed algorithm has better effect in resisting differential attack.

Two-Dimensional Detrending Fluctuation Analysis
In order to implement the scaling analysis of the different encryption schemes, the Two-Dimensional Detrending Fluctuation Analysis (2D-DFA) [37] is used to analyze the original image P, the confusion image F, and the diffusion image E when the scrambling stage considers two operations in this paper. Table 6 presents the result of the scaling analysis for encrypting the same image with different schemes, where α is the scaling fluctuation exponent. When the scaling fluctuation exponent α of the ciphertext image is close to 1, we assume that the encryption system is secure from a perception point of view and does not reveal any information of the original image [38]. As can be seen from Table 6, the values of the scaling exponents of diffusion image E are lower than that of the plaintext image P, and they are close to 1. Therefore, the encrypted image does not reveal any information that can distinguish the original image.

Conclusions
In this work, a 3D chaotic system with high complexity, called the 3D-ICM, was proposed. The excellent hyperchaotic dynamic behavior of the system has been described via quantitative evaluation criteria, such as LE and SE. Furthermore, compared with the existing chaotic system, it can be seen that the 3D-ICM has superior chaotic characteristics, which makes it usable in the field of image encryption. Thus, we proposed a chaotic image encryption scheme based on confusion and diffusion and used the 3D-ICM as a chaotic sequence generator. The scheme has low time complexity because it only involves one multiplication operation in the diffusion process. In addition, the scheme can also resist various attacks including brute-force attack, statistic attack, and differential attack, so it has a high level of security. In the future work, we will investigate the further application of the scheme in video encryption and field-programmable gate array (FPGA).