# An Image Encryption Algorithm Based on Multichaotic System and DNA Coding

Authors: Jiming Zheng; Zheng Luo; Zhirui Tang
Journal: Discrete Dynamics in Nature and Society
 (2020)

---

## Abstract

In this paper, an improved two-dimensional logistic-sine coupling map (N2D-LSCM) and an improved Henon map (NHenon) are proposed. Furthermore, by combining N2D-LSCM and NHenon map, an image encryption algorithm is proposed based on these two chaotic systems and DNA coding. The chaotic sequences generated by N2D-LSCM are used as the parameters of NHenon. In the scrambling stage, DNA encoding is carried out for pixels after scrambling by two chaotic sequences generated by N2D-LSCM; in the stage of diffusion, DNA random coding acts on random matrix obtained by two chaotic sequences generated by NHenon, and DNA XOR operation is carried out with the image obtained in the scrambling stage to diffuse. Compared with other 2D map for image encryption algorithm, this algorithm exhibits good security and holds high efficiency.


---

## Body

## 1. Introduction

In recent years, with the rapid development of network communication technology, a large number of digital information is transmitted through the network at every moment. It includes not only text message and images but also audio, videos, and other digital information [1]. How to protect this private information is an important research issue. Image encryption is one of the useful methods to protect image information. Because the digital image has the characteristics of large data capacity, high information redundancy, and high correlation between adjacent pixels, and the traditional text encryption methods, such as DES and AES [2, 3], are no longer suitable for image encryption. The researchers introduced chaos theory into image encryption, and the properties of chaos like randomness, sensitive dependence on initial value, and unpredictability made chaos closely connected with cryptography [4]. In recent 10 years, with the increasing number of proposed chaotic systems, many image encryption algorithms have emerged.Scrambling-diffusion is the classical structure of image encryption based on chaotic system [5], so image encryption mainly contains two stages: scrambling and diffusion. The scrambling phase changes the position of image pixels, and the diffusion phase conducts pixel values replacement and performs mutual diffusion among different pixels. For an encryption algorithm based on chaos, its encryption efficiency and security are mainly determined by the structure of encryption algorithm and the performance of chaotic maps.In order to increase the efficiency of encryption algorithm, many encryption algorithms only use one-dimensional or two-dimensional chaotic system [6–9]. Because the chaotic system is deterministic, if the attacker obtains the corresponding chaotic orbit information, it is possible to use the existing analysis technology to analyze the structure type of the chaotic system and reduce the complexity of the key, so as to decode [10]. Therefore, the security of low-dimensional mapping is not enough. Some encryption algorithms use a high-dimensional chaotic system, which makes the encryption speed low and cannot meet the real-time requirements [11, 12].The combination of multiple sets of low-dimensional maps can improve the security and efficiency of the algorithm [13, 14]. In [13], Hua et al. proposed a composite structure of chaotic mapping based on cosine transform, which can composite many chaotic maps and has better chaotic performance. In [15], Abdelfatah obtained a new one-dimensional chaotic map DCPG by combining Chebyshev chaotic map with tent map; as a result, it largely increases the key space. Based on DCPG, a new encryption algorithm was proposed. Encryption was completed by two rounds of exclusive OR operations, with high encryption efficiency.DNA molecules have the characteristics of large-scale parallel, huge storage space, and low power consumption. In recent years, many researchers have successfully combined DNA computing and chaotic systems into the field of image encryption [16, 17]. In [16], Wang et al. proposed an image encryption method using DNA sequence operation and introduced a high-dimensional chaotic map as a chaotic sequence generator and only uses a single fixed DNA coding rule. In [17], Niyat and Moattar proposed a color image encryption method based on hyperchaotic system and DNA sequence. Image encryption adopts the idea of block. Each block randomly selects a DNA coding rule. However, in the scrambling stage and the diffusion stage, two kinds of three-dimensional chaotic systems are used, resulting in large amount of calculation and low encryption efficiency. Dagadu et al. put forward a new image encryption method based on DNA sequence operation and chaos system [18]. Using random DNA coding rules and low-dimensional chaotic maps, the encryption effect and security were improved. Amani and Yaghoobi put forward a new color image adaptive encryption algorithm based on DNA sequence operation and hyperchaos system [19]. Due to the chaotic maps selected by the above algorithms, they have shortcomings in security or efficiency.In order to overcome the problems of the above algorithms, we proposed an improved two-dimensional logistic-sine coupling map (N2D-LSCM) and an improved Henon map (NHenon) in this paper. Further, we propose an image encryption scheme based on multiple chaotic systems and DNA coding. Our scheme use scrambling-diffusion structure. Two chaotic sequences are generated by N2D-LSCM in the scrambling process. On the one hand, these two chaotic sequences are used to permute original image and DNA encoding, respectively. On the other hand, in the diffusion stage, firstly, the sequence value generated by N2D-LSCM is taken as the parameter values of NHenon, and then two chaotic sequences are obtained by iterating the NHenon mapping, one as the key matrix and the other as the corresponding DNA coding rule matrix used in diffusion stage. The key matrix is encoded by the DNA coding rule matrix. Finally, DNA XOR operation is performed on the DNA molecules between the permuted DNA matrix and the encoded key matrix to complete the image encryption. The simulation results show that this method has good security and can effectively resist many kinds of common attacks, such as statistical attack, brute-force, chosen/known plaintext attack, clipping attack, and noise attack.The rest of this paper is arranged as follows. Section2 introduces the chaotic system and DNA coding; Section 3 describes the encryption algorithm; Section 4 shows the simulation experiment results; Section 5 presents the security analysis of the encryption method we proposed and the comparison results with the other three methods; finally, Section 6 summarizes this paper.


## 2. Chaotic System and DNA Coding

In this part, we first introduce the new 2D logistic-sine coupling map and new Henon map of the two chaotic systems involved in our method. The chaotic behavior of each chaotic map is analyzed by bifurcation diagram, Lyapunov exponent (LE) diagram, and trajectory diagram. In the bifurcation diagram, the horizontal axis represents parameters of a system and the vertical axis represents variables. If the system is chaotic, each fixed variable will correspond to as many parameters as possible. For two trajectories of a chaotic system, from two closed initial states, LE describes their average separation rate. Positive maximum LE number means that the closed trajectories of the dynamic system diverge in each unit time and evolve into completely different trajectories with the increase of time. Therefore, if the maximum LE number of the dynamic system is positive, the system is chaotic and a larger maximum LE number means better performance [6]. If a dynamic system can get more than one positive solution, its trajectory will diverge in many directions, so it has hyperchaotic behavior. The hyperchaotic behavior is a much more complex motion than the chaotic behavior. Trajectories indicate the motion from a given initial state increases with time. The trajectory of periodic motion is a closed curve, and the trajectory of chaotic behavior will never be closed or repeated in theory. Therefore, the chaotic trajectory usually occupies part of the phase space, which can reflect the randomness of the output of the chaotic system. If the chaotic track of chaotic system can occupy more phase space, it has better random output. Finally, we will explain the DNA coding method used in this paper.


### 2.1. Chaotic System

