Image Encryption Algorithm Based on Dynamic DNA Coding and Chen ’ s Hyperchaotic System

With the development of national information processes, specific image information from secret departments or individuals is often required to be confidentially transmitted. Numerous image encryption methods exist, especially since the initial value sensitivity and other characteristics of chaos theory and chaos theory-based encryption have become increasingly important in recent years. At present, DNA coding constitutes a new research direction of image encryption that uses the four base pairs of DNA code and image pixel values to establish a special correspondence, in order to achieve pixel diffusion. There are eight DNA encoding rules, and current methods of selecting the DNA encoding rules are largely fixed. Thus, the security of encoded data is not high. In this paper, we use the Lorenz chaotic system, Chen’s hyperchaotic system, and the DNA encoding combination and present a new image encryption algorithm that can dynamically select eight types of DNA encoding rules and eight types of DNA addition and subtraction rules, with significant improvements in security. Through simulation experiments and histograms, correlations, and NPCR analyses, we have determined that the algorithm possesses numerous desirable features, including good encryption effects and antishear and antinoise performances.


Introduction
With the development of national information processes, people have paid increasing attention to secure transmission of image information.The traditional classical encryption algorithms primarily include the DES, IDEA, and RSA algorithms [1][2][3].However, compared to text files, image files contain a larger amount of data, so the traditional encryption algorithms are not suitable for image encryption.While some image encryption techniques have emerged, based on mathematical transformations, nevertheless, their security is inadequate.
Chaotic encryption technology has been used as the mainstream of encryption technology in recent years [4], but the use of chaotic technology only is not safe enough [5][6][7].In recent years, image encryption technology based on DNA computing has been extensively used by scholars, but work is still at the initial stages of research.At present, most of the image encryption algorithms that are based on DNA coding adopt relatively fixed coding methods, and security is not high.In this paper, DNA coding and chaotic encryption technology are combined, and a dynamic DNA coding image encryption algorithm is proposed that can improve the security of the encryption process.Based on simulation experiments, the algorithm has been shown to exhibit good encryption effects and can effectively resist statistical, shear, and other attacks.

Dynamic DNA Coding and Chaotic Mapping
2.1.DNA Coding.A DNA sequence consists of four different basic nucleotides, namely, A, T, C, and G [8], whereby pairing is allowed only between A and T and C and G. Additionally, each pixel point in a grayscale image can be represented by an 8-bit binary number, taking the values of 0 and 1.The binary value pair also constitutes a complementary relationship pair.Since 00 and 11 and 01 and 10 are also complementary, the DNA bases A, C, G, and T can be encoded using the digit pairs 00, 01, 10, and 11.Thus, 24 types of this coding scheme can be obtained, but the program must satisfy the pairing rules, in that A bases must be paired with T and C must be paired with G, so only eight types of programs are effective.These are shown in Table 1.For example, if the grayscale value of a pixel in an image is equal to 147, it can be converted to the binary value "10010011."If the first rule in Table 1 is selected, the 8-bit binary number can be expressed as "GCAT."Furthermore, if the fourth rule is chosen, then the 8-bit of the binary number can be expressed as "ATCG."With the development of DNA computing, some researchers have proposed algorithms based on DNA sequences for the operations of addition and subtraction, based on the basic principles of binary addition and subtraction [9,10].Thus, this corresponds to eight different types of DNA encoding schemes, whereby there are eight types of DNA addition operations and eight types of DNA subtraction.In this paper, we use the coding rules 1 and 4, for example, to obtain the addition operation rules and the subtraction operation rules, as shown in Tables 2-5.

