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

Authors: Huiqing Huang; Dongsheng Cheng
Journal: Security and Communication Networks
 (2020)

---

## Abstract

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 withN×M are decomposed into 8-bit planes and then they overlap into a 3D bit matrix with size N×M×24. Then, 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. The 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. The 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.


---

## Body

## 1. 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. Thereafter, image encryption based on chaos has been widely used and developed in many image encryption algorithms [2–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–21]. In [16], Li and Zheng point out that the encryption algorithm proposed in [2] cannot resist chosen/known-plaintext 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 known-plaintext 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.The 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. The 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. This encryption scheme can encrypt three grayscale images into one color image; this can confuse the attacker to some extent. Instead of simply using a 1-image 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. The 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.The rest of this paper is structured as follows. Section2 introduces the hyperchaotic system and 3D nonequilateral Arnold transformation. The 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.


## 2. Preliminary Work

### 2.1. Hyperchaotic System

In 1999, Chen et al. found a chaotic system similar to Lorenz chaotic system but topologically not equivalent and named this chaotic system as Chen’s chaotic system [22]. In 2006, Gao et al. promoted four-dimensional (4D) Chen’s chaotic system; thus, a 4D hyperchaotic system [23] is obtained, which is shown as(1)x˙=36y−x,y˙=−16x−xz+28y−h,z˙=xy−3z,h˙=x+k.where k is the control parameter of the hyperchaotic system. When −0.7≤k≤0.7, the corresponding Lyapunov exponents of system (1) are λ1,λ2>0,λ3=0,λ4<0, and system (1) is hyperchaotic [24]. According to [25], when k=0.2, the Lyapunov exponents of the hyperchaotic system are λ1=1.552,λ2=0.023,λ3=0,λ4=−12.573, and the hyperchaotic attractors are shown in Figure 1. Set the initial value x0=1,y0=0.1,z0=1.4,h0=4 and, through iterative system (1), the temporal evolutions of system (1) are obtained, as is shown in Figure 1. For more detailed analysis of the complex dynamics of system (1), please see [23, 25].Figure 1
Hyperchaos attractors of system (1). (a) x-y plane; (b) x-z plane.
(a)(b)


### 2.2. 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:(2)xzyzzz=1bz0cz1+bzcz0001xnynznmodNMK,xxyxzx=10001bx0cx1+bxcxxzyzzzmodNMK,xn+1yn+1zn+1=1+bycy0cy010by01xxyxzxmodNMK.In equation (2), cz=rzM/gcdN,M,cx=rxK/gcdM,K,cy=ryN/gcdK,N, and gcd⋅ represents the greatest common divisor; bx,by,bz,rx,ry,rz are any positive integer. Its inverse transformation can be achieved by the three following expressions:(3)yx=yn+1,xx=xn+1−cyzn+1modN,zx=zn+1−byxxmodK,xz=xx,zz=zx−cxyxmodK,yz=yx−bxzzmodM,zn=zz,yn=yz−czxzmodM,xn=xz−bzynmodN.


## 2.1. Hyperchaotic System

In 1999, Chen et al. found a chaotic system similar to Lorenz chaotic system but topologically not equivalent and named this chaotic system as Chen’s chaotic system [22]. In 2006, Gao et al. promoted four-dimensional (4D) Chen’s chaotic system; thus, a 4D hyperchaotic system [23] is obtained, which is shown as(1)x˙=36y−x,y˙=−16x−xz+28y−h,z˙=xy−3z,h˙=x+k.where k is the control parameter of the hyperchaotic system. When −0.7≤k≤0.7, the corresponding Lyapunov exponents of system (1) are λ1,λ2>0,λ3=0,λ4<0, and system (1) is hyperchaotic [24]. According to [25], when k=0.2, the Lyapunov exponents of the hyperchaotic system are λ1=1.552,λ2=0.023,λ3=0,λ4=−12.573, and the hyperchaotic attractors are shown in Figure 1. Set the initial value x0=1,y0=0.1,z0=1.4,h0=4 and, through iterative system (1), the temporal evolutions of system (1) are obtained, as is shown in Figure 1. For more detailed analysis of the complex dynamics of system (1), please see [23, 25].Figure 1
Hyperchaos attractors of system (1). (a) x-y plane; (b) x-z plane.
(a)(b)


