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

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. *en, 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. *e 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 plainimage 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. *e 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.

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. e 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. e 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. en, the image was reencrypted by employing row and column encryption to achieve permutation and diffusion simultaneously. Furthermore, the SHA-256 hash value of the plainimage 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.
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. e rest of this paper is arranged as follows: In Section 2, 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.

LDM Model and Delayed Sine Map.
e LDM model is displayed in Figure 2. e mathematical formula for this model is expressed as 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: where μ is the system parameter. When μ � 4, the system has a Lyapunov exponent 3.9462. erefore, the DSM is a chaotic map.

2D-DSIMM Model.
e 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 We replaced the Sine map in 2D-SIMM with the DSM and obtained a two-dimensional delayed Sine ICMIC modulation map (2D-DSIMM): where a and b are system parameters. When a � 0.2 and b � 3, the system has two positive Lyapunov exponents (6.0788, 5.2529). erefore, it is a hyperchaotic map.

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

Chaos Attractor.
e chaos attractor shows the randomness of the chaotic sequence. A larger phase space means better ergodicity of the dynamical system. Figure 3 shows the attractors of the 2D-DSIMM, 2D-SIMM, 2D-SLMM, and 2D-Logistic. e parameters of the 2D-DSIMM are set as a � 5 and b � 5. e parameters of the 2D-SIMM are set as a � 1 and b � 5. e parameters of the 2D-SLMM are set as 1 and 3, and the parameter of the 2Dlogistic 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.

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) Delay L (‧) 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, Figure 4 presents their bifurcation and Lyapunov exponent diagrams with b � 3. e 2D-SIMM has obvious period windows. e 2D-DSIMM has almost none period windows and is hyperchaotic when a ∈ [0.7, 2]. e results indicate that the 2D-DSIMM has wider chaotic and hyperchaotic ranges than 2D-SIMM.

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.

The Novel Image Encryption Algorithm
In this section, we present the permutation-confusiondiffusion architecture of the proposed algorithm, as shown in Figure 6. 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.

Key Generation.
To resist brute-force attack, an image encryption algorithm's key length should be not less than 128 bits [40]. e key structure is presented in Figure 7. In particular, K � a, b, x 01 , y 01 , x 02 , y 02 . With the computer precision of 10 − 16 , each element has the size of 52 bits. erefore, 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 b 1 b 2 , . . . , b 312 , we use the following equations to transform it to floating-point data: . . , 312) are integers which are obtained by directly transforming a 312-bit binary string to a decimal integer.
e initial value of the permutation and confusion x (0) 0 is set as ((x 01 + x 02 + y 01 + y 02 )/4). e initial value of the forward diffusion (x (1) 0 , y (1) 0 ) is set as (x 01 y 01 ). In backward diffusion, the initial value (x (2) 0 , y (2) 0 ) is set as (x 02 , y 02 ). e parameter in permutation and confusion is directly set as μ � 4. e control parameters in forward and backward diffusion are generated by Using these parameters and initial states, the DSM and 2D-DSIMM can generate chaotic sequences for the following permutation, confusion, and diffusion.

Permutation and Confusion.
To break the high correlations of the plain-image, we apply the multilayer of the nonlinear index to shuffle the pixels. e detailed procedures of permutation and confusion are described as follows: Step 1: get the row and column of the plain-image P. M denotes the height of the matrix and N denotes the width of the matrix.
Step 2: using parameters μ � 4, and initial state ((x 01 + x 02 + y 01 + y 02 )/4), iterate the DSM for (D + M + N) times, and abandon the previous D iterations to avoid the transient effect. e chaotic sequences X M and X N are obtained.
Step 3: quantify the sequences X M and X N , and obtain the sequence A M and A N . e quantification method is as follows: Step 4: from top to bottom and left to right, switch the pixel of position (i, j) with the pixel of the position , and we get the permutated image P 1 .
Step 5: create a matrix E with the same size as P, and the matrix E is obtained by Step 6: confuse the permutated image P 1 with the matrix E and get the image P 2 . e confusion operation is P 2 � E ⊕ P 1 .
We demonstrate the permutation process by permutating a 5 × 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. e permutation result of the proposed algorithm is shown in Figure 8(c). e row and column shuffling method achieved high time efficiency [41] as shown in Figure 8(d). e sorting method achieved a good shuffling effect [42] as shown in Figure 8(e). e 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. is permutation and confusion method is time-efficient since we only need to iterate DSM for (M + N) times. e experimental environment is MATLAB 2016a with Intel (R) Core (TM) i5-6300HQ @ 2.6 Hz, and the randomaccess memory (RAM) adopted is 8 GB. e computation time of permutation and confusion is around 12 milliseconds.

Diffusion.
To better resist differential attacks, we improve the plaintext sensitivity by enhancing the diffusion algorithm. Figure 10 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. e cyclic bit-shift is used to enhance the security of the algorithm further. us, the change of any pixel will affect every iteration of the diffusion.
ere is a reasonable concern that the sensitivity will also exist in the decryption process. e 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. e simulation results of the robustness of the algorithm are given in Section 4.7.
e 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.
e 2D-DSIMM diffusion is described as follows: Step 1: converse the 2D image into 1D sequence.
e chaotic sequences X DB and Y DB are obtained.
Step 3: quantify the sequences X DF , Y DF , X DB and Y DB , and obtain the sequences S 1 , S 2 , S b 1 , S b 1 . e quantification method is defined by where F is the number of allowed pixel values in plainimage P and f is the gray level. F � 256 and f � 8 if P is 8 − bit grayscale image. erefore, the elements of S 1 and S b 1 are the integer from 0 to 255, and the elements of S 2 and S b 2 are the integer from 0 to 7.

Security and Communication Networks
where T is the 1D sequence converted from the confused image P 2 , 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: where C b is the backward diffused image.
Step 6: convert the 1D sequence into a 2D digital image C.
e 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 the 256 × 256 gray Lena image as shown in Figure 11. e 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 onebit 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). us, the diffusion algorithm has an excellent antidifferential attack property.
When we apply m 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. Figure 12, 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. e decryption of 2D-DSIMM diffusion is represented as follows:

Decryption Algorithm. As shown in
where the ⋙ is the operation of right cyclic bit-shift. irdly, transform the obtained sequence into 2D matrix D 1 with the same size as the cipher image, and execute the anticonfusion operation D 2 � E ⊕ D 1 . Finally, we exchange the pixel value of D 2 (i, j) with D 2 A M (mod(A N (j) + i, M) + 1), A N (mod(A M (i) + j, N) + 1), from right to left, bottom to top, and obtain the decrypted image. e decryption scheme is shown in Figure 12.

Simulation
Results. Figure 13 shows the encryption result of three images with different sizes. One can observe that their cipher images are really noisy. e 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.

Histogram Analysis.
e histogram can illustrate the statistical distribution of pixels visually. Figure 14 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. us, it is difficult for an attacker to extract useful information from the distribution pattern.
As a complement, we apply the histogram variance to quantitatively analyze the pixel distribution. A smaller histogram variance value means a more uniform distribution. e histogram variance is defined by where p denotes the grayscale value and Z i denotes the number of the pixel with gray value i. Table 1 shows the histogram variance of different 512 × 512 gray images using the proposed scheme and scheme from [43]. e results show that the histogram variance of the proposed scheme is smaller, which indicates a more uniform pixel distribution.

Chi-Square Test Analysis.
e 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. e Chi-square is defined as where ob i denotes the observed frequencies of the pixel value i and e i denotes the expected frequencies of the pixel value i. For a 256-level gray image, e i can be expressed as

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

Security and Communication Networks
Original images Cipher images Decrypted images (16) Figure 15 depicts the correlation between adjacent pixels in the plain-image Lena and its corresponding cipher image in the horizontal, vertical, and diagonal direction. e plainimage exhibits a high correlation in all three directions. e points in Figure 15(b) appear to be uniformly distributed. Further, Table 3 shows their correlation coefficients quantitatively.
e 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.

Information Entropy Analysis.
e information entropy can be used to describe the uncertainties of grayscale in a digital image. e information entropy of the source m is defined as where m i is the ith gray value for an L level gray image and p(m i ) is the probability of the gray value m i . 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]. e information entropy of encrypted images is listed in Table 5. e critical values of local entropy for 256 × 256 the gray image are given. e 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.

Secret Key Analysis.
To endure the brute-force attack, a good image encryption algorithm should have a large keyspace. e proposed algorithm has a secret key with a length of 312 bits under the computational precision of 10 − 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. e results of the secret key sensitivity test are displayed in Figure 16. To test the key sensitivity, the 256 × 256 Lena image is encrypted with the K 1 key, which is the correct key. When we change one bit of each part successively, six different and incorrect secret keys K 2 − K 7 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. erefore, the key sensitivity test is positive.

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. e NPCR and UACI between two encrypted images C 1 and C 2 are defined by 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. en, we encrypt these two images using the same set of random key and calculate the values of NPCR and UACI. ese processes are executed 1000 times. e results are presented in Table 6. e 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%.

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.

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 O(M × N).
Let M × 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. e computational complexity for XOR operation of one bit is denoted as X.
en, the computational complexity for the proposed algorithm is D(M + N) + (2S + 9rX + 2I)MN. 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, e average value is the encryption time of the algorithm. e 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. ree gray images with different sizes are encrypted 100 times, and the average execution times are listed in Table 7. In comparison to the two earlier proposed algorithms [48,49], our algorithm is faster and can meet the daily needs of secure image transmission.

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. e 2D-DSIMM has a better dynamical performance than the original map and some other recently proposed chaotic maps. e 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. e algorithm is composed of three procedures: permutation based on multilayer of the nonlinear index, confusion, and diffusion based on cyclic bit-shift. e 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. us, we do not need to relate the secret key with the plaintext to maintain high resistance to differential attack. e 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.

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

Conflicts of Interest
e authors declare that they have no conflicts of interest.