3-Image Bit-Level Encryption Algorithm Based on 3D Nonequilateral Arnold Transformation and Hyperchaotic System

In this paper, we propose a novel 3-image bit-level encryption algorithm based on 3D nonequilateral Arnold transformation and hyperchaotic system. Firstly, the three plain images with N × M are decomposed into 8-bit planes and then they overlap into a 3D bit matrix with size N × M × 24. *en, the 3D bit matrix is scrambled by 3D nonequilateral Arnold transformation and the scrambled 3D bit matrix is integrated and transformed into three 2D pixel-level images. Finally, the hyperchaotic system is used to diffuse the three 2D pixel-level images; then three diffused images are rearranged to be one color image, resulting in the encrypted image. Numerical simulations and analyses of the proposed encryption scheme are given to validate the feasibility and safety of the method. *e statistical analyses like histogram, correlation, and entropy confirm that the proposed method can effectively resist statistical attacks and security key analysis shows that the key space is large enough to render the brute-force attack ineffective in proposed method. *e differential analysis confirms that the proposed method is effective against differential attacks and the results of the experiment confirmed that the method can resist occlusion attack.


Introduction and Related Works
Image is an important carrier for human visual system to obtain rich information and is one of the important ways of information transmission nowadays. As the most important carrier of information, hundreds of millions of images are generated, stored, and transmitted over the network every day. How to ensure the security of image has become a hot topic in recent years. Image encryption is one of the important means to ensure image security. As early as 1989, Matthews proposed to introduce chaos theory into the image encryption system in [1] and found that the image encryption scheme based on chaos had high security. ereafter, image encryption based on chaos has been widely used and developed in many image encryption algorithms [2][3][4][5][6][7][8][9][10][11][12][13][14][15]. However, with the development of computer technology and password cracking technology, more and more shortcomings of chaos-based image encryption schemes are found [16][17][18][19][20][21]. In [16], Li and Zheng point out that the encryption algorithm proposed in [2] cannot resist chosen/knownplaintext attack. In [17], it is pointed out that the encryption scheme proposed in [3] can be broken by chosen-plaintext attack and differential known-plaintext attack, respectively. Zhu et al. [18] cryptanalyzed the image encryption scheme proposed in [4] using chosen-plaintext combined with chosen-ciphertext attack. Liu and Liu [19] found that some image encryption schemes based on hybrid chaotic system and cyclic elliptic curve are not only insecure against knownplaintext attack but also insecure against chosen-plaintext attack. In [21], Chen et al. analyzed a medical image encryption algorithm that integrates high-speed scrambling and adaptive pixel diffusion [21], and they completely recovered the original image from the corresponding encrypted image under bad randomness using the chosen plain image attack method. e cryptanalysis of image encryption algorithm motivates the cipher designers to design more secure schemes. We know that the common encryption algorithm is to turn an image into a white noise image through the encryption algorithm, so it is vulnerable to attack by existing attack methods. From the above, we find that many image encryption algorithms are broken because the encryption scheme cannot resist the chosen-plaintext attack. So, in this paper, we have proposed a novel method for 3-image encryption based on 3D nonequilateral Arnold transformation and hyperchaotic system, which can effectively confuse the attacker and resist the chosen-plaintext attack. e proposed scheme includes three steps: the pixel value of the image being converted to a binary value, permutation using 3D nonequilateral Arnold transformation, and diffusion using the chaotic sequence generated by hyperchaotic system. In the permutation stage, the positions of elements in the superimposed 3D bit matrix are rearranged, so the change of each original image pixel will affect the entire rearranged 3D bit matrix. In the stage of diffusion, according to equation (7), the change of one-pixel value will affect the change of other pixel values, resulting in the coupling of pixels at different positions.
is encryption scheme can encrypt three grayscale images into one color image; this can confuse the attacker to some extent. Instead of simply using a 1image method to encrypt three images, respectively, and then compose the result into an RGB-encrypted image, in our approach, the change in the pixel value of each original image affects the result of the entire encryption. e proposed encryption scheme is applied to three publicly accessible test images, and the results indicate that our algorithm not only can effectively resist statistical attacks but also is effective against chosen-plaintext attack. e rest of this paper is structured as follows. Section 2 introduces the hyperchaotic system and 3D nonequilateral Arnold transformation. e 3-image bit-level scheme based on 3D nonequilateral Arnold transformation and hyperchaotic system is described in detail in Section 3. Section 4 discusses and analyzes the numerical simulation of the proposed scheme. Finally, the conclusion is drawn in Section 5.