## 2.2. 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:(2)xzyzzz=1bz0cz1+bzcz0001xnynznmodNMK,xxyxzx=10001bx0cx1+bxcxxzyzzzmodNMK,xn+1yn+1zn+1=1+bycy0cy010by01xxyxzxmodNMK.In equation (2), cz=rzM/gcdN,M,cx=rxK/gcdM,K,cy=ryN/gcdK,N, and gcd⋅ represents the greatest common divisor; bx,by,bz,rx,ry,rz are any positive integer. Its inverse transformation can be achieved by the three following expressions:(3)yx=yn+1,xx=xn+1−cyzn+1modN,zx=zn+1−byxxmodK,xz=xx,zz=zx−cxyxmodK,yz=yx−bxzzmodM,zn=zz,yn=yz−czxzmodM,xn=xz−bzynmodN.


## 3. 3-Image Bit-Level Encryption Algorithm

The flowchart of the proposed encryption scheme is shown in Figure2. We consider three original grayscale images of size N×M represented by three matrixes I1, I2, and I3, respectively. By iterating hyperchaotic system in equation (1), generate four chaotic sequences, H1=h11,h12,…,h1l, H2=h21,h22,…,h2l, H3=h31,h32,…,h3l, and H4=h41,h42,…,h4l, and their size of L=N×M. The procedure of the proposed algorithm is described in detail as follows:Step 1
Preprocessing chaotic sequencesH1, H2, H3, and H4, we get four integer sequences U1, U2, U3, and U4, and their elements are between 0 and 255. The mathematical representation of preprocessing is(4)U1=u11,u12,…,u1L,U2=u21,u22,…,u2L,U3=u31,u32,…,u3L,U4=u41,u42,…,u4L.We have(5)u1i=floor10kh1imod256,u2i=floor10kh2imod256,u3i=floor10kh3imod256,u4i=floor10kh4imod256.Here,i=1,2,⋯,L, floorx 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 ofN×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 sequenceU4 as Arnold parameters bx, by, bz, rx, ry, and rz; 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 cubicA into three bit-level cubes B1, B2, and B3 with a size of N×M×8; then perform transformation from these bit-level cubes to three 2D pixel-level images C1, C2, and C3.Step 5
According to the column scanning, the three 2D pixel-level images are rearranged into three sequencesK1=k11,k12,…,k1L, K2=k21,k22,…,k2L, and K3=k31,k32,…,k3L, respectively.Step 6
The values of the sequencesK1, K2, and K3 are diffused with equation (7)fd7; then we can obtain three diffusion sequences D1, D2, and D3.(6)D1=d11,d12,…,d1L,D2=d21,d22,…,d2L,D3=d31,d32,…,d3L,(7)d1i=d1i−1+d2i−1+k1i+k1i−1+k2i−1mod256⊕k3i−1⊕d3i−1⊕u1i,d2i=d2i−1+d3i−1+k2i+k2i−1+k3i−1mod256⊕k1i−1⊕d1i−1⊕u2i,d3i=d3i−1+d1i−1+k3i+k3i−1+k1i−1mod256⊕k2i−1⊕d2i−1⊕u3i.We havei=1,2,…,L and the initial values k10, k20, k30, d10, d20, and d30 can be used as encryption and decryption keys.Step 7
Rearrange the three sequencesD1, D2, and D3 into three 2D pixel-level images R, G, and B with a size of N×M, respectively. Then R, G, and B are converted into a color encrypted image E.Figure 2
The flowchart of the proposed encryption.Since each step of the above encryption algorithm is reversible, the decryption is the reverse process of the encryption process.


## 4. Simulation Results and Analysis

