Abstract

We propose a new image encryption algorithm based on DNA sequences combined with chaotic maps. This algorithm has two innovations: (1) it diffuses the pixels by transforming the nucleotides into corresponding base pairs a random number of times and (2) it confuses the pixels by a chaotic index based on a chaotic map. For any size of the original grayscale image, the rows and columns are fist exchanged by the arrays generated by a logistic chaotic map. Secondly, each pixel that has been confused is encoded into four nucleotides according to the DNA coding. Thirdly, each nucleotide is transformed into the corresponding base pair a random number of time(s) by a series of iterative computations based on Chebyshev’s chaotic map. Experimental results indicate that the key account of this algorithm is 1.536 × 10127, the correlation coefficient of a 256 × 256 Lena image between, before, and after the encryption processes was 0.0028, and the information entropy of the encrypted image was 7.9854. These simulation results and security analysis show that the proposed algorithm not only has good encryption effect, but also has the ability to repel exhaustive, statistical, differential, and noise attacks.

1. Introduction

With the development of science, technology, and society, the computer industry, in which a small branch of digital images applications has become increasingly pervasive, has come to occupy a dominant position worldwide. Digital images have become one of the most popular media types and are now used extensively in various fields such as politics, economics, defense, and education [1]. However, because of the open nature of networks, image transmission security is subject to potential threats. In some fields, such as military affairs, commerce, and medical treatment, digital images also need to meet the highest requirements of confidentiality [2]. Consequently, image encryption technology has become an effective way to protect images being transmitted.

Various common image encryption algorithms are available, including text encryption technology, SCAN language-based encryption technology, quadtree image encryption technology, vector quantization encryption technology (VQ), encryption technology based on pseudorandom sequences, encryption technology based on the “key image” chaotic encryption technology, and image encryption technology based on DNA computing [310]. Recently, chaotic encryption technology has been attracting increasing attention. Chaos is an inner-class random process of nonlinear systems performance and is very sensitive to initial values, thus resulting in unpredictable results. The benefits of chaotic encryption technology include simple implementation, robustness, fast encryption, and high security [11]. However, although chaotic encryption technology has many advantages, it also has a number of deficiencies. For example, at present, most chaotic encryption algorithms confuse the single image pixel value or location, but the utilization of only one of the two strategies does not ensure high security for the image [12], and thus it is easy for attackers to crack an encrypted image by simply using the pixel comparison method.

In 1994, Adleman first introduced DNA computing into the encryption field, which created a new stage of information processing. DNA encryption is a new frontier and is presently at the forefront of international cryptography research [13, 14]. DNA molecules harness massive parallelism and have low energy consumption and high storage density [15, 16]. Therefore, image encryption algorithms based on DNA computing possess unique advantages that the traditional cryptographic algorithms do not have. However, using only DNA encoding to encrypt images is not secure. Therefore, we combine chaos encryption technology and image encryption based on DNA computing to solve the hidden insecurity problems existing when images are confused using the chaotic encryption technology. First, we confuse the digital image pixels using the chaotic encryption technology. We then diffuse the confused pixels using DNA encoding. The diffusion process is also applied to the chaotic encryption technology and, finally, we obtain the encryption result.

In summary, our study successfully combines chaotic encryption technology and DNA coding techniques in a method that has been verified via a large number of experiments and security analyses to prove the security and rationality of the algorithm.

2. DNA Encoding and Chaotic Maps

2.1. DNA Encoding and Complementary Rule

DNA sequencing is the process used to map the nucleotide sequence forming a strand of DNA. Four bases, adenine (A), thymine (T), guanine (G), and cytosine (C) form the building blocks of genetic code. “A” binds with “T” and “G” binds with “C” [17]. We know that every digital image pixel can be expressed by 8-bit binary numbers [18]. Because the binary numbers “0” and “1” are complementary, “00” and “11” and “01” and “10” are also complementary. If we use the four deoxynucleotides “A,” “T,” “G,” and “C” to represent the binary numbers “00,” “11,” “01,” and “10,” respectively, then each pixel can be encoded into a string of nucleotides. For example, the gray value of a digital image pixel is 228, and the binary corresponding to this value is “11100100.” According to the above rules, the string of nucleotides that corresponds to this binary is “TCGA.” There are 24 types of combinations for the four nucleotides. However, only eight coding combinations are suitable for the principle of complementarity. These rules are summarized in Table 1.

