# A Double-Layer Image Encryption Scheme Based on Chaotic Maps and DNA Strand Displacement

Authors: Zhen Tang; Zhixiang Yin; Risheng Wang; Xiyuan Wang; Jing Yang; Jianzhong Cui
Journal: Journal of Chemistry
 (2022)

---

## Abstract

The image encryption schemes combining chaotic maps, DNA coding, and DNA sequence operation can effectively protect the image. In this paper, a double-layer image encryption scheme is proposed by combining chaotic maps with DNA strand displacement (DSD). Chaotic maps are used to generate pseudorandom sequences and perform routine scrambling and diffusion operations on the plaintext image. We propose three DSD-based encryption rules according to the diversity of DNA strand displacement, and these three encryption rules are used to encrypt the image at the DNA sequence level. The plaintext image can be transformed into the cipher image, which is difficult to be recognized without the correct keys through the double-layer encryption at the level of chaotic maps and DNA. Simulation results and security analysis show that the proposed encryption scheme can effectively protect image information and resist conventional information attacks.


---

## Body

## 1. Introduction

The ways of information storage and transmission are diversified. While modern information technology brings convenience, it also faces severe challenges form information security. Different from one-dimensional text information, image data has the characteristics of strong correlation and redundancy between adjacent pixels, which makes the traditional encryption schemes such as AES and DES cannot improve the effective encryption protection. The emergence of chaos theory breaks the limitations of traditional encryption schemes [1–5]. Chaotic image encryption usually goes through two stages of scrambling and diffusion, but some typical chaotic image encryption schemes are broken or threatened with the update of various decryption methods. Therefore, researchers actively explore the use of the hyperchaotic maps, combination of chaotic maps, graph theory, quantum communication, and cross-disciplinary technology to design the more effective image encryption schemes [6–13]. Among them, the application of DNA sequence and DNA computing in image encryption has become a hot research subject [14–19]. At present, the technology of information coding, reading and writing with DNA molecule as storage medium, and information hiding and encryption techniques based on diverse DNA structures and reactions are becoming increasingly available [20–24]. But the single use of DNA encryption technology for information encryption requires complex biological experiments to complete, which undoubtedly increases the cost of information encryption. The combination of chaotic maps and DNA computing can not only improve the effect of encryption, but also save the cost of experiment. In recent years, DNA coding, DNA addition and subtraction, DNA subsequence operation, and DNA deletion and insertion have become an important part of image encryption [25–29]. However, the diversity of DNA reactions and structures is rarely addressed in image encryption schemes [30].This paper aims to apply more DNA reactions to image encryption schemes to enrich image encryption methods. We propose a double-layer image encryption scheme by combining DNA strand displacement (DSD) with chaotic maps. The emphasis of this paper is on the construction of new encryption rules based on DSD. At first, Lorenz chaotic map and Lorenz hyperchaotic map are used for routine scrambling and diffusion of the image, and then DNA coding and DSD-based encryption rules are used for secondary encryption. Simulation results show that the proposed double-layer image encryption scheme based on chaotic maps and DSD has better encryption effect.


## 2. Materials and Methods

### 2.1. Lorenz Maps

#### 2.1.1. Lorenz Chaotic Map

(1)x˙=ay−xy˙=cx−y−xzz˙=xy−bz,where the letters a, b, and c in equation (1) are parameters of the Lorenz chaotic map. When the parameters a = 10, b = 8/3, and c = 28, Lorenz map is in chaotic state and can generate three chaotic sequences. Figure 1 is the attractor graph of the Lorenz map. The four-order Runge–Kutta method is used to solve Lorenz equation.Figure 1
The attractor graph of the Lorenz chaotic map.


#### 2.1.2. Lorenz Hyperchaotic Map

(2)x˙=ay−x+w,y˙=cx−y−xz,z˙=xy−bz,w˙=−yz+rw,when the parametersa = 10, b = 8/3, c = 28, and −1.52≤ r ≤−0.06, Lorenz hyperchaotic map is in chaotic state. Figure 2 is the phase diagram of Lorenz hyperchaotic map with r = −1.Figure 2
The phase diagram of Lorenz hyperchaotic map withr=−1.
(a)(b)


### 2.2. DNA Encoding Rules and DSD

DNA Encoding. DNA contain four bases: A (adenine), T (thymine), C (cytosine), and G (guanine), which strictly follow the Watson−Crick base complementary pairing principle; that is, A and T are complementary; G and C are complementary [14]. T, A, C, and G can be used to encode binary numbers, and there are eight such coding rules due to the need to satisfy the base complementary pairing principle, as shown in Table 1. For example, if a decimal number “200” is converted to the 8-bit binary sequence “11001000,” and binary sequence is encoded using rule 2; the sequence “TAGA” can be obtained. Similarly, if the above sequence is decoded using rule 2, the 8-bit binary sequence “11001000” can be obtained, and the two processes are completely reversible. But the correct binary sequence could not be obtained using the other seven DNA coding rules to decode the sequence. These eight coding rules are themselves the form of encryption, regardless of the DNA computing or operation.Table 1
DNA encoding rules.
12345678T1111101001010000A0000010110101111C1001110000110110G0110001111001001DSD. DSD is a DNA hybridization reaction through toehold-mediated branch migration. A long, single-stranded DNA that is fully complementary to the substrate is used as input and is connected to the dangling toehold domain in the prehybridized partially complementary DNA substrate, and then the DSD is triggered. Unlike most DNA-based reactions, DSD is diverse and can be directed either from the 5’ terminal toehold of the substrate or from the 3’ terminal toehold, as shown in Figures 3(a) and 3(b). In addition, DSD is cascaded. The input and output of DSD are single-strand DNA, and the single-strand output can be used as the input of the next cascade, as shown in Figure 3(c).Figure 3
Basic reaction principle of DSD. (a) DSD starts at the 3’ terminal toehold of the substrate. (b) DSD starts at the 5’ terminal toehold of the substrate. (c) Cascade DSD.
(a)(b)(c)


## 2.1. Lorenz Maps

### 2.1.1. Lorenz Chaotic Map

(1)x˙=ay−xy˙=cx−y−xzz˙=xy−bz,where the letters a, b, and c in equation (1) are parameters of the Lorenz chaotic map. When the parameters a = 10, b = 8/3, and c = 28, Lorenz map is in chaotic state and can generate three chaotic sequences. Figure 1 is the attractor graph of the Lorenz map. The four-order Runge–Kutta method is used to solve Lorenz equation.Figure 1
The attractor graph of the Lorenz chaotic map.


### 2.1.2. Lorenz Hyperchaotic Map

(2)x˙=ay−x+w,y˙=cx−y−xz,z˙=xy−bz,w˙=−yz+rw,when the parametersa = 10, b = 8/3, c = 28, and −1.52≤ r ≤−0.06, Lorenz hyperchaotic map is in chaotic state. Figure 2 is the phase diagram of Lorenz hyperchaotic map with r = −1.Figure 2
The phase diagram of Lorenz hyperchaotic map withr=−1.
(a)(b)


## 2.1.1. Lorenz Chaotic Map

(1)x˙=ay−xy˙=cx−y−xzz˙=xy−bz,where the letters a, b, and c in equation (1) are parameters of the Lorenz chaotic map. When the parameters a = 10, b = 8/3, and c = 28, Lorenz map is in chaotic state and can generate three chaotic sequences. Figure 1 is the attractor graph of the Lorenz map. The four-order Runge–Kutta method is used to solve Lorenz equation.Figure 1
The attractor graph of the Lorenz chaotic map.


## 2.1.2. Lorenz Hyperchaotic Map

(2)x˙=ay−x+w,y˙=cx−y−xz,z˙=xy−bz,w˙=−yz+rw,when the parametersa = 10, b = 8/3, c = 28, and −1.52≤ r ≤−0.06, Lorenz hyperchaotic map is in chaotic state. Figure 2 is the phase diagram of Lorenz hyperchaotic map with r = −1.Figure 2
The phase diagram of Lorenz hyperchaotic map withr=−1.
(a)(b)


## 2.2. DNA Encoding Rules and DSD

DNA Encoding. DNA contain four bases: A (adenine), T (thymine), C (cytosine), and G (guanine), which strictly follow the Watson−Crick base complementary pairing principle; that is, A and T are complementary; G and C are complementary [14]. T, A, C, and G can be used to encode binary numbers, and there are eight such coding rules due to the need to satisfy the base complementary pairing principle, as shown in Table 1. For example, if a decimal number “200” is converted to the 8-bit binary sequence “11001000,” and binary sequence is encoded using rule 2; the sequence “TAGA” can be obtained. Similarly, if the above sequence is decoded using rule 2, the 8-bit binary sequence “11001000” can be obtained, and the two processes are completely reversible. But the correct binary sequence could not be obtained using the other seven DNA coding rules to decode the sequence. These eight coding rules are themselves the form of encryption, regardless of the DNA computing or operation.Table 1
DNA encoding rules.
12345678T1111101001010000A0000010110101111C1001110000110110G0110001111001001DSD. DSD is a DNA hybridization reaction through toehold-mediated branch migration. A long, single-stranded DNA that is fully complementary to the substrate is used as input and is connected to the dangling toehold domain in the prehybridized partially complementary DNA substrate, and then the DSD is triggered. Unlike most DNA-based reactions, DSD is diverse and can be directed either from the 5’ terminal toehold of the substrate or from the 3’ terminal toehold, as shown in Figures 3(a) and 3(b). In addition, DSD is cascaded. The input and output of DSD are single-strand DNA, and the single-strand output can be used as the input of the next cascade, as shown in Figure 3(c).Figure 3
Basic reaction principle of DSD. (a) DSD starts at the 3’ terminal toehold of the substrate. (b) DSD starts at the 5’ terminal toehold of the substrate. (c) Cascade DSD.
(a)(b)(c)


## 3. Results and Discussion

### 3.1. Scheme Description

The encryption scheme is divided into two parts: encryption at the level of chaotic maps and encryption at the level of DSD. At the level of chaos, Lorenz hyperchaotic map and Lorenz chaotic map are used to perform pixel position scrambling and XOR diffusion, respectively. At the level of DSD, the diversity of DSD is used to form different DSD-based encryption rules. Figure4 is the encryption flowchart. The encryption steps are as follows:Figure 4
Flowchart of the proposed scheme.Step 1.
A gray imageT of size M×N is the plaintext image.Step 2.
A group values of Lorenz hyperchaotic map’s initial valuesx0,y0,z0,w0 are chosen as the keys, and the hyperchaotic map equations are iterated by the fourth-order Runge–Kutta method for M×N+t times. The effect of chaos is enhanced by removing the first t iterations. Starting from t + 1, after 3000 iterations, the chaotic state x0 is slightly perturbed by equation (3), and h is the step length; then, we can get a pseudorandom chaotic sequence S of length M×N. The pseudorandom sequences X are obtained by normalizing the pseudorandom sequences S to the integer interval [1, M×N]. The repeated pseudorandom numbers in the sequences X retain only the first occurrence, while the numbers in the integer interval [1, M×N] that do not appear in the sequences X are arranged at the end of the sequences X in ascending numerical order from small to large, and there are no duplicate values in sequences X.(3)x0=x0+h∗siny0.Step 3.
The original plaintext image matrixT (M, N) is scrambled by sequences X and equation (4), and the resulting matrix is denoted as A (M, N).(4)t=TXi;TXi=TXM∗N−i+1;TXM∗N−i+1=t.Step 4.
A group values of Lorenz chaotic map’s initial valuesx0,y0,z0 are chosen as the keys, and the chaotic map equations are iterated by fourth-order Runge–Kutta method for M×N+t times. Three pseudorandom chaotic sequences Lx, Ly, and Lz with length of M×N can be obtained by removing the previous t iterations. Lx, Ly, and Lz are mapped to integer interval [0, 255] and the three pseudorandom sequences are reconstructed into the matrices with the size of M×N, denoted as Lxm, Lym, and Lzm. The matrix A (M, N) in Step 3 is treated as B (M, N) by XOR operation with the matrix Lxm.Step 5.
The matrixB (M, N) is first transformed into the binary matrix and transformed into DNA matrix C (each location in the DNA sequence matrix C is no longer a decimal number, but four bases). The DNA sequence matrix C is partitioned by columns, one block for every four columns, and we get the DNA sequence matrices D1,D2,D3,…,DN/4. The size of the matrix Dii=1∼N/4 is M×N/4, and it has four bases at each position, so each row of the matrix Di is a 16 nt DNA sequence. Set the direction of DNA sequences from left to right to be 5′ terminal to 3′ terminal. The principle of encrypting the DNA sequence by DSD is as follows: suppose that the DNA sequence of a row in matrix Di, from left to right, is TCTCACCATTCCCACG, and is denoted as the original DNA sequence: 5′-TCTCACCATTCCCACG-3′. When DSD-Figure 3(a) is chosen for encryption, the DNA substrate involved in the reaction can be used as the key, but not all sequences on the substrate can be chosen at random to be the key. In Figure 5, the original DNA sequence determines the sequence of toehold (green, the sequence from left to right is AGAG) and complementary regions (blue region, the sequence in the blue region below is TGGTAAGGGTGC, and the sequence in the blue region above is ACCATTCCCACG) on the substrate, and the length of the toehold is set at 4 nt. The red region of the substrate is the core region of the key, which is the same length as the toehold and is 4 nt, to ensure that the displaced DNA sequence remains the same length as the original DNA sequence. The four bases in the red region have 256 possibilities. The sequences of red region in Figure 5 are AGCT. The original sequence 5′-TCTCACCATTCCCACG-3′ is encrypted to 5′-ACCATTCCCACGAGCT-3′. We refer to the encryption rule generated based on this type of DSD as DSD-rule a, as shown in Table 2.
When DSD in Figure3(b) is chosen for encryption, it is similar to DSD-rule a. In Figure 6, the original DNA sequence determines the sequence of the toehold (green, the sequence from left to right is CACG) and complementary regions (blue region, the sequence in the blue region below is AGAGTGGTAAGG, and the sequence in the blue region above is TCTCACCATTCC) on the substrate. The red region of the substrate is the core region of the key, and the sequence assigned to the red region in Figure 6 is AGCT. The original sequence is encrypted to 5′-AGCTTCTCACCATTCC-3′. We refer to the encryption rule generated based on this type of DSD as DSD-rule b, as shown in Table 2.
When DSD in Figure3(c) is chosen for encryption, the two DNA substrates involved in the reaction each carry part of the key. As shown in Figure 7, the toehold on the first substrate (green region) is 6 nt in length and the sequence is AGAGTG. The red region is the core region of the key, and its length is 10 nt, there are 410 possibilities. The original DNA sequence strand reacts with the first DNA substrate and the displaced single strand continues DSD with the second substrate. The toehold on the second substrate (black region) is 3 nt in length and the sequence is TGC. The purple region is the core region of the key, and its length is 6 nt, there are 46 possibilities. The original sequence is encrypted to 5’-AGCTTGGAGGTTAGGC-3’. We refer to the encryption rule generated based on this type of DSD as DSD-rule c, as shown in Table 2.
In DSD-based encryption rules, the keys of DSD-rule a and DSD-rule b are composed of four bases, and the key of DSD-rule c is composed of 16 bases. Due to the pseudorandom of chaotic sequences, we use the matricesLym and Lzm in Step 4 to generate the keys required by DSD-based encryption rules. The matrices Lym and Lzm are first transformed into the 8-bit binary matrices and transformed into the DNA sequence matrices Lykey and Lzkey with the size of M×N. Each location in matrix Lykey contains four bases, so there are M×N keys required for the DSD-rule a and DSD-rule b in matrix Lykey. Each location in matrix Lzkey also contains four bases, so there are M×N/4 keys required for the DSD-rule c in matrix Lzkey. For any matrix Dii=1∼N/4, there are three types of DSD-based encryption rules that it can select. In order to realize encryption more quickly, matrices D1, D4, …, D1+3n (n is natural number, and 1+3n∈1,N/4) are encrypted by DSD-rule a, matrices D2, D5, …, D2+3n (n is natural number, and 2+3n∈2,N/4) are encrypted by DSD-rule b, and matrices D3, D6, …, D3+3n (n is natural number, and 3+3n∈3,N/4) are encrypted by DSD-rule c.
For matricesD1, D4, …, D1+3n, delete the first column of each block matrix according to DSD-rule a, the original matrices with 4 columns in row M are changed into 3 columns in row M, and the first n columns of matrix Lykey are inserted into the fourth column of each block matrix to get the encrypted block matrices E1, E4, …, E1+3n. For matrices D2, D5, …, D2+3n, delete the fourth column of each block matrix according to DSD-rule b, and the n + 1 column to n + 3n column of matrix Lykey are inserted into the first column of each block matrix to get the encrypted block matrices E2, E5, …, E2+3n. For matrices D3, D6, …, D3+3n, they are all displaced by the first 3n columns of matrix Lzkey according to DSD-rule c, and the encrypted block matrices E3, E6, …, E3+3n are obtained.Figure 5
The DNA sequence encryption principle of DSD-rule a.Table 2
DSD-based encryption rules.
Original DNA sequenceDSD-ruleEncrypted DNA sequenceTCTCACCATTCCCACGDSD-rule aACCATTCCCACG∗∗∗∗TCTCACCATTCCCACGDSD-rule b∗∗∗∗ TCTCACCATTCCTCTCACCATTCCCACGDSD-rule c∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗Figure 6
The DNA sequence encryption principle of DSD-rule b.Figure 7
The DNA sequence encryption principle of DSD-rule c.Step 6.
The encrypted block matricesEii=1∼N/4 obtained in Step 5 are merged into DNA sequence matrix E of size M×N.Step 7.
A random DNA coding rule is selected to decode the DNA sequence matrixE, and then it is transformed into the decimal matrix F, and finally the encrypted image is obtained.


### 3.2. Simulation Results

A256×256 gray image “Lena” is the plaintext image, and the above chaotic maps and DSD-based encryption rules are used to encrypt it. The initial values x0,y0,z0, and w0 of Lorenz hyperchaotic map are set to 1.1, 2.2, 3.3, and 4.4, and x0,y0,z0 of Lorenz chaotic map are set to 10, 1, and 0. The simulation results are realized by MATLAB R2014a; the operating system of computer is Windows 10, as shown in Figure 8. The encryption steps are reversible. In the DSD-based encryption rules, the encryption keys are provided by matrices Lykey and Lzkey. The decryption keys are the complement sequences of the toehold. From the visual effect, the encrypted image is not easy to get information.Figure 8
Simulation results. (a) Plaintext image “Lena” (256×256). (b) Encrypted. (c) Decrypted.
(a)(b)(c)


### 3.3. Security Analysis

Key Space. In general, a key space larger than 2100 can resist brute-force attack. The key space is the total number of keys used in an encryption scheme. The keys in this paper consist of two parts: (1) at the level of chaos: 7 chaotic keys, the key space is (1014)7 = 1098; (2) at the level of DNA. In Step 5, matrix B is converted to DNA sequence matrix C using a DNA encoding rule, while matrices Lym and Lzm use a DNA encoding rule when convert to DNA sequence matrices Lykey and Lzkey, respectively. In Step 7, the DNA sequence matrix E uses a DNA coding rule when converting to the decimal matrix F. As a result, the DNA coding rules are used four times during the whole encryption process. In Step 5, there are three DSD-based encryption rules that any block matrix Dii=1∼N/4 can choose. When the size of the plaintext image is 256×256, it has 364 possibilities. The key space at the DNA level is 8×8×8×8×364≈1.4×1034. Thus, the total key space is 1.4×10132, which is much larger than 2100, and this key space is large enough to resist brute-force attack.Sensitivity Analysis of Key. Chaotic maps are sensitive to initial values. For example, when the initial value x0 of Lorenz map changes from 10 to 10.0000000000001, the decryption result is shown in Figure 9(a). z0 changes from 0 to 0.0000000000001, the decryption result is shown in Figure 9(b). Based on these results, we can find that the keys of the proposed encryption scheme are sensitive enough to resist exhausting attack.Figure 9
Sensitivity analysis. (a) The decrypted image whenx0 of Lorenz map changes from 10 to 10.0000000000001. (b) The decrypted image when z0 of Lorenz map changes from 0 to 0.0000000000001.
(a)(b)The Gray Histogram Analysis. Histogram analysis is a method to evaluate the ability of proposed scheme to resist statistical attack. If the histogram distribution of the encrypted image is not uniform, the attacker can obtain the statistical features of the encrypted image through statistical analysis and then decrypt the image. Figure 10 are the gray histograms of plaintext and encrypted images. Comparing these two histograms, the histogram of encrypted image is distributed more uniform.Figure 10
The gray histogram. (a) The gray histogram of the plaintext image “Lena.” (b) The gray histogram of the encrypted image.
(a)(b)Correlation Coefficient Analysis. Another important approach to resist statistical analysis is to eliminate the correlation in plaintext image. 10,000 pairs of adjacent pixel values are randomly selected in each direction of plaintext and encrypted images, and equation (5) is used to calculate the correlation, the results are shown in Figure 11 and Table 3. Compared with [15], [18], [26], and [28], our encryption scheme is more effective in removing correlation.(5)rxy=covx,yDx×DyEx=1N∑i=1NxiDx=1N∑i=1Nxi−Ex2covx,y=1N∑i=1Nxi−Exyi−Ey.Figure 11
Correlation of adjacent pixels in plaintext and encrypted images.
(a)(b)(c)(d)(e)(f)Table 3
Correlation of adjacent pixels in plaintext and encrypted images.
CorrelationOriginalProposedRef. [15]Ref. [18]Ref. [26]Ref. [28]Horizontal0.9719−0.00020.0004−0.00210.0024−0.0077Vertical0.94440.00520.00210.00090.00120.0002Diagonal0.91630.0018−0.00380.00030.0016−0.0055Information Entropy. Information entropy is used to evaluate the randomness of information:(6)Hm=−∑i=1nPmilogPmi,where mi is the ith gray value of L level gray image and Pmi is the emergence probability of mi, so ∑i=1LPmi=1. The ideal value of information entropy approaches 8. The information entropy of encrypted image is 7.9971, as shown in Table 4. Therefore, our encryption scheme is effective.Table 4
Information entropy.
Information entropyProposedRef. [15]Ref. [18]Ref. [26]Plain image7.3740———Encrypted image7.99717.98747.99717.9970Differential Attack Analysis. Differential attack is a common attack in which attackers make small changes to the image and encrypts it. By comparing two encrypted images to find out the difference, it can help the attackers qualitatively observe the difference between the two images. NPCR and UACI are used as two criterions to evaluate the ability to resist differential attack. They can be calculated by the following equation:(7)NPCRP1,P2=∑i=1M∑i=1NSignP1i,j−P2i,jM×N×100%UACIP1,P2=∑i=1M∑i=1NSignP1i,j−P2i,j255×M×N×100%Signx=1,x>00,x=0−1,x<0,where the size of images P1 and P2 is M×N. The ideal value of NPCR is 99.6094% and UACI is 33.4635%. NPCR and UACI between Lena (Figure 8(a)) and encrypted image (Figure 8(b)) are shown in Table 5. The results show that the proposed scheme can resist differential attack.Table 5
NPCR and UACI.
ImageNPCR (%)UACI (%)Figures8(a) and 8(b)99.647531.2188Ref. [15]99.601728.1370Ref. [25]99.610038.0000


## 3.1. Scheme Description

The encryption scheme is divided into two parts: encryption at the level of chaotic maps and encryption at the level of DSD. At the level of chaos, Lorenz hyperchaotic map and Lorenz chaotic map are used to perform pixel position scrambling and XOR diffusion, respectively. At the level of DSD, the diversity of DSD is used to form different DSD-based encryption rules. Figure4 is the encryption flowchart. The encryption steps are as follows:Figure 4
Flowchart of the proposed scheme.Step 1.
A gray imageT of size M×N is the plaintext image.Step 2.
A group values of Lorenz hyperchaotic map’s initial valuesx0,y0,z0,w0 are chosen as the keys, and the hyperchaotic map equations are iterated by the fourth-order Runge–Kutta method for M×N+t times. The effect of chaos is enhanced by removing the first t iterations. Starting from t + 1, after 3000 iterations, the chaotic state x0 is slightly perturbed by equation (3), and h is the step length; then, we can get a pseudorandom chaotic sequence S of length M×N. The pseudorandom sequences X are obtained by normalizing the pseudorandom sequences S to the integer interval [1, M×N]. The repeated pseudorandom numbers in the sequences X retain only the first occurrence, while the numbers in the integer interval [1, M×N] that do not appear in the sequences X are arranged at the end of the sequences X in ascending numerical order from small to large, and there are no duplicate values in sequences X.(3)x0=x0+h∗siny0.Step 3.
The original plaintext image matrixT (M, N) is scrambled by sequences X and equation (4), and the resulting matrix is denoted as A (M, N).(4)t=TXi;TXi=TXM∗N−i+1;TXM∗N−i+1=t.Step 4.
A group values of Lorenz chaotic map’s initial valuesx0,y0,z0 are chosen as the keys, and the chaotic map equations are iterated by fourth-order Runge–Kutta method for M×N+t times. Three pseudorandom chaotic sequences Lx, Ly, and Lz with length of M×N can be obtained by removing the previous t iterations. Lx, Ly, and Lz are mapped to integer interval [0, 255] and the three pseudorandom sequences are reconstructed into the matrices with the size of M×N, denoted as Lxm, Lym, and Lzm. The matrix A (M, N) in Step 3 is treated as B (M, N) by XOR operation with the matrix Lxm.Step 5.
The matrixB (M, N) is first transformed into the binary matrix and transformed into DNA matrix C (each location in the DNA sequence matrix C is no longer a decimal number, but four bases). The DNA sequence matrix C is partitioned by columns, one block for every four columns, and we get the DNA sequence matrices D1,D2,D3,…,DN/4. The size of the matrix Dii=1∼N/4 is M×N/4, and it has four bases at each position, so each row of the matrix Di is a 16 nt DNA sequence. Set the direction of DNA sequences from left to right to be 5′ terminal to 3′ terminal. The principle of encrypting the DNA sequence by DSD is as follows: suppose that the DNA sequence of a row in matrix Di, from left to right, is TCTCACCATTCCCACG, and is denoted as the original DNA sequence: 5′-TCTCACCATTCCCACG-3′. When DSD-Figure 3(a) is chosen for encryption, the DNA substrate involved in the reaction can be used as the key, but not all sequences on the substrate can be chosen at random to be the key. In Figure 5, the original DNA sequence determines the sequence of toehold (green, the sequence from left to right is AGAG) and complementary regions (blue region, the sequence in the blue region below is TGGTAAGGGTGC, and the sequence in the blue region above is ACCATTCCCACG) on the substrate, and the length of the toehold is set at 4 nt. The red region of the substrate is the core region of the key, which is the same length as the toehold and is 4 nt, to ensure that the displaced DNA sequence remains the same length as the original DNA sequence. The four bases in the red region have 256 possibilities. The sequences of red region in Figure 5 are AGCT. The original sequence 5′-TCTCACCATTCCCACG-3′ is encrypted to 5′-ACCATTCCCACGAGCT-3′. We refer to the encryption rule generated based on this type of DSD as DSD-rule a, as shown in Table 2.
When DSD in Figure3(b) is chosen for encryption, it is similar to DSD-rule a. In Figure 6, the original DNA sequence determines the sequence of the toehold (green, the sequence from left to right is CACG) and complementary regions (blue region, the sequence in the blue region below is AGAGTGGTAAGG, and the sequence in the blue region above is TCTCACCATTCC) on the substrate. The red region of the substrate is the core region of the key, and the sequence assigned to the red region in Figure 6 is AGCT. The original sequence is encrypted to 5′-AGCTTCTCACCATTCC-3′. We refer to the encryption rule generated based on this type of DSD as DSD-rule b, as shown in Table 2.
When DSD in Figure3(c) is chosen for encryption, the two DNA substrates involved in the reaction each carry part of the key. As shown in Figure 7, the toehold on the first substrate (green region) is 6 nt in length and the sequence is AGAGTG. The red region is the core region of the key, and its length is 10 nt, there are 410 possibilities. The original DNA sequence strand reacts with the first DNA substrate and the displaced single strand continues DSD with the second substrate. The toehold on the second substrate (black region) is 3 nt in length and the sequence is TGC. The purple region is the core region of the key, and its length is 6 nt, there are 46 possibilities. The original sequence is encrypted to 5’-AGCTTGGAGGTTAGGC-3’. We refer to the encryption rule generated based on this type of DSD as DSD-rule c, as shown in Table 2.
In DSD-based encryption rules, the keys of DSD-rule a and DSD-rule b are composed of four bases, and the key of DSD-rule c is composed of 16 bases. Due to the pseudorandom of chaotic sequences, we use the matricesLym and Lzm in Step 4 to generate the keys required by DSD-based encryption rules. The matrices Lym and Lzm are first transformed into the 8-bit binary matrices and transformed into the DNA sequence matrices Lykey and Lzkey with the size of M×N. Each location in matrix Lykey contains four bases, so there are M×N keys required for the DSD-rule a and DSD-rule b in matrix Lykey. Each location in matrix Lzkey also contains four bases, so there are M×N/4 keys required for the DSD-rule c in matrix Lzkey. For any matrix Dii=1∼N/4, there are three types of DSD-based encryption rules that it can select. In order to realize encryption more quickly, matrices D1, D4, …, D1+3n (n is natural number, and 1+3n∈1,N/4) are encrypted by DSD-rule a, matrices D2, D5, …, D2+3n (n is natural number, and 2+3n∈2,N/4) are encrypted by DSD-rule b, and matrices D3, D6, …, D3+3n (n is natural number, and 3+3n∈3,N/4) are encrypted by DSD-rule c.
For matricesD1, D4, …, D1+3n, delete the first column of each block matrix according to DSD-rule a, the original matrices with 4 columns in row M are changed into 3 columns in row M, and the first n columns of matrix Lykey are inserted into the fourth column of each block matrix to get the encrypted block matrices E1, E4, …, E1+3n. For matrices D2, D5, …, D2+3n, delete the fourth column of each block matrix according to DSD-rule b, and the n + 1 column to n + 3n column of matrix Lykey are inserted into the first column of each block matrix to get the encrypted block matrices E2, E5, …, E2+3n. For matrices D3, D6, …, D3+3n, they are all displaced by the first 3n columns of matrix Lzkey according to DSD-rule c, and the encrypted block matrices E3, E6, …, E3+3n are obtained.Figure 5
The DNA sequence encryption principle of DSD-rule a.Table 2
DSD-based encryption rules.
Original DNA sequenceDSD-ruleEncrypted DNA sequenceTCTCACCATTCCCACGDSD-rule aACCATTCCCACG∗∗∗∗TCTCACCATTCCCACGDSD-rule b∗∗∗∗ TCTCACCATTCCTCTCACCATTCCCACGDSD-rule c∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗Figure 6
The DNA sequence encryption principle of DSD-rule b.Figure 7
The DNA sequence encryption principle of DSD-rule c.Step 6.
The encrypted block matricesEii=1∼N/4 obtained in Step 5 are merged into DNA sequence matrix E of size M×N.Step 7.
A random DNA coding rule is selected to decode the DNA sequence matrixE, and then it is transformed into the decimal matrix F, and finally the encrypted image is obtained.


## 3.2. Simulation Results

A256×256 gray image “Lena” is the plaintext image, and the above chaotic maps and DSD-based encryption rules are used to encrypt it. The initial values x0,y0,z0, and w0 of Lorenz hyperchaotic map are set to 1.1, 2.2, 3.3, and 4.4, and x0,y0,z0 of Lorenz chaotic map are set to 10, 1, and 0. The simulation results are realized by MATLAB R2014a; the operating system of computer is Windows 10, as shown in Figure 8. The encryption steps are reversible. In the DSD-based encryption rules, the encryption keys are provided by matrices Lykey and Lzkey. The decryption keys are the complement sequences of the toehold. From the visual effect, the encrypted image is not easy to get information.Figure 8
Simulation results. (a) Plaintext image “Lena” (256×256). (b) Encrypted. (c) Decrypted.
(a)(b)(c)


## 3.3. Security Analysis

Key Space. In general, a key space larger than 2100 can resist brute-force attack. The key space is the total number of keys used in an encryption scheme. The keys in this paper consist of two parts: (1) at the level of chaos: 7 chaotic keys, the key space is (1014)7 = 1098; (2) at the level of DNA. In Step 5, matrix B is converted to DNA sequence matrix C using a DNA encoding rule, while matrices Lym and Lzm use a DNA encoding rule when convert to DNA sequence matrices Lykey and Lzkey, respectively. In Step 7, the DNA sequence matrix E uses a DNA coding rule when converting to the decimal matrix F. As a result, the DNA coding rules are used four times during the whole encryption process. In Step 5, there are three DSD-based encryption rules that any block matrix Dii=1∼N/4 can choose. When the size of the plaintext image is 256×256, it has 364 possibilities. The key space at the DNA level is 8×8×8×8×364≈1.4×1034. Thus, the total key space is 1.4×10132, which is much larger than 2100, and this key space is large enough to resist brute-force attack.Sensitivity Analysis of Key. Chaotic maps are sensitive to initial values. For example, when the initial value x0 of Lorenz map changes from 10 to 10.0000000000001, the decryption result is shown in Figure 9(a). z0 changes from 0 to 0.0000000000001, the decryption result is shown in Figure 9(b). Based on these results, we can find that the keys of the proposed encryption scheme are sensitive enough to resist exhausting attack.Figure 9
Sensitivity analysis. (a) The decrypted image whenx0 of Lorenz map changes from 10 to 10.0000000000001. (b) The decrypted image when z0 of Lorenz map changes from 0 to 0.0000000000001.
(a)(b)The Gray Histogram Analysis. Histogram analysis is a method to evaluate the ability of proposed scheme to resist statistical attack. If the histogram distribution of the encrypted image is not uniform, the attacker can obtain the statistical features of the encrypted image through statistical analysis and then decrypt the image. Figure 10 are the gray histograms of plaintext and encrypted images. Comparing these two histograms, the histogram of encrypted image is distributed more uniform.Figure 10
The gray histogram. (a) The gray histogram of the plaintext image “Lena.” (b) The gray histogram of the encrypted image.
(a)(b)Correlation Coefficient Analysis. Another important approach to resist statistical analysis is to eliminate the correlation in plaintext image. 10,000 pairs of adjacent pixel values are randomly selected in each direction of plaintext and encrypted images, and equation (5) is used to calculate the correlation, the results are shown in Figure 11 and Table 3. Compared with [15], [18], [26], and [28], our encryption scheme is more effective in removing correlation.(5)rxy=covx,yDx×DyEx=1N∑i=1NxiDx=1N∑i=1Nxi−Ex2covx,y=1N∑i=1Nxi−Exyi−Ey.Figure 11
Correlation of adjacent pixels in plaintext and encrypted images.
(a)(b)(c)(d)(e)(f)Table 3
Correlation of adjacent pixels in plaintext and encrypted images.
CorrelationOriginalProposedRef. [15]Ref. [18]Ref. [26]Ref. [28]Horizontal0.9719−0.00020.0004−0.00210.0024−0.0077Vertical0.94440.00520.00210.00090.00120.0002Diagonal0.91630.0018−0.00380.00030.0016−0.0055Information Entropy. Information entropy is used to evaluate the randomness of information:(6)Hm=−∑i=1nPmilogPmi,where mi is the ith gray value of L level gray image and Pmi is the emergence probability of mi, so ∑i=1LPmi=1. The ideal value of information entropy approaches 8. The information entropy of encrypted image is 7.9971, as shown in Table 4. Therefore, our encryption scheme is effective.Table 4
Information entropy.
Information entropyProposedRef. [15]Ref. [18]Ref. [26]Plain image7.3740———Encrypted image7.99717.98747.99717.9970Differential Attack Analysis. Differential attack is a common attack in which attackers make small changes to the image and encrypts it. By comparing two encrypted images to find out the difference, it can help the attackers qualitatively observe the difference between the two images. NPCR and UACI are used as two criterions to evaluate the ability to resist differential attack. They can be calculated by the following equation:(7)NPCRP1,P2=∑i=1M∑i=1NSignP1i,j−P2i,jM×N×100%UACIP1,P2=∑i=1M∑i=1NSignP1i,j−P2i,j255×M×N×100%Signx=1,x>00,x=0−1,x<0,where the size of images P1 and P2 is M×N. The ideal value of NPCR is 99.6094% and UACI is 33.4635%. NPCR and UACI between Lena (Figure 8(a)) and encrypted image (Figure 8(b)) are shown in Table 5. The results show that the proposed scheme can resist differential attack.Table 5
NPCR and UACI.
ImageNPCR (%)UACI (%)Figures8(a) and 8(b)99.647531.2188Ref. [15]99.601728.1370Ref. [25]99.610038.0000


## 4. Conclusions

The types and forms of DNA reactions are diverse. In order to introduce more DNA-based operations into image encryption to enrich image encryption methods, we propose three DSD-based encryption rules according to the diversity of DSD, and a double-layer image encryption scheme based on chaotic maps and DSD is proposed. The results show that the proposed scheme has good encryption effect. Our next work is expected to propose more DNA-level sequence encryption rules based on DNA reactions and more encryption methods for image encryption.



---

*Source: 3906392-2022-01-28.xml*