Chaotic image encryption scheme using two-by-two deoxyribonucleic acid complementary rules

Abstract. An image encryption technique has been proposed using deoxyribonucleic acid (DNA) operations and chaotic map in this scheme. First, initial conditions of row encryption and column encryption are calculated. Then, a two-dimensional sine iterative chaotic map with infinite collapse (ICMIC) modulation map (2D-SIMM) is adopted to produce chaotic sequences. Extended exclusive OR (XOR) is executed to enhance security. A mask matrix is produced by 2D-SIMM. It performs XOR operation with the DNA-encoded matrix. Finally, the revised DNA-encoded matrix is performed two-by-two DNA complementary rules and executed DNA decoding to obtain the cipher image. Experiment results prove that the proposed scheme is secure enough and can resist various attacks.


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.
where a and b are the positive system parameters. While a ¼ 1 and b ¼ 5, the system of 2D-SIMM is a hyper chaotic map. Compared with the 2-D sine logistic modulation map (2D-SLMM) 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.

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. . . ..

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.
The DNA complementary rule must satisfy that 17 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 6 3 ; 2 7 7 x ≠ DðxÞ ≠ D½DðxÞ ≠ DfD½DðxÞg x ¼ DðDfD½DðxÞgÞ ; where DðxÞ is different from x in at least 1-bit position. There are six DNA complementary rules as follows: 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: Notice that the double complement of xx is D½DðxxÞ. DfD½DðxxÞg 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.

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 ¼ P 7 i¼0 x i · 2 i and r ¼ P 10 i¼0 r i · 2 i , the Extended XOR (eXOR) operation can be defined as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 4 ; 3 2 6 ; 3 0 1 eXORðx; rÞ ¼ where notðxÞ flips a single bit x, and the "x⊕y" represents the XOR operation. It has the following performance: If eXORðx; rÞ ¼ t, then eXORðt; rÞ ¼ x. This property can be proved by Table 3.   Table 3 The results of not (x i ⊕r i ⊕r iþ3 ).

Secret Key and Random Number Generation
In this scheme, gray level images with the size of M × N are applied to demonstrate the proposed scheme. The initial values x 0 and y 0 could be calculated as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 5 ; 6 3 ; 6 8 4 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 6 3 ; 6 3 9 where x 0 01 , x 0 02 , y 0 01 , y 0 02 , and N 0 represent the initial secret keys. ðx 1 0 ; y 1 0 Þ denotes the initial condition of row encryption, and ðx 2 0 ; y 2 0 Þ denotes the initial condition of column encryption. "x mod y" refers to the module operation.

Row encryption
The steps of row encryption are displayed as follows: Step 1. i ¼ 1. The initial values ðx 1 0 ; y 1 0 Þ 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 7. i ¼ i þ 1 and update ðx; yÞ by E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 9 ; 6 3 ; 1 2 8 x where s 1 is the mean of Pði; : : : Þ.
Step 8. Do steps 1 to 7 again until i > M.

Column encryption
The steps of column encryption are shown as follows: Step 1. j ¼ 1. The initial values ðx 2 0 ; y 2 0 Þ are produced by Eq. (6). Iterate 2D-SIMM N 0 times and the sequences are discarded for avoiding transient effect.
Step 3. The fractional part of the values ðx; yÞ is converted into binary streams ðU; VÞ.
Step 8. Do steps 1 to 7 in a loop until j > N.
New pixel matrix P is obtained finally.

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 × 4N.
Step 3. Convert c i (1 ≤ i ≤ MN) into corresponding binary format. The former 8 bits are encoded using DNA encoding rule. The length of sequence C 1 is 4MN.
z is the number of the two-by-two complementary rule that has been chosen for image encryption and z ∈ ½1;15!.
Step 7. Iterate 2D-SIMM N 0 times and the sequences are discarded with the initial values x 2 0 and y 1 0 .
Step 10. Use the z'th two-by-two DNA complementary rule to operate on matrix H.
Step 11. Convert DNA cipher matrix H into decimal number.
Step 12. Cipher image is obtained finally.

Image Decryption
The decryption algorithm is the reverse process of the encryption algorithm. It could be described briefly as follows. First, DNA decryption is applied. Then, column decryption and row decryption are performed. Finally, the plain image is obtained.

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.

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 0 01 , x 0 02 , y 0 01 , y 0 02 , 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 × 10 16 × 10 16 × 10 16 × 10 16 × 15! ≈ 1.3 × 10 76 . It will be large enough to withstand an exhaustive attack.
In the paper, secret keys are set (x 0 01 , x 0 02 , y 0 01 , y 0 02 , 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.

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).

Correlation Analysis
The correlation coefficient r xy between two adjacent pixels x and y are defined as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 6 ; 6 3 ; 1 6 3 r xy ¼ covðx; yÞ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi DðxÞDðyÞ p ; where covðx; yÞ ¼ 1 . 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.

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.

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 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 8 ; 3 2 6 ; 3 2 9 Dði; jÞ × 100%; E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 9 ; 3 2 6 ; 2 8 5 E Q -T A R G E T ; t e m p : i n t r a l i n k -; s e c 5 . 5 ; 3 2 6 ; 2 3 8 Dði; jÞ ¼ 0; if C 1 ði; jÞ ¼ C 2 ði; jÞ 1; else : NPCR ¼ 99.61% and UACI ¼ 33.32%. The experiments demonstrate that the proposed scheme could effectively resist a plaintext attack and differential attack.

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.

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.

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.
Disclosures I declare that there is no conflict of interest in the manuscript.