Dynamic DNA Coding.
Most algorithms only choose fixed DNA encoding rules to encode, and only a maximum of eight experiments can break it.In this paper, the DNA encoding rules are dynamically selected according to generated chaotic sequences.For example, a pixel value can correspond to any of the four digital values and can be converted to a binary value.Every two binary bits of this value can then use a random encoding mode, which makes the key space larger, more difficult to decipher, and with a higher image encryption security.For example, if the value of the pixel point is still 147, the value of its corresponding chaotic sequence is [1,3,5,7], and then the result of the DNA encoding is "GCGG." Based on the principle of base complementation, the nucleotide   in the nucleotide sequence of DNA encoding is as follows [11]: In (1),   and (  ) are complementary.According to (1), there are six types of base pairs that meet the requirements of the combination, as shown below: (AT)(TC)(CG)(GA). (AT)(TG)(GC)(CA). (AC)(CT)(TG)(GA). (AC)(CG)(GT)(TA). (AG)(GT)(TC)(CA). (AG)(GC)(CT)(TA).
During pixel diffusion, one of the six complementary rules will be selected, the complementary DNA sequences will replace operations, and the number of complementary alternative steps will be dynamically selected based on the value of the chaotic sequence, in order to achieve pixel proliferation.

Lorenz Chaotic System. The mathematical expression of the Lorenz chaotic system is [12]
=  ( − ) , When  = 10,  = 8/3, and  = 28, the Lorenz system is in a chaotic state.In this paper, the Lorenz chaotic system is used to scramble the pixel position, as well as achieve the dynamic selection of the DNA addition and subtraction rules.Correspondingly, the main operation is as follows: (1) The use of the Lorenz chaotic system generates three pseudo-random sequences whose lengths are  × 2, ,  ×  × 4 :  = { 1 ,  2 , . . .,  ×2 },  = { 1 ,  2 , . . .,   }, and  = { 1 ,  2 , . . .,  ××4 }.Herein,  is the number of lines of the original image matrix, and  is the number of the original image matrix columns.
(3) By using the first  numbers in the sequence  = { 1 ,  2 , . . .,  ×2 }, each line of the image is transformed in accordance with Among the matrix entries,  , , represents the th row and th column in image .For example, if  1 = 50, then the elements of the first row in the image have to be right-shifted by 50.
(4) By using each number in the sequence  = { 1 ,  2 , . . .,   }, each column of the image is transformed in accordance with For example, if  1 = 90, then each of the elements of the first column in the image is downward shifted by 90.
(5) By using the last  numbers in the sequence  = { 1 ,  2 , . . .,  ×2 }, each line of the image is transformed.The methodology and step (3) remain the same and can be used to complete (4).
The scrambling idea introduced in this article is advanced and includes a line shift conversion, a column shift conversion, and a line shift transformation.If only two ranks of shifting are applied, this may cause some adjacent pixels in a line or column of the original image to remain adjacent in the encrypted image.Transformation can ensure full dispersion of the scrambled image.
The sequence  = { 1 ,  2 , . . .,  ××4 } that will be generated by the Lorenz chaotic system that will be used to dynamically select the DNA addition and subtraction rules in the encryption step will be described in detail.
When decrypting, only the rows and columns corresponding to the left-and upward-shift operations will be used.
Four pseudo-random sequences generated by Chen's super chaotic system are performed as follows: where the operation abs is used to obtain the absolute value, fix is used to obtain an integer outcome, and the expressions  = 0,  < 5;  = 1,  > 5 mean that if the value of the sequence  is less than 5, it will be changed to 0; otherwise it will become 1.The absolute value of each sequence is applied, and the fractional part is taken and then multiplied by 10 10 times, and the remainder is then estimated.
Based on these operations, the contents of the sequences  = {

Image Encryption and Decryption Technology
3.1.Image Encryption Technology.In this paper, the image encryption technology is divided into two main parts, the scrambling and pixel diffusion, as shown in the flow chart of Figure 1.
Assuming that the initial size of the grayscale image  is  × , the specific encryption steps are as follows.
Output.Encrypted image   is the output.
(1) The grayscale image  is converted into a twodimensional matrix  1 of size  × .(2) Use (2) of the Lorenz system to generate three pseudorandom sequences with three different lengths of × 2, ,  ×  × 4.
(3) Use (3) to extract the sequence generated in the arithmetic conversion.(4) Use ( 4) and (5)   (11) Generate a random number  1 within the range of 1-6, in order to select a rule of six base-pair complementary rules.Based on (3) generate the values of sequence  and the complementary base rules selected, and apply the DNA replacement operation on the two-dimensional matrix  6 .The replacement method is in accordance with the following rule: if the value is 0, the DNA code on the bit is not replaced.If it is 1,   = (  ); if it is 2,   = ((  )); if it is 3,   = (((  ))).A two-dimensional matrix  7 of  rows and  columns is obtained after the complementary substitution.
(12) Generate a random number  2 within the range of 1-2, according to the sequence of  or  (of which 1 represents , and 2 represents ).According to each number in the sequence, choose the corresponding rules in Table 1 dynamically for the DNA decoding operation, in order to obtain matrix  8 .
(13) Convert the matrix  8 to a decimal matrix  9 .At the end, the two-dimensional matrix  9 is converted into an encrypted image   and stored as the output, and the filename is saved by the user.
The encryption process is fully combined with chaos theory and DNA coding theory, by using the chaotic sequence of values, to encode by DNA, and the DNA addition rule of choice.The encoding rules are changeable, random, and not easy to crack and achieve the dynamic DNA encryption.

Image Decryption Technology. The decryption process is the inverse operation of the encryption process.
Input.The encrypted image   , the initial value of the Lorenz chaotic system  1 ,  1 ,  1 , the initial value of Chen's hyperchaotic system  0 ,  0 ,  0 ,  0 , parameter , and the random numbers  1 and  2 are the input.
Output.The original grayscale image  is the output.
(1) The encrypted image   is converted into a twodimensional binary matrix  1 .(2) Use (2) of the Lorenz system to generate three pseudorandom sequences of lengths  × 2, ,  ×  × 4, and use (3) to define the sequence generated in the arithmetic conversion.(3) Use ( 6) of Chen's hyperchaotic system to generate four pseudo-random sequences of lengths equal to ×× 8, and use (7) to estimate the four sequences in the arithmetic conversion.(4) According to the random number generator, select the sequence  or  (of which 1 represents  and 2 represents ).According to every value of the selected sequence, dynamically select the appropriate rules in Table 1; decode the matrix  1 by DNA into the matrix  2 .
(5) According to random number  1 , select a rule of six base-pair complementary rules, and according to the value of each entry of the sequence  and the  selected base-pair complementary rules, apply the DNA replacement operation on the two-dimensional matrix  2 , and generate matrix  3 .( 6) According to each value in the sequence , select the encoding rules from Table 1 dynamically, encode the sequence  based on the DNA encoding operation, and generate matrix  4 .( 7) According to each value in the sequence , select the DNA subtraction rules dynamically, taking the DNA subtraction operation of the matrices  3 and  4 , and generate matrix  5 .(8) According to each value in the sequence , select the encoding rules from Table 1 dynamically to decode matrix  5 , and generate matrix  6 .(9) Convert the matrix  6 to a decimal matrix  7 .(10) According to (4) and ( 5), apply the row shift and column shift operations on the two-dimensional matrix  7 , and generate matrix  8 .
(11) Matrix  8 is converted into an image , the output is saved, and the filename is then saved by the user.

Results
In

Secret Key's Space and Security
Analyses.All the chaotic systems are sensitive to initial conditions.In order to encrypt images with additional security, the secret key's space must be tremendously high so that it can resist high-intensity, exhaustive types of attacks [14].In this paper, the encryption technology is used as follows: (1) Initialize the value of the Lorenz chaotic system  1 ,  1 ,  1 .
(3) Apply DNA coding and complementary rules so that the value of the chaotic sequence can be used to determine the type of DNA encoding rules.Correspondingly, the random number  1 can be used for selecting the type of complementary rules, and the random number  2 can be used for selecting the types of DNA encoding and decoding rules and the values of the chaotic sequence.
The sensitivity of the Lorenz chaotic system to the initial value is 10 −16 .When the initial value of the  1 sensitivity is between 10 −1 and 10 −16 , the ratio of the values of the different elements in the matrix of the digital images attained at two different sensitivities is greater than 0.85.However, when the sensitivity of the key is 10 −17 , the proportion of the different elements is equal to 0. Thus, the key space of the initial value of the Lorenz chaotic system is determined in accordance with   1 =   1 =   1 = 10 16 .For Chen's hyperchaotic system, when the initial value of the decryption is slightly changed with respect to the initial value of the encryption, such that ∇ 0 = 10 −17 , the decrypted image and the original image are still difficult to distinguish.However, when ∇ 0 = 10 −16 , the result of the decryption is not accurate.For example, when the image is encrypted with an initial value  0 = 0.364, it can be successfully decrypted using  0 = 0.36400000000000001 but cannot be successfully decrypted using  0 = 0.3640000000000001.A large number of experimental data prove that the initial value key space of Chen's hyperchaotic system is   0 =   0 =   0 =   0 = 10 16 .Similarly, the variation of the parameter  in the chaotic region ranges from −0.7 × 10 −16 to 0.7 × 10 −16 , so Chen's hyperchaotic system parameter key space is   ≈ 0.7 × 10 16 .
There are eight types of DNA encoding rules and six types of DNA complementary rules, which carry the two DNA codes and the single DNA complementary substitution, so the key space of the random number is   1 = 6, and   2 = 2. Therefore, the total memory space of the encryption key is which is much larger than 2 100 .Therefore, the secret key's space is large enough to resist an exhaustive attack.

Sensitivity Analysis of the Secret Key.
Using the initial value  1 = 0.526 for the encryption of the Lena image, the encrypted image shown in Figure 3(b) is obtained.If  1 = 0.526 is used, the decrypted image is shown in Figure 3(c).Using  1 = 0.5260000000000001 the decrypted image is shown in Figure 3(d).For a very small and visible change, keys will not correctly decrypt the encrypted image.The sensitivity of this test can be seen from the key as long as there is a small change that will make the decrypted result distinctly different.Ultimately, this indicates that the key encryption algorithm is highly sensitive.Thus, the results obtained by the encryption technology used to encrypt images are difficult to be exposed to a statistical attack crack.

Correlation Coefficient Analysis.
The correlation coefficient, , [16] is a measure of the degree of linear correlation between two random variables.Its value is in the range of [−1, 1], and || expresses the degree of correlation between the variables.Usually when || is in the range of [0.7, 1], the two variables are highly correlated.We randomly selected 3,000 pairs of adjacent pixels (along the vertical, horizontal, and diagonal directions) from both the original and encrypted images of Lena and calculated the correlation coefficient for each pair of adjacent pixels according to (9).Table 6 shows the results of the correlation coefficients of two adjacent pixels, which are compared with the results in [15].Experimental results show that the correlation of the image is significantly reduced.It also shows that this technique can be very good in comparison to the relevant statistics of sexual assaults.Furthermore, calculation of the correlation coefficient of the two images after encryption of the Lena and Cameraman's images yields the respective results of 0.0053741 and 0.0035124, which are much less than 0.7.This shows that the correlation between the encrypted image after the adoption of this encryption algorithm and the original image is very low.Reference [15] also uses DNA coding for image encryption and has been implemented in a standard image (Cameraman image), the encrypted image, and horizontal, vertical, and diagonal direction correlation, as shown in Table 6.A comparison shows that the encryption image generated by this algorithm and the horizontal, vertical, and diagonal directions of the correlation can be lower than the results elicited from the encrypted image generated by the use of the encryption algorithm proposed in [15].Thus, we can prove that the algorithm in this paper is more secure,   Using (10), the NPCR was calculated for the Lena and Cameraman images before and after encryption.The results are shown in Table 7.We can see that this encryption technology can manifest minor changes on the original image, yet leading to major differences on the encrypted image, which also shows the effectiveness of the algorithm.DNA coding has also been used for image encryption in [18], and the comparison data is shown in Table 7. Reference [18] Table 7: NPCR values for the Lena and Cameraman images before and after the encryption.99.60 Reference [18] 50.11 is also based on the Cameraman image, but the value of NPCR is only 50.11%.According to the definition of NPCR, we know that the greater the value, the higher the security of the algorithm.Correspondingly, the elicited value of 99.6% indicates that the algorithm security is outstanding.Some studies in the literature also use the unified average changing intensity (UACI).However, UACI cannot accurately explain the merits of the algorithm, so this article does not use UACI analysis.

Antishearing Attack Analysis.
After the use of the encryption algorithm applied to encrypt Lena's image,    a certain percentage of the encrypted image is cropped.The remaining sheared image was then decrypted, and the results are shown in Figure 5. Figure 5 shows that, even when the encrypted image is sheared by 25%, the algorithm can still restore the original image, indicating that the algorithm can effectively withstand the cropping, which also illustrates that the correlation of the image encrypted by this algorithm is larger [19].

Resistance Noise Analysis.
Image noise is one the various factors that hinders image acceptance.Furthermore, the degree of reliability of the encryption algorithm also depends on the robustness of noise resistance [20].When the picture is in the uptake or in the process of transmission, there is some image noise interference, and these disturbances may result in unpredictable error occurrences that lead to the inability to decrypt the original image.Typically, the impact of noise on the encryption system is very obvious, and application of minor transformations on the encrypted image will likely lead to decryption failure and inability to restore the original image.An effective encryption algorithm must have a very good resistance to noise interference, so that when decrypting, the distortion of the image is as low as possible, and the impact is as little as possible.This algorithm exhibits good robustness against noise, because image encryption encompasses scrambling of the location of the original pixels in the image, followed by dynamic encoding by DNA, and DNA addition.DNA complementation means that the value of the original image pixel is changed to achieve pixel diffusion.This prevents spreading of those pixels changed by noise in the decryption process, thereby avoiding a subsequent cascading effect.In justification of this argument, numerous experiments have been conducted that have proven the robustness of the performance to noise [20].
In this paper, the different means and variances of Gaussian white noise are selected to apply noise interference in image encryption, in order to simulate the impact of some real physical signals in the encrypted image.The results are shown in Figure 6.
Modifications of the means and variances of the Gaussian white noise interference lead to the encrypted and decrypted images shown in Figure 6.Based on the elicited results, the decrypted image visually still contains all the information of the original image, and the correlation with the original image is still high.

Conclusions
According to the requirement of high efficiency, safety, and reliability of the encrypted image, this paper proposes an image encryption technology based on the combination of chaotic map and DNA coding technology.Firstly, the chaotic sequences generated by the Lorenz chaotic system are used to scramble the pixels in the image.Using Chen's hyperchaotic system and DNA encoding, the pixels in the image are diffused in order to obtain the image encryption technology.The experimental results show that the key of the technique is 8.4 × 10 128 , which meets the big key's space, and is able to withstand statistical analyses, offensive operations, and other requirements of the image encryption technology.

Figure 1 :
Figure 1: Flow chart of the encryption program.
(a) Shearing of the encrypted (b) Restored image

Table 2 :
The addition operation of DNA sequence based on rule 1.

Table 3 :
The subtraction operation of DNA sequence based on rule 1.

Table 4 :
The addition operation of DNA sequence based on rule 4.

Table 5 :
The subtraction operation of DNA sequence based on rule 4.
to scramble the original image and obtain a new matrix  2 .(5) Convert the matrix  2 into the binary matrix  3 .(6) Use (6) of Chen's hyperchaotic system and generate four pseudo-random sequences, each with a length of  ×  × 8. Using the value in the sequence , the DNA encoding rules in Table 1 are dynamically selected, and the DNA code is used for each two-bit binary number in a twodimensional matrix to generate the DNA matrix  4 .(9) According to the value of the sequence , the DNA encoding rules in Table 1 are dynamically selected, sequence  is encoded by DNA, and the DNA matrix  5 is generated.
(2))According to(2), generate the sequence of , and apply a dynamic selection of the eight types of DNA addition rules.Then apply the addition operation on matrix  4 and matrix  5 to obtain matrix  6 .

Table 6 :
The comparison of the correlation coefficients of Lena's images.The grayscale histograms of the original and encrypted images of Lena and the Cameraman are shown in Figure4.Through the comparison of their gray level histograms, it can be seen that the histogram of the original image pixel values are concentrated at specific values, but the encryption image gray level histogram of the pixel distribution is relatively balanced.