A Quantum Image Encryption Method Based on DNACNot

The image is one of the most important means to store information, and is widely used in every aspect of life. However, the characteristics of images enable them to be easily stolen, tampered with, and copied. Researchers have proposed many encryption methods, with most applying only to traditional digital images. There are few encryption methods for quantum images, and quantum image-oriented encryption technology has begun to attract researchers’ attention. This study proposes a quantum image encryption method based on DNA Controlled-Not (DNACNot). Based on the quantum image information, encryption parameters are obtained and transferred as part of a chaotic initial key. Two natural DNA sequences are amplified to obtain the DNA coordinate sequence, and a modified chaos game representation is used to modify the DNA coordinate sequence, which is then used to correct the sequence generated by chaos. The resulting sequence is converted to an integer sequence to obtain DNACNot. A controlled-not operation is performed between DNACNot and the quantum image is scrambled by bit-plane to obtain the encrypted image. The encryption method has high security, a good encryption effect, and a large key space. The method can effectively resist exhaustive, statistical, and differential attacks. The algorithm is easy to implement at a low cost. The encryption time of our proposed method is satisfactory, and the method is suitable for real-time encryption. Moreover, the encryption results can be transmitted over the internet and stored in the cloud.


I. INTRODUCTION
Because images are vivid, they are widely used by humans and are an important means to express information. However, they also provide a channel for criminals to use the internet to obtain unauthorized data. Image owners need reliable encryption to protect their interests. Image encryption methods can be based on modern cryptography technology [1], secret segmentation and sharing technology, chaotic technology [2], mathematical formulas or transforms [3], compressive sensing [4], and DNA technology [5]. The latter four methods are the most widely used, and these are the focus of researchers.
Because of the characteristic of chaos, image encryption based on chaos is one of the most popular methods.
The associate editor coordinating the review of this manuscript and approving it for publication was Sedat Akleylek .
Wang et al. [2] proposed a chaotic system in the form of the power-exponential structure, and a color image cryptosystem was proposed based on this system. Encryption methods based on various mathematical formulas or transformations have also received extensive attention. Wu et al. [3] made use of elliptic curve ElGamal encryption to encrypt compressed images. Researchers have also begun to focus on compressive sensing image encryption methods. For example, Hu et al. [4] proposed a method based on double random phase encoding and parallel compressive sensing with updated sampling processes. Another new method [5] is based on DNA computing and coding [6], [7]. Hu et al. [8] proposed a method based on high-dimensional chaotic systems and the cycle operation for DNA sequences, in which pixels of original images were encoded randomly using a DNA coding rule.
Some new methods are neural network-based [9] or asymmetric-based [10]. Almost all of these methods are designed for traditional digital images, while the encryption of quantum images remains in its infancy. However, as the traditional computer approaches its physical limits, researchers are beginning to study a new computing model, and quantum computers have produced a series of satisfactory encryption results [11]- [23]. For example, EI-Latif et al. [11] presented an encryption algorithm of quantum medical images. The proposed algorithm utilizes gray code and a chaotic map. Liu et al. [12] proposed quantum block image encryption based on Arnold transform and Sine Chaotification Model. Hu et al. [14] proposed a quantum image encryption algorithm based on Arnold scrambling and wavelet transforms. Abd-EI-Atty and EI-Latif [16] proposed an encryption protocol for NEQR images based on one-particle quantum walks on a circle. A Double image encryption using 3D Lorenz chaotic system, 2D non-separable linear canonical transform and QR decomposition was proposed by Rakheja et al. [19]. Liu et al. [20] proposed a quantum image encryption algorithm based on bit-plane permutation and sine logistic map. The current encryption technology for quantum images is divided into three categories: scrambling technology based on the basic gray code and bit plane (GB); scrambling technology based on improved GB; and scrambling technology combined with GB and position. These quantum image encryption techniques can only complete one of the two basic requirements of image encryption, that is, scrambling. For the other basic requirement, image encryption-diffusion, the effect need to be improved further.
This study presents a quantum image encryption method based on DNA Controlled-Not (DNACNot). Four parameters are obtained from quantum image information. Based on two natural DNA sequences and the encryption parameters, the DNACNot is obtained by the improved chaotic game representation and iterative chaotic map with infinite collapses (ICMIC). The encrypted image is obtained by a controlled-not operation. The encryption results are analyzed comprehensively, from which it can be seen that the method has high security. Our method greatly improves the diffusivity while preserving the good scrambling of traditional quantum image encryption.