3D Nonequilateral Arnold Transformation.
Based on the researches of Shao et al. [26] and Li et al. [27], Wu and Tian [28] presented the 3D nonequilateral Arnold transformation (2) and corresponding inverse transformation: In equation (2), c z � r z (M/gcd(N, M)), c x � r x (K/gcd(M, K)), c y � r y (N/gcd(K, N)), and gcd(·) represents the greatest common divisor; b x , b y , b z , r x , r y , r z are any positive integer. Its inverse transformation can be achieved by the three following expressions:

3-Image Bit-Level Encryption Algorithm
e flowchart of the proposed encryption scheme is shown in Figure 2. We consider three original grayscale images of size N × M represented by three matrixes I 1 , I 2 , and I 3 , respectively. By iterating hyperchaotic system in equation (1) e procedure of the proposed algorithm is described in detail as follows: Step 1 Preprocessing chaotic sequences H 1 , H 2 , H 3 , and H 4 , we get four integer sequences U 1 , U 2 , U 3 , and U 4 , and their elements are between 0 and 255. e mathematical representation of preprocessing is We have Here, i � 1, 2, · · · , L, floor(x) returns the nearest integer less than or equal to x, and mod returns the remainder after division.
Step 2 Transform the three original grayscale images into three bit-level cubes with a size of N × M × 8, and by superimposing them together, we can get a bit-level cubic J of size N × M × 24.
Step 3 Take six elements from the sequence U 4 as Arnold parameters b x , b y , b z , r x , r y , and r z ; then the bit-level cubic J is scrambled by using the 3D nonequilateral Arnold transformation, and obtain scrambled bit-level cubic A. Step 4 Divide bit-level cubic A into three bit-level cubes B 1 , B 2 , and B 3 with a size of N × M × 8; then perform transformation from these bit-level cubes to three 2D pixel-level images C 1 , C 2 , and C 3 .
Step 5 According to the column scanning, the three 2D pixel-level images are rearranged into three

Key
Hyperchaotic system  sequences Step 6 e values of the sequences K 1 , K 2 , and K 3 are diffused with equation (7)fd7; then we can obtain three diffusion sequences D 1 , D 2 , and D 3 .
We have i � 1, 2, . . . , L and the initial values k 10 , k 20 , k 30 , d 10 , d 20 , and d 30 can be used as encryption and decryption keys.
Step 7 Rearrange the three sequences D 1 , D 2 , and D 3 into three 2D pixel-level images R, G, and B with a size of N × M, respectively. en R, G, and B are converted into a color encrypted image E.
Since each step of the above encryption algorithm is reversible, the decryption is the reverse process of the encryption process.

Simulation Results and Analysis
e simulation experiments were carried out with MATLAB on a laptop.
e results of the three groups of images after 3D nonequilateral transformation are shown in Figure 4. e encryption and decryption results are shown in Figure 5.

Statistical Analysis.
To evaluate the performance of the proposed encryption scheme, some typical statistical analysis methods are adopted in the experiments, such as histogram analysis, correlation analysis, and information entropy analysis.

Histogram Analysis.
It is well known that histograms of meaningful image usually show irregular shape, and the histogram reflects the distribution rule of image pixel value. erefore, a good encryption scheme should change the irregular shape of the original image histogram to make it as evenly distributed as possible, so as to form a completely random-like cryptographic image. e histograms of the original images and their corresponding encrypted color images are shown in Figure 6.
To measure the degree of deviation of pixel distribution from absolute uniformity, we introduce Chi-square test, which can measure the degree of deviation from absolute uniform distribution of image pixel distribution. e Chisquare test can be defined as where k i represents the number of occurrences of the pixel value i and k is the expected frequency. So, the smaller χ 2 is, the more evenly distributed the image is. e χ 2 values of the original images and their corresponding encrypted color images are shown in Table 1. From Table 1, we can find that the χ 2 values of the original grayscale images with size of 256 × 256 are very large. In contrast, the χ 2 values of each component of the encrypted color image are much smaller. is indicates that the proposed encryption scheme can resist histogram attacks.

