## 1.

## Introduction

Recently, many image encryption methods have been proposed. The diffusion and confusion operations that are proposed by Shannon^{1} in cryptography are also used in image encryption. Traditional encryption methods are improper for image encryption such as low efficiency, enormous data, high correlation, and so on.^{2} Chen et al.^{3} presented a real-time cryptosystem. The confusion and diffusion operations of this scheme were performed based on a lookup table. Chen et al.^{4} also put forward an image encryption algorithm based on gray code. It was performed with high efficiency. The chaotic map is highly sensitive to initial values and system parameters, unpredictable, pseudorandom, and ergodic.^{5} It is very suitable for an image encryption system. Liu et al.^{6} proposed a double image encryption method based on random pixel exchanging and phase encoding in gyrator domains. Mao et al.^{7} presented a fast image encryption method, which was based on three-dimensional chaotic baker maps. Sivakumar and Venkatesan^{8} proposed an image encryption scheme. Knight’s travel path and true random number were adopted in this method. Wang et al.^{9} presented an efficient image encryption scheme using a two-step phase-shifting interference method, in fractional Fourier transform and random mixed encoding. Wang and Luan^{10} proposed an image encryption scheme using reversible cellular automata and chaos.

Since deoxyribonucleic acid (DNA) computing supports high parallelism, it is also superior in massive storage and extremely low power consumption. Many DNA-based methods have been proposed nowadays.^{11}12.13.14.^{–}^{15} Zhen et al.^{12} presented an image encryption scheme based on chaotic sequence, DNA encoding, and entropy. Rehman et al.^{13} proposed a method that was based on chaos and DNA complementary rules for gray images. The most significant and least significant parts of each block were encoded with different methods. Wang et al.^{16} proposed an image encryption technique based on DNA sequence and coupled map lattice. The scheme could resist different attacks and enhance the system’s security. Wang et al.^{17} also designed an image encryption method based on a two-dimensional (2-D) logistic map and DNA sequence. DNA addition, DNA subtraction, and DNA complementary rules were used to obtain the ciphered image. Belazi et al.^{18} designed an equivalent mathematical model of the cryptosystem and algebraic analysis was given. By finding equivalent keys, key space was reduced. The authors also proposed a recovering scheme with lower complexity than the actual decryption method. In Ref. 19, a 2-D logistic map was employed for row circular permutation and column circular permutation. Initial values and system parameters of the chaotic system were calculated first. Abd-El-Hafiz et al.^{20} proposed two measures for the evaluation permutation skills. Two parameters were proposed in the program.

The rest of this paper is arranged as follows. Section 2 briefly introduces the two-dimensional sine iterative chaotic map with infinite collapse (ICMIC) modulation map (2D-SIMM), random number generation, DNA operations, and improved expanded exclusive OR (XOR) operation. Section 3 describes the proposed scheme. Section 4 depicts the simulation results. Section 5 presents security analysis and the conclusion is described in Sec. 6.

## 2.

## Preliminary Work

## 2.1.

### Two-Dimensional Sine ICMIC Modulation Map

2D-SIMM^{21} is defined as

## (1)