II. BACKGROUND KNOWLEDGE A. NOVEL ENHANCED QUANTUM REPRESENTATION
In 2013, Zhang et al. [24] proposed novel enhanced quantum representation (NEQR), based on the flexible representation of quantum images (FRQI) model, to represent quantum images. Although NEQR uses more qubits than some other models to represent an image, it can contain both the position and color information of every pixel. The NEQR model for a 2 n × 2 n gray image is where  For a 128 × 128 gray test Lena image (Figure 1), its NEQR is written as follows:

B. BIT-PLANE
The set of bits for each pixel value of an image corresponding to a specific bit position is called a bit plane [11], [12]. For example, if the pixel value range for an image is [0,255], then the binary form represents it as 8-bit data; hence, the image has eight bit planes. Bit-plane 8 contains the most significant bits, and Bit-plane 1 contains the least important bits ( Figure 2).

C. CHAOS GAME REPRESENTATION
Jeffrey [25] proposed the scale-independent chaos game representation (CGR) of genomic sequences in 1990. The CGR of a DNA sequence is drawn in a unit square, with its four vertices marked by nucleotides A-(0,0), C-(0,1), G-(1,1), and T-(1,0). The mapping process has the following steps: the first nucleotide of the sequence is drawn between the center of the square and the vertex representing the nucleotide; successive nucleotides in a sequence are drawn between the previously drawn points and the vertices representing the nucleotides to be drawn. The coordinates of the continuous points in the VOLUME 8, 2020 chaos game representation of DNA sequences are described by an iterative function system defined as where x i and y i are the coordinates of the ith base, and g ix and g iy ) are the vertex values of the ith base.

D. ICMIC
The iterative chaotic map with infinite collapses (ICMIC) [26] is a kind of one-dimensional (1-D) chaotic map that has higher Lyapunov exponents. A perfect iterative chaos model can be obtained by properly selecting the parameters, and the sequences it produces can be regarded as better than those from a uniform distribution. It can be written as where x ∈ (−1, 1), and x = 0, n ≥ 1, and n is an integer, a ∈ (0, +∞).

A. ENCRYPTION PARAMETERS
For an encryption method that better resists differential attacks, we design encryption parameters from the original image information. We use the two-dimensional discrete cosine transform (2D-DCT) to calculate four encryption parameters based on the bit plane information of the original image. Eight bit planes are processed by 2D-DCT to obtain eight decimal matrices, namely, D_plane1, D_plane2, D_plane3, D_plane4, D_plane5, D_plane6, D_plane7, and D_plane8. The encryption parameters sub1, sub2, sub3, and sub4 are obtained as follows: (abs(d_p3(i, j)) + abs(d_p6(i, j)))), where , and d_p8(i, j) are values of the ith row and the jth column in D_plane1, D_plane2, D_plane3, D_plane4, D_plane5, D_plane6, D_plane7, and D_plane8, respectively; abs() is the absolute value operation; and floor() is an integer operation.

B. IMPROVED CHAOS GAME REPRESENTATION
We use two natural DNA sequences as encryption tools to further expand the key space and enable the encryption algorithm to better resist exhaustive attacks. The chaos game representation is improved as follows: where e1x and e1y are the vertex values of one DNA sequence, e2x and e2y are the vertex values of another DNA sequence, and x and y are the coordinates of the base in the two-dimensional plane.

C. DNACNot
DNACNot is constructed by some operations on two natural DNA sequences and chaotic sequences, as follows.
Step 2: Set system parameter a and modification parameter subz, and combine them with encryption parameters to obtain four chaotic sequences of length 2 2n .
Step 3: Use the sequence MOTDNA to modify four chaotic sequences in different ways to obtain modified sequences of length 2 2n .
Step 4: Convert the above sequences to integer sequences of length 2 2n . Perform XOR operations in turn to obtain DNALOGIN .
Step 5: Represent the integer sequence DNALOGIN by NEQR to obtain DNACNot.