Many chaos-based digital image encryption schemes considering image features have been proposed.In [1], in order to design a new chaotic map for image encryption algorithm with higher security, a two-dimensional Logistic-Sine coupling map, namely, 2D-LSCM, was proposed. The 2D-LSCM is defined as(1)xi+1=sinπ4θxi1−xi+1−θsinπyi,yi+1=sinπ4θyi1−yi+1−θsinπxi+1,where θ is the control parameter. It is generated by first coupling the logistic and sine maps, then extending the dimension from one-dimensional (1D) to 2D.The system is chaotic whenθ∈0,1, xi and yi are between 0,1 certainly. The bifurcation diagram of 2D-LSCM is shown in Figures 1(a) and 1(b) when x0=0.4andy0=0.1.Figure 1
The bifurcation diagram of 2D-LSCM. (a)θ−x; (b) θ−y.
(a)(b)As can be seen from Figure1, the 2D-LSCM has the problem of uneven data distribution. Therefore, we have improved the 2D-LSCM. The new definition of 2D-LSCM (namely N2D-LSCM) is as follows:(2)xi+1=sinπ4θxi1−xi+1−θsinπyi×2hmod1,yi+1=sinπ4θyi1−yi+1−θsinπxi+1×2hmod1,where θ is the parameter and θ∈0,1. The system is chaotic when xi∈0,1, yi∈0,1. The bifurcation diagram of N2D-LSCM is shown in Figures 2(a) and 2(b) when x0=0.4,y0=0.1,andh=10. Compared with 2D-LSCM, N2D-LSCM solves the problem of uneven data distribution.Figure 2
The bifurcation diagram of N2D-LSCM. (a)θ−x; (b) θ−y.
(a)(b)For the values of the above parameters, Figures3 and 4 are the Lyapunov exponents and trajectories, respectively, corresponding to equations (1) and (2). Compared with 2D-LSCM, N2D-LSCM not only increases the values of two maximum Lyapunov exponents but also further increases the proportion of trajectories in phase space.Figure 3
The Lyapunov exponents diagram of (a) 2D-LSCM and (b) N2D-LSCM.
(a)(b)Figure 4
Trajectories of (a) 2D-LSCM and (b) N2D-LSCM.
(a)(b)


### 2.2. Improved Henon Map

Henon map is a two-dimensional discrete chaotic map, which is defined by(3)xi+1=1−axi2+yi,yi+1=bxi.Whena∈1.1,1.4,b=0.3, the Henon map is chaotic. The bifurcation diagram of Henon map is shown in Figures 5(a) and 5(b), and its Lyapunov exponent diagram is shown in Figure 6(a).Figure 5
The bifurcation diagram of Henon. (a)a−x and (b) a−y.
(a)(b)Figure 6
The Lyapunov exponents diagram of (a) Henon; (b) NHenon.
(a)(b)According to Figure5, it can be found that Henon mapping not only has the problem of uneven data distribution but also the parameter range is small. In order to solve the above problems, we combine the Henon map and the sine map to construct a new two-dimensional map. In addition, we also combine the linear part zi into nonlinear part ezi, a new Henon (namely, NHenon) map is obtained, which is defined as follows:(4)zi+1=1−asinzi2+sinqimod1,qi+1=bezimod1.The range of parameters a andb is extended to −∞,+∞.Whenz0=0.5 and q0=0.5,a∈−10,10,b=1.3, the bifurcation diagram of NHenon is shown in Figures 7(a) and 7(b), and its Lyapunov exponent diagram is shown in Figure 6(b). For the values of the above parameters, Figures 8(a) and 8(b) are the trajectories corresponding to formulas (5) and (6).Figure 7
The bifurcation diagram of NHenon. (a)a−z; (b) a−q.
(a)(b)Figure 8
Trajectories of (a) Henon and (b) NHenon.
(a)(b)By comparing the bifurcation diagrams of Henon map and NHenon map, we can see that NHenon map has more uniform data distribution than Henon map. From Figure6(b), it can be found that λ1∈0.05,0.2 and λ2∈0.35,0.5; therefore, there are always two positive maximum Lyapunov exponents in NHenon, which have a better chaotic property. At the same time, NHenon’s trajectories occupy more phase space than Henon mapping.In our proposed encryption method, the values of two chaotic sequences generated by N2D-LSCM are taken as the parameters of the NHenon mapping, so as to further improve the chaotic performance of the mapping. The form of the composite chaotic mapping is as follows:(5)xi+1=sinπ4θxi1−xi+1−θsinπyi×2hmod1,yi+1=sinπ4θyi1−yi+1−θsinπxi+1×2hmod1,zi+1=1−hxi+1×sinzi2+sinqimod1,qi+1=hyi+1×ezimod1,where θ∈0,1 is the parameter, xn∈0,1, yn∈0,1, zn∈0,1, and qn∈0,1.


### 2.3. DNA Coding

There are four bases in the DNA molecule in total, respectively, A, G, C, and T, where A is complementary to T and G is complementary to C. Applying this property to the binary, that is 0 and 1 complement each other. By this, we can complete the DNA encoding of the binary number. In an image, the value of pixels is represented as binary, and each two bits represent one base, such that 00 and 11, 01 and 10 are complementary pairs in binary form. The eight DNA coding rules in Table1 satisfy the DNA complementation rules proposed by Watson and Crick [20]. For example, the pixel value is 78, whose binary form is 01001110, if encoded according to rule 1 of Table 1, and the result is CATG.Table 1
DNA encoding rules.
Rule12345678A0000010110101111T1111101001010000C0110001100110110G1001110011001001Binary operations include addition, subtraction, XOR, and many other operations. As researchers delve deeper into DNA computing, they propose addition, subtraction, and exclusive OR operations on DNA computation. In this paper, to simplify the algorithm further, only the XOR operation of DNA is used in the diffusion phase, which is represented by⊕.According to the eight DNA coding rules in Table1, there are eight corresponding DNA exclusive OR rules, and the DNA exclusive OR operation rules based on DNA encoding rule 1 are shown in Table 2.Table 2
DNA XOR operation rule based on DNA coding rule 1.
XOR⊕AGCTAAGCTGGATCCCTAGTTCGA


## 2.1. Chaotic System