The simulation experiments were carried out with MATLAB on a laptop. The initial values and parameters of the hyperchaotic system (1) are x0=1, y0=0.1, z0=1.3, h0=4, and k=0.2. The initial values of step 6 are k10=34, k20=234, k30=89, d10=60, d20=74, and d30=234. There are three groups of test images: the first group contains three images (“Lena,” “Liftingbody,” and “Barbara”), the second group contains three images (“Cameraman,” “Rice,” and “Text”), and the third group contains three images (“Onion,” “Peppers,” and “Toyobjects”), which are shown in Figure 3. The results of the three groups of images after 3D nonequilateral transformation are shown in Figure 4. The encryption and decryption results are shown in Figure 5.Figure 3
Test images: (a) “Lena,” (b) “Liftingbody,” (c) “Barbara,” (d) “Cameraman,” (e) “Rice,” (f) “Text,” (g) “Onion,” (h) “Peppers,” and (i) “Toyobjects.”
(a)(b)(c)(d)(e)(f)(g)(h)(i)Figure 4
The results of the three groups of images after 3D nonequilateral transformation: (a) scrambling of “Lena,” (b) scrambling of “Liftingbody,” (c) scrambling of “Barbara,” (d) scrambling of “Cameraman,” (e) scrambling of “Rice,” (f) scrambling of “Text,” (g) scrambling of “Onion,” (h) scrambling of “Peppers,” and (i) scrambling of “Toyobjects.”
(a)(b)(c)(d)(e)(f)(g)(h)(i)Figure 5
The encryption and decryption results: (a) encrypted color image for the first group of test images, (b) decryption of “Lena,” (c) decryption of “Liftingbody,” and (d) decryption of “Barbara”; (e) encrypted color image for the second group of test images, (f) decryption of “Cameraman,” (g) decryption of “Rice,” and (h) decryption of “Text”; and (i) encrypted color image for the third group of test images, (j) decryption of “Onion,” (k) decryption of “Peppers,” and (l) decryption of “Toyobjects.”
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)


### 4.1. 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.


#### 4.1.1. 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. Therefore, 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. The histograms of the original images and their corresponding encrypted color images are shown in Figure6.Figure 6
Histograms of the original images and their corresponding encrypted color images: (a) original image “Lena,” (b) original image “Liftingbody,” (c) original image “Barbara,” (d) R component of Figure5(a), (e) G component of Figure 5(a), and (f) B component of Figure 5(a).
(a)(b)(c)(d)(e)(f)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. The Chi-square test can be defined as(8)χ2=∑i=0255ki−k¯2k¯,where ki 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.Theχ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. This indicates that the proposed encryption scheme can resist histogram attacks.Table 1
χ2 values for plain and encrypted images.
Gray images256×256Figure5(a)256×256LenaLiftingbodyBarbaraRGBχ24114521325077465200.8125281.9141272.5625


#### 4.1.2. 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)Cxy [7] is introduced, which can measure the degree of correlation in a specific direction:(9)Cxy=∑i=1Nxi−x¯yi−y¯∑i=1Nxi−x¯2∑i=1Nyi−y¯2,where x¯=1/N∑i=1Nxi and y¯=1/N∑i=1Nyi. The 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.Table 2
CCAP in original and encrypted images.
Original imagesOur algorithmRef. [7]LenaLiftingbodyBarbaraRGBRGBHorizontal0.97180.96340.9278−−0.00210.0014−0.00160.00270.00340.0046Vertical0.94420.94790.8869−0.0011−0.00020.0005−0.0013−0.00340.0038Diagonal0.91810.91940.8697−0.00170.00150.0004−0.0039−0.00210.0013Besides, Figure7 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. This further proves that the proposed 3-image encryption algorithm could resist the correlation analysis attack.Figure 7
Correlation distribution of two vertical adjacent pixels in (a) original image “Lena,” (b) original image “Liftingbody,” (c) original image “Barbara,” (d) R component of Figure5(a), (e) G component of Figure 5(a), and (f) B component of Figure 5(a).
(a)(b)(c)(d)(e)(f)


#### 4.1.3. Information Entropy

Information entropyHm is used to describe the uncertainty of information source. For images, Hm is proportional to the uniformity of gray value distribution. As for a message source m, the mathematical representation of the corresponding information entropy Hm can been expressed as follows:(10)Hm=−∑i=0L−1pmilogpmi,where L and pmi represent the total number and the probability of symbol mi, 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.The 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].Table 3
Comparison of information entropies for encrypted images by different encryption algorithms.
Our algorithmRef. [15]Ref. [29]RGBRGBRGBInformation entropy7.99787.99697.99707.98987.98987.99087.98967.98937.9896