D. ALGORITHM DESCRIPTION
The algorithm has four parts. Four encryption parameters are obtained and transferred as part of the key based on the quantum image information. Two natural DNA sequences are amplified to obtain the DNA coordinate sequence, which is modified by chaos game representation. The modified sequence corrects the sequences generated by ICMIC, and the result is converted to an integer sequence to obtain DNACNot. A controlled-not operation is used to calculate DNACNot and the quantum image is scrambled by bit-plane to obtain the encrypted image. A flowchart illustrating the process is shown in Figure 3, and the encryption approach is as follows.
Step 1: Input a quantum image |A of size 2 n × 2 n , represented by NEQR.
Step 3: Obtain two natural DNA sequences DNA1 and DNA2 by the given parameters. These are amplified to obtain the new DNA sequences ENDNA1 and ENDNA2, of length 2 2n .
Step 5: Given (x 0 , y 0 ), use the improved chaos game representation to convert vertex sequences EDNAT 1 and EDNAT 2 to one chaotic game coordinate sequence CG, thus obtaining the modification sequence MODNA.
Step 10: Scramble quantum image |A using bit plane technology to obtain the scrambled quantum image |S .
Step 11: The quantum image |S and |DNACNot undergo the controlled-not operation to obtain the encrypted quantum image |E .
Decryption follows the same steps and proceeds by executing steps 11 and 10 in reverse. The decryption steps are as follows.
Step 1: Follow the same steps as the encryption algorithm to generate |DNACNot .
Step 2: The encrypted quantum image |E and |DNACNot undergo the controlled-not operation to obtain the quantum image |S .
Step 3: Use reserve bit plane technology to scramble quantum image |S , and then obtain the original quantum image |A .  To effectively compare these results with those on other images, we encrypted six other images. Figure 5

V. ALGORITHM PERFORMANCE ANALYSIS A. KEY SPACE ANALYSIS
This encryption method has 10 key parameters, and it uses the natural DNA sequence as the key. Although there are only four types of bases, natural DNA sequences are diverse due to different combinations and lengths. Even if the same DNA sequence is selected at a different starting position, it is  possible to obtain completely different subsequences. Moreover, with the continuous development of genetic engineering and sequencing technology, the known DNA sequences of human beings are increasing, and people can treat the natural DNA sequence set as a one-time pad. Therefore, the encryption method has the property of a one-time pad. It also uses the improved chaotic game representation method and ICMIC, whose parameters further expand the key space, thus enabling the proposed quantum image encryption method to well resist exhaustive attacks.