Many chaos-based digital image encryption schemes considering image features have been proposed.In [1], in order to design a new chaotic map for image encryption algorithm with higher security, a two-dimensional Logistic-Sine coupling map, namely, 2D-LSCM, was proposed. The 2D-LSCM is defined as(1)xi+1=sinπ4θxi1−xi+1−θsinπyi,yi+1=sinπ4θyi1−yi+1−θsinπxi+1,where θ is the control parameter. It is generated by first coupling the logistic and sine maps, then extending the dimension from one-dimensional (1D) to 2D.The system is chaotic whenθ∈0,1, xi and yi are between 0,1 certainly. The bifurcation diagram of 2D-LSCM is shown in Figures 1(a) and 1(b) when x0=0.4andy0=0.1.Figure 1
The bifurcation diagram of 2D-LSCM. (a)θ−x; (b) θ−y.
(a)(b)As can be seen from Figure1, the 2D-LSCM has the problem of uneven data distribution. Therefore, we have improved the 2D-LSCM. The new definition of 2D-LSCM (namely N2D-LSCM) is as follows:(2)xi+1=sinπ4θxi1−xi+1−θsinπyi×2hmod1,yi+1=sinπ4θyi1−yi+1−θsinπxi+1×2hmod1,where θ is the parameter and θ∈0,1. The system is chaotic when xi∈0,1, yi∈0,1. The bifurcation diagram of N2D-LSCM is shown in Figures 2(a) and 2(b) when x0=0.4,y0=0.1,andh=10. Compared with 2D-LSCM, N2D-LSCM solves the problem of uneven data distribution.Figure 2
The bifurcation diagram of N2D-LSCM. (a)θ−x; (b) θ−y.
(a)(b)For the values of the above parameters, Figures3 and 4 are the Lyapunov exponents and trajectories, respectively, corresponding to equations (1) and (2). Compared with 2D-LSCM, N2D-LSCM not only increases the values of two maximum Lyapunov exponents but also further increases the proportion of trajectories in phase space.Figure 3
The Lyapunov exponents diagram of (a) 2D-LSCM and (b) N2D-LSCM.
(a)(b)Figure 4
Trajectories of (a) 2D-LSCM and (b) N2D-LSCM.
(a)(b)


## 2.2. Improved Henon Map

Henon map is a two-dimensional discrete chaotic map, which is defined by(3)xi+1=1−axi2+yi,yi+1=bxi.Whena∈1.1,1.4,b=0.3, the Henon map is chaotic. The bifurcation diagram of Henon map is shown in Figures 5(a) and 5(b), and its Lyapunov exponent diagram is shown in Figure 6(a).Figure 5
The bifurcation diagram of Henon. (a)a−x and (b) a−y.
(a)(b)Figure 6
The Lyapunov exponents diagram of (a) Henon; (b) NHenon.
(a)(b)According to Figure5, it can be found that Henon mapping not only has the problem of uneven data distribution but also the parameter range is small. In order to solve the above problems, we combine the Henon map and the sine map to construct a new two-dimensional map. In addition, we also combine the linear part zi into nonlinear part ezi, a new Henon (namely, NHenon) map is obtained, which is defined as follows:(4)zi+1=1−asinzi2+sinqimod1,qi+1=bezimod1.The range of parameters a andb is extended to −∞,+∞.Whenz0=0.5 and q0=0.5,a∈−10,10,b=1.3, the bifurcation diagram of NHenon is shown in Figures 7(a) and 7(b), and its Lyapunov exponent diagram is shown in Figure 6(b). For the values of the above parameters, Figures 8(a) and 8(b) are the trajectories corresponding to formulas (5) and (6).Figure 7
The bifurcation diagram of NHenon. (a)a−z; (b) a−q.
(a)(b)Figure 8
Trajectories of (a) Henon and (b) NHenon.
(a)(b)By comparing the bifurcation diagrams of Henon map and NHenon map, we can see that NHenon map has more uniform data distribution than Henon map. From Figure6(b), it can be found that λ1∈0.05,0.2 and λ2∈0.35,0.5; therefore, there are always two positive maximum Lyapunov exponents in NHenon, which have a better chaotic property. At the same time, NHenon’s trajectories occupy more phase space than Henon mapping.In our proposed encryption method, the values of two chaotic sequences generated by N2D-LSCM are taken as the parameters of the NHenon mapping, so as to further improve the chaotic performance of the mapping. The form of the composite chaotic mapping is as follows:(5)xi+1=sinπ4θxi1−xi+1−θsinπyi×2hmod1,yi+1=sinπ4θyi1−yi+1−θsinπxi+1×2hmod1,zi+1=1−hxi+1×sinzi2+sinqimod1,qi+1=hyi+1×ezimod1,where θ∈0,1 is the parameter, xn∈0,1, yn∈0,1, zn∈0,1, and qn∈0,1.


## 2.3. DNA Coding

There are four bases in the DNA molecule in total, respectively, A, G, C, and T, where A is complementary to T and G is complementary to C. Applying this property to the binary, that is 0 and 1 complement each other. By this, we can complete the DNA encoding of the binary number. In an image, the value of pixels is represented as binary, and each two bits represent one base, such that 00 and 11, 01 and 10 are complementary pairs in binary form. The eight DNA coding rules in Table1 satisfy the DNA complementation rules proposed by Watson and Crick [20]. For example, the pixel value is 78, whose binary form is 01001110, if encoded according to rule 1 of Table 1, and the result is CATG.Table 1
DNA encoding rules.
Rule12345678A0000010110101111T1111101001010000C0110001100110110G1001110011001001Binary operations include addition, subtraction, XOR, and many other operations. As researchers delve deeper into DNA computing, they propose addition, subtraction, and exclusive OR operations on DNA computation. In this paper, to simplify the algorithm further, only the XOR operation of DNA is used in the diffusion phase, which is represented by⊕.According to the eight DNA coding rules in Table1, there are eight corresponding DNA exclusive OR rules, and the DNA exclusive OR operation rules based on DNA encoding rule 1 are shown in Table 2.Table 2
DNA XOR operation rule based on DNA coding rule 1.
XOR⊕AGCTAAGCTGGATCCCTAGTTCGA


## 3. Encryption Algorithm Description

SHA256 algorithm can generate a unique hash value of 256 bits for any length of data. In our algorithm, the SHA 256 hash value of plaintext image is used to get the initial values and parameters of N2D-LSCM and NHenon. In the scrambling process, two pseudorandom sequences are generated by N2D-LSCM. On the one hand, these two chaotic sequences are used as a scrambling sequence and a scrambling DNA coding matrix, respectively. Firstly, the scrambling sequence is used to scramble plaintext image at pixel level, and then scrambling results are encoded according to scrambling DNA coding matrix. On the other hand, in the diffusion stage, the sequence generated by N2D-LSCM is taken as the parameter of NHenon. And then, two chaotic sequences are obtained by iterating the NHenon mapping, one as the key matrix and the other as the corresponding DNA coding rule matrix. The key matrix is encoded by the DNA coding matrix, and finally the permuted DNA matrix and random DNA matrix are performed DNA exclusive OR operation completes image encryption. The flow chart of our encryption algorithm is shown in Figure9.Figure 9
Encryption algorithm flow chart.


### 3.1. Generating Initial Values and Parameters of Chaotic Maps

First, the SHA256 hash value of the original image is set every 8 bits as a group, and a total of 32 sets are used as the encryption keyK:(6)Kn=kn,1kn,2kn,3kn,4kn,5kn,6kn,7kn,8,K=K1K2…K32.Then, according to formula (7), the intermediate variables used to calculate the initial value and parameters of chaotic mapping are obtained:(7)ti=li×∑j=116Kj×∑j=1162i×K2j−1∑j=1732Kj×∑j=11625×K2jmod1,i=1,2,3,4,5.Among them,l1,l2,l3,l4, and l5 are the intermediate variables for the parameters and initial values of N2D-LSCM and NHenon, respectively. The parameters and initial values of (5) are obtained by substituting the intermediate variables into the following equations:(8)Li=timod12+0.5,i=1,2,3,4,5,h=round∑i=15Li+10,where θ=L1, x0=L2, y0=L3, z0=L4, and q0=L5. Round· is rounding function. Lii=1,2,3,4,5 and h are the initial values and parameters of N2D-LSCM and NHenon.