### 4.2. 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 encryption scheme to the key, one of the correct keys can be changed slightly, while the others remain unchanged. To analyze the sensitivity of the proposed algorithm to the key, two sets of keys are used to decrypt the encryption image. Figures8(a)–8(c) show the decrypted images with an incorrect key x0, while the other keys are unchanged. Figures 8(d)–8(f) illustrate the decrypted images with a wrong key k, while the other keys are all correct. It is obvious that even the tiny change of 10−15 with the correct keys results is completely unrecognizable. So, the key spaces for x0, y0, z0, h0, and k are Sx0=Sy0=Sz0=Sh0=Sk≈1015.Figure 8
Decryption images with wrong keyx0=1+10−15: (a) decrypted image “Lena,” (b) decrypted image “Liftingbody,” and (c) decrypted image “Barbara”; and decryption images with incorrect key k=0.2+10−15: (d) decrypted image “Lena,” (e) decrypted image “Liftingbody,” and (f) decrypted image “Barbara.”
(a)(b)(c)(d)(e)(f)The initial valuesk10, k20, k30, d10, d20, and d30 are 8-bit integers, so Sk10=Sk20=Sk30=Sd10=Sd20=Sd30=28. Therefore, the total key space S=Sx0Sy0Sz0Sh0SkSk10Sk20Sk30Sd10Sd20Sd30≈2.815×1089, which is so large that it can resist the brute-force attack. The 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.Table 4
Comparison of key spaces.
AlgorithmOur algorithmAnand et al. [30]Zhou et al. [10]Key space2.815×108910752187As for image, the degree of difference between two images can be measured by the mean square error (MSE):(11)MSE=1N×M∑i=1N∑i=1MIi,j−Hi,j2,where Ii,j and Hi,j stand for the gray values at point i,j of original color image and decrypted image, respectively. The MSE curves of test images for x0 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.Figure 9
MSE curves forx0: (a) “Lena,” (b) “Liftingbody,” and (c) “Barbara.”
(a)(b)(c)


### 4.3. 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].The 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 imagesCR,G,B, CR,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]:(12)NPCR=∑i,jDR,G,Bi,jN×M×100%,UACI=∑i,jCR,G,Bi,j−CR,G,B′i,jN×M×H×100%,respectively; here, H represents the largest allowed pixel value in the image, and(13)DR,G,Bi,j=0,ifCR,G,Bi,j=CR,G,B′i,j,1,ifCR,G,Bi,j≠CR,G,B′i,j.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].The NPCR and UACI values of plain images and changing a pixel value in one of the plain images are shown in Table5. 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. That 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.Table 5
The NPCR and UACI values for encrypting three test images.
LenaLiftingbodyBarbaraRGBRGBRGBNPCR0.96960.96960.96960.99340.99340.99340.99540.99540.9954UACI0.33460.33360.33490.33590.33530.33570.33570.33520.3374


### 4.4. Performance in Lossy and Noisy Communication Channels

In this section, in order to analyze the performance of the proposed encryption algorithm in noisy and lossy communication channels, two simulation experiments are performed.The simulation results of the proposed algorithm are shown in Figures10 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).
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)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.
(a)(b)(c)(d)(e)(f)


### 4.5. 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–36]. For three grayscale images with size of M×N, there are 3×M×N pixels. In the process of 3D nonequilateral Arnold transformation, the transformation object is bit element, so the time complexity is O24×M×N. The diffusion operation is of the pixel level, so the time complexity is O3×M×N. 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 O4×M×N. Therefore, the total time complexity of the proposed algorithm is O24×M×N, which is efficient for real-time applications.


## 4.1. 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.


### 4.1.1. 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. Therefore, 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. The histograms of the original images and their corresponding encrypted color images are shown in Figure6.Figure 6
Histograms of the original images and their corresponding encrypted color images: (a) original image “Lena,” (b) original image “Liftingbody,” (c) original image “Barbara,” (d) R component of Figure5(a), (e) G component of Figure 5(a), and (f) B component of Figure 5(a).
(a)(b)(c)(d)(e)(f)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. The Chi-square test can be defined as(8)χ2=∑i=0255ki−k¯2k¯,where ki 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.Theχ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. This indicates that the proposed encryption scheme can resist histogram attacks.Table 1
χ2 values for plain and encrypted images.
Gray images256×256Figure5(a)256×256LenaLiftingbodyBarbaraRGBχ24114521325077465200.8125281.9141272.5625