B. KEY SENSITIVITY ANALYSIS
A secure encryption scheme is sensitive to subtle changes in the key. To test the key sensitivity of the proposed method, three new keys were used to decrypt the original encrypted image (Figure 4 The experimental results obtained when using the wrong keys are shown in Figure 6. Figure 6(a)-(c) show the decrypted results under key1, key2, and key3, respectively. From Figure 6 and Table 1, it can be seen that the original image cannot be decrypted with the wrong keys. Thus, this method has satisfactory key sensitivity.

C. CORRELATION ANALYSIS
A secure image encryption scheme must eliminate the strong correlation between pixels of an image. Correlation coefficients were used to analyze the correlation between pixels. The correlation coefficient between pixel x and pixel y is where E(x) and D(x) are the expectation and variance, respectively, and r xy ∈ [−1, 1].    Figure 7 and Table 2 show that the correlation of the original images is very high, whereas the correlation of the encrypted images is very low. The closer the correlation between adjacent pixels is to 0, the greater the difference between them, and the more difficult it is for an attacker to use the relationship between pixels to infer the pixel values of other pixels. The absolute values of our results are very close to 0, and thus the attacker cannot get the information of the original image through the relationship between pixels. For convenience of comparison, this method is used to encrypt Figure 5(a)-(f). The results are shown in Table 3. We encrypt the same images as those in the literature, and the results we obtain are closer to 0 compared with their results. Thus, our encrypted images have higher security.

D. HISTOGRAM ANALYSIS
A secure image encryption algorithm can resist statistical attacks. It is necessary to eliminate the correlation between pixels and ensure that the pixels of an encrypted image are evenly distributed. We performed a histogram analysis to verify that the proposed method can evenly distribute pixels. The variance of the histogram is Table 4 shows the var of Figure 4, and Figure 8    We can see that var of the original images are all very high while the var of the encrypted images are all very low. Table 4 shows that the var after encryption is reduced by at least 97% compared to before encryption. The smaller the var, the more even the pixel value distribution of the pixels; this makes it more difficult for an attacker to use the distribution of pixel values to crack an encrypted image. Figure 8 also illustrates this conclusion. Figure 8 Table 5 shows comparisons with methods from Liu et al. [12] and Liu et al. [20], and it can be seen that our method has lower var.The pixel values of the encrypted image we obtain are more evenly distributed, making it more difficult for an attacker to decipher.

E. INFORMATION ENTROPY ANALYSIS
Information entropy measures the randomness of an image and the amount of information hidden in it. The entropy of an 8-bit image is defined as where m denotes the information source, x i is the gray value equal to pixel value i, and P(x i ) is the probability of the gray value in an image. A robust encryption scheme should have an entropy value of 8.   Table 6 shows the information entropies of the plain and encrypted images (Figure 4 Table 7 shows the comparison results between our information entropies and others' in the case of encrypting the same images. The values obtained by our method are closer to 8 than those from EI-Latif et al. [11], Liu et al. [12], Abd-EI-Atty et al. [16], and Rakheja et al. [19]. Although our result is not better than that of Liu et al. [20], the results differ by only 0.0001. Therefore, in terms of information entropy, the performance of our algorithm is satisfactory.

F. DIFFERENTIAL ATTACK
A differential attack cracks the symmetric encryption scheme by analyzing the information distribution of an encrypted image. A secure symmetric encryption scheme can resist a differential attack. The number of pixels change rate (NPCR) and unified average changing intensity (UACI) are used to measure the ability to resist differential attacks.
NPCR and UACI tests are shown in Table 8. The respective results of Figure 4(a)-(c) are NPCR = 99.57% and UACI = 33.41%, NPCR = 99.55% and UACI = 33.47%, NPCR = 99.57% and UACI = 33.51%. Every result meets all criteria [27]. Therefore, our method can resist the differential attack well. Tables 9 and 10 compare our results to those of different image encryption algorithms on NPCR and UACI . There are six criteria across three levels [27].  EI-Latif et al. [11] only meets three criteria, and it only meets the criteria of NPCR, and none of the three indicators of UACI meet the criteria. Liu et al. [12] meets five criteria, but it is not good on NPCR at the 0.05-level. The algorithm in Abd-EI-Latif et al. [16] only meets three criteria, and it fails on UACI at three levels. Although the algorithm in Liu et al. [20] can meet all criteria on UACI , it cannot meet any criterion on NPCR. In the case of encrypting the same images, our proposed algorithm meets all criteria. These findings further prove that our method can effectively resist differential attacks compared to other algorithms.

G. COMPUTATIONAL COMPLEXITY AND ENCRYPTION SPEED ANALYSIS
According to Chai et al. [28], the time complexities on the preparation and recovery of the quantum image for NEQR representation are O(qn2 2n ) and O(2 2n ), respectively. However, generally speaking, the time complexity of the quantum image encryption algorithm only includes the time cost in the encryption process or the decryption process, and does not include the time cost in the preparation and recovery. Therefore, the time cost in the preparation and recovery of the quantum image is neglected. In our method, the time complexity consists of four parts: the time cost of generating key parameters, the time cost of processing the natural DNA sequence, the time cost of generating DNACnot, and the time cost of a controlled-not operation. In the stage of generating key parameters, the complexity is O(n 2 ); in the stage  of processing the natural DNA sequence, the complexity is O(2 2n ); in the stage of generating DNACnot, the complexity is O(2 2n ); in the stage of processing the natural DNA sequence, the complexity is O(2 2n ); and in the stage of a controlled-not operation, the complexity is O(2 2n ). Therefore, the computational complexity of our quantum image encryption method is O(2 2n ), which is as good as that of classical methods [20].
For a good encryption algorithm, the speed of encryption is also very important. In order to more intuitively introduce the speed of the quantum image encryption method we proposed, we used multiple images with different sizes but with the same image content as Figure 4(a)-(c) to record encryption time required for them. We used MATLAB 2019 to simulate the experiments.The configuration of the computer we used is: Intel Core i7-9700k CPU, 16GB memory and Windows

VI. CONCLUSION
We proposed a quantum image encryption method based on DNACNot. Four encryption parameters obtained from quantum image information were used as part of the chaotic initial value. Two natural DNA sequences were used according to the improved chaos game representation to modify the chaotic sequences to build DNACNot. A controlled-not operation was performed with DNACNot, and the quantum image was scrambled by a bit plane to obtain the encrypted image. Our algorithm was shown to be effective at encrypting quantum images. Through five aspects of performance analysis, namely, key space, key sensitivity, correlation, histograms, and differential attacks, we proved that our encryption method has high security. To further prove the superiority of our encryption method, under the premise of encrypting the same original images, we compared our experimental results with those of others. Through comparison, we can see that in each performance analysis our method is overall better than others. Although in terms of information entropy our result is not superior to Liu et al. [20], the difference is only 0.0001. Except for this, our method performs better than that in Liu et al. [20]. Therefore, regarding overall performance, our method is also superior to the method in Liu et al. [20]. In addition to the above performance analysis, we also analyzed the speed and computational complexity of the encryption algorithm. These two indicators are also satisfactory. In subsequent research, we will further optimize the structure of the encryption algorithm, improve its efficiency, reduce its computational complexity, and improve the security of encryption.