Correlation Analysis.
Meaningful images usually show high correlation; that is, neighboring pixels in each direction (horizontal, vertical, and diagonal directions) have very close pixel values. A good image encryption algorithm can effectively break the correlation between adjacent pixels of the original image. In order to test the correlations of adjacent pixels, the correlation coefficient of adjacent pixels (CCAP) C xy [7] is introduced, which can measure the degree of correlation in a specific direction: where x � (1/N) N i�1 x i and y � (1/N) N i�1 y i . e CCAP of original and encrypted images are listed in Table 2. From Table 2, we can easily see that the correlation coefficient of the three original images is close to 1 in each direction, while the correlation coefficient of the components of color encrypted image is close to 0 in each direction. In addition, according to the data in Table 2, compared with the method in [7], our algorithm can more effectively eliminate the correlation between adjacent pixels of the original image.
Besides, Figure 7 shows the correlation distribution among vertical adjacent pixels in original images and their encrypted images. It is clear that three strongly correlated original images can be developed into the corresponding color encrypted images with an almost random relationship among adjacent pixels. is further proves that the proposed 3-image encryption algorithm could resist the correlation analysis attack.

Information Entropy. Information entropy H(m)
is used to describe the uncertainty of information source. For images, H(m) is proportional to the uniformity of gray value distribution. As for a message source m, the mathematical representation of the corresponding information entropy H(m) can been expressed as follows: where L and p(m i ) represent the total number and the probability of symbol m i , and log represents the base 2 logarithm so that the entropy is expressed in bits. For 8-bit grayscale image, the probability of each value within [0, 255] is (1/256), so the ideal entropy value of a well-encrypted image is 8 bits. e information entropies of our scheme, [15], and [29] are listed in Table 3. It is indicated that the information entropies of the components of color encrypted images are close to the ideal value of 8; this means that the proposed 3-image encryption algorithm can counteract the entropy attack. As seen from Table 3, the information entropy obtained by our algorithm is larger than those of [15] and [29]; it means that our algorithm is more effective than the proposed algorithms in [15] and [29].

Security Key Analysis.
A secure encryption scheme should be extremely sensitive to the key and have enough large key space. To evaluate the sensitivity of the proposed e initial values k 10 , k 20 , k 30 , d 10 , d 20 , and d 30 are 8-bit integers, so S k 10 � S k 20 � S k 30 � S d 10 � S d 20 � S d 30 � 2 8 . erefore, the total key space S � S x 0 S y 0 S z 0 S h 0 S k S k 10 S k 20 S k 30 S d 10 S d 20 S d 30 ≈ 2.815 × 10 89 , which is so large that it can resist the brute-force attack. e comparison with other algorithms in key space is shown in Table 4, which shows that our proposed algorithm has larger key space compared to other algorithms.
As for image, the degree of difference between two images can be measured by the mean square error (MSE): where I(i, j) and H(i, j) stand for the gray values at point (i, j) of original color image and decrypted image, respectively. e MSE curves of test images for x 0 are computed and shown in Figure 9. Obviously, the MSE is very large with a little deviation to the correct keys and it is close to 0 only when the main keys are correct. It validates that the 3-image encryption algorithm is extremely sensitive to the security keys.

Differential Analysis.
According to the cryptanalyst's mastery of plaintext, ciphertext, and other data resources, the cryptanalysis attacks against encryption systems can be divided into the following four types: ciphertext-only attack, plaintext-known attack, chosen-plaintext attack, and chosen-ciphertext attack. Among them, the chosen-plaintext attack is the most powerful attack on cryptosystem. So, a good encryption system should be very sensitive to the plain images. In other words, if a little change in a plain image can lead to a completely different cipher image, then this cryptosystem can effectively resist chosen-plaintext attack and differential attacks [29,31]. e number of pixels changing rate (NPCR) and the unified averaged changed intensity (UACI) are two widely used performance indexes for differential attack analysis. For two encrypted images C R,G,B , C R,G,B ′ the corresponding before and after one pixel of the plain image is changed, respectively. Mathematically, NPCR and UACI can be defined in the following equations [32]: respectively; here, H represents the largest allowed pixel value in the image, and For two random images, the theoretical values of NPCR and UACI for an 8-bit gray image are NPCR � 99.6094% and UACI � 33.4635% [33]. e NPCR and UACI values of plain images and changing a pixel value in one of the plain images are shown in Table 5. It can be seen from Table 5 that only one-pixel value of one of the three images has changed the NPCR values no less than 0.9696 and UACI values no less than 0.3336. at is, any tiny changes in one of the plain images can result in a totally different cipher image, so the proposed scheme can resist differential attacks and chosen-plaintext attack.

