# A Novel Image Encryption Algorithm Based on the Delayed Maps and Permutation-Confusion-Diffusion Architecture

Authors: Pengcheng He; Kehui Sun; Congxu Zhu
Journal: Security and Communication Networks
 (2021)

---

## Abstract

To improve the dynamical behaviors of 1D chaotic maps, a new linear-delay-modulation method (LDM) is proposed. Derived from the Sine map, a delayed Sine map (DSM) is proposed based on the LDM. Then, we substitute the Sine map in the SIMM system with DSM and obtained a delayed SIMM system (DSIMM). Its chaotic performance is analyzed through the phase diagram, Lyapunov exponent spectrum, and complexity. The results show that the delayed chaotic map can generate more complex dynamical behaviors and more random sequences. Hence, we apply the two delayed systems to a novel image encryption algorithm with the permutation-confusion-diffusion architecture. Firstly, to permutate the pixel of the image efficiently, the plain-image is scrambled by using a multilayer of the nonlinear index. Secondly, the image is confused by using the chaotic matrix generated with two chaotic sequences, and then, the ciphertext is transformed into a 1D sequence. Finally, to improve the plaintext sensitivity and facilitate key management, we enhance the sensitivity by applying a novel diffusion algorithm instead of using plaintext-related keystream. The diffusion equation contains the sum of undiffused pixels and the operation of cyclic bit-shift. Simulation results for the gray image illustrate the effectiveness of the proposed encryption algorithm.


---

## Body

## 1. Introduction

With the development of information technology, digital information security has become a major concern for individuals and organizations. When it comes to text encryption, there exist several traditional encryption schemes, such as DES, AES, and IDEA [1–3]. Besides text security, the protection of digital images is exceedingly important. The chaotic system has many unique features similar to the counterpart of the cryptosystem, such as bulky data capacity and high redundancy [4], which are difficult to handle by using text encryption techniques. In the last two decades, many new image encryption schemes were proposed, and researchers proposed many image encryption schemes by applying various technologies, such as compressive sensing [5–7], DNA coding [8–13], quantum theory [14–17], chaos systems [18–28], S-box [29], and networks [30, 31].In [32], a general permutation-diffusion architecture for chaos-based image encryption was employed as illustrated in Figure 1. In the permutation stage, the position of the pixels is scrambled. In the diffusion stage, the pixel values are modified so that a tiny change in one-pixel spreads out to as many pixels as possible. In [33], Li et al. proposed a new image encryption algorithm that joins the pixel plane and bit-plane shuffle based on the nonlinearly modulated logistic map with delay. The nonlinear modulation with the delay operation effectively improves the dynamical behaviors of the chaotic system. With the introduction of the Sine function, the iteration time of the chaotic system is greatly increased. In [34], Liu et al. proposed a new two-dimensional Sine ICMIC modulation map (2D-SIMM) and designed a fast image encryption scheme using cyclic shift permutation and pixel-level diffusion. In [35], Chen and Sun applied the DPFMC method to resist the dynamical degradation of the 2D-SCL map and combined the confusion and diffusion processes in one stage to improve the running speed. In [36], Zhu and Sun proposed a new image security scheme using the modified skew tent map to generate keystream correlated with plaintext. The initial-key generation stage uses plaintext to disturb the current chaotic number and then takes the disturbed chaotic number as the input of the system. In [5], Xu et al. proposed a fast image encryption algorithm, in which two circular measurement matrices measured a plain-image from two directions. Then, the image was reencrypted by employing row and column encryption to achieve permutation and diffusion simultaneously. Furthermore, the SHA-256 hash value of the plain-image is used to disturb the chaotic system’s initial condition. Many existing image encryption algorithms correlate the plaintext with the initial condition of the chaotic system. In this way, with a different original image, the chaotic system’s initial condition will be different. So, the differential attack resistance is strengthened. However, there are some defects of the traditional plaintext correlation method. Firstly, the secret key cannot be reused, and the key management is a challenging task because it contains the message of the plaintext. Secondly, the correlation method, such as SHA-256, is time-consuming and decreases the encryption algorithm’s efficiency.Figure 1
Permutation-diffusion architecture.To overcome those weaknesses above, we enhance the Sine map and SIMM system’s dynamical behaviors by introducing the LDM model and strengthening the resistance to differential attack using the novel diffusion algorithm. A high sensitive diffusion based on cyclic bit-shift is proposed. The rest of this paper is arranged as follows: In Section2, we use the LDM model to improve the chaotic behaviors of the Sine map and the SIMM system. In Section 3, the image encryption algorithm of the permutation-confusion-diffusion architecture and its simulation results is presented. In Section 4, the security analysis is presented. Finally, we summarize the results.


## 2. DSM and 2D-DSIMM Models

### 2.1. LDM Model and Delayed Sine Map

The LDM model is displayed in Figure2. The mathematical formula for this model is expressed as(1)xi+1=QFxi·Lxi−1,where F is a 1D chaotic map, L is a linear function, and Q denotes a qualified function. In this paper, we set F as Sine map, L as 1−x, and Q is the self-map, and the delayed Sine map (DSM) is obtained as follows:(2)xi+1=μsin4πxi1−xi−1,where μ is the system parameter. When μ=4, the system has a Lyapunov exponent 3.9462. Therefore, the DSM is a chaotic map.Figure 2
The LDM model.


### 2.2. 2D-DSIMM Model

The 2D-SIMM is obtained by the closed-loop coupling method (CMC) [34]. In the CMC model, when the Sine map is employed to modulate the output of ICMIC, the 2D-SIMM is defined as(3)xi+1=a·sinπ·yi·sinbxi,yi+1=a·sinπ·xi+1·sinbyi.We replaced the Sine map in 2D-SIMM with the DSM and obtained a two-dimensional delayed Sine ICMIC modulation map (2D-DSIMM):(4)xi+1=a·sin4π·yi·1−yi−1·sinbxi,yi+1=a·sin4π·xi+1·1−xi·sinbyi,where aandb are system parameters. When a=0.2andb=3, the system has two positive Lyapunov exponents 6.0788,5.2529. Therefore, it is a hyperchaotic map.


### 2.3. Performance Evaluation of 2D-DSIMM

To evaluate the properties of the improved 2D-DSIMM, the chaos attractor, Lyapunov exponents, and approximate entropy were investigated.


#### 2.3.1. Chaos Attractor

The chaos attractor shows the randomness of the chaotic sequence. A larger phase space means better ergodicity of the dynamical system.Figure3 shows the attractors of the 2D-DSIMM, 2D-SIMM, 2D-SLMM, and 2D-Logistic. The parameters of the 2D-DSIMM are set as a=5andb=5. The parameters of the 2D-SIMM are set as a=1andb=5. The parameters of the 2D-SLMM are set as 1 and 3, and the parameter of the 2D-logistic is set as 1.18. It is obvious that the 2D-DSIMM occupies a larger phase space and a more uniform distribution than that of the others.Figure 3
Attractors: (a) 2D-DSIMM witha=5,b=5; (b) 2D-SIMM with a=1,b=5; (c) 2D-SLMM with α=1,β=3; (d) 2D-logistic map with r=1.18.
(a)(b)(c)(d)


#### 2.3.2. Bifurcation and Lyapunov Exponent Spectrum