### 4.1.2. 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)Cxy [7] is introduced, which can measure the degree of correlation in a specific direction:(9)Cxy=∑i=1Nxi−x¯yi−y¯∑i=1Nxi−x¯2∑i=1Nyi−y¯2,where x¯=1/N∑i=1Nxi and y¯=1/N∑i=1Nyi. The 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.Table 2
CCAP in original and encrypted images.
Original imagesOur algorithmRef. [7]LenaLiftingbodyBarbaraRGBRGBHorizontal0.97180.96340.9278−−0.00210.0014−0.00160.00270.00340.0046Vertical0.94420.94790.8869−0.0011−0.00020.0005−0.0013−0.00340.0038Diagonal0.91810.91940.8697−0.00170.00150.0004−0.0039−0.00210.0013Besides, Figure7 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. This further proves that the proposed 3-image encryption algorithm could resist the correlation analysis attack.Figure 7
Correlation distribution of two vertical adjacent pixels in (a) original image “Lena,” (b) original image “Liftingbody,” (c) original image “Barbara,” (d) R component of Figure5(a), (e) G component of Figure 5(a), and (f) B component of Figure 5(a).
(a)(b)(c)(d)(e)(f)


### 4.1.3. Information Entropy

Information entropyHm is used to describe the uncertainty of information source. For images, Hm is proportional to the uniformity of gray value distribution. As for a message source m, the mathematical representation of the corresponding information entropy Hm can been expressed as follows:(10)Hm=−∑i=0L−1pmilogpmi,where L and pmi represent the total number and the probability of symbol mi, 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.The 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].Table 3
Comparison of information entropies for encrypted images by different encryption algorithms.
Our algorithmRef. [15]Ref. [29]RGBRGBRGBInformation entropy7.99787.99697.99707.98987.98987.99087.98967.98937.9896


## 4.1.1. 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. Therefore, 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. The histograms of the original images and their corresponding encrypted color images are shown in Figure6.Figure 6
Histograms of the original images and their corresponding encrypted color images: (a) original image “Lena,” (b) original image “Liftingbody,” (c) original image “Barbara,” (d) R component of Figure5(a), (e) G component of Figure 5(a), and (f) B component of Figure 5(a).
(a)(b)(c)(d)(e)(f)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. The Chi-square test can be defined as(8)χ2=∑i=0255ki−k¯2k¯,where ki 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.Theχ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. This indicates that the proposed encryption scheme can resist histogram attacks.Table 1
χ2 values for plain and encrypted images.
Gray images256×256Figure5(a)256×256LenaLiftingbodyBarbaraRGBχ24114521325077465200.8125281.9141272.5625


## 4.1.2. 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)Cxy [7] is introduced, which can measure the degree of correlation in a specific direction:(9)Cxy=∑i=1Nxi−x¯yi−y¯∑i=1Nxi−x¯2∑i=1Nyi−y¯2,where x¯=1/N∑i=1Nxi and y¯=1/N∑i=1Nyi. The 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.Table 2
CCAP in original and encrypted images.
Original imagesOur algorithmRef. [7]LenaLiftingbodyBarbaraRGBRGBHorizontal0.97180.96340.9278−−0.00210.0014−0.00160.00270.00340.0046Vertical0.94420.94790.8869−0.0011−0.00020.0005−0.0013−0.00340.0038Diagonal0.91810.91940.8697−0.00170.00150.0004−0.0039−0.00210.0013Besides, Figure7 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. This further proves that the proposed 3-image encryption algorithm could resist the correlation analysis attack.Figure 7
Correlation distribution of two vertical adjacent pixels in (a) original image “Lena,” (b) original image “Liftingbody,” (c) original image “Barbara,” (d) R component of Figure5(a), (e) G component of Figure 5(a), and (f) B component of Figure 5(a).
(a)(b)(c)(d)(e)(f)


## 4.1.3. Information Entropy

Information entropyHm is used to describe the uncertainty of information source. For images, Hm is proportional to the uniformity of gray value distribution. As for a message source m, the mathematical representation of the corresponding information entropy Hm can been expressed as follows:(10)Hm=−∑i=0L−1pmilogpmi,where L and pmi represent the total number and the probability of symbol mi, 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.The 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].Table 3
Comparison of information entropies for encrypted images by different encryption algorithms.
Our algorithmRef. [15]Ref. [29]RGBRGBRGBInformation entropy7.99787.99697.99707.98987.98987.99087.98967.98937.9896


## 4.2. 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 encryption scheme to the key, one of the correct keys can be changed slightly, while the others remain unchanged. To analyze the sensitivity of the proposed algorithm to the key, two sets of keys are used to decrypt the encryption image. Figures8(a)–8(c) show the decrypted images with an incorrect key x0, while the other keys are unchanged. Figures 8(d)–8(f) illustrate the decrypted images with a wrong key k, while the other keys are all correct. It is obvious that even the tiny change of 10−15 with the correct keys results is completely unrecognizable. So, the key spaces for x0, y0, z0, h0, and k are Sx0=Sy0=Sz0=Sh0=Sk≈1015.Figure 8
Decryption images with wrong keyx0=1+10−15: (a) decrypted image “Lena,” (b) decrypted image “Liftingbody,” and (c) decrypted image “Barbara”; and decryption images with incorrect key k=0.2+10−15: (d) decrypted image “Lena,” (e) decrypted image “Liftingbody,” and (f) decrypted image “Barbara.”
(a)(b)(c)(d)(e)(f)The initial valuesk10, k20, k30, d10, d20, and d30 are 8-bit integers, so Sk10=Sk20=Sk30=Sd10=Sd20=Sd30=28. Therefore, the total key space S=Sx0Sy0Sz0Sh0SkSk10Sk20Sk30Sd10Sd20Sd30≈2.815×1089, which is so large that it can resist the brute-force attack. The 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.Table 4
Comparison of key spaces.
AlgorithmOur algorithmAnand et al. [30]Zhou et al. [10]Key space2.815×108910752187As for image, the degree of difference between two images can be measured by the mean square error (MSE):(11)MSE=1N×M∑i=1N∑i=1MIi,j−Hi,j2,where Ii,j and Hi,j stand for the gray values at point i,j of original color image and decrypted image, respectively. The MSE curves of test images for x0 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.Figure 9
MSE curves forx0: (a) “Lena,” (b) “Liftingbody,” and (c) “Barbara.”
(a)(b)(c)


## 4.3. 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].The 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 imagesCR,G,B, CR,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]:(12)NPCR=∑i,jDR,G,Bi,jN×M×100%,UACI=∑i,jCR,G,Bi,j−CR,G,B′i,jN×M×H×100%,respectively; here, H represents the largest allowed pixel value in the image, and(13)DR,G,Bi,j=0,ifCR,G,Bi,j=CR,G,B′i,j,1,ifCR,G,Bi,j≠CR,G,B′i,j.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].The NPCR and UACI values of plain images and changing a pixel value in one of the plain images are shown in Table5. 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. That 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.Table 5
The NPCR and UACI values for encrypting three test images.
LenaLiftingbodyBarbaraRGBRGBRGBNPCR0.96960.96960.96960.99340.99340.99340.99540.99540.9954UACI0.33460.33360.33490.33590.33530.33570.33570.33520.3374


## 4.4. Performance in Lossy and Noisy Communication Channels

In this section, in order to analyze the performance of the proposed encryption algorithm in noisy and lossy communication channels, two simulation experiments are performed.The simulation results of the proposed algorithm are shown in Figures10 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).
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)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.
(a)(b)(c)(d)(e)(f)


## 4.5. 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–36]. For three grayscale images with size of M×N, there are 3×M×N pixels. In the process of 3D nonequilateral Arnold transformation, the transformation object is bit element, so the time complexity is O24×M×N. The diffusion operation is of the pixel level, so the time complexity is O3×M×N. 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 O4×M×N. Therefore, the total time complexity of the proposed algorithm is O24×M×N, which is efficient for real-time applications.


## 5. 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. Then 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. The extensive experiments demonstrate that our proposed 3-image encryption scheme has the ability to resist several types of attacks such as statistical analysis, brute-force attack, differential attack, and occlusion attack. These 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.



---

*Source: 8841302-2020-11-26.xml*