Performance in Lossy and Noisy Communication
Channels. In this section, in order to analyze the performance of the proposed encryption algorithm in noisy and       Figures 10 and 11. We first occlude 1/256, 1/64, and 1/16 of Figure 5(a), and the corresponding recovered images with correct keys are shown in Figure 10. It can be seen from the figure that only the basic outline of the original image can be restored when a small part of the pixels in Figure 5(a) are obscured. However, when the occlusion ratio increases, less information is obtained from the original image from the decrypted output image. When adding Salt & Pepper noise (density 0.00001) and Gaussian noise (mean 0 and variance 0.00001) to the encrypted image, the corresponding decrypted images are shown in Figure 11. It is indicated that the proposed encryption algorithm is weakly robust against Salt & Pepper noise attacks. However, it is very poorly robust to Gaussian noise.      Figure 10: Cut-encrypted images and the corresponding decrypted output: (a) cut 1/256, (b) decrypted "Lena" from (a), (c) decrypted "Liftingbody" from (a), (d) decrypted "Barbara" from (a), (e) cut 1/64, (f ) decrypted "Lena" from (e), (g) decrypted "Liftingbody" from (e), (h) decrypted "Barbara" from (e), (i) cut 1/16, (j) decrypted "Lena" from (i), (k) decrypted "Liftingbody" from (i), and (l) decrypted "Barbara" from (i).

Computational Complexity.
In the following, we analyzed the computational complexity of the proposed algorithm. In fact, the computational complexity of the encryption algorithm is determined by the operations and steps required to complete the encryption/decryption process, if some details such as the operating system, programming language, hardware on which the algorithm runs, and programming skills are ignored [34][35][36]. In addition, during the generation of chaotic sequences, the hyperchaotic system is iterated for many times, and the time complexity of floating-point operation is O(4 × M × N). erefore, the total time complexity of the proposed algorithm is O(24 × M × N), which is efficient for real-time applications.

Conclusion
In this work, we presented a new scheme for 3-image encryption and decryption. In this scheme, the pixel values of the three grayscale images are converted to binary values first. Next, we put them on top of each other to get a 3D bit matrix and then it is scrambled using the 3D nonequilateral Arnold transformation. en the scrambled 3D bit matrix is divided into three equal parts and converted into three 2D pixel-level images. Finally, the chaotic sequences generated by the hyperchaotic system are used to diffuse the three 2D pixel-level images and the three diffused images are considered as RGB components of color encrypted image. We know that the method of simply using a 1-image method to encrypt three images, respectively, and then composing the result into an RGB-encrypted image has a disadvantage; that is, the change of pixel value of each image will only affect one component of the RGB-encrypted image. However, the algorithm proposed in this paper overcomes this shortcoming. According to the simulation results of differential analysis, only changing one-pixel value of any image will cause a change of at least 96.96% ciphertext.
e extensive experiments demonstrate that our proposed 3-image encryption scheme has the ability to resist several types of attacks such as statistical analysis, bruteforce attack, differential attack, and occlusion attack.
ese results show that the proposed encryption algorithm is promising for secure transmission of three images by single algorithm. In the future, in order to adapt to more and more serious network security problems, the design of image encryption technology with high security and strong robustness is worth further study.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest. (d) (e) (f ) Figure 11: Decrypted output for noise attacked images: (a) decrypted "Lena" from encrypted image to which Salt & Pepper noise is added, (b) decrypted "Liftingbody" from encrypted image to which Salt & Pepper noise is added, (c) decrypted "Barbara" from encrypted image to which Salt & Pepper noise is added, (d) decrypted "Lena" from encrypted image to which Gaussian noise is added, (e) decrypted "Liftingbody" from encrypted image to which Gaussian noise is added, and (f ) decrypted "Barbara" from encrypted image to which Gaussian noise is added.