To compare the chaotic characteristics of the 2D-DSIMM and the 2D-SIMM system, the chaotic dynamical behaviors of the two systems are described by using bifurcation and Lyapunov exponent diagrams. Lyapunov exponents (LEs) measure the rate of divergence of orbits away from each other [37], and the maximum Lyapunov exponent (MLE) is concerned with the predictability of a chaotic system.A 2D discrete chaotic map has two LEs. For the 2D-SIMM map and 2D-DSIMM map, Figure4 presents their bifurcation and Lyapunov exponent diagrams with b=3. The 2D-SIMM has obvious period windows. The 2D-DSIMM has almost none period windows and is hyperchaotic when a∈0.7,2. The results indicate that the 2D-DSIMM has wider chaotic and hyperchaotic ranges than 2D-SIMM.Figure 4
Bifurcation and Lyapunov exponents. (a) Bifurcation of 2D-DSIMM. (b) Bifurcation of 2D-SIMM. (c) Lyapunov exponent spectrum of 2D-DSIMM. (d) Lyapunov exponent spectrum of 2D-SIMM.
(a)(b)(c)(d)


#### 2.3.3. Approximate Entropy

Approximate entropy (ApEn) is a nonlinear index used to quantify the regularity and complexity of chaotic systems [38, 39]. Increasing ApEn value corresponds to the increasing unpredictability of the generated chaotic series. Figure 5 shows the ApEn of 2D-DSIMM, 2D-SIMM, 2D-SLMM, and logistic maps. As we can see, the ApEn complexity of 2D-DSIMM is higher than 2D-SIMM and is much larger than that of the other chaotic maps. It shows that 2D-DSIMM has a more complex dynamical performance than 2D-SIMM.Figure 5
ApEn complexity of 2D-DSIMM, 2D-SIMM, 2D-SLMM, and logistic map.


## 2.1. LDM Model and Delayed Sine Map

The LDM model is displayed in Figure2. The mathematical formula for this model is expressed as(1)xi+1=QFxi·Lxi−1,where F is a 1D chaotic map, L is a linear function, and Q denotes a qualified function. In this paper, we set F as Sine map, L as 1−x, and Q is the self-map, and the delayed Sine map (DSM) is obtained as follows:(2)xi+1=μsin4πxi1−xi−1,where μ is the system parameter. When μ=4, the system has a Lyapunov exponent 3.9462. Therefore, the DSM is a chaotic map.Figure 2
The LDM model.


## 2.2. 2D-DSIMM Model

The 2D-SIMM is obtained by the closed-loop coupling method (CMC) [34]. In the CMC model, when the Sine map is employed to modulate the output of ICMIC, the 2D-SIMM is defined as(3)xi+1=a·sinπ·yi·sinbxi,yi+1=a·sinπ·xi+1·sinbyi.We replaced the Sine map in 2D-SIMM with the DSM and obtained a two-dimensional delayed Sine ICMIC modulation map (2D-DSIMM):(4)xi+1=a·sin4π·yi·1−yi−1·sinbxi,yi+1=a·sin4π·xi+1·1−xi·sinbyi,where aandb are system parameters. When a=0.2andb=3, the system has two positive Lyapunov exponents 6.0788,5.2529. Therefore, it is a hyperchaotic map.


## 2.3. Performance Evaluation of 2D-DSIMM

To evaluate the properties of the improved 2D-DSIMM, the chaos attractor, Lyapunov exponents, and approximate entropy were investigated.


### 2.3.1. Chaos Attractor

The chaos attractor shows the randomness of the chaotic sequence. A larger phase space means better ergodicity of the dynamical system.Figure3 shows the attractors of the 2D-DSIMM, 2D-SIMM, 2D-SLMM, and 2D-Logistic. The parameters of the 2D-DSIMM are set as a=5andb=5. The parameters of the 2D-SIMM are set as a=1andb=5. The parameters of the 2D-SLMM are set as 1 and 3, and the parameter of the 2D-logistic is set as 1.18. It is obvious that the 2D-DSIMM occupies a larger phase space and a more uniform distribution than that of the others.Figure 3
Attractors: (a) 2D-DSIMM witha=5,b=5; (b) 2D-SIMM with a=1,b=5; (c) 2D-SLMM with α=1,β=3; (d) 2D-logistic map with r=1.18.
(a)(b)(c)(d)


### 2.3.2. Bifurcation and Lyapunov Exponent Spectrum

To compare the chaotic characteristics of the 2D-DSIMM and the 2D-SIMM system, the chaotic dynamical behaviors of the two systems are described by using bifurcation and Lyapunov exponent diagrams. Lyapunov exponents (LEs) measure the rate of divergence of orbits away from each other [37], and the maximum Lyapunov exponent (MLE) is concerned with the predictability of a chaotic system.A 2D discrete chaotic map has two LEs. For the 2D-SIMM map and 2D-DSIMM map, Figure4 presents their bifurcation and Lyapunov exponent diagrams with b=3. The 2D-SIMM has obvious period windows. The 2D-DSIMM has almost none period windows and is hyperchaotic when a∈0.7,2. The results indicate that the 2D-DSIMM has wider chaotic and hyperchaotic ranges than 2D-SIMM.Figure 4
Bifurcation and Lyapunov exponents. (a) Bifurcation of 2D-DSIMM. (b) Bifurcation of 2D-SIMM. (c) Lyapunov exponent spectrum of 2D-DSIMM. (d) Lyapunov exponent spectrum of 2D-SIMM.
(a)(b)(c)(d)


### 2.3.3. Approximate Entropy

Approximate entropy (ApEn) is a nonlinear index used to quantify the regularity and complexity of chaotic systems [38, 39]. Increasing ApEn value corresponds to the increasing unpredictability of the generated chaotic series. Figure 5 shows the ApEn of 2D-DSIMM, 2D-SIMM, 2D-SLMM, and logistic maps. As we can see, the ApEn complexity of 2D-DSIMM is higher than 2D-SIMM and is much larger than that of the other chaotic maps. It shows that 2D-DSIMM has a more complex dynamical performance than 2D-SIMM.Figure 5
ApEn complexity of 2D-DSIMM, 2D-SIMM, 2D-SLMM, and logistic map.


## 2.3.1. Chaos Attractor

The chaos attractor shows the randomness of the chaotic sequence. A larger phase space means better ergodicity of the dynamical system.Figure3 shows the attractors of the 2D-DSIMM, 2D-SIMM, 2D-SLMM, and 2D-Logistic. The parameters of the 2D-DSIMM are set as a=5andb=5. The parameters of the 2D-SIMM are set as a=1andb=5. The parameters of the 2D-SLMM are set as 1 and 3, and the parameter of the 2D-logistic is set as 1.18. It is obvious that the 2D-DSIMM occupies a larger phase space and a more uniform distribution than that of the others.Figure 3
Attractors: (a) 2D-DSIMM witha=5,b=5; (b) 2D-SIMM with a=1,b=5; (c) 2D-SLMM with α=1,β=3; (d) 2D-logistic map with r=1.18.
(a)(b)(c)(d)


## 2.3.2. Bifurcation and Lyapunov Exponent Spectrum

To compare the chaotic characteristics of the 2D-DSIMM and the 2D-SIMM system, the chaotic dynamical behaviors of the two systems are described by using bifurcation and Lyapunov exponent diagrams. Lyapunov exponents (LEs) measure the rate of divergence of orbits away from each other [37], and the maximum Lyapunov exponent (MLE) is concerned with the predictability of a chaotic system.A 2D discrete chaotic map has two LEs. For the 2D-SIMM map and 2D-DSIMM map, Figure4 presents their bifurcation and Lyapunov exponent diagrams with b=3. The 2D-SIMM has obvious period windows. The 2D-DSIMM has almost none period windows and is hyperchaotic when a∈0.7,2. The results indicate that the 2D-DSIMM has wider chaotic and hyperchaotic ranges than 2D-SIMM.Figure 4
Bifurcation and Lyapunov exponents. (a) Bifurcation of 2D-DSIMM. (b) Bifurcation of 2D-SIMM. (c) Lyapunov exponent spectrum of 2D-DSIMM. (d) Lyapunov exponent spectrum of 2D-SIMM.
(a)(b)(c)(d)