### 3.2. Pixel Level Scrambling

Step 1: four chaotic sequencesX,Y,Z,andQ are obtained by iterative system (5) for 1000+M×N times, and their first 1000 items are deleted. These four sequences is calculated as follows:(9)X=xi,i=1,2,…,M×N,Y=yi×8,i=1,2,…,M×N,Z=zi×1014mod256,i=1,2,…,M×N,Q=zi×8,i=1,2,…,M×N,where the symboli indicates rounding up; that is, the smallest integer greater than i. mod indicates modulo, and M and N are the height of the image and the width of the image, respectively.Step 2: the plaintext image ofM×N is represented by P1, which is converted into a one dimension array P2=P21,P22,…,P2M×N.Step 3 (scrambling stage): the specific process is as follows:(1)
OrderX increased to obtain the sequence X1=x1i,i=1,2,…,M×N, and then the elements in X1 corresponds to the subscript in X to form a sequence X2, so that it satisfies the requirements of xx2i=x1i,i=1,2,…,M×N.(2)
RearrangeP2 as P3, so that it satisfies P3i=P2x2i,i=1,2,…,M×N.(3)
ReshapeP3 into M × N matrix and define it as P4. P5 is a M × 8N matrix that expands the value of pixels in P4 into 8-bit binary.(4)
Carry out DNA encoding forP5. The 8-bit binary of each pixel adopts the same coding rule. That is, each pixel corresponds to a DNA coding rule. Determine the DNA coding rule corresponding to each pixel according to the value of sequence Y and carry out DNA coding for it. Obtain the DNA matrix P6 of M × 4N after scrambling and complete the scrambling.


### 3.3. Diffusion Stage

Step 1: the matrixZ1 is obtained by rearranging the sequence Z into the matrix of M × N.Step 2: each pixel of matrixZ1 is expanded into 8-bit binary to get matrix Z2.Step 3: each pixel ofZ1 adopts the same coding rule; that is, each pixel corresponds to a DNA coding rule. According to the elements’ value of sequence Q, the corresponding DNA coding rule of each pixel is determined, and the DNA coding of Z2 is carried out to obtain the DNA random matrix of M × 4N.Step 4: assume that the DNA coding matrix after diffusion isCDNA. Then, we use the diffusion algorithm proposed in the reference, and the specific process is described as follows:(1)
First, calculate the center point of matrixP6 according to equation (11) and then diffuse the center point of P6 according to equation (12)fd12:(10)cr=M2,cc=4N2,CDNAcr,cc=P6cr,cc⊕DNAMatrixcr,cc,where ⊕ is the exclusive OR operator.(2)
Starting from the center point ofP6, diffuse the cr-th row of the matrix P6 toward the left and right at the same time.Diffusion in the left direction is as follows:(11)CDNAcr,cc−i=P6cr,cc−i⊕DNAMatrixcr,cc−i⊕CDNAcr,cc−i+1,i=1,2,…,cc−1.Diffusion in the right direction is as follows:(12)CDNAcr,cc+i=P6cr,cc+i⊕DNAMatrixcr,cc+i⊕CDNAcr,cc+i−1,i=1,2,…,cc−1.(3)
Start from the middle row ofP6, and simultaneously spread in the upper and lower directions to accelerate diffusion.Diffusion in the upper direction is as follows:(13)up=cr−i.If up>0:(14)CDNAup,j=P6up,j⊕DNAMatrixup,j⊕CDNAup+1,j,wherej=1,2,…,4N.Diffusion in the downward direction is as follows:(15)down=cr+i.If  down≤M:(16)CDNAdown,j=P6down,j⊕DNAMatrixdown,j⊕CDNAdown−1,j,wherei=1,2,…,M−1/2,j=1,2,…,4N.


### 3.4. Getting the Encrypted Image

After the diffusion process at the DNA level, theCDNA needs to be decoded to get the encrypted image. The decoding steps are as follows:Step 1: the matrixCDNA is randomly decoded into binary form. Let the array of DNA decoding rules be Rules=rulei=Yi+Qimod8+1i=1,2,…,M×N, decode the four DNA codes corresponding to each pixel according to Rules, and obtain the binary matrix Cbin of M × 8N after DNA decoding.Step 2: every 8 bits of binary matrixCbin are restored to decimal numeral system, and the encrypted image Cimg is obtained.


## 3.1. Generating Initial Values and Parameters of Chaotic Maps

First, the SHA256 hash value of the original image is set every 8 bits as a group, and a total of 32 sets are used as the encryption keyK:(6)Kn=kn,1kn,2kn,3kn,4kn,5kn,6kn,7kn,8,K=K1K2…K32.Then, according to formula (7), the intermediate variables used to calculate the initial value and parameters of chaotic mapping are obtained:(7)ti=li×∑j=116Kj×∑j=1162i×K2j−1∑j=1732Kj×∑j=11625×K2jmod1,i=1,2,3,4,5.Among them,l1,l2,l3,l4, and l5 are the intermediate variables for the parameters and initial values of N2D-LSCM and NHenon, respectively. The parameters and initial values of (5) are obtained by substituting the intermediate variables into the following equations:(8)Li=timod12+0.5,i=1,2,3,4,5,h=round∑i=15Li+10,where θ=L1, x0=L2, y0=L3, z0=L4, and q0=L5. Round· is rounding function. Lii=1,2,3,4,5 and h are the initial values and parameters of N2D-LSCM and NHenon.


## 3.2. Pixel Level Scrambling

Step 1: four chaotic sequencesX,Y,Z,andQ are obtained by iterative system (5) for 1000+M×N times, and their first 1000 items are deleted. These four sequences is calculated as follows:(9)X=xi,i=1,2,…,M×N,Y=yi×8,i=1,2,…,M×N,Z=zi×1014mod256,i=1,2,…,M×N,Q=zi×8,i=1,2,…,M×N,where the symboli indicates rounding up; that is, the smallest integer greater than i. mod indicates modulo, and M and N are the height of the image and the width of the image, respectively.Step 2: the plaintext image ofM×N is represented by P1, which is converted into a one dimension array P2=P21,P22,…,P2M×N.Step 3 (scrambling stage): the specific process is as follows:(1)
OrderX increased to obtain the sequence X1=x1i,i=1,2,…,M×N, and then the elements in X1 corresponds to the subscript in X to form a sequence X2, so that it satisfies the requirements of xx2i=x1i,i=1,2,…,M×N.(2)
RearrangeP2 as P3, so that it satisfies P3i=P2x2i,i=1,2,…,M×N.(3)
ReshapeP3 into M × N matrix and define it as P4. P5 is a M × 8N matrix that expands the value of pixels in P4 into 8-bit binary.(4)
Carry out DNA encoding forP5. The 8-bit binary of each pixel adopts the same coding rule. That is, each pixel corresponds to a DNA coding rule. Determine the DNA coding rule corresponding to each pixel according to the value of sequence Y and carry out DNA coding for it. Obtain the DNA matrix P6 of M × 4N after scrambling and complete the scrambling.


## 3.3. Diffusion Stage