$$\{\begin{array}{l}{x}_{i+1}=a\text{\hspace{0.17em}}\mathrm{sin}(\pi {y}_{i})\mathrm{sin}(b/{x}_{i})\\ {y}_{i+1}=a\text{\hspace{0.17em}}\mathrm{sin}(\pi {x}_{i+1})\mathrm{sin}(b/{y}_{i})\end{array},$$^{22}and 2-D logistic map,

^{17}2D-SIMM has better ergodicity, larger key space, more complex dynamical behaviors, and phase space trajectory.

^{21}More secure chaotic sequences could be produced with the system. 2D-SIMM is employed in this paper to generate chaotic sequences.

## 2.2.

### Random Number Generation

The sequences produced by 2D-SIMM are decimal real numbers. The fractional part of a real number is changed into equivalent binary format. The former 16 bits of binary value are separated into two halves each with 8 bits.^{8} They are executed XOR operation to generate a random number finally.

The process can be described as follows. Suppose the value generated by 2D-SIMM is 0.63636. The binary bit streams of the fractional part are 10100010111010000111…..

The former 16 bits are 1010001011101000. The first half is $({T}_{15-8})=(10100010)2$, and the other half is $({T}_{7-0})=(11101000)2$. The generated random number $(R)={T}_{15-8}$ XOR ${T}_{7-0}=(01001010)2$.

## 2.3.

### Deoxyribonucleic Acid Operations

DNA is two twisted strands, which are composed of four bases: adenine (A), cytosine (C), thymine (T), and guanine (G).^{13} (A) and (G), respectively, bond with complement (T) and (C), and vice versa. 00, 01, 10, and 11 are represented as A, C, G, and T, respectively. Each pixel is transformed into a DNA sequence with length 4 in. 8-bit gray image. The rule for DNA XOR is shown in Table 1.

## Table 1

XOR operation of DNA sequence.

⊕ | A | C | G | T |

A | A | C | G | T |

C | C | A | T | G |

G | G | T | A | C |

T | T | G | C | A |

The DNA complementary rule must satisfy that^{17}

There are six DNA complementary rules as follows:

1. G → T, T → A, A → C, C → G;

2. G → T, T → C, C → A, A → G;

3. G → C, C → A, A → T, T → G;

4. G → C, C → T, T → A, A → G;

5. G → A, A → T, T → C, C → G; and

6. G → A, A → C, C → T, T → G.

A complementary rule^{23} is defined, which processes the alphabet in doubles instead of one by one. Assume that ($xx$) is the token and $D(xx)$ defines its complement.

Here, the same property must apply as follows:

## (3)

$$\{\begin{array}{l}xx\ne D(xx)\ne D[D(xx)]\ne D\{D[D(xx)]\}\ne \dots \ne {D}^{15}(xx)\\ xx={D}^{16}(xx)\end{array}.$$Notice that the double complement of $xx$ is $D[D(xx)]$. $D\{D[D(xx)]\}$ is its triple complement and ${D}^{15}(xx)$ is its 15-fold complementary. The number of two-by-two complementary rules is 15! (1307674368000). It is far more than traditional complementary rules that total 3! (6) legal rules. The method could expand key space for a cryptographic system efficiently. A legal complementary rule is shown in Table 2.

## Table 2

A legal two-by-two complementary rule.

Token | Complement | Token | Complement |
---|---|---|---|

AA | CG | CG | TC |

TC | GC | GC | CT |

CT | TT | TT | AG |

AG | TA | TA | GA |

GA | CA | CA | AT |

AT | CC | CC | GG |

GG | TG | TG | GT |

GT | AC | AC | AA |

## 2.4.

### Improved Expanded XOR Operation

The improved expanded XOR operation^{24} is applied to enhance the security and to increase the complexity of information. For two inputs $x=\sum _{i=0}^{7}{x}_{i}\xb7{2}^{i}$ and $r=\sum _{i=0}^{10}{r}_{i}\xb7{2}^{i}$, the Extended XOR (eXOR) operation can be defined as

## (4)

$$\mathrm{eXOR}(x,r)=\sum _{i=0}^{7}\text{not}({x}_{i}\oplus {r}_{i}\oplus {r}_{i+3})\xb7{2}^{i},$$If $\mathrm{eXOR}(x,r)=t$, then $\mathrm{eXOR}(t,r)=x$.

This property can be proved by Table 3.

## Table 3

The results of not (xi⊕ri⊕ri+3).

xi | riri+3 | |||
---|---|---|---|---|

00 | 01 | 10 | 11 | |

0 | 1 | 0 | 0 | 1 |

1 | 0 | 1 | 1 | 0 |

## 3.

## Image Encryption and Decryption Scheme

## 3.1.

### Secret Key and Random Number Generation

In this scheme, gray level images with the size of $M\times N$ are applied to demonstrate the proposed scheme. The initial values ${x}_{0}$ and ${y}_{0}$ could be calculated as follows:

## (5)

$${x}_{0}^{1}=({x}_{01}^{0}+\frac{{N}_{0}}{1000})\mathrm{mod}1,\phantom{\rule{0ex}{0ex}}{y}_{0}^{1}=({y}_{01}^{0}+{x}_{0}^{1})\mathrm{mod}1,$$## (6)

$${x}_{0}^{2}=({x}_{02}^{0}+{y}_{0}^{1})\mathrm{mod}1,\phantom{\rule{0ex}{0ex}}{y}_{0}^{2}=({y}_{02}^{0}+{x}_{0}^{2})\mathrm{mod}1,$$## 3.2.

### Matrix-Level Encryption

## 3.2.1.

#### Row encryption

The steps of row encryption are displayed as follows:

Step 1. $i=1$. The initial values $({x}_{0}^{1},{y}_{0}^{1})$ are obtained by Eq. (5). Iterate 2D-SIMM ${N}_{0}$ times and the sequences are discarded in order to avoid the transient effect.

Step 2. Continue to iterate 2D-SIMM again and then obtain the new values $(x,y)$.

Step 3. The fractional parts of the values $(x,y)$ are converted into binary streams $(S,T)$.

Step 4. The 22 most significant bits of $S$ are employed to build random numbers ${k}_{1}$, and the 16 most significant bits of $T$ are adopted to build random numbers ${k}_{2}$.

$${S}_{21-11}\leftarrow \text{first half}\text{\hspace{0.17em}}11\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},{S}_{10-0}\leftarrow \text{second half}\text{\hspace{0.17em}}11\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}{k}_{1}\leftarrow {S}_{21-11}\text{\hspace{0.17em}}\mathrm{XOR}\text{\hspace{0.17em}}{S}_{10-0}\mathrm{.}$$$${T}_{15-8}\leftarrow \text{first half}\text{\hspace{0.17em}}\text{8}\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},{T}_{7-0}\leftarrow \text{second half}\text{\hspace{0.17em}}8\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},\text{\hspace{0.17em}}\text{and}{k}_{2}\leftarrow {T}_{15-8}\text{\hspace{0.17em}}\mathrm{XOR}\text{\hspace{0.17em}}{T}_{7-0}\mathrm{.}$$where ${k}_{1}$, ${k}_{2}$ are the integers, and ${k}_{1}\in [1,2047]$, ${k}_{2}\in [1,N-1]$.Step 5. For $i$’th row pixels $P(i,\dots )$, do $P(i,\dots )=\mathrm{eXOR}[P(i,\dots ),{k}_{1}]$.