We assume that the size of the original grayscale image is , transform into a binary matrix , and then randomly select one of the eight combinations of coding DNA to encode . The coded matrix is called . Finally, is converted into a one-dimensional sequence , which can be expressed as follows:

In accordance with the principle of the complementary base, we set the nucleotide string of the encoding nucleotides as follows: where and are complementary; in other words, and are a pair of base pairs. These base pairs need to meet the conditions of injective mapping. According to (2), there are six types of rational complementary combinations of base pairs: (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 the pixel diffusion, the nucleotides will be substituted using the DNA complementary rule. We randomly select one rule from the six available to achieve a complementary substitution. Thus, we can achieve our objective of pixel diffusion.

2.2. Logistic Map

In this paper, we use two types of chaotic maps: logistic chaotic map and Chebyshev’s chaotic map. The logistic chaotic map is a polynomial map of depth two [19]. The mathematical definition of this map is as follows [20, 21]:

Therefore, our algorithm confuses the pixels using the logistic map and suppose that the size of the original grayscale image is . In summary, the main idea is as follows.

Step  1. Suppose two arrays, and , are, respectively, used to record the rows and columns of an image:

Step  2. Generate two pseudorandom sequences and , with respective sizes and , using the logistic map:

Step  3. Arrange the sequences and in descending order and record their locations. Thus, we can obtain the descending indexes, Index 1 and Index 2, of this pseudorandom sequence:

The primary objective of this step is to find the index of the largest number from the sequence with size and then store it in . Next, we find the index of the second largest number and store it in . We repeat this process until the descending sequence indexes are all stored in array Index 1. Similarly, we can obtain the index array Index 2 by arranging the sequence in descending order and taking its index.

Step  4. According to indexes Index 1 and Index 2, we exchange row with column . We can then obtain new arrays of the exchanged row and column and can confuse the image pixels.

2.3. Chebyshev’s Map

The expression of Chebyshev’s map is as follows: where , . When , Chebyshev’s map is chaotic [22]. In a condition of infinite computational accuracy, this map can produce an infinite-length, nonperiodic, chaotic real-valued sequence [23]. Thus, Chebyshev’s map has useful applications in encryption systems.

We generated iterations of complementary replacements of encoding DNA using Chebyshev’s map, which is mainly used to diffuse the pixels of an image. The main steps are as follows.

Chebyshev’s map has two initial values, and , and two parameters, and . The confused grayscale image has pixels. Each pixel can be represented by four 2-bit nucleotides; therefore, the number of one-dimensional images of the encoding DNA is after the coding.

Step  1. Generate two one-dimensional sequences and using (7), two initial values and , and two parameters and :

Step  2. Generate a new one-dimensional sequence using (10), which will serve as the location that is used to obtain one digit from . In order to enlarge the key space, we randomly select one digit from 15 decimal digits, according to the location sequence :

Step  3. Obtain the sequence using (12), which will serve as the number of iterations and has a one-to-one correspondence with the nucleotide sequence , generated by (1): where the function is used to extract the number of decimal digit from .

3. Image Encryption and Decryption Algorithm

3.1. Image Encryption Algorithm

The overall encryption process is depicted in Figure 1.

If we suppose that the size of the original grayscale image is , the encryption steps are as follows:Input: image , the initial values of the logistic map and , the parameters and , the initial values of Chebyshev’s map and , and the parameters and .Output: the encrypted image.

Step  1. Convert the original grayscale image into a two-dimensional matrix called . Let two arrays be named and . These are, respectively, used to record the rows and columns of image .

Step  2. Generate the two one-dimensional descending index sequences using (3) of the logistic mapping, which is used to, respectively, exchange rows and columns of matrix . Thus, we can obtain a confused image .

Step  3. Convert image into a binary two-dimensional matrix . The size of is rows and eight columns. Then, generate a random integer from one to eight, which is used to decide which DNA encoding rule (Table 1) should be used. Convert into a DNA encoding matrix with rows and four columns. Finally, convert this matrix into a one-dimensional DNA coding sequence , whose size is .

Step  4. Generate a storing unit using (7) of the Chebyshev mapping. Get a sequence of iterations with . Then, generate a random integer from one to six. Thus, we can decide which rule to use among the six types of complementary base pairs rules. Finally, according to each value of , we can decide the method to replace the nucleotides in the DNA sequence . The method of iterative substitution is as follows:switch ;case 0, do not change ;case 1, ;case 2, ;case 3, .The complementarily substituted DNA sequence is .

Step  5. Generate a random integer from one to eight, which is used to decide which DNA encoding rule (Table 1) should be utilized. Then, convert the sequence into a one-dimensional binary sequence .

Step  6. Convert the sequence into a decimal dimensional matrix with rows and columns. Finally, convert the dimensional matrix into the encryption image and output the encryption image.

3.2. Image Decryption Algorithm

The decryption and encryption algorithm processes are reversed and operate as follows:Input: encryption image , the initial values of the logistic map and , the parameters and , the initial values of Chebyshev’s map and , the parameters and , and the random integers , , and .Output: original grayscale image.

Step  1. Convert the encryption image into a one-dimensional binary sequence .

Step  2. Convert the sequence into a one-dimensional DNA coding sequence using the DNA encoding rule .

Step  3. Generate a storing unit using (7) of the Chebyshev mapping. Obtain a sequence of iterations with . Compute the complementary pair of each nucleotide for time(s) to obtain the DNA coding sequence using the complementary base pairs rule .

Step  4. Transform sequence into a two-dimensional matrix using the encoding DNA rule . Then, transform the sequence into a two-dimensional decimal matrix .

Step  5. Recover the rows and columns of according to the descending index generated by (3) of the logistic mapping to get the decrypted image .

4. Experimental Results

In our experiment, we first set the initial values and parameters of the logistic map: , , , and . For Chebyshev’s map, we set , , , and . The size of the original grayscale image was . The original gray image and the encrypted image are shown in Figures 2(a)2(f). The 3D color image and the encrypted image are shown in Figures 2(g) and 2(h).

5. Algorithm Performance and Security Analysis

5.1. Key Space and Sensitivity Analysis

Any chaotic system is sensitive to the initial values. To make the encryption algorithm highly secure, the key space should be large enough to make any brute-force attack ineffective. Here, all the keys are from the process of confusing and diffusing the pixels. Our encryption algorithm actually does have some of the following secret keys:(1)the initial values of the logistic map, and , and the parameters and ;(2)the initial values of Chebyshev’s map, and , and the parameters and ;(3)DNA coding and complementary rules and random integers , , and .

The sensitivities to the initial values and parameters of the logistic map are both considered to be [24]. If we set the precision decimal value of the keys from to , the ratio of the different elements between the two arrays is larger than 0.85. However, when the key difference is , it equals zero. Therefore, we can define the key space of the initial values of the logistic map: . For the variation of the parameters , and .

In the case of Chebyshev’s map, when the change in the initial value is small, , the decrypted image is still indistinguishable [25]. However, when , the decipher result is uncertain. For example, when we encrypt Lena’s image with , it can be successfully decrypted by ; however, when is used, the encrypted image cannot be successfully decrypted.

We encrypted Lena’s image with two similar initial values () and obtained the results shown in Figure 3. From the differences observed in Figure 3(c), we can state that the encryption results are completely different. A large number of experimental results indicate that the key spaces for the initial values are . Similarly, the variation of the parameters and in the chaotic region is between and , so that .

There are only eight kinds of coding DNA that meet the complementary rule, and there are altogether six kinds of legal complementary rules. We used coding DNA rules twice and DNA complementary rules once. Therefore, the key space of the random integers is , and . The total key space is which is much larger than ; therefore, the encryption algorithm has a sufficiently large key space to repel all kinds of brute-force attacks.

5.2. Resistance to Statistical Attacks
5.2.1. Gray Histogram Analysis

Following statistical analysis of the original and encrypted images, we constructed grayscale histogram analysis of Lena and Shrek and their encrypted images (Figure 4). Comparing the histograms, it is evident that the pixel grayscale values of the original images are concentrated on some values, while the histograms of the encrypted images are relatively uniform, which makes statistical attacks difficult.

5.2.2. Correlation Coefficient Analysis

The correlation coefficient is the evaluation criterion used to find the degree of linear correlation between two random variables. The range of our correlation coefficient is ; indicates positive correlation and indicates negative correlation. represents the degree of correlation between the variables, with indicating perfect correlation and indicating uncorrelated variables [26]. In general, for , we assume a strong linear correlation. We calculated the correlation coefficient between the original Lena image and its encrypted image. The result was 0.0128, which is much less than 0.8, thus proving that the correlation between the original and encrypted images is very low. We randomly selected 2,500 pairs of adjacent pixels (in vertical, horizontal, and diagonal directions) from both the original and encrypted images and calculated the correlation coefficient for each pair of adjacent pixels according to (14). Table 2 shows the results of correlation coefficients for two adjacent pixels, which are compared with the results obtained by Zhang et al. [13, 14]. The results indicate that the correlation of two adjacent pixels of the plain image is significant. Therefore, the encryption effect of this algorithm is rather good: where

5.3. Information Entropy Analysis

Information entropy is the average information from which the redundant part has been excluded. Information entropy is the most important feature of randomness. Let be the information source; the formula for calculating information entropy is as follows [13]: where represents the probability of . Assume that there are information source states and that they appear with the same probability; then, according to (16), we obtain the ideal , which indicates that the information is random. Hence, the information entropy of the encrypted image should be close to eight, and the closer it gets to eight, the harder the cryptosystem leaves information available [14]. We used (16) to calculate the information entropy of the encrypted image of Lena and Shrek (Table 3). Since the obtained values are all close to the ideal value of eight, the probability of accidental information leakage is minuscule.

5.4. Differential Attack

A general requirement for all image encryption schemes is that the encrypted image be significantly different from its original version. This difference can be measured by means of two criteria: namely, the number of pixel change rate (NPCR) and the unified average changing intensity (UACI). NPCR is the change rate of the encrypted image pixels when the image changes one pixel in the process of encryption. The larger NPCR is, the stronger the resistance is of the algorithm to plaintext attack. UACI is the change rate of the average strength of the original image and the encrypted image. The larger UACI is, the stronger the resistance is of the algorithm to differential attacks [26].

The formulas used to calculate NPCR and UACI are as follows: where and represent the width and height of the image, respectively. and denote the encrypted images before and after one pixel of the plain image is changed. For the pixel at position , if , let ; else, let .

We calculated the correlation coefficients, NPCR, and UACI of the original and encrypted images of Lena and Shrek (Table 4) and subsequently deduced that our algorithm is robust against differential attacks.

5.5. Robustness against Noise

One of the most important problems in real-world communication technology is the robustness of a cryptosystem against noise. Signal-independent noise very often occurs between the transmitter and the receiver when an image is transmitted electronically. The error propagation phenomenon implies that errors in the encrypted image will lead to errors in the decrypted image [23]. A good algorithm is designed to avoid the propagation error in the decrypted image.

Our cryptosystem is robust against noise because we first diffuse the pixels by permuting the rows and columns and then confuse each pixel according to the DNA complementary rule. Since the pixels changed by the noise will not propagate in the decrypted image during the decryption process, our algorithm is very robust against noise.

We prefer to use white Gaussian noise because it provides a reasonable assumption for the unavoidable randomness of the real physical channel, and the random numbers of this type of noise are uniformly distributed [23].

Figure 5 shows Lena’s encrypted images affected by white Gaussian noise with various variances and the corresponding decrypted images. Table 5 summarizes the mean value of the correlation coefficients, NPCR, and UACI of Lena’s noisy decrypted and original images; although NPCR > 99% and UACI > 28%, visually, the noisy decrypted images maintain the overall information contained in the original images and their correlations are still high.

6. Conclusion

In this paper, we proposed a novel confusion/diffusion algorithm for image encryption. First, we exchanged the pixel positions of rows and columns of the digital image according to a chaotic index based on the logistic chaotic map to confuse the image pixels. Then, we encoded each of the pixels that had been confused into four nucleotides and obtained a one-dimensional nucleotide sequence after a series of iterative computations based on Chebyshev’s chaotic map. Next, we transformed each nucleotide into its corresponding base pair a random number of time(s) according to the complementary rule. Finally, we converted the two-dimensional matrix obtained into an encrypted image. Our experimental results and security analyses show that the scheme can achieve not only good encryption results, but also a sufficiently large key space to be able to repel common attacks. Therefore, the scheme is reliable enough to be applied in image encryption.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is supported by the Fundamental Research Funds for the Central Universities (DL13CB04) and Nature Science Foundation of Heilongjiang Province (ZD201203/C1603), as well as Nature Science Foundation of Heilongjiang Province (LC2012C33).