On a Symmetric Image Encryption Algorithm Based on the Peculiarity of Plaintext DNA Coding

Many plaintext-related or non-plaintext-related image encryption algorithms based on chaotic systems have been found inefficient and insecure under chosen plaintext attacks. In this paper, a novel plaintext-related mechanism based on the peculiarity of plaintext DNA coding (PPDC) is presented and used to developed a symmetric image encryption algorithm. In our scheme, a hyper-chaotic Lorenz system is used to produce four chaotic sequences. Firstly, by using one chaotic sequence to control the DNA rules, the original image is encoded to obtain the image DNA coding and PPDC, and another chaotic sequence is encoded into a DNA sequence, which is used in the DNA XOR operation. Then, the processing of the remaining two chaotic sequences by using the PPDC is performed to obtain two key streams, which are used in the permutation stage. After performing the traditional permutation operation and DNA XOR operation, the cipher image is obtained. Because of the use of the PPDC, the key streams used in the permutation stage are related to the secret keys and plaintext image, which gives the encryption system higher plaintext sensitivity and security. The simulation experimental results and security analysis demonstrate that the proposed encryption system possesses high efficiency and security and can resist various typical attacks like exhaustive attack, statistical attack, and differential attack effectively.


Introduction
The security of multimedia information communication has become the focus of attention due to the openness and sharing of network transmission, especially for digital images related to military, medical, and other fields that contain sensitive information. Therefore, developing a secure digital image encryption algorithm has become a vital research direction. However, for the inherent characteristics of digital images like the enormous data capacity, strong correlation among adjacent pixels, and high redundancy, the mainstream textual cryptography systems such as the Data Encryption Standard (DES), the Advanced Encryption Standard (AES), etc., are poorly suited to image encryption [1].
Chaotic systems possessing several salient features like extreme sensitivity to initial conditions and control parameters, ergodicity, aperiodicity, and randomicity have been used to generate pseudo-random sequences that are very complex and difficult to analyze and predict. In 1977, Fridrich firstly used the pseudo-random sequences generated by chaotic systems in image cryptosystems [2]. Subsequently, many chaos-based image encryption systems [1,[3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18] have been constantly developed by researchers. For example, in [8], a new chaotic map was created based on a Beta function and used to develop a novel image encryption system with excellent resistance to various attacks. In 2019, Alawida et al. [14] proposed a hybrid digital chaotic system-based image cryptosystem, which has higher complexity, higher sensitivity, and a larger key space compared to other chaotic-based methods proposed previously. Some algorithms have been proven to be insecure due to the following drawbacks: (1) smaller key space; (2) lower plaintext sensitivity; (3) the chaotic sequence generated by the low-dimensional chaotic map is more likely to degenerate into a short-period sequence because of the finite precision of the computer; (4) the same key streams are used in the scrambling and diffusion operation when encrypting different original images. For example, A. Jain et al. presented a robust image encryption scheme [17] by using a one-dimensional logistic map and claimed that the cryptosystem could resist traditional attacks like statistical attack, exhaustive attack, and differential attack. In 2017, Dou et al. [19] analyzed and broke the encryption process by the chosen plaintext attack. More recently, Wang et al. [20] found an image encryption scheme using a 1D chaotic map [18] to be insecure and to be able to be completely cracked by the chosen plaintext.
In the last few years, the properties of DNA computing like enormous parallelism, higher information density, and ultra-low power consumption have been discovered, and many image encryption algorithms [10,16,17,[21][22][23][24][25][26][27][28][29][30][31][32] have been designed by combining DNA computing and chaos. For example, in [17], the DNA operation combined with chaotic systems was used to develop a robust image encryption system. Firstly, the pixels in the original image are encoded into the DNA sequence, and a mask is generated by a chaotic map. Secondly, the diffusion process is implemented through the DNA addition and the complementary operation between the mask and the DNA encoded image. Finally, the diffused image is permuted using chaotic sequences generated by 2D chaos and decoded to obtain the cipher image. However, for some image encryption algorithms [10,16,17,21], all pixels of the original image are encoded/decoded by fixed DNA encoding/decoding rules, which lead to less randomness of the encryption schemes. For example, in [21], the original image was divided into four equal sub-images, which were encoded into DNA matrices according to a specific DNA encoding/decoding rule. The index of the employed DNA encoding/decoding rules, ranging from one to eight, is stationary and used for secret keys. However, it is insecure against exhaustive attack because it can be broken by a maximum of eight tests. Furthermore, including the algorithm in [21], most DNA operation-based schemes suffer similar drawbacks in the pure chaos-based image encryption algorithms mentioned above, which may lead to the encryption system being vulnerable to chosen plaintext attacks. To overcome the security flaws, many plaintext-related mechanisms and random DNA encoding/decoding technology have been proposed and used in image encryption recently. In [28], 2D-HSMwas used to control the DNA encoding/decoding rules randomly. Specifically, the parameter of temp calculated from the pixel value of the original image was used to manage the encryption process. However, the image cryptosystems developed in [28] have been broken with the chosen plaintext attack because of the insufficient plaintext association in 2019 [33]. In [22], the initial values and parameters of the chaotic system were calculated by the SHA 256 hash of the original image and modified by the plain image's Hamming distance, leading to the high plaintext sensitivity of the encryption algorithm to resist the chosen plaintext attacks effectively. However, for algorithms like those in [22,31], due to encrypting different images with distinct keys, one must transfer the keys through a secret channel every time, which increases the implementation complexity and limits the application of this algorithm to real-time encryption.
The discussions above show that existing algorithms have one or more of the following defects: (1) the potential insecurity of low-dimensional chaotic systems; (2) the shortcomings of fixed DNA coding rules; (3) the security flaws of low sensitivity to the plain images; (4) the implementation complexity of the one-time-pad mechanism. To overcome these flaws, we propose a novel plaintext-related mechanism based on the peculiarity of plaintext DNA coding (PPDC), which is used to control the encryption process. The value of PPDC is determined by all pixel values of the original image and the chaotic sequence generated by a four-wing hyper-chaotic system, which can significantly increase plaintext sensitivity to strengthen the ability to resist powerful chosen plaintext attacks.
The paper is organized as follows: In Section 2, the related technologies are introduced. Section 3 provides the detailed encryption process. The simulation and security analysis results are described in Section 4. Section 5 gives a brief conclusion.

Hyper-Chaotic System
In our scheme, a 4D hyper-chaotic Lorenz system [34] is used to implement the encryption and is described by Equation (1).
where parameters a = 10, b = 8/3, c = 28, −1.52 ≤ r ≤ −0.06, and the hyper-chaotic Lorenz system is chaotic. By using the method of calculating the Lyapunov exponential spectrum of the differential equation system proposed in [35], if the parameter is set as r = −1, we get four Lyapunov exponents, namely λ1 = 0.3381, λ2 = 0.1586, λ3 = 0, λ4 = −15.1752. Furthermore, the hyper-chaos attractors are shown in Figure 1. As shown in Figure 1, compared with low-dimensional systems, the hyper-chaotic system has more complex strange attractors.

DNA Sequence Operations
A DNA sequence is made up of four nucleic acids, namely purine A (adenine), T (thymine), C (cytosine), and G (guanine). According to the Watson-Crick base pairing rules [28], A and G are complementary to T and C, respectively. In the binary system, the binary data 00 and 01 are complementary to 11 and 10, respectively [31]. Therefore, if the four nucleic acids A, T, C, and G are used to encode binary numbers 00, 01, 10, and 11, respectively, we get 4! = 24 kinds of coding rules. However, only eight kinds of coding rules match the principle of complementary base pairing, which are listed in Table 1.
In image encryption, the pixel values are converted into binary numbers firstly and then encoded into DNA sequence. Inversely, the DNA sequence can be decoded with the same coding rule to get the corresponding pixel value. For example, one pixel with a value of 188, the binary value of which is "10111100", can be encoded as DNA sequence "TGGC" by Rule 3 and "GAAT" by Rule 7. On the other hand, the same DNA sequence can be decoded into different binary sequences using different DNA rules. For example, DNA sequence "GATC" can be decoded as "10001101" and "11100100" using Rules 1 and 5, respectively. The XOR operation of nucleic acids, which is used in the diffusion stage, is shown in Table 2.   Table 2. XOR operation of the DNA sequence.

PPDC-Based Image Encryption Algorithm
The flowchart of the proposed encryption system is shown in Figure 2. Without loss of generality, we assume that the original image I has a size of M × N. Firstly, reshape I into one-dimensional array P of length M × N. In our scheme, four secret keys {x0, y0, z0, w0} are chosen as the initial values of the 4D Lorenz hyper-chaotic system, which is solved using the fourth-order Runge-Kutta algorithm with step size h = 0.002. The former N 0 iteration values are discard to obtain four random sequences x n , y n , z n , and w n with the same size of r = M * N, given by Equation (2).
Then, perform Equation (3) on the two sequences x n and y n to obtain two other new sequences X and Y.
where i, j = 1, 2, · · · , r. The sequence X is used as the DNA coding rules. Next, convert the array P and sequence Y into binary arrays P b and Y b , respectively. Then, by using sequence X as the coding rules, binary arrays P b and Y b are encoded to get DN A_P and DN A_Y, respectively. Note that each DN A_P i and DN A_Y i , i = 1, 2, · · · , M × N consists of four elements, which are represented by "A", "T", "C", "G".
To improve the plaintext sensitivity, a novel plaintext-related mechanism based on the peculiarity of plaintext DNA coding (PPDC) is presented. Firstly, calculate the numbers of A, T, C, and G in DN A_P, which are named as num A , num T , num C , and num G , respectively. Then, the values of num A , num T , num C , and num G are used to calculate PPDC by Equations (4)- (8). Obviously, because the attackers cannot know the elements' value of X, it is entirely impossible to get the value of PPDC and to select or construct special images to crack the proposed algorithm.
Finally, the PPDC is used to process the two chaotic sequences z n and w n to generate two sequences Z and W by the following equation, which are used in the DNA level permutation stage. The detailed permutation process is presented in Algorithm 1.
After the permutation stage, the DNA XOR operation is performed to implement the diffusion stage, and the diffusion process is presented in Algorithm 2. After reshaping the encrypted binary array C into a matrix of size M × N, the image encryption process is complete. Furthermore, Figure 3 gives the flow diagram of using the encryption-decryption system to encrypt an image of size 3 × 3.   Figure 3. A simple example of the encryption scheme.

Decryption Process of the Proposed System
The symmetric encryption system uses a single-key encryption method, that is the same key can be used for both the encryption and decryption process, and decryption is the inverse process of encryption. In the decryption process, the receiver can decrypt cipher image C using the secret key Then, using the same methods shown in the encryption process, four new random sequences x n , y n , z n , and w n are obtained. Finally, Algorithm 3 shows the detailed decryption process.

Algorithm 3 Decryption algorithm.
Input: The one-dimensional vector Q and four random sequences x n , y n , z n , and w n . Output: Decrypted image P.
1: obtain two new sequences X and Y using Equation (3) 2: DN A_Q ← Encode Q with rule X.

Experimental Simulation Results and Security Analysis
In order to verify the effectiveness and security of the proposed encryption system, some standard grayscale images are used to perform the various simulated experiments with the platform of MATLAB 8.6.0.267246(R2015b).

Simulation Results
This section, we implemented the simulation for standard images in the condition of key _x0 = 1.1, key _y0 = 2.2, key _z0 = 3.3, key _w0 = 4.4, and N 0 = 2000. Figure 4a,b shows the original image and the encrypted image, respectively. According to the simulation results, one cannot identify the plaintext image information from the cipher image. Figure 4c is the decrypted image, which has completely restored the plaintext image information. The decrypted image with wrong key key _x0 = 1.100000000000001, key _y0 = 2.2, key _z0 = 3.3, key _w0 = 4.4, and N 0 = 2000 is shown in Figure 4d, and we can see that the wrong key cannot recover the original image.

Differential Attack Analysis
Attackers often use a set of original images that are slightly different to access the same cryptosystem and obtain corresponding encrypted images. By analyzing the differences between the encrypted images, the correlation between the plain image and cipher image, cryptanalysts may deduce the vulnerabilities in the encryption system. The unified average changing intensity (UACI) and the number of pixels change rate (NPCR) are usually used as indicators of resistance to differential attack [36], which is denoted as Equation (10) where c 1 , c 2 are the encrypted images corresponding to two plaintext images, which have one different In our test, four standard images were selected as original images, i.e., "Peppers", "Camera", "Lena", and "Baboon". Similar algorithms published in recent years were used to encrypt the same plain images, and the corresponding analysis results of NPCR and UACI are shown in Table 3. One can clearly observe that the proposed cryptosystem has more excellent performance compared to other schemes.

Exhaustive Attack Analysis
In the following subsections, we calculate the key space and analyze the key sensitivity, which are important evaluation criteria for an image encryption system resisting the exhaustive attack.

Secret Key Sensitivity
Key sensitivity can be evaluated by the difference degree between two cipher images, which is obtained by encrypting the same original image with two secret keys that have an extremely tiny alteration. There are five secret keys (key _x0 , key _y0 , key _z0 , key _w0 , N 0 ) in our proposed scheme. To test the secret keys' sensitivity, we select randomly one set of keys from the secret key space. The selected keys are used to encrypt the plaintext image to get the corresponding cipher image C 1 . If we want to evaluate the sensitivity of key _x0 , keep the other four keys (key _y0 , key _z0 , key _w0 , and N 0 ) unchanged, and replace key _x0 with key _x0 + 10 −15 to obtain a new set of secret keys. Then, encrypt the same original image with the new keys to obtain another encrypted image C 2 . Finally, we use NPCR and UACI to analyze the differences between C 1 and C 2 according to Equation (10). After 200 trials, the average values of NPCR and UACI are calculated. As Table 4 shows, the NPCR and UACI values are approximate to the theoretical values, which proves that our scheme possesses high key sensitivity. Another four keys (key _y0 , key _z0 , key _w0 , and N 0 ) are analyzed and calculated in the same way (note that the value of N 0 is changed by one).  Figure 5a, are encrypted with the key(1)and key (2) to obtain the encrypted images denoted as C 3 and C 4 , which are shown in Figure 5b,c. The difference images of C 3 and C 4 are given in Figure 5d. One can intuitively see that the encrypted images have significant changes; even the secret key makes a tiny change. Finally, encrypted images C 4 and C 3 are decrypted using key (1) and key(2) to get the decrypted images shown in Figure 5e,f. From Figure 5, we can see that the cipher image cannot be successfully restored, and any valid information in the original image cannot be obtained from the decrypted image even if the correct secret key has been changed slightly. Thus, our image cryptosystem possesses outstanding key sensitivity.

Statistical Attack Analysis
The correlation coefficient, histogram, and information entropy are three important evaluation criteria for statistical attack analysis.

Correlation Coefficient Test
Generally, the correlation between adjacent pixels is strong in the plaintext image and must be decreased close to zero after being encrypted by a secure encryption system (note that the theoretical value is zero). In the experiment, we calculate the correlation coefficients of all the adjacent pixels in the four directions of the plain image and the cipher image using Equation (11), and the calculation results are shown in Table 5. A comparison of the detailed results with similar algorithms is given in Table 6.
where cov(u, v) = 1 the number of image pixels, and u, v are the gray values of adjacent pixels in the four directions mentioned above. Furthermore, two-thousand pixels are randomly selected from the original image or its corresponding encrypted image. The correlation diagram among adjacent pixels in the four directions is shown in Figure 6. As Figure 6 shows, after encrypting, the values of the adjacent pixels are completely different.

Histogram Analysis
The image histogram reflects the frequency of the different grayscale throughout the digital image. To resist statistical attack, the histogram of encrypted image should be flat. In this section, four images are selected as the original image shown in Figure 7a. The histograms of the original images and their corresponding encrypted image are given in Figure 7b,c, respectively. Intuitively, the cipher image has a flat histogram, while original image histogram fluctuates greatly.
Furthermore, the uniform distribution of the cipher image histogram is analyzed by histogram variance in quantitative analysis, which is defined as follows: where H = {h 0 , h 1 , . . . , h 255 } is a one-dimensional array, h i represents the frequency of the pixel in the image, and M and N are the size of the test images. The smaller the value of the variance is, the more difficult it is to get the statistical information of the cipher image. The variance results of the cipher image histogram encrypted by different encryption algorithms are shown in Table 7. One can see that, compared with similar algorithms, the image histogram encrypted by our proposed scheme is flatter.
(a) The original image.

Information Entropy Analysis
The greater the entropy of the system, the more uncertain the system. Information entropy is often used to measure the uncertainty of image information. The entropy is defined as follows: where L is the grayscale of image (i ∈ L) and p(m i ) is the probability of the occurrence of grayscale m i . Assuming that an image with a grayscale of L = 256 and all the grayscale appears with the same probability, according to Equation (13), the theoretical value of information entropy H(m) is eight, according to Equation (12). Therefore, the bigger the information entropy of the encrypted image, the more secure the image cryptosystem is. In this section, many standard images are used to measure our scheme's information entropy performance. The information entropy analysis results of the cipher images of Lena encrypted by our scheme and similar algorithms are also given. As shown in Tables 8 and 9, the experimental results of our scheme are closer to the theoretical value of eight than similar algorithms. Therefore, the proposed cryptosystem possesses high security when facing statistical attacks.

Encrypted Time Analysis
In practical applications, in addition to the security performance, the cryptosystem's running speed is also an important indicator. In this section, the execution time is evaluated in seconds. Table 10 shows the execution time of the proposed image cryptosystem and similar schemes [3,13,28,29]. One can see that our scheme has a better performance in encryption speed. Besides, we analyze the time complexity denoted by Θ. The computational complexity is related to the process of completing encryption/decryption. In our proposed scheme, the time consumption mainly includes the key streams' generation, DNA encoding/decoding, permutation, and diffusion stages. For a grayscale image with size M × N, the time complexity of DNA encoding and decoding is Θ(8 × M × N). In the permutation and diffusion phase, the manipulated object is the DNA sequence, and its complexity is Θ(4 × M × N). Furthermore, the hyper-chaotic Lorenz system is solved to obtain chaotic sequences, in which the time complexity is Θ(M × N). Thus, the time complexity of the proposed scheme is Θ(8 × M × N). Through time complexity analysis, the DNA encoding and decoding part has higher time complexity. However, in the future, with the advent of DNA computers, a DNA-based image encryption system can be massively executed in parallel mode.

Conclusions
In this paper, a novel plaintext-related mechanism based on the peculiarity of plaintext DNA coding (PPDC) is proposed. The original image is firstly encoded to obtain the DNA encoding and the value of PPDC. Then, PPDC is used to process the chaotic sequences to obtain the key streams used in the permutation stage. Such key stream generation method is different from the one used in the previous DNA-based chaotic image encryption algorithms. Because the key streams are related to both the random sequences generated by the Lorenz hyper-chaotic system and plaintext image, our scheme can realize higher key sensitivity and plaintext sensitivity to resist chosen plaintext attacks or differential attacks effectively. Furthermore, the DNA level permutation operation not only disorganizes the position of the plain image pixels, but also changes the value of the pixel, which improve the efficiency and security. Especially, the encryption algorithm only needs to carry out one round of the permutation-diffusion operation to get a better ability of resisting various attacks.
Secret key space analysis, histogram analysis, correlation analysis, sensitivity analysis, and information entropy analysis are given. The analysis results prove that the proposed algorithm is secure to resist all kinds of attacks, including the powerful chosen plaintext attack.