Step 1: the matrixZ1 is obtained by rearranging the sequence Z into the matrix of M × N.Step 2: each pixel of matrixZ1 is expanded into 8-bit binary to get matrix Z2.Step 3: each pixel ofZ1 adopts the same coding rule; that is, each pixel corresponds to a DNA coding rule. According to the elements’ value of sequence Q, the corresponding DNA coding rule of each pixel is determined, and the DNA coding of Z2 is carried out to obtain the DNA random matrix of M × 4N.Step 4: assume that the DNA coding matrix after diffusion isCDNA. Then, we use the diffusion algorithm proposed in the reference, and the specific process is described as follows:(1)
First, calculate the center point of matrixP6 according to equation (11) and then diffuse the center point of P6 according to equation (12)fd12:(10)cr=M2,cc=4N2,CDNAcr,cc=P6cr,cc⊕DNAMatrixcr,cc,where ⊕ is the exclusive OR operator.(2)
Starting from the center point ofP6, diffuse the cr-th row of the matrix P6 toward the left and right at the same time.Diffusion in the left direction is as follows:(11)CDNAcr,cc−i=P6cr,cc−i⊕DNAMatrixcr,cc−i⊕CDNAcr,cc−i+1,i=1,2,…,cc−1.Diffusion in the right direction is as follows:(12)CDNAcr,cc+i=P6cr,cc+i⊕DNAMatrixcr,cc+i⊕CDNAcr,cc+i−1,i=1,2,…,cc−1.(3)
Start from the middle row ofP6, and simultaneously spread in the upper and lower directions to accelerate diffusion.Diffusion in the upper direction is as follows:(13)up=cr−i.If up>0:(14)CDNAup,j=P6up,j⊕DNAMatrixup,j⊕CDNAup+1,j,wherej=1,2,…,4N.Diffusion in the downward direction is as follows:(15)down=cr+i.If  down≤M:(16)CDNAdown,j=P6down,j⊕DNAMatrixdown,j⊕CDNAdown−1,j,wherei=1,2,…,M−1/2,j=1,2,…,4N.


## 3.4. Getting the Encrypted Image

After the diffusion process at the DNA level, theCDNA needs to be decoded to get the encrypted image. The decoding steps are as follows:Step 1: the matrixCDNA is randomly decoded into binary form. Let the array of DNA decoding rules be Rules=rulei=Yi+Qimod8+1i=1,2,…,M×N, decode the four DNA codes corresponding to each pixel according to Rules, and obtain the binary matrix Cbin of M × 8N after DNA decoding.Step 2: every 8 bits of binary matrixCbin are restored to decimal numeral system, and the encrypted image Cimg is obtained.


## 4. Experimental Results

Run PyCharm software in Windows 10 64-bit system environment and use the algorithm proposed in this paper to encrypt and decrypt Baboon.pgm256×256, House.pgm256×256, Barche.pgm512×512, and Peppers.pgm 512×512 grayscale image. The selected key is shown in Table 3. The experimental results are shown in Figure 10.Table 3
Encryption key we used.
Keyl1l2l3l4l5key10.57210.31380.75640.54920.8589Figure 10
Encryption and decryption experiment result (from top to bottom: original image, encrypted image, and decrypted image, respectively).By comparing the decrypted images in the experiment with the corresponding original images, the result shows that all the pixels are the same.


## 5. Security Analysis

### 5.1. Key Space

In order to resist brute attacks effectively, the key space should be large enough. The initial key values of our proposed method arel1, l2, l3 and l4, and l5, and the calculation accuracy is about 10−14, so our key space is 1070, which is far larger than 2100. That means we can effectively resist brute attacks [21].


### 5.2. Key Sensitivity

A secure encryption scheme has a very high sensitivity to the key. Even if the encryption key has a tiny change, the encryption/decryption result should be completely different. In our test, we add0.1234×10−14 to the key′1sl1 in Table 3, and keep the rest of the key1 unchanged to get key2. Encrypt the Peppers.pgm with key1 and key2, respectively. The encryption results are shown in Figures 11(a) and 11(b). Here, Figure 11(c) shows the difference between Figures 11(a) and 11(b). Key2 is used as the key to decrypt the encryption graph corresponding to key1, and the decryption result is shown in Figure 11(d). The experimental results show that our method has good key sensitivity in the encryption and decryption processes.Figure 11
Key sensitivity analysis results. (a) Encryption result ofkey1; (b) encryption result of key2; (c) difference of (a) and (b); (d) decryption result of using key2 to decrypt (a).
(a)(b)(c)(d)


### 5.3. Differential Attack Analysis

Differential attack is a very common and effective analysis method in image analysis. It modifies the plaintext image slightly and then encrypts the original plaintext image and the modified plaintext image, respectively. By analyzing the difference between the plaintext image and the encrypted image, attackers try to get the relationship between the plaintext image and the encrypted image. In order to resist differential attack effectively, encryption algorithm should have excellent sensitivity to plaintext image. Generally, we measure it according to NPCR and UACI. NPCR represents the pixel change rate when modifying one pixel, and UACI represents the average intensity of the difference between plaintext image and ciphertext image. For 8-bit grayscale images, the expected values of NPCR and UACI are 99.6094% and 33.4635%, respectively. The formulas are as follows:(17)NPCR=1M×N∑i,jDi,j×100%,Di,j=0,Ci,j=C′i,j,1,Ci,j≠C′i,j,UACI=1M×N∑i,jCi,j−C′i,j255×100%,where C is the encrypted image of the unmodified plaintext image, C′ is the encrypted image of the modified plaintext image, M is the height of the plaintext image, N is the width of the plaintext image, and Ci,j is the pixel value at the coordinate i,j of the encrypted image C. The keys used by our encryption method are obtained by the user key and the SHA256 hash of the plaintext image. The encryption result is highly related to the plaintext, which can resist the differential attack effectively. The experimental results of differential analysis with other methods in the comparative literature are shown in Table 4.Table 4
NPCR and UACI values.
ImagesSizeMeasureRef. [18]Ref. [9]Ref. [15]Our studyBaboon256∗256NPCR0.996030.995741.000000.99607UACI0.334790.334920.331430.33362512∗512NPCR0.996120.996131.000000.99596UACI0.334770.334080.351620.33459House256∗256NPCR0.996130.995681.000000.99609UACI0.335340.335960.331000.33492Barche256∗256NPCR0.995820.996151.000000.99668UACI0.334600.332790.246140.33486512∗512NPCR0.996330.996181.000000.99611UACI0.334020.334450.240380.33514


### 5.4. Information Entropy

Shannon entropy analysis has been widely used to evaluate the uncertainty or unpredictability. The formula is as follows:(18)Hm=∑i=02N−1pmilog1pmi.Here,N is the total number of samples (when the image is with a bit-depth of 8, N is 8), m is the information source, and pmi represents the probability of sample mi. For the image with gray level 8, according to the principle of maximum entropy, the information entropy is closer to 8, and it means that the probability of each pixel is more average. Using the methods in this paper and references [9, 15, 18] to analyze the information entropy of Baboon, House, Lena, Peppers, and their corresponding encrypted images, the comparative experimental results are shown in Table 5.Table 5
Information entropy analysis results.
ImagesSizeOriginal imageInformation entropy of cryptographRef. [18]Ref. [9]Ref. [15]Our studyBaboon256∗2567.338487.997207.997457.997197.99710512∗5127.357947.999017.999357.999337.99923House256∗2566.496277.997517.997357.997447.99740Barche256∗2567.568297.997267.997197.997497.99754512∗5127.445577.999237.999407.999357.99937Peppers256∗2567.525137.997447.997007.997077.99707512∗5127.571487.999307.999247.999297.99937