Step 6. A ${k}_{2}$-bit right cyclic shift is performed on $P(i,\dots )$.

Step 7. $i=i+1$ and update $(x,y)$ by

where ${s}_{1}$ is the mean of $P(i,\dots )$.## (9)

$$\{\begin{array}{l}x=x+{s}_{1}-\lfloor x+{s}_{1}\rfloor \\ y=y+{s}_{1}-\lfloor y+{s}_{1}\rfloor \end{array},$$Step 8. Do steps 1 to 7 again until $i>M$.

## 3.2.2.

#### Column encryption

The steps of column encryption are shown as follows:

Step 1. $j=1$. The initial values $({x}_{0}^{2},{y}_{0}^{2})$ are produced by Eq. (6). Iterate 2D-SIMM ${N}_{0}$ times and the sequences are discarded for avoiding transient effect.

Step 2. Iterate 2D-SIMM once again and get new $(x,y)$.

Step 3. The fractional part of the values $(x,y)$ is converted into binary streams $(U,V)$.

Step 4. The 22 most significant bits of $U$ are employed to build random numbers ${k}_{3}$, and the 16 most significant bits of $V$ are employed to build random numbers ${k}_{4}$.

$${U}_{21-11}\leftarrow \text{first half}\text{\hspace{0.17em}}11\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},{U}_{10-0}\leftarrow \text{second half}\text{\hspace{0.17em}}11\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}{k}_{3}\leftarrow {U}_{21-11}\text{\hspace{0.17em}}\mathrm{XOR}\text{\hspace{0.17em}}{S}_{10-0}\mathrm{.}$$$${V}_{15-8}\leftarrow \text{first half}\text{\hspace{0.17em}}\text{8}\text{\hspace{0.17em}}\mathrm{bits},{V}_{7-0}\leftarrow \text{second half}\text{\hspace{0.17em}}8\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{bits},\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}{k}_{4}\leftarrow {U}_{15-8}\text{\hspace{0.17em}}\mathrm{XOR}\text{\hspace{0.17em}}{S}_{7-0}\mathrm{.}$$where ${k}_{3}$, ${k}_{4}$ are the integers, and ${k}_{3}\in [1,2047]$, ${k}_{4}\in [1,M-1]$.Step 5. For $j$’th column pixels $P(\xb7,j)$, do $P(\xb7,j)=\mathrm{eXOR}[P(\xb7,j),{k}_{3}]$.