## 2.3.3. Approximate Entropy

Approximate entropy (ApEn) is a nonlinear index used to quantify the regularity and complexity of chaotic systems [38, 39]. Increasing ApEn value corresponds to the increasing unpredictability of the generated chaotic series. Figure 5 shows the ApEn of 2D-DSIMM, 2D-SIMM, 2D-SLMM, and logistic maps. As we can see, the ApEn complexity of 2D-DSIMM is higher than 2D-SIMM and is much larger than that of the other chaotic maps. It shows that 2D-DSIMM has a more complex dynamical performance than 2D-SIMM.Figure 5
ApEn complexity of 2D-DSIMM, 2D-SIMM, 2D-SLMM, and logistic map.


## 3. The Novel Image Encryption Algorithm

In this section, we present the permutation-confusion-diffusion architecture of the proposed algorithm, as shown in Figure6. In this diagram, i denotes the row index, and j denotes the column index. k and l denote the 1D sequence index. As we can see, the proposed scheme is composed of key generation, permutation, confusion, and diffusion.Figure 6
Block diagram of the image encryption scheme.


### 3.1. Key Generation

To resist brute-force attack, an image encryption algorithm’s key length should be not less than 128 bits [40]. The key structure is presented in Figure 7. In particular, K=a,b,x01,y01,x02,y02. With the computer precision of 10−16, each element has the size of 52 bits. Therefore, the length of this scheme’s secret key is 6×52=312, and it is long enough to resist the attack from the most advanced computers nowadays. For the 52-bit binary string b1b2,…,b312, we use the following equations to transform it to floating-point data:(5)a=∑i=152bi×2−i,b=∑i=52+12×52bi×2−i−52,x01=∑i=2×52+13×52bi×2−i−2×52,x02=∑i=3×52+14×52bi×2−i−3×52,y01=∑i=4×52+15×52bi×2−i−4×52,y02=∑i=5×52+16×52bi×2−i−5×52.Figure 7
Secret key structure.bii=1,2,…,312 are integers which are obtained by directly transforming a 312-bit binary string to a decimal integer.The initial value of the permutation and confusionx00 is set as x01+x02+y01+y02/4. The initial value of the forward diffusion x01,y01 is set as x01y01. In backward diffusion, the initial value x02,y02 is set as x02,y02. The parameter in permutation and confusion is directly set as μ=4. The control parameters in forward and backward diffusion are generated by(6)a1=0.7+a+x01mod1,b1=0.7+b+y01mod1,a2=0.7+a+x02mod1,b2=0.7+a+y02mod1.Using these parameters and initial states, the DSM and 2D-DSIMM can generate chaotic sequences for the following permutation, confusion, and diffusion.


### 3.2. Permutation and Confusion

To break the high correlations of the plain-image, we apply the multilayer of the nonlinear index to shuffle the pixels. The detailed procedures of permutation and confusion are described as follows:Step 1: get the row and column of the plain-imageP. M denotes the height of the matrix and N denotes the width of the matrix.Step 2: using parametersμ=4, and initial state x01+x02+y01+y02/4, iterate the DSM for D+M+N times, and abandon the previous D iterations to avoid the transient effect. The chaotic sequences XM and XN are obtained.Step 3: quantify the sequencesXM and XN, and obtain the sequence AM and AN. The quantification method is as follows:(7)AM=modfloorXM×216,M+1,AN=modfloorXN×216,N+1.Step 4: from top to bottom and left to right, switch the pixel of positioni,j with the pixel of the position AMmodANj+i,M+1,ANmodAMi+j,N+1, and we get the permutated image P1.Step 5: create a matrixE with the same size as P, and the matrix E is obtained by(8)Ei,j=modfloorj·XNi+i·XMj×216,256.Step 6: confuse the permutated imageP1 with the matrix E and get the image P2. The confusion operation is P2=E⊕P1.We demonstrate the permutation process by permutating a5×5 pixel matrix, as shown in Figure 8. Figure 8(a) is the original 5×5 image, and Figure 8(b) shows the shuffling process using the proposed permutation algorithm. The permutation result of the proposed algorithm is shown in Figure 8(c). The row and column shuffling method achieved high time efficiency [41] as shown in Figure 8(d). The sorting method achieved a good shuffling effect [42] as shown in Figure 8(e). The proposed permutation method balanced the execution time and the shuffling effect. It effectively breaks the inner relationship of location between the pixels due to the multilayer of the nonlinear index. Figure 9 shows the result about one round permutation and confusion of the 256×256 gray Lena image. No fixture of the plain-image can be obtained after permutation. This permutation and confusion method is time-efficient since we only need to iterate DSM for M+N times. The experimental environment is MATLAB 2016a with Intel (R) Core (TM) i5-6300HQ @ 2.6 Hz, and the random-access memory (RAM) adopted is 8 GB. The computation time of permutation and confusion is around 12 milliseconds.Figure 8
Demonstration of permutation, forM=5,N=5,AM=3,2,5,4,1,AN=2,3,1,5,4. (a) Original image P. (b) Process of pixel swapping. (c) Permutation result of the proposed algorithm. (d) Permutation result of row and column shuffling method. (e) Permutation result of sorting method.Figure 9
Simulation results of one round permutation and confusion. (a) Plain-imageP. (b) Permutation result of P, named Pper. (c) Confusion result of Pper, named P1.
(a)(b)(c)


### 3.3. Diffusion

To better resist differential attacks, we improve the plaintext sensitivity by enhancing the diffusion algorithm.Figure10 shows the elements we used in the diffusion function. In the equation of diffusion, we introduce the previously encrypted pixel and the sum of unencrypted pixels. The cyclic bit-shift is used to enhance the security of the algorithm further. Thus, the change of any pixel will affect every iteration of the diffusion.Figure 10
Operations and elements of the diffusion equation.There is a reasonable concern that the sensitivity will also exist in the decryption process. The avalanche effect does not happen in the decryption process. Decrypted image is not sensitive to the cipher image, and we can maintain robustness when it comes to noise attack or data loss. The simulation results of the robustness of the algorithm are given in Section4.7.The diffusion is divided into two steps: forward diffusion and backward diffusion. In the forward diffusion process, equation (10) is applied from the first pixel to the last pixel of the image. In the backward diffusion process, equation (11) is applied from the last pixel to the first pixel. We execute diffusion forward and backward during every round of encryption. The 2D-DSIMM diffusion is described as follows:Step 1: converse the 2D image into 1D sequence.Step 2: using parametera1,b1 and initial state x01,y01, iterate the 2D-DSIMM for D+M·N times and dicard the first D points, so the chaotic sequences XDF and YDF are obtained. Using parameter a2,b2 and initial state x02,y02, iterate the 2D-DSIMM for D+M·N times and dicard the first D points. The chaotic sequences XDB and YDB are obtained.Step 3: quantify the sequencesXDF, YDF, XDB and YDB, and obtain the sequences S1, S2, S1b, S1b. The quantification method is defined by(9)S1=modfloorXDF×216,F,S2=modfloorYDF×216,f,S1b=modfloorXDB×216,F,S2b=modfloorYDB×216,f,whereF is the number of allowed pixel values in plain-image P and f is the gray level. F=256 and f=8 if P is 8−bit grayscale image. Therefore, the elements of S1 and S1b are the integer from 0 to 255, and the elements of S2 and S2b are the integer from 0 to 7.Step 4: execute forward diffusion:(10)C01=T1⊕S11⊕modsumT2:end+c0,F,C1=C01⋘S21,C0i=Ti⊕S1i⊕modsumTi+1:end+Ci−1,F,Ci=C0i⋘S2i,C0n=Tn⊕S1n⊕modCn−1,F,Cn=C0n⋘S2n,whereT is the 1D sequence converted from the confused image P2, n is the length of the permutated sequence T, and the ⋘ is the operation of the cyclic left bit-shift. C is the forward diffused image.Step 5: execute backward diffusion:(11)C0bn=Cn⊕S1bn⊕modsumC1:n−1+cb0,F,Cbn=C0bn⋘S2bn,C0bi=Ci⊕S1bi⊕modsumC1:i−1+Cbi+1,F,Cbi=C0bi⋘S2bi,C0b1=C1⊕S1b1⊕modCb2,F,Cb1=C0b1⋘S2b1,whereCb is the backward diffused image.Step 6: convert the 1D sequence into a 2D digital imageC.The 2D-DSIMM diffusion in the decryption process is the inverse of the forward operation.To show the diffusion algorithm’s original image sensitivity, we apply the diffusion procedure on the256×256 gray Lena image as shown in Figure 11. The proposed diffusion algorithm can turn the nature image into a meaningless one as shown in Figure 11(b). When using the same secret key to diffuse two plain-images with only a one-bit difference, we obtained Figure 11(c). After the forward and backward diffusion, a one-bit change of the original image can cause the avalanche effect, which can be seen from Figure 11(d). Thus, the diffusion algorithm has an excellent antidifferential attack property.Figure 11
Demonstration of 2D-DSIMM diffusion. (a) Plain-imageI1. (b) 2D-DSIMM diffusion result of I1. (c) 2D-DSIMM diffusion result of I2, where I2 is another plain-image that has one-pixel difference with I1 in position 128,128. (d) The difference of 2D-DSIMM diffusion results to I1 and I2.
(a)(b)(c)(d)When we applym round of the encryption, in the first m−1 rounds, we set the sum as constant 0. In the following section, we will analyze the encryption scheme of two rounds.


### 3.4. Decryption Algorithm

As shown in Figure12, the steps of the decryption algorithm are similar to the steps of encryption. Firstly, we obtain the quantized pseudorandom sequence in the same way as encryption. Secondly, we transform the cipher image P into a 1D sequence. The decryption of 2D-DSIMM diffusion is represented as follows:(12)C0b1=Cb1⋙S2b1,Tb1=C0b1⊕S1b1⊕modCb2,F,C0bi=Cbi⋙S2bi,Tbi=C0bi⊕S1bi⊕modsumTb1:i−1+Cbi+1,F,C0bn=Cbn⋙S2bn,Tbn=C0bn⊕S1bn⊕modsumTb1:i−1+cb0,F,T0bn=Tbn⋙S2n,Tn=T0bn⊕S11⊕modTbn−1,F,T0bi=Tbi⋙S2i,Ti=T0bi⊕S1i⊕modsumTi+1:end+Tbi−1,F,T0b1=Tb1⋙S21,T1=T0b1⊕S11⊕modsumT1:end+c0,F,where the ⋙ is the operation of right cyclic bit-shift. Thirdly, transform the obtained sequence into 2D matrix D1 with the same size as the cipher image, and execute the anticonfusion operation D2=E⊕D1. Finally, we exchange the pixel value of D2i,j with D2AMmodANj+i,M+1,ANmodAMi+j,N+1, from right to left, bottom to top, and obtain the decrypted image. The decryption scheme is shown in Figure 12.Figure 12
Block diagram of the image decryption scheme.


### 3.5. Simulation Results

Figure13 shows the encryption result of three images with different sizes. One can observe that their cipher images are really noisy. The pixel distributions are meaningless to the attackers, and they can reveal nothing about the plain-image. With the right set of the secret key, the plain-image can be obtained through the decryption process.Figure 13
Original image and its cipher image, decrypted image.


## 3.1. Key Generation

To resist brute-force attack, an image encryption algorithm’s key length should be not less than 128 bits [40]. The key structure is presented in Figure 7. In particular, K=a,b,x01,y01,x02,y02. With the computer precision of 10−16, each element has the size of 52 bits. Therefore, the length of this scheme’s secret key is 6×52=312, and it is long enough to resist the attack from the most advanced computers nowadays. For the 52-bit binary string b1b2,…,b312, we use the following equations to transform it to floating-point data:(5)a=∑i=152bi×2−i,b=∑i=52+12×52bi×2−i−52,x01=∑i=2×52+13×52bi×2−i−2×52,x02=∑i=3×52+14×52bi×2−i−3×52,y01=∑i=4×52+15×52bi×2−i−4×52,y02=∑i=5×52+16×52bi×2−i−5×52.Figure 7
Secret key structure.bii=1,2,…,312 are integers which are obtained by directly transforming a 312-bit binary string to a decimal integer.The initial value of the permutation and confusionx00 is set as x01+x02+y01+y02/4. The initial value of the forward diffusion x01,y01 is set as x01y01. In backward diffusion, the initial value x02,y02 is set as x02,y02. The parameter in permutation and confusion is directly set as μ=4. The control parameters in forward and backward diffusion are generated by(6)a1=0.7+a+x01mod1,b1=0.7+b+y01mod1,a2=0.7+a+x02mod1,b2=0.7+a+y02mod1.Using these parameters and initial states, the DSM and 2D-DSIMM can generate chaotic sequences for the following permutation, confusion, and diffusion.


## 3.2. Permutation and Confusion

To break the high correlations of the plain-image, we apply the multilayer of the nonlinear index to shuffle the pixels. The detailed procedures of permutation and confusion are described as follows:Step 1: get the row and column of the plain-imageP. M denotes the height of the matrix and N denotes the width of the matrix.Step 2: using parametersμ=4, and initial state x01+x02+y01+y02/4, iterate the DSM for D+M+N times, and abandon the previous D iterations to avoid the transient effect. The chaotic sequences XM and XN are obtained.Step 3: quantify the sequencesXM and XN, and obtain the sequence AM and AN. The quantification method is as follows:(7)AM=modfloorXM×216,M+1,AN=modfloorXN×216,N+1.Step 4: from top to bottom and left to right, switch the pixel of positioni,j with the pixel of the position AMmodANj+i,M+1,ANmodAMi+j,N+1, and we get the permutated image P1.Step 5: create a matrixE with the same size as P, and the matrix E is obtained by(8)Ei,j=modfloorj·XNi+i·XMj×216,256.Step 6: confuse the permutated imageP1 with the matrix E and get the image P2. The confusion operation is P2=E⊕P1.We demonstrate the permutation process by permutating a5×5 pixel matrix, as shown in Figure 8. Figure 8(a) is the original 5×5 image, and Figure 8(b) shows the shuffling process using the proposed permutation algorithm. The permutation result of the proposed algorithm is shown in Figure 8(c). The row and column shuffling method achieved high time efficiency [41] as shown in Figure 8(d). The sorting method achieved a good shuffling effect [42] as shown in Figure 8(e). The proposed permutation method balanced the execution time and the shuffling effect. It effectively breaks the inner relationship of location between the pixels due to the multilayer of the nonlinear index. Figure 9 shows the result about one round permutation and confusion of the 256×256 gray Lena image. No fixture of the plain-image can be obtained after permutation. This permutation and confusion method is time-efficient since we only need to iterate DSM for M+N times. The experimental environment is MATLAB 2016a with Intel (R) Core (TM) i5-6300HQ @ 2.6 Hz, and the random-access memory (RAM) adopted is 8 GB. The computation time of permutation and confusion is around 12 milliseconds.Figure 8
Demonstration of permutation, forM=5,N=5,AM=3,2,5,4,1,AN=2,3,1,5,4. (a) Original image P. (b) Process of pixel swapping. (c) Permutation result of the proposed algorithm. (d) Permutation result of row and column shuffling method. (e) Permutation result of sorting method.Figure 9
Simulation results of one round permutation and confusion. (a) Plain-imageP. (b) Permutation result of P, named Pper. (c) Confusion result of Pper, named P1.
(a)(b)(c)


## 3.3. Diffusion

To better resist differential attacks, we improve the plaintext sensitivity by enhancing the diffusion algorithm.Figure10 shows the elements we used in the diffusion function. In the equation of diffusion, we introduce the previously encrypted pixel and the sum of unencrypted pixels. The cyclic bit-shift is used to enhance the security of the algorithm further. Thus, the change of any pixel will affect every iteration of the diffusion.Figure 10
Operations and elements of the diffusion equation.There is a reasonable concern that the sensitivity will also exist in the decryption process. The avalanche effect does not happen in the decryption process. Decrypted image is not sensitive to the cipher image, and we can maintain robustness when it comes to noise attack or data loss. The simulation results of the robustness of the algorithm are given in Section4.7.The diffusion is divided into two steps: forward diffusion and backward diffusion. In the forward diffusion process, equation (10) is applied from the first pixel to the last pixel of the image. In the backward diffusion process, equation (11) is applied from the last pixel to the first pixel. We execute diffusion forward and backward during every round of encryption. The 2D-DSIMM diffusion is described as follows:Step 1: converse the 2D image into 1D sequence.Step 2: using parametera1,b1 and initial state x01,y01, iterate the 2D-DSIMM for D+M·N times and dicard the first D points, so the chaotic sequences XDF and YDF are obtained. Using parameter a2,b2 and initial state x02,y02, iterate the 2D-DSIMM for D+M·N times and dicard the first D points. The chaotic sequences XDB and YDB are obtained.Step 3: quantify the sequencesXDF, YDF, XDB and YDB, and obtain the sequences S1, S2, S1b, S1b. The quantification method is defined by(9)S1=modfloorXDF×216,F,S2=modfloorYDF×216,f,S1b=modfloorXDB×216,F,S2b=modfloorYDB×216,f,whereF is the number of allowed pixel values in plain-image P and f is the gray level. F=256 and f=8 if P is 8−bit grayscale image. Therefore, the elements of S1 and S1b are the integer from 0 to 255, and the elements of S2 and S2b are the integer from 0 to 7.Step 4: execute forward diffusion:(10)C01=T1⊕S11⊕modsumT2:end+c0,F,C1=C01⋘S21,C0i=Ti⊕S1i⊕modsumTi+1:end+Ci−1,F,Ci=C0i⋘S2i,C0n=Tn⊕S1n⊕modCn−1,F,Cn=C0n⋘S2n,whereT is the 1D sequence converted from the confused image P2, n is the length of the permutated sequence T, and the ⋘ is the operation of the cyclic left bit-shift. C is the forward diffused image.Step 5: execute backward diffusion:(11)C0bn=Cn⊕S1bn⊕modsumC1:n−1+cb0,F,Cbn=C0bn⋘S2bn,C0bi=Ci⊕S1bi⊕modsumC1:i−1+Cbi+1,F,Cbi=C0bi⋘S2bi,C0b1=C1⊕S1b1⊕modCb2,F,Cb1=C0b1⋘S2b1,whereCb is the backward diffused image.Step 6: convert the 1D sequence into a 2D digital imageC.The 2D-DSIMM diffusion in the decryption process is the inverse of the forward operation.To show the diffusion algorithm’s original image sensitivity, we apply the diffusion procedure on the256×256 gray Lena image as shown in Figure 11. The proposed diffusion algorithm can turn the nature image into a meaningless one as shown in Figure 11(b). When using the same secret key to diffuse two plain-images with only a one-bit difference, we obtained Figure 11(c). After the forward and backward diffusion, a one-bit change of the original image can cause the avalanche effect, which can be seen from Figure 11(d). Thus, the diffusion algorithm has an excellent antidifferential attack property.Figure 11
Demonstration of 2D-DSIMM diffusion. (a) Plain-imageI1. (b) 2D-DSIMM diffusion result of I1. (c) 2D-DSIMM diffusion result of I2, where I2 is another plain-image that has one-pixel difference with I1 in position 128,128. (d) The difference of 2D-DSIMM diffusion results to I1 and I2.
(a)(b)(c)(d)When we applym round of the encryption, in the first m−1 rounds, we set the sum as constant 0. In the following section, we will analyze the encryption scheme of two rounds.


## 3.4. Decryption Algorithm

As shown in Figure12, the steps of the decryption algorithm are similar to the steps of encryption. Firstly, we obtain the quantized pseudorandom sequence in the same way as encryption. Secondly, we transform the cipher image P into a 1D sequence. The decryption of 2D-DSIMM diffusion is represented as follows:(12)C0b1=Cb1⋙S2b1,Tb1=C0b1⊕S1b1⊕modCb2,F,C0bi=Cbi⋙S2bi,Tbi=C0bi⊕S1bi⊕modsumTb1:i−1+Cbi+1,F,C0bn=Cbn⋙S2bn,Tbn=C0bn⊕S1bn⊕modsumTb1:i−1+cb0,F,T0bn=Tbn⋙S2n,Tn=T0bn⊕S11⊕modTbn−1,F,T0bi=Tbi⋙S2i,Ti=T0bi⊕S1i⊕modsumTi+1:end+Tbi−1,F,T0b1=Tb1⋙S21,T1=T0b1⊕S11⊕modsumT1:end+c0,F,where the ⋙ is the operation of right cyclic bit-shift. Thirdly, transform the obtained sequence into 2D matrix D1 with the same size as the cipher image, and execute the anticonfusion operation D2=E⊕D1. Finally, we exchange the pixel value of D2i,j with D2AMmodANj+i,M+1,ANmodAMi+j,N+1, from right to left, bottom to top, and obtain the decrypted image. The decryption scheme is shown in Figure 12.Figure 12
Block diagram of the image decryption scheme.


## 3.5. Simulation Results

Figure13 shows the encryption result of three images with different sizes. One can observe that their cipher images are really noisy. The pixel distributions are meaningless to the attackers, and they can reveal nothing about the plain-image. With the right set of the secret key, the plain-image can be obtained through the decryption process.Figure 13
Original image and its cipher image, decrypted image.


## 4. Security Analysis

### 4.1. Histogram Analysis

The histogram can illustrate the statistical distribution of pixels visually. Figure14 presents the histogram of plain-image Lena and the corresponding cipher image. Unlike the original image, the pixel distribution of the cipher image is relatively uniform. Thus, it is difficult for an attacker to extract useful information from the distribution pattern.Figure 14
Histograms of the original image and cipher image. (a) Original Lena image. (b) Cipher Lena image after one round encryption.
(a)(b)As a complement, we apply the histogram variance to quantitatively analyze the pixel distribution. A smaller histogram variance value means a more uniform distribution. The histogram variance is defined by(13)varZ=∑i=1p∑j=1pZi−Zj22p2,where p denotes the grayscale value and Zi denotes the number of the pixel with gray value i.Table1 shows the histogram variance of different 512×512 gray images using the proposed scheme and scheme from [43]. The results show that the histogram variance of the proposed scheme is smaller, which indicates a more uniform pixel distribution.Table 1
Comparison of histogram variance on different512×512 gray images.
Image nameHistogram varianceOriginal imagesEncrypted imagesProposedRef. [43]Lena633400841.2982.6Peppers780660952.81087.6Boats1535900952.11044.9Elaine562670830.9993.7


### 4.2. Chi-Square Test Analysis

The Chi-square test is used to further test the uniformity of the pixel values. A lower value of the Chi-square indicates a more uniform distribution. The Chi-square is defined as(14)χtest2=∑i=0255obi−ei2ei,where obi denotes the observed frequencies of the pixel value i and ei denotes the expected frequencies of the pixel value i. For a 256-level gray image, ei can be expressed as(15)ei=M×N256.The Chi-square results of the encrypted images are listed in Table2. In the table, the Chi-square test results are tested under the significance level of 0.01 and 0.05. At 0.01 and 0.05 significance level, the Chi-square values are χ0.012=310.4 and χ0.052=293.2, respectively. Evidently, the Chi-square value is acceptable at both 0.01 and 0.05 significance level.Table 2
Chi-square test results of different512×512 gray images.
Image nameChi-squareCritical valueχ0.052=293.2χ0.012=310.4Lena242.8PassPassPeppers238.2PassPassBoats207.8PassPassElaine239.9PassPass


### 4.3. Correlation Analysis

After randomly picking 10000 points inside the plain-image and its corresponding cipher image, their correlation coefficientsρxy of two adjacent pixels can be obtained by(16)ρxy=covx,yDxDy,covx,y=Ex−Exy−Ey,Ex=1N∑i=1Nxi,Dx=1N∑i=1Nxi−Ex2.Figure15 depicts the correlation between adjacent pixels in the plain-image Lena and its corresponding cipher image in the horizontal, vertical, and diagonal direction. The plain-image exhibits a high correlation in all three directions. The points in Figure 15(b) appear to be uniformly distributed. Further, Table 3 shows their correlation coefficients quantitatively. The correlation coefficients of plain-image are nearly 1, while their cipher images are nearly 0. Table 4 compares the correlation coefficients of cipher image Lena under different encryption algorithms. Obviously, the proposed algorithm leads to a smaller correlation coefficient.Figure 15
Correlation of adjacent pixels in the plain-image of256×256 Lena. (a) Horizontal direction. (b) Vertical direction. (c) Diagonal direction. Correlation of two adjacent pixels in the cipher image of 256×256 Lena. (d) Horizontal direction. (e) Vertical direction. (f) Diagonal direction.
(a)(b)(c)(d)(e)(f)Table 3
Correlation coefficients between two adjacent pixels in different images.
Image nameOriginal imageEncrypted imageHorizontalDiagonalVerticalHorizontalDiagonalVerticalLena0.94600.93210.97250.00130.00020.0033Peppers0.96390.94140.97090.0021−0.00240.0009Boats0.93700.90400.95710.00430.00170.0031Man0.94050.91330.9540−0.0022−0.0011−0.0029Table 4
Correlation coefficients of the encrypted Lena image with different algorithms.
DirectionOriginal imageOur schemeRef. [44]Ref. [45]Ref. [46]Horizontal0.95820.00130.00900.0015−0.0029Diagonal0.92660.00020.0041−0.0005−0.0001Vertical0.95660.00330.00240.00210.0012


### 4.4. Information Entropy Analysis

The information entropy can be used to describe the uncertainties of grayscale in a digital image. The information entropy of the sourcem is defined as(17)Hm=−∑i=1LPmilogpmi,where mi is the ith gray value for an L level gray image and pmi is the probability of the gray value mi. When L=256, for an image with uniformly distributed pixel values, it has an information entropy of 8. To measure the randomness of an image at a local lever, Wu et al. proposed the local Shannon entropy [47]. The information entropy of encrypted images is listed in Table 5. The critical values of local entropy for 256×256 the gray image are given. The local entropy test results should be at the range of hα∗− and hα∗+. Evidently, the global entropy of all cipher images is greater than 7.99, and the local entropy is acceptable in different significance levels.Table 5
Information entropy of256×256 gray images.
RoundImage nameGlobal entropyLocal entropyCritical valueNo. of blocks = 30h0.05∗−=7.9019h0.01∗−=7.9017h0.001∗−=7.9015Block size = 44 ∗ 44h0.05∗+=7.9030h0.01∗+=7.9032h0.001∗+=7.90341 roundLena7.99727.9024PassPassPassPeppers7.99727.9028PassPassPassBoats7.99727.9025PassPassPassMan7.99727.9027PassPassPassCamera7.99727.9025PassPassPass2 roundsLena7.99727.9027PassPassPassPeppers7.99727.9025PassPassPassBaboon7.99727.9026PassPassPassMan7.99737.9027PassPassPassCamera7.99727.9028PassPassPass


### 4.5. Secret Key Analysis

To endure the brute-force attack, a good image encryption algorithm should have a large keyspace. The proposed algorithm has a secret key with a length of 312 bits under the computational precision of10−15. Even the most advanced computer system cannot check so many options at present.To resist differential attack, an encrypted image should be sensitive to minor changes in the secret key. The results of the secret key sensitivity test are displayed in Figure16. To test the key sensitivity, the 256×256 Lena image is encrypted with the K1 key, which is the correct key. When we change one bit of each part successively, six different and incorrect secret keys K2−K7 are obtained to decode the encrypted image. As we can see, even with the flipping of one bit in the key, the difference is quite large. Therefore, the key sensitivity test is positive.Figure 16
Secret key sensitivity test results under one round of the proposed algorithm. (a) Encrypted image. (b) Decrypted image withK1. (c) Decrypted image with K2. (d) Decrypted image with K3. (e) Decrypted image with K4. (f) Decrypted image with K5. (g) Decrypted image with K6. (h) Decrypted image with K7.
(a)(b)(c)(d)(e)(f)(g)(h)


### 4.6. Resisting Differential Attack Analysis

A number of pixels change rate (NPCR) and unified average changing intensity (UACI) are used to quantify the ability to resist differential attack. The NPCR and UACI between two encrypted imagesC1 and C2 are defined by(18)NPCR=1M×N∑i,jDi,j,UACI=1M×N∑i,jC1i,j−C2i,j255,Di,j=1,ifC1i,j≠C2i,j,0,ifC1i,j=C2i,j.Here,M and N denote the height and the width of the image, respectively. Firstly, for the test image Lena, we select a pixel of random position and flip its least significant bit. Then, we encrypt these two images using the same set of random key and calculate the values of NPCR and UACI. These processes are executed 1000 times. The results are presented in Table 6. The data show that a one-bit flip of the original image can lead to a pretty high resistance value even through one round encryption. Apparently, with two rounds of encryption, the value of NPCR is close to the ideal value 99.61%, and the value of UACI is close to the ideal value 33.46%.Table 6
Values of NPCR and UACI.
Image nameIndex1 round2 roundsMinimumMaximumMeanMinimumMaximumMeanLenaNPCR0.99210.99830.99520.99550.99680.9961UACI0.33160.33620.33420.33220.33640.3346PeppersNPCR0.99230.99810.99510.99570.99640.9961UACI0.33340.33580.33460.33340.33580.3346BoatsNPCR0.99200.99790.99500.99590.99630.9961UACI0.33390.33540.33470.33400.33580.3346ManNPCR0.99230.99800.99520.99600.99620.9961UACI0.33360.33500.33450.33420.33490.3346


### 4.7. Robustness Analysis

When the cipher image is transmitted in a real communication channel, it will be contaminated with noise. While we strengthen the sensitivity between the plaintext and the encrypted image during the encryption process, it is essential to ensure that the sensitivity does not exist between the cipher image and decrypted image during the decryption process, which will propagate error and weaken the stability of the encryption system.Figure17 demonstrates the robustness of the algorithm. In Figures 17(a) and 17(b), some part of the cipher image Lena is cropped, and their decryption images are shown in Figures 17(e) and 17(f). Figures 17(c) and 17(d) are the encrypted Lena images contaminated with pepper and salt noise, and their decryption images are shown in Figures 17(g) and 17(h). The result demonstrates that the proposed algorithm is robust.Figure 17
Robustness analysis. (a) The encrypted image with100×100 data loss. (b) The encrypted image with 128×128 data loss. (c) Cipher Lena image polluted by pepper and salt noise with noise densities of 0.01. (d) Cipher Lena image polluted by pepper and salt noise with noise densities of 0.04. (e, f) The decrypted images of (a–d).
(a)(b)(c)(d)(e)(f)(g)(h)


### 4.8. Time Complexity Analysis

To evaluate the proposed algorithm’s computational complexity, the time complexity of generating sequences, permutation, confusion, and diffusion is given as follows [43, 50]. In the stage of sequence generation, we iterate the DSM M+N times for permutation and confusion and iterate 2D-SIMM 2M×N times for diffusion. In the permutation, confusion, and diffusion stage, the operation is executed pixel by pixel, so their computational complexity is OM×N.LetM×N be the size of all the k grayscale images, the computational complexity for once DSM iteration is denoted as D, and the computational complexity for one 2D-DSIMM is denoted as I. The computational complexity for XOR operation of one bit is denoted as X. Then, the computational complexity for the proposed algorithm is DM+N+2S+9rX+2IMN. Since decryption is the inverse operation of encryption, it has the same time complexity.We use gray images with different sizes as the algorithm’s input and perform the encryption 1000 times. In the proposed algorithm, The average value is the encryption time of the algorithm. The experimental environment is MATLAB 2016a with Intel (R) Core (TM) i5-6300HQ @ 2.6 Hz, and the random-access memory (RAM) adopted is 8 GB. Three gray images with different sizes are encrypted 100 times, and the average execution times are listed in Table7. In comparison to the two earlier proposed algorithms [48, 49], our algorithm is faster and can meet the daily needs of secure image transmission.Table 7
Encryption and decryption time for different size images under 2 rounds of the proposed algorithm.
Image nameSizeEncryption time (ms)Decryption time (ms)Our schemeRef. [48]Ref. [49]Our schemeLena256×2567612717282Lena512×512282516701297Man1024×10241021213225931046


## 4.1. Histogram Analysis

The histogram can illustrate the statistical distribution of pixels visually. Figure14 presents the histogram of plain-image Lena and the corresponding cipher image. Unlike the original image, the pixel distribution of the cipher image is relatively uniform. Thus, it is difficult for an attacker to extract useful information from the distribution pattern.Figure 14
Histograms of the original image and cipher image. (a) Original Lena image. (b) Cipher Lena image after one round encryption.
(a)(b)As a complement, we apply the histogram variance to quantitatively analyze the pixel distribution. A smaller histogram variance value means a more uniform distribution. The histogram variance is defined by(13)varZ=∑i=1p∑j=1pZi−Zj22p2,where p denotes the grayscale value and Zi denotes the number of the pixel with gray value i.Table1 shows the histogram variance of different 512×512 gray images using the proposed scheme and scheme from [43]. The results show that the histogram variance of the proposed scheme is smaller, which indicates a more uniform pixel distribution.Table 1
Comparison of histogram variance on different512×512 gray images.
Image nameHistogram varianceOriginal imagesEncrypted imagesProposedRef. [43]Lena633400841.2982.6Peppers780660952.81087.6Boats1535900952.11044.9Elaine562670830.9993.7


## 4.2. Chi-Square Test Analysis

The Chi-square test is used to further test the uniformity of the pixel values. A lower value of the Chi-square indicates a more uniform distribution. The Chi-square is defined as(14)χtest2=∑i=0255obi−ei2ei,where obi denotes the observed frequencies of the pixel value i and ei denotes the expected frequencies of the pixel value i. For a 256-level gray image, ei can be expressed as(15)ei=M×N256.The Chi-square results of the encrypted images are listed in Table2. In the table, the Chi-square test results are tested under the significance level of 0.01 and 0.05. At 0.01 and 0.05 significance level, the Chi-square values are χ0.012=310.4 and χ0.052=293.2, respectively. Evidently, the Chi-square value is acceptable at both 0.01 and 0.05 significance level.Table 2
Chi-square test results of different512×512 gray images.
Image nameChi-squareCritical valueχ0.052=293.2χ0.012=310.4Lena242.8PassPassPeppers238.2PassPassBoats207.8PassPassElaine239.9PassPass


## 4.3. Correlation Analysis

After randomly picking 10000 points inside the plain-image and its corresponding cipher image, their correlation coefficientsρxy of two adjacent pixels can be obtained by(16)ρxy=covx,yDxDy,covx,y=Ex−Exy−Ey,Ex=1N∑i=1Nxi,Dx=1N∑i=1Nxi−Ex2.Figure15 depicts the correlation between adjacent pixels in the plain-image Lena and its corresponding cipher image in the horizontal, vertical, and diagonal direction. The plain-image exhibits a high correlation in all three directions. The points in Figure 15(b) appear to be uniformly distributed. Further, Table 3 shows their correlation coefficients quantitatively. The correlation coefficients of plain-image are nearly 1, while their cipher images are nearly 0. Table 4 compares the correlation coefficients of cipher image Lena under different encryption algorithms. Obviously, the proposed algorithm leads to a smaller correlation coefficient.Figure 15
Correlation of adjacent pixels in the plain-image of256×256 Lena. (a) Horizontal direction. (b) Vertical direction. (c) Diagonal direction. Correlation of two adjacent pixels in the cipher image of 256×256 Lena. (d) Horizontal direction. (e) Vertical direction. (f) Diagonal direction.
(a)(b)(c)(d)(e)(f)Table 3
Correlation coefficients between two adjacent pixels in different images.
Image nameOriginal imageEncrypted imageHorizontalDiagonalVerticalHorizontalDiagonalVerticalLena0.94600.93210.97250.00130.00020.0033Peppers0.96390.94140.97090.0021−0.00240.0009Boats0.93700.90400.95710.00430.00170.0031Man0.94050.91330.9540−0.0022−0.0011−0.0029Table 4
Correlation coefficients of the encrypted Lena image with different algorithms.
DirectionOriginal imageOur schemeRef. [44]Ref. [45]Ref. [46]Horizontal0.95820.00130.00900.0015−0.0029Diagonal0.92660.00020.0041−0.0005−0.0001Vertical0.95660.00330.00240.00210.0012


## 4.4. Information Entropy Analysis

The information entropy can be used to describe the uncertainties of grayscale in a digital image. The information entropy of the sourcem is defined as(17)Hm=−∑i=1LPmilogpmi,where mi is the ith gray value for an L level gray image and pmi is the probability of the gray value mi. When L=256, for an image with uniformly distributed pixel values, it has an information entropy of 8. To measure the randomness of an image at a local lever, Wu et al. proposed the local Shannon entropy [47]. The information entropy of encrypted images is listed in Table 5. The critical values of local entropy for 256×256 the gray image are given. The local entropy test results should be at the range of hα∗− and hα∗+. Evidently, the global entropy of all cipher images is greater than 7.99, and the local entropy is acceptable in different significance levels.Table 5
Information entropy of256×256 gray images.
RoundImage nameGlobal entropyLocal entropyCritical valueNo. of blocks = 30h0.05∗−=7.9019h0.01∗−=7.9017h0.001∗−=7.9015Block size = 44 ∗ 44h0.05∗+=7.9030h0.01∗+=7.9032h0.001∗+=7.90341 roundLena7.99727.9024PassPassPassPeppers7.99727.9028PassPassPassBoats7.99727.9025PassPassPassMan7.99727.9027PassPassPassCamera7.99727.9025PassPassPass2 roundsLena7.99727.9027PassPassPassPeppers7.99727.9025PassPassPassBaboon7.99727.9026PassPassPassMan7.99737.9027PassPassPassCamera7.99727.9028PassPassPass


## 4.5. Secret Key Analysis

To endure the brute-force attack, a good image encryption algorithm should have a large keyspace. The proposed algorithm has a secret key with a length of 312 bits under the computational precision of10−15. Even the most advanced computer system cannot check so many options at present.To resist differential attack, an encrypted image should be sensitive to minor changes in the secret key. The results of the secret key sensitivity test are displayed in Figure16. To test the key sensitivity, the 256×256 Lena image is encrypted with the K1 key, which is the correct key. When we change one bit of each part successively, six different and incorrect secret keys K2−K7 are obtained to decode the encrypted image. As we can see, even with the flipping of one bit in the key, the difference is quite large. Therefore, the key sensitivity test is positive.Figure 16
Secret key sensitivity test results under one round of the proposed algorithm. (a) Encrypted image. (b) Decrypted image withK1. (c) Decrypted image with K2. (d) Decrypted image with K3. (e) Decrypted image with K4. (f) Decrypted image with K5. (g) Decrypted image with K6. (h) Decrypted image with K7.
(a)(b)(c)(d)(e)(f)(g)(h)


## 4.6. Resisting Differential Attack Analysis

A number of pixels change rate (NPCR) and unified average changing intensity (UACI) are used to quantify the ability to resist differential attack. The NPCR and UACI between two encrypted imagesC1 and C2 are defined by(18)NPCR=1M×N∑i,jDi,j,UACI=1M×N∑i,jC1i,j−C2i,j255,Di,j=1,ifC1i,j≠C2i,j,0,ifC1i,j=C2i,j.Here,M and N denote the height and the width of the image, respectively. Firstly, for the test image Lena, we select a pixel of random position and flip its least significant bit. Then, we encrypt these two images using the same set of random key and calculate the values of NPCR and UACI. These processes are executed 1000 times. The results are presented in Table 6. The data show that a one-bit flip of the original image can lead to a pretty high resistance value even through one round encryption. Apparently, with two rounds of encryption, the value of NPCR is close to the ideal value 99.61%, and the value of UACI is close to the ideal value 33.46%.Table 6
Values of NPCR and UACI.
Image nameIndex1 round2 roundsMinimumMaximumMeanMinimumMaximumMeanLenaNPCR0.99210.99830.99520.99550.99680.9961UACI0.33160.33620.33420.33220.33640.3346PeppersNPCR0.99230.99810.99510.99570.99640.9961UACI0.33340.33580.33460.33340.33580.3346BoatsNPCR0.99200.99790.99500.99590.99630.9961UACI0.33390.33540.33470.33400.33580.3346ManNPCR0.99230.99800.99520.99600.99620.9961UACI0.33360.33500.33450.33420.33490.3346


## 4.7. Robustness Analysis

When the cipher image is transmitted in a real communication channel, it will be contaminated with noise. While we strengthen the sensitivity between the plaintext and the encrypted image during the encryption process, it is essential to ensure that the sensitivity does not exist between the cipher image and decrypted image during the decryption process, which will propagate error and weaken the stability of the encryption system.Figure17 demonstrates the robustness of the algorithm. In Figures 17(a) and 17(b), some part of the cipher image Lena is cropped, and their decryption images are shown in Figures 17(e) and 17(f). Figures 17(c) and 17(d) are the encrypted Lena images contaminated with pepper and salt noise, and their decryption images are shown in Figures 17(g) and 17(h). The result demonstrates that the proposed algorithm is robust.Figure 17
Robustness analysis. (a) The encrypted image with100×100 data loss. (b) The encrypted image with 128×128 data loss. (c) Cipher Lena image polluted by pepper and salt noise with noise densities of 0.01. (d) Cipher Lena image polluted by pepper and salt noise with noise densities of 0.04. (e, f) The decrypted images of (a–d).
(a)(b)(c)(d)(e)(f)(g)(h)


## 4.8. Time Complexity Analysis

To evaluate the proposed algorithm’s computational complexity, the time complexity of generating sequences, permutation, confusion, and diffusion is given as follows [43, 50]. In the stage of sequence generation, we iterate the DSM M+N times for permutation and confusion and iterate 2D-SIMM 2M×N times for diffusion. In the permutation, confusion, and diffusion stage, the operation is executed pixel by pixel, so their computational complexity is OM×N.LetM×N be the size of all the k grayscale images, the computational complexity for once DSM iteration is denoted as D, and the computational complexity for one 2D-DSIMM is denoted as I. The computational complexity for XOR operation of one bit is denoted as X. Then, the computational complexity for the proposed algorithm is DM+N+2S+9rX+2IMN. Since decryption is the inverse operation of encryption, it has the same time complexity.We use gray images with different sizes as the algorithm’s input and perform the encryption 1000 times. In the proposed algorithm, The average value is the encryption time of the algorithm. The experimental environment is MATLAB 2016a with Intel (R) Core (TM) i5-6300HQ @ 2.6 Hz, and the random-access memory (RAM) adopted is 8 GB. Three gray images with different sizes are encrypted 100 times, and the average execution times are listed in Table7. In comparison to the two earlier proposed algorithms [48, 49], our algorithm is faster and can meet the daily needs of secure image transmission.Table 7
Encryption and decryption time for different size images under 2 rounds of the proposed algorithm.
Image nameSizeEncryption time (ms)Decryption time (ms)Our schemeRef. [48]Ref. [49]Our schemeLena256×2567612717282Lena512×512282516701297Man1024×10241021213225931046


## 5. Conclusions

In this paper, we introduced LDM to enhance the chaotic behaviors of the 1D chaotic system, and a delayed Sine map and delayed SIMM map are proposed. The 2D-DSIMM has a better dynamical performance than the original map and some other recently proposed chaotic maps. The evidence is provided by analyzing its attractor, Lyapunov exponent spectrum, and approximate entropy. Based on these two maps, a new image encryption algorithm is proposed. The algorithm is composed of three procedures: permutation based on multilayer of the nonlinear index, confusion, and diffusion based on cyclic bit-shift. The permutation procedure efficiently scrambles the position of the pixels. With cyclic bit-shift operation and massive pixels’ introduction into its diffusion equation, the diffusion procedure owns high sensitivity to the minor change of the plaintext image. It can quickly diffuse pixel values into the full image. Thus, we do not need to relate the secret key with the plaintext to maintain high resistance to differential attack. The results show that the proposed algorithm has high security and fast speed, and it can resist common attacks, including statistical attacks, differential attacks, and brute-force attacks. Simulation results show that our scheme has good application prospects in image encryption communication.



---

*Source: 6679288-2021-03-08.xml*