### 5.5. Histogram Analysis

A secure image encryption scheme should be able to ensure that the pixel values of the ciphertext image are evenly distributed and enhance the resistance to statistical attacks, so as to prevent attackers from obtaining any meaningful data from the ciphertext image. We tested Baboon.pgm, House.pgm, Barche.pgm, Peppers.pgm, and their corresponding ciphertext images with different keys. The histogram of the original images is shown in Figure12.Figure 12
The result of histogram analysis.
(a)(b)(c)(d)(e)(f)(g)(h)In the mathematical quantity analysis of each key, we judge the uniformity by the variance of the histogram of the encrypted image. Generally, if the variance of the encrypted image is lower, the uniformity is better. We encrypt the same image usingkey1 and different passwords obtained by changing only one parameter in key1 at a time and then calculate the variance of each encrypted image. In the case of different keys, the closer the two variance values the higher the uniformity. And, the results are shown in Table 6. As can be seen from Table 6, the average variance is about 950 when using key1, which is smaller than 1017 in reference [15]. The variance of the histogram is defined as follows:(19)varC=1n2∑i=1n∑j=1n12Ci−Cj2,where C is the vector of histogram values and C=C1,C2,…,C256 and Ci and Cj represent the number of pixel value equal to i and j, respectively.Table 6
Variances of histograms compared among all secret keys.
Ciphered imagekey1l1l2l3l4l5Baboon1114.03901033.32031158.71871110.12501030.67181064.8125Barche980.2109928.99211114.49211024.2187989.1640918.5390Peppers756.8437842.0703961.9609947.9531863.9609926.7109Average950.3645934.79421078.39051027.4320961.2656970.0208By calculating the differences of variance betweenkey1 and the secret key obtained by changing only one parameter in key1, we can measure the uniformity of each parameter in secret keys. The result is shown in Table 7. As can be seen from Table 7, the differences of all variances are around 100, so each parameter in the secret key has good uniformity.Table 7
Variances difference of histograms compared among all secret keys.
Ciphered imagel1l2l3l4l5Baboon80.718744.67973.91483.367249.2265Barche51.2188134.281244.00788.953161.68Peppers85.2266205.1172191.1094107.1172169.8672Average72.3880128.026079.677066.479193.5912Through the above analysis, it can be seen that the pixel values of the encrypted image obtained by this encryption method are evenly distributed and can effectively resist statistical attacks.


### 5.6. Correlation Analysis

Because of the high correlation of adjacent pixels in the image, in order to resist the statistical attack, the correlation between adjacent pixels should be reduced as much as possible. The correlation coefficient is used to describe the degree of correlation between pixels. The smaller the correlation coefficient is, the lower the correlation between adjacent pixels is. The calculation method is as follows:(20)rx,y=covx,yDxDy,covx,y=1N∑i=1Nxi−Exyi−Ey,where x and y are grey-level values of the two adjacent pixels in the image, and the expectation and variance of x are Ex=1/N∑i=1Nxi and Dx=1/N∑i=1Nxi−Ex2, respectively.Five-thousand pairs of adjacent pixels are randomly selected from the horizontal direction, vertical direction, and diagonal direction of the original image and the encrypted image, and the correlation coefficient is calculated. The experimental results are shown in Table8 and Figure 13. Compared with other recently proposed methods, the results are shown in Table 9. It can be seen that the correlation between adjacent pixels of plaintext image is very strong, but the correlation coefficient of encrypted image is close to 0, which proves that the correlation between adjacent pixels is very low.Table 8
Correlation coefficient of images.
ImageHorizontalVerticalDiagonalBaboon0.65780.73010.6387Cipher baboon−0.0022−0.0064−0.0023House0.95280.97690.9331Cipher house−0.00080.00330.0007Barche0.97590.96050.9447Cipher barche0.00600.0021−0.0061Peppers0.74710.86550.7172Cipher peppers−0.0020−0.0046−0.0070Figure 13
The adjacent-pixel distribution maps of the input images and the cipher images. (a) Baboon. (b) House. (c) Barche. (d) Peppers.
(a)(b)(c)(d)Table 9
Correlation coefficient of house with different algorithms.
DirectionPlain imageRef. [18]Ref. [9]Ref. [15]OursHorizontal0.95280.00600.0043−0.0012−0.0008Vertical0.97690.00380.0034−0.00080.0033Diagonal0.9331−0.0013−0.0070−0.00600.0007


### 5.7. Resistance to Cropping Attacks

Because some information loss may occur when data are transmitted in the channel, a good encryption algorithm should recover data as much as possible in the case of information loss. It can be measured by MSE and NSPR, which are defined as follows:(21)MSE=1MN∑x=1M∑y=1NPx,y−Dx,y2,PSNR=10log102552MSEdB,where M and N are the height and width of image P, respectively, P (x, y) represents the pixel value of the original image at coordinates (x, y), and D is the decrypted image of P after losing some data.By testing, we can see that the cipher images can be decrypted with some data loss, which means that proposed algorithm has a good robustness as for data loss. The experimental results are shown in Figure14 and Table 10.Figure 14
Cropping attack analysis. (a) Missing 12.5% of data; (b) missing 25% of data; (c) missing 50% of data.
(a)(b)(c)Table 10
MSE and PSNR values.
AttacksDegreePSNRRef. [18]Ref. [9]Ref. [15]Our studyGaussian noiseVariance is 0.000135.188927.912232.127835.6820Variance is 0.000333.218227.890932.136235.6493Variance is 0.000532.370927.893532.135235.6915Salt and pepper noiseDensity is 0.0147.723227.919639.037842.3384Density is 0.0540.681627.918432.586334.9672Density is 0.2533.735527.894928.296729.1269Cropping12.5%36.736127.894836.586537.001725%33.741027.916633.690333.920250%30.740327.884430.712930.8924


### 5.8. Resistance to Noise Attacks

When image data are transmitted in the channel, it may be affected by noise, and the most common ones are Gaussian noise and salt and pepper noise. A good encryption system should be able to recover the encrypted image affected by noise to the maximum extent. By simulating different intensities of Gaussian noise and salt and pepper noise, the corresponding decrypted image is obtained. The experimental results are shown in Figure15. From testing results, we can see that the cipher images can be decrypted with some noise.Figure 15
Gaussian noise (a)–(c) and salt and pepper noise (d)–(f) results. (a) Variance is 0.0001; (b) variance is 0.0003; (c) variance is 0.0005; (d) density is 0.01; (e) density is 0.05; (f) density is 0.25.
(a)(b)(c)(d)(e)(f)


### 5.9. Resistance to Plaintext Attacks

The classical attack types include ciphertext only, known plaintext, chosen plaintext, and chosen ciphertext, and chosen plaintext is the most powerful attack. The proposed algorithm is sensitive to the initial parameters and values. Moreover, the encryption result of every byte is influenced by the contents of the previous bytes. In general, if the white and black plaintext images can be encrypted, and its histogram with random distribution can effectively resist plaintext attack and selective plaintext attack. The experimental results are shown in Figure16, and the NPCR and UACI results of the encrypted image are shown in Table 11. It can be seen that the pixels of the encrypted image obey the random distribution.Figure 16
Test for resistance against plaintext attacks using all-white and all-black images. (a) White image, (b) cipher image of white, (c) the histogram of (b), (d) black image, (e) cipher image of black, and (f) the histogram of (e).
(a)(b)(c)(d)(e)(f)Table 11
Entropies and correlation coefficients of plaintext images.
ImageEntropyCorrelation coefficientHorizontalVerticalDiagonalWhite0———Cipher white7.9974−0.00380.00040.0039Black0———Cipher black7.99750.00630.00030.0062


## 5.1. Key Space

In order to resist brute attacks effectively, the key space should be large enough. The initial key values of our proposed method arel1, l2, l3 and l4, and l5, and the calculation accuracy is about 10−14, so our key space is 1070, which is far larger than 2100. That means we can effectively resist brute attacks [21].


## 5.2. Key Sensitivity

A secure encryption scheme has a very high sensitivity to the key. Even if the encryption key has a tiny change, the encryption/decryption result should be completely different. In our test, we add0.1234×10−14 to the key′1sl1 in Table 3, and keep the rest of the key1 unchanged to get key2. Encrypt the Peppers.pgm with key1 and key2, respectively. The encryption results are shown in Figures 11(a) and 11(b). Here, Figure 11(c) shows the difference between Figures 11(a) and 11(b). Key2 is used as the key to decrypt the encryption graph corresponding to key1, and the decryption result is shown in Figure 11(d). The experimental results show that our method has good key sensitivity in the encryption and decryption processes.Figure 11
Key sensitivity analysis results. (a) Encryption result ofkey1; (b) encryption result of key2; (c) difference of (a) and (b); (d) decryption result of using key2 to decrypt (a).
(a)(b)(c)(d)


## 5.3. Differential Attack Analysis

Differential attack is a very common and effective analysis method in image analysis. It modifies the plaintext image slightly and then encrypts the original plaintext image and the modified plaintext image, respectively. By analyzing the difference between the plaintext image and the encrypted image, attackers try to get the relationship between the plaintext image and the encrypted image. In order to resist differential attack effectively, encryption algorithm should have excellent sensitivity to plaintext image. Generally, we measure it according to NPCR and UACI. NPCR represents the pixel change rate when modifying one pixel, and UACI represents the average intensity of the difference between plaintext image and ciphertext image. For 8-bit grayscale images, the expected values of NPCR and UACI are 99.6094% and 33.4635%, respectively. The formulas are as follows:(17)NPCR=1M×N∑i,jDi,j×100%,Di,j=0,Ci,j=C′i,j,1,Ci,j≠C′i,j,UACI=1M×N∑i,jCi,j−C′i,j255×100%,where C is the encrypted image of the unmodified plaintext image, C′ is the encrypted image of the modified plaintext image, M is the height of the plaintext image, N is the width of the plaintext image, and Ci,j is the pixel value at the coordinate i,j of the encrypted image C. The keys used by our encryption method are obtained by the user key and the SHA256 hash of the plaintext image. The encryption result is highly related to the plaintext, which can resist the differential attack effectively. The experimental results of differential analysis with other methods in the comparative literature are shown in Table 4.Table 4
NPCR and UACI values.
ImagesSizeMeasureRef. [18]Ref. [9]Ref. [15]Our studyBaboon256∗256NPCR0.996030.995741.000000.99607UACI0.334790.334920.331430.33362512∗512NPCR0.996120.996131.000000.99596UACI0.334770.334080.351620.33459House256∗256NPCR0.996130.995681.000000.99609UACI0.335340.335960.331000.33492Barche256∗256NPCR0.995820.996151.000000.99668UACI0.334600.332790.246140.33486512∗512NPCR0.996330.996181.000000.99611UACI0.334020.334450.240380.33514


## 5.4. Information Entropy

Shannon entropy analysis has been widely used to evaluate the uncertainty or unpredictability. The formula is as follows:(18)Hm=∑i=02N−1pmilog1pmi.Here,N is the total number of samples (when the image is with a bit-depth of 8, N is 8), m is the information source, and pmi represents the probability of sample mi. For the image with gray level 8, according to the principle of maximum entropy, the information entropy is closer to 8, and it means that the probability of each pixel is more average. Using the methods in this paper and references [9, 15, 18] to analyze the information entropy of Baboon, House, Lena, Peppers, and their corresponding encrypted images, the comparative experimental results are shown in Table 5.Table 5
Information entropy analysis results.
ImagesSizeOriginal imageInformation entropy of cryptographRef. [18]Ref. [9]Ref. [15]Our studyBaboon256∗2567.338487.997207.997457.997197.99710512∗5127.357947.999017.999357.999337.99923House256∗2566.496277.997517.997357.997447.99740Barche256∗2567.568297.997267.997197.997497.99754512∗5127.445577.999237.999407.999357.99937Peppers256∗2567.525137.997447.997007.997077.99707512∗5127.571487.999307.999247.999297.99937


## 5.5. Histogram Analysis

A secure image encryption scheme should be able to ensure that the pixel values of the ciphertext image are evenly distributed and enhance the resistance to statistical attacks, so as to prevent attackers from obtaining any meaningful data from the ciphertext image. We tested Baboon.pgm, House.pgm, Barche.pgm, Peppers.pgm, and their corresponding ciphertext images with different keys. The histogram of the original images is shown in Figure12.Figure 12
The result of histogram analysis.
(a)(b)(c)(d)(e)(f)(g)(h)In the mathematical quantity analysis of each key, we judge the uniformity by the variance of the histogram of the encrypted image. Generally, if the variance of the encrypted image is lower, the uniformity is better. We encrypt the same image usingkey1 and different passwords obtained by changing only one parameter in key1 at a time and then calculate the variance of each encrypted image. In the case of different keys, the closer the two variance values the higher the uniformity. And, the results are shown in Table 6. As can be seen from Table 6, the average variance is about 950 when using key1, which is smaller than 1017 in reference [15]. The variance of the histogram is defined as follows:(19)varC=1n2∑i=1n∑j=1n12Ci−Cj2,where C is the vector of histogram values and C=C1,C2,…,C256 and Ci and Cj represent the number of pixel value equal to i and j, respectively.Table 6
Variances of histograms compared among all secret keys.
Ciphered imagekey1l1l2l3l4l5Baboon1114.03901033.32031158.71871110.12501030.67181064.8125Barche980.2109928.99211114.49211024.2187989.1640918.5390Peppers756.8437842.0703961.9609947.9531863.9609926.7109Average950.3645934.79421078.39051027.4320961.2656970.0208By calculating the differences of variance betweenkey1 and the secret key obtained by changing only one parameter in key1, we can measure the uniformity of each parameter in secret keys. The result is shown in Table 7. As can be seen from Table 7, the differences of all variances are around 100, so each parameter in the secret key has good uniformity.Table 7
Variances difference of histograms compared among all secret keys.
Ciphered imagel1l2l3l4l5Baboon80.718744.67973.91483.367249.2265Barche51.2188134.281244.00788.953161.68Peppers85.2266205.1172191.1094107.1172169.8672Average72.3880128.026079.677066.479193.5912Through the above analysis, it can be seen that the pixel values of the encrypted image obtained by this encryption method are evenly distributed and can effectively resist statistical attacks.


## 5.6. Correlation Analysis

Because of the high correlation of adjacent pixels in the image, in order to resist the statistical attack, the correlation between adjacent pixels should be reduced as much as possible. The correlation coefficient is used to describe the degree of correlation between pixels. The smaller the correlation coefficient is, the lower the correlation between adjacent pixels is. The calculation method is as follows:(20)rx,y=covx,yDxDy,covx,y=1N∑i=1Nxi−Exyi−Ey,where x and y are grey-level values of the two adjacent pixels in the image, and the expectation and variance of x are Ex=1/N∑i=1Nxi and Dx=1/N∑i=1Nxi−Ex2, respectively.Five-thousand pairs of adjacent pixels are randomly selected from the horizontal direction, vertical direction, and diagonal direction of the original image and the encrypted image, and the correlation coefficient is calculated. The experimental results are shown in Table8 and Figure 13. Compared with other recently proposed methods, the results are shown in Table 9. It can be seen that the correlation between adjacent pixels of plaintext image is very strong, but the correlation coefficient of encrypted image is close to 0, which proves that the correlation between adjacent pixels is very low.Table 8
Correlation coefficient of images.
ImageHorizontalVerticalDiagonalBaboon0.65780.73010.6387Cipher baboon−0.0022−0.0064−0.0023House0.95280.97690.9331Cipher house−0.00080.00330.0007Barche0.97590.96050.9447Cipher barche0.00600.0021−0.0061Peppers0.74710.86550.7172Cipher peppers−0.0020−0.0046−0.0070Figure 13
The adjacent-pixel distribution maps of the input images and the cipher images. (a) Baboon. (b) House. (c) Barche. (d) Peppers.
(a)(b)(c)(d)Table 9
Correlation coefficient of house with different algorithms.
DirectionPlain imageRef. [18]Ref. [9]Ref. [15]OursHorizontal0.95280.00600.0043−0.0012−0.0008Vertical0.97690.00380.0034−0.00080.0033Diagonal0.9331−0.0013−0.0070−0.00600.0007


## 5.7. Resistance to Cropping Attacks

Because some information loss may occur when data are transmitted in the channel, a good encryption algorithm should recover data as much as possible in the case of information loss. It can be measured by MSE and NSPR, which are defined as follows:(21)MSE=1MN∑x=1M∑y=1NPx,y−Dx,y2,PSNR=10log102552MSEdB,where M and N are the height and width of image P, respectively, P (x, y) represents the pixel value of the original image at coordinates (x, y), and D is the decrypted image of P after losing some data.By testing, we can see that the cipher images can be decrypted with some data loss, which means that proposed algorithm has a good robustness as for data loss. The experimental results are shown in Figure14 and Table 10.Figure 14
Cropping attack analysis. (a) Missing 12.5% of data; (b) missing 25% of data; (c) missing 50% of data.
(a)(b)(c)Table 10
MSE and PSNR values.
AttacksDegreePSNRRef. [18]Ref. [9]Ref. [15]Our studyGaussian noiseVariance is 0.000135.188927.912232.127835.6820Variance is 0.000333.218227.890932.136235.6493Variance is 0.000532.370927.893532.135235.6915Salt and pepper noiseDensity is 0.0147.723227.919639.037842.3384Density is 0.0540.681627.918432.586334.9672Density is 0.2533.735527.894928.296729.1269Cropping12.5%36.736127.894836.586537.001725%33.741027.916633.690333.920250%30.740327.884430.712930.8924


## 5.8. Resistance to Noise Attacks

When image data are transmitted in the channel, it may be affected by noise, and the most common ones are Gaussian noise and salt and pepper noise. A good encryption system should be able to recover the encrypted image affected by noise to the maximum extent. By simulating different intensities of Gaussian noise and salt and pepper noise, the corresponding decrypted image is obtained. The experimental results are shown in Figure15. From testing results, we can see that the cipher images can be decrypted with some noise.Figure 15
Gaussian noise (a)–(c) and salt and pepper noise (d)–(f) results. (a) Variance is 0.0001; (b) variance is 0.0003; (c) variance is 0.0005; (d) density is 0.01; (e) density is 0.05; (f) density is 0.25.
(a)(b)(c)(d)(e)(f)


## 5.9. Resistance to Plaintext Attacks

The classical attack types include ciphertext only, known plaintext, chosen plaintext, and chosen ciphertext, and chosen plaintext is the most powerful attack. The proposed algorithm is sensitive to the initial parameters and values. Moreover, the encryption result of every byte is influenced by the contents of the previous bytes. In general, if the white and black plaintext images can be encrypted, and its histogram with random distribution can effectively resist plaintext attack and selective plaintext attack. The experimental results are shown in Figure16, and the NPCR and UACI results of the encrypted image are shown in Table 11. It can be seen that the pixels of the encrypted image obey the random distribution.Figure 16
Test for resistance against plaintext attacks using all-white and all-black images. (a) White image, (b) cipher image of white, (c) the histogram of (b), (d) black image, (e) cipher image of black, and (f) the histogram of (e).
(a)(b)(c)(d)(e)(f)Table 11
Entropies and correlation coefficients of plaintext images.
ImageEntropyCorrelation coefficientHorizontalVerticalDiagonalWhite0———Cipher white7.9974−0.00380.00040.0039Black0———Cipher black7.99750.00630.00030.0062


## 6. Conclusions

In this paper, we improve the 2D-LSCM and Henon mapping to make the data more uniform and have larger Lyapunov exponents and then propose our image encryption algorithm. In this algorithm, the SHA256 hash value of plaintext image is used to get the initial values and parameters of N2D-LSCM and NHenon. In the scrambling process, two pseudorandom sequences are generated by N2D-LSCM.These two chaotic sequences are used as scrambling sequences and scrambling DNA coding matrix respectively. Firstly, scrambling sequence is used to scrambling plaintext image at pixel level, and then scrambling results are encoded according to scrambling DNA coding matrix. In addition, in the diffusion stage, firstly, the sequence values generated by N2D-LSCM are taken as the parameters of NHenon, and then two chaotic sequences are obtained by iterating the NHenon mapping, one is as the key matrix, and the other is as the corresponding DNA coding rule matrix. The chaotic key matrix is encoded by the DNA coding matrix. Finally, the permuted DNA matrix and random DNA matrix performed DNA exclusive OR operation to complete image encryption. The simulation shows that this encryption method has good security and can effectively resist many common attacks, such as statistical attack, violent attack, select/known plaintext attack, cropping attack, and noise attack. The scrambling method proposed in this paper is not efficient enough in operation. In the next step, we will improve the scrambling efficiency in this algorithm and develop an encryption algorithm suitable for color image.



---

*Source: 5982743-2020-09-27.xml*