Step 6. Connect $P(\xb7,j)$ into a circle. Shift the pixels to up ${k}_{4}$ steps.

Step 7. $j=j+1$ and update $(x,y)$ by

where ${s}_{2}$ is the mean of $P(\xb7,j)$.## (12)

$$\{\begin{array}{l}x=x+{s}_{2}-\lfloor x+{s}_{2}\rfloor \\ y=y+{s}_{2}-\lfloor y+{s}_{2}\rfloor \end{array},$$Step 8. Do steps 1 to 7 in a loop until $j>N$.

New pixel matrix $P$ is obtained finally.

## 3.3.

### DNA-Level Encryption

DNA encryption is depicted as follows:

Step 1. DNA encoding is performed on the new matrix $P$, and DNA-encoded matrix ${P}_{b}$ is obtained with size $M\times 4N$.

Step 2. A chaotic sequence $C=({c}_{1},{c}_{2},\dots ,{c}_{MN})$ is generated under initial condition ${x}_{0}^{1}$ and ${y}_{0}^{2}$ using Eq. (1). Here, ${c}_{i}={x}_{i}(i=\mathrm{1,2},\dots ,MN)$.

Step 3. Convert ${c}_{i}$ ($1\le i\le MN$) into corresponding binary format. The former 8 bits are encoded using DNA encoding rule. The length of sequence ${C}_{1}$ is $4MN$.

Step 4. Rearrange the sequence ${C}_{1}$ to form a matrix $Q$ with size $M\times 4N$.

Step 5. The two matrices $Q$ and ${P}_{b}$ are executed DNA XOR operation to generate matrix $H$,

$t=\mathrm{2,3},\dots ,4MN$.## (13)

$$H(1)=Q(1)\oplus {P}_{b}(1)\oplus \mathrm{mod}({N}_{0},256),\phantom{\rule{0ex}{0ex}}H(t)=Q(t)\oplus {P}_{b}(t)\oplus H(t-1),$$Step 6. Iterate 2D-SIMM once again and get the new $({x}^{\prime},{y}^{\prime})$

$z$ is the number of the two-by-two complementary rule that has been chosen for image encryption and $z\in [\mathrm{1,15}!]$.Step 7. Iterate 2D-SIMM ${N}_{0}$ times and the sequences are discarded with the initial values ${x}_{0}^{2}$ and ${y}_{0}^{1}$.

Step 8. Iterate 2D-SIMM ${f}_{0}$ $[{f}_{0}=\mathrm{max}(M,2N)]$ times again. Then, two chaotic sequences $E=({x}_{1},{x}_{2},\dots ,{x}_{M})$ and $F=({y}_{1},{y}_{2},\dots ,{y}_{2N})$ are generated.

Step 9. Transform $E$ and $F$ into matrices ${K}_{1}(M,1)$ and ${K}_{2}(\mathrm{1,2}N)$. Multiply ${K}_{1}$ and ${K}_{2}$ to obtain matrix $K$ with size $M\times 2N$

$i\in [1,M]$, $j\in [1,2N]$, and $L(i,j)\in 1,15$.Step 10. Use the $z$’th two-by-two DNA complementary rule to operate on matrix $H$.

for $i=1$: $M$

for $j=1$: $2N$

if $L(i,j)$ is equal to $w$ and $w$ is integer,

Then, change $H(i,2j-1)$ and $H(i,2j)$ to be ${D}^{w}[H(i,2j-1)H(i,2j)]$

end

end.

Here, $w\in 1$, 15, and ${D}^{w}(xx)$ means its $w$’th complement.

Step 11. Convert DNA cipher matrix $H$ into decimal number.

Step 12. Cipher image is obtained finally.

## 4.

## Simulation Results

The experiments of the proposed algorithm are simulated on the MATLAB 2010b platform. In this paper, Lena, Baboon, peppers, Terrace, and Jokul are used as original images. The size of the plain image is $256\times 256$, as shown in Fig. 1. The initial keys are set (${x}_{01}^{0}$, ${x}_{02}^{0}$, ${y}_{01}^{0}$, ${y}_{02}^{0}$, and ${N}_{0}$) = (0.3462, 0.5484, 0.7425, 0.8562, and 150).

The experimental results are demonstrated in Fig. 2. Figures 2(a)–2(c) are plain images, cipher images, and decrypted images.

The decrypted image is lossless and the same as the plain image with the proposed scheme.

Two schemes of Ref. 16 and 21 are employed for contrasts of performance evaluations. Encrypted images with different methods are shown in Fig. 3.

## 5.

## Security Analysis

An excellent encryption algorithm could resist many kinds of attacks, such as a statistical attack, brute-force attack, differential attack, and plaintext attack, and so on.

## 5.1.

### Key Space and Sensitivity Analysis

An excellent image encryption algorithm should be very sensitive to secret keys, and key space should be large enough to resist the brute-force attack. In the proposed scheme, the secret keys are ${x}_{01}^{0}$, ${x}_{02}^{0}$, ${y}_{01}^{0}$, ${y}_{02}^{0}$, and ${N}_{0}$. The number of two-by-two DNA complementary rules is a factorial of 15 (15!). If the precision of the system is ${10}^{-16}$, then the key space of the proposed scheme is ${10}^{16}\times {10}^{16}\times {10}^{16}\times {10}^{16}\times {10}^{16}\times 15!\approx 1.3\times {10}^{76}$. It will be large enough to withstand an exhaustive attack.

In the paper, secret keys are set (${x}_{01}^{0}$, ${x}_{02}^{0}$, ${y}_{01}^{0}$, ${y}_{02}^{0}$, and ${N}_{0}$) = (0.3462, 0.5484, 0.7425, 0.8562, and 150). If a tiny alteration (${10}^{-6}$) is brought in one of the initial values, the others remain the same. The decrypted images are depicted in Fig. 4. The difference between improper decrypted images [Figs. 4(b)–4(f)] and the plain image is almost 99.7%. So, the proposed scheme is very sensitive to the system key.

## 5.2.

### Histogram Analysis

An excellent encryption scheme should provide the flat histogram of the encrypted image. The histograms of a plain image and its encrypted image are shown in Fig. 5. It indicates that the numbers of every pixel value of the encrypted image are nearly even. It demonstrates that a statistical attack is invalid to the proposed algorithm. Histograms of plain and cipher images are displayed in Figs. 5(a) and 5(b).

## 5.3.

### Correlation Analysis

The correlation coefficient ${r}_{xy}$ between two adjacent pixels $x$ and $y$ are defined as

where $\mathrm{cov}(x,y)=\frac{1}{N}\sum _{i=1}^{N}[{x}_{i}-E(x)][{y}_{i}-E(y)]$, $E(x)=\frac{1}{N}\sum _{i=1}^{N}{x}_{i}$, $D(x)=\frac{1}{N}\sum _{i=1}^{N}{[{x}_{i}-E(x)]}^{2}$.7225 pairs of adjacent pixels from the plain image and encrypted image are chosen in the horizontal, vertical, and diagonal directions. Figure 6 shows the correlation of two adjacent pixels in the Lena image and its cipher image. It can be shown that correlation is very high in the plain image but correlation is extremely low in the cipher image.

Table 4 shows the values of correlation coefficients of two adjacent pixels in Fig. 6. The results in the proposed scheme are compared with the results in Refs. 16, 21, 22, and 25. The results reveal that the proposed algorithm is rather good.

## Table 4

Analysis of correlation coefficients.

Algorithm | Horizontal | Vertical | Diagonal |
---|---|---|---|

Plain image | 0.9425 | 0.9701 | 0.9248 |

Proposed | 0.0013 | 0.0021 | $-0.0024$ |

Ref. 16 | $-0.0028$ | 0.0032 | 0.0052 |

Ref. 21 | 0.0033 | $-0.0028$ | $-0.0039$ |

Ref. 22 | 0.0048 | $-0.0037$ | 0.0034 |

Ref. 25 | $-0.0062$ | 0.0076 | $-0.0053$ |

## 5.4.

### Information Entropy

Information entropy is one of the most important features of randomness. If $m$ is the information source, then information entropy is calculated as follows:

where $p({m}_{i})$ denotes the probability of symbol ${m}_{i}$ and $L$ is the total number of ${m}_{i}$. The maximum information entropy is 8. The information entropy of cipher images is listed in Table 5.## Table 5

Information entropy of cipher image.

Image | Lena | Terrace | Peppers | Jokul | Baboon |
---|---|---|---|---|---|

$H(m)$ | 7.9971 | 7.9972 | 7.9973 | 7.9969 | 7.9974 |

## 5.5.

### Differential Attack

Number of pixels change rate (NPCR) and unified average changing intensity (UACI) are two parameters that are most widely adopted to measure the sensitivity to the plain image.^{21} NPCR and UACI are used to test the system to resist differential attacks. NPCR and UACI are calculated as

## (19)

$$\mathrm{UACI}=\frac{1}{M\times N}\sum _{i=1}^{M}\sum _{j=1}^{N}\frac{|{C}_{1}(i,j)-{C}_{2}(i,j)|}{255}\times 100\%,$$$\mathrm{NPCR}=99.61\%$ and $\mathrm{UACI}=33.32\%$. The experiments demonstrate that the proposed scheme could effectively resist a plaintext attack and differential attack.

## 5.6.

### Noise Attack

During processing, transmission or an attack from an intruder, the encrypted image will be inevitable to confront with noise. The robust image encryption scheme should withstand a slight noise attack. Figure 7 shows the decrypted Lena with different kinds of noises and intensities.

As shown in Fig. 7, the decrypted image can be recovered even the encrypted image with noise.

## 5.7.

### Known-Plaintext and Chosen-Plaintext Attacks

In the proposed scheme, the iteration condition of 2D-SIMM will be changed by the encrypted pixel value. Even if an invader uses all black or white images as the chosen plain image, the proposed scheme could resist attacks. That is because row encryption, column encryption, and DNA-level encryption will be different if the plain image is changed. Therefore, the proposed scheme could resist known-plaintext and chosen-plaintext attacks.

## 6.

## Conclusion

In this paper, an image encryption scheme is proposed based on two-by-two DNA complementary rules and 2D-SIMM. First, the plain image is performed confusion and permutation operations. Then, DNA-level encryption is executed. The extended XOR operation is applied to help the image encryption scheme to resist plaintext attacks. The experimental results prove that the scheme could afford a differential attack, brute-force attack, statistical attack, and plaintext attack. The security of the system is very high. The proposed method is suitable for practical application.

## Acknowledgments

This research was financially supported by the National Natural Science Foundation of China (Grant No. 61272469), the Natural Science Foundation of Fujian Province (Grant No. 2016J05153), and the Outstanding Youth Scientific Research Training Program of Fujian Province (2017).

## References

## Biography

**Shuliang Sun** received his BS degree from Hangzhou Dianzi University in 2003, his MS degree from Guangxi University in 2006, and his PhD from Tongji University in 2011. He is a teacher at the School of Electronics and Information Engineering, Fuqing Branch of Fujian Normal University, China. His research interests include optical pattern recognition, optical image processing, and optical communication.