Self-Adaptive Image Encryption Algorithm Based on Quantum Logistic Map

*is study proposes a self-adaptive image encryption algorithm based on the quantum logistic map. First, the initial values are substituted into the quantum logistic map based on an iteration process to generate three random sequences. After preprocessing, three new random sequences with better randomicity were obtained from the generated random sequences. In particular, the correlation coefficients for random sequences before and after preprocessing are compared to determine the best model to make the correlation coefficients closer to zero. Second, one random sequence in the scrambling stage is selected with respect to the plain image.*e selected random sequence is then used to perform row-column perturbation on the plain image. Finally, the remaining two random sequences are used to perform forward and reverse diffusion to obtain the final cipher image. Because of the dependence on the plain image, the algorithm can frustrate the chosen-plaintext and known-plaintext attacks. Experimental results show that the proposed encryption algorithm can achieve secure communications.


Introduction
With the rapid development of network technology and multimedia, the forms of information expression on the network are also diversified.
is digital information is transmitted through the network to all corners of the world to facilitate the daily needs of people. As the most universal and key information carrier in the field of digital information systems and modern communication, digital images may contain abundant private information. If an unauthorized person accesses this information, there could be serious consequences.
erefore, the protection of image information from being leaked and stolen has become the focus of the field of information security [1]. e randomness, ergodicity, and unpredictability of chaotic systems can satisfy the requirements of image encryption. In [2], a chaotic system is used for image encryption, in which the iterative state value of the chaotic system is directly used to scramble image pixel points proposed.
is study introduces the performance of an image cryptosystem, including key space, known-plain attacks, ciphertext-only attacks, and chaotic map pseudorandom sequence generators.
en, this type of image encryption method based on the chaotic system is extensively used in image encryption systems. A new chaotic system was presented in [3] based on two existing one-dimensional chaotic maps that can be used to implement a sorting-based scrambling algorithm. e new chaotic system has good chaotic behavior, and the distribution of chaotic sequences is uniform. Image encryption was also realized by combining the Arnold map and the Rivest-Shamir-Adleman (RSA) algorithm [4]. First, the initial value of the Arnold map is generated by the RSA algorithm followed by the XOR diffusion operation. After the scrambling operation of the rows and columns, the additive mode diffusion operation is performed.
is achieves a three-layer image hiding effect. Because the security of the encryption scheme depends on the RSA algorithm, the security is at a high level. In [5], an image encryption scheme based on the RSA and Arnold transform was proposed that is better than the traditional ones that are based on the Arnold transform and row-column chaos. First, two sets of parameters are generated by the RSA algorithm. Subsequently, during the scrambling operation, two sets of parameters are applied to the Arnold transform. A set of parameters is used in block scrambling, and another set is used in global scrambling. In turn, in [6], an improved image encryption and decryption algorithm was proposed that combined Tent and Arnold maps. e plain image was first transformed by the Hadamard transformation and then scrambled using the Arnold map, finally XOR diffusion using the Tent map. Reference [7] suggested image encryption with two different sets of chaotic maps. First, the Tent-Sine map was used to generate the measurement matrix and the random numbers needed for embedding. e plain image was then scrambled using the Logistic-Tent map. e experiments proved that the system has enhanced security and improved robustness characteristics. A chaos-based asymmetric color image encryption scheme was proposed in [8], in which different keys were distributed to different receivers by a key conversion mechanism. Using the hash value of the plain image as two initial values of the Henon map, the random sequence needed for encryption was generated. However, owing to the short cryptosystem period and low precision in the lowdimensional chaotic system, the security of image encryption was difficult to promise. With the development of cryptographic security analysis, these low-dimensional chaotic systems are no longer secure considering key space.
us, a method that combines high-dimensional chaotic systems to design the image encryption algorithm needs our attention. Reference [9] proposed an image cryptosystem based on a lifting scheme and a chaotic system. In the lifting scheme, the plain image data were split into even-and oddindexed sequences. Based on these two sequences, one lowfrequency and three high-frequency components of the image were obtained by computing wavelet transforms. e pseudorandom sequences generated by the chaotic system with the secret key were used to disturb the detailed components' high frequency and were then used to disturb the approximation components' low frequency of the image. e two disturbed components are inverted separately to execute the prediction and update operations once more to achieve the cipher image. A new digital image encryption scheme was proposed combining with Lorenz chaotic system in [10]. In the process of generating a random keystream, the hash value of the plain image was embedded into the encryption system, and the initial key was changed dynamically to improve the security level. However, the chaotic sequences obtained by the Lorenz system have some problems such as weak wideband characteristics, imperfect sequence correlation, and local monotonicity. erefore, an improved version of the Lorenz system was proposed in [11]. By replacing the nonlinear term in the Lorenz system with the sum of the exponential and the quadratic terms of a single variable, more complex chaotic attractors with larger positive Lyapunov exponents can be generated. Reference [12] combined chaotic systems with compression sensing technology to design a visually meaningful encryption scheme. In the process of preencryption, compressed perceptual technology and Zigzag obfuscation were used to obtain the middle encrypted image. e random sequence generated by 3D-cat map and the middle encrypted image are embedded with the least significant bit to obtain the final cipher image. Reference [13] proposed a new image encryption algorithm that included a quantum chaotic map, Lorenz chaotic map, and deoxyribonucleic acid (DNA) coding. It used four DNA base pairs to dynamically select DNA coding rules, DNA additions, and XOR rules. Dynamic selection of DNA coding and decoding rules was achieved by the dynamic changes in pixel DNA encoding that effectively improved the security of the encryption algorithm. Reference [14] proposed a color image encryption based on DNA and a 4D memristive hyperchaos. e main feature was to use the dynamic DNA mechanism based on hyperchaos in the processes of encoding, confusion, and diffusion. In [15], an efficient bit-level quantum color image encryption scheme based on quantum cross-exchange operation and 5D hyperchaotic system was proposed, which shows high security and enough capacity of resisting noise attack.
Image encryption is usually pursued in the frequency and spatial domains. Reference [16] used frequency domain encryption, wherein the plain image was first transformed with the discrete wavelet transform and then compressed. e carrier image was then processed by lifting the wavelet transform and discrete cosine transform together with a Schur decomposition. Finally, an embedding operation was performed to achieve visually meaningful image encryption. Although frequency domain encryption greatly improves encryption efficiency, the implementation of frequency domain transformation leads to data loss. A secure and efficient image encryption algorithm based on adaptive permutation diffusion and DNA random coding was proposed in [17]. Plain images were first transformed into DNA sequences using random coding rules to disperse the distribution of the plain image. e adaptive permutationdiffusion process was then introduced to encrypt. In [18], the perturbation operation was designed as a self-adaptive method to replace the traditional confusion method. In addition, it provided a feedback-based diffusion mechanism that could act on internal blocks so that minor changes can affect the value of the current and another block. A new multi-image encryption scheme based on QDFrHT and an improved pixel adaptive diffusion was proposed in [19], which can achieve large-capacity image compression and encryption. Moreover, it is more convenient for key storage and transmission. Zhou et al. [20] proposed a quantum image encryption and decryption scheme, which was based on iterative generalized Arnold transforms and quantum image cycle shift operations. Different parameters and different iteration times were suggested for high security. In [21], a DQWTand 3D hyperchaotic Henon map based image compression and encryption algorithm was presented. For a high security, the quantum image is scrambled by the iterative generalized Arnold transforms to eliminate the block effect. Ye et al. [22] proposed an image encryption scheme by employing DCT, quantum logistic map, and substitutionpermutation structure which has a high sensitivity to plain text and keys. Reference [23] proposed an efficient pixellevel chaotic image encryption algorithm based on the twodimensional sine logistic modulation map. To be different from the traditional encryption architecture, the method enhances the connection between pixel shuffling and value changing. In [24], a three-dimensional chaotic map was employed for fast image encryption. e scheme, especially, uses the latest generated numbers to permute the next block.
ere are some other encryption methods, for example, public-key cryptosystem based [25] and random numbers insertion based [7].
Because the low-dimensional chaotic system has certain security problems and the frequency domain encryption will cause data loss, therefore, this study uses the quantum logistic map to conduct the encryption algorithm in the spatial domain.
e range of the parameters is wider, and the random sequence generated can be preprocessed to produce a more random sequence which improves the encryption effect.
is article is organized as follows: the proposed encryption algorithm is given in Section 2 with detailed image encryption and decryption processes. Section 3 executes the simulation and obtains the experimental result. Security analysis is performed in Section 4. Section 5 presents some conclusions of the proposed method.

Quantum Logistic Map.
A quantum chaotic map was presented in [26], which is defined as where the control parameter r ∈ 3.74, 4.00, the parameter β ≥ 3.5, and x n and z n are the complex conjugations of x n and z n , respectively. e above quantum logistic map has the advantages of natural parallelism, simple structure, and large capacity. Moreover, the generated chaotic sequences are more pseudorandom. When r � 3.99 and β ≥ 6, the quantum chaotic map can exhibit better chaotic behavior. In this study, r � 3.99, β � 7, and the initial conditions x 0 � 0.067, y 0 � 0.247, and z 0 � 0.863, are randomly selected and substituted 2500 times; then, three random sequences are obtained, and the first 500 are discarded to eliminate the transient effect. e autocorrelation and cross-correlation diagrams of the sequences x, y, z are shown in Figure 1. Because the ideal pseudorandom sequence needs to be uniformly distributed, the autocorrelation function should satisfy the shape of a delta function, and the cross-correlation function is close to zero. As can be observed from Figure 1, the autocorrelation and cross-correlation functions of the sequences x, y, z are not very close to the ideal case. us, a preprocess is designed for these sequences as follows with test results listed in Table 1: When we set α � 6, the autocorrelation and crosscorrelation of the new sequences x ′ , y ′ , z ′ are shown in Figure 2. It can be observed that the treated sequence autocorrelation function is closer to the delta function and the cross-correlation function is closer to zero. Compared with the random sequence before processing, the random sequence after processing is closer to the ideal random sequence, and the randomness is improved. To prove that the randomness of the processed sequences is better, the histograms of the sequence before and after processing are shown in Figure 3. Obviously, the new sequences are more random. It is noted that α � 6 is chosen due to the smallest mean value of the cross-correlation coefficient as seen in Table 1.

Image Encryption Process.
e flowchart of our image encryption algorithm is shown in Figure 4. e encryption steps are as follows: Step 1: read the size of the plain image P as m × n, and compute sum s � M i�1 N j�1 P(i, j) . en, sequences x � x 1 , x 2 , . . . , x s 1 +m×n ,y � y 1 , y 2 , . . . , y s 1 +m×n , and z � z 1 , z 2 , . . . , z s 1 +m×n with lengths s 1 + m × n are generated with keys x 0 , y 0 , z 0 , where s 1 � (smod200) + 300.
Step 3: map all values in the random sequence L into the range of [1, m] and the random sequence T into the range of [1, n] Step 4: perform the scrambling operation on the plain image P to obtain M using updated sequence Land where i � 1, 2, . . . , m and j � 1, 2, . . . , n.

Security and Communication Networks
Step Step 6: arrange the image M into a one-dimensional matrix M ′ , and do the XOR operation for it by sequence Y as follows: where i � 2, . . . , m × n.
Step 7: perform a reverse diffusion operation again to achieve a better diffusion effect as follows: where j � m × n − 1, . . . , 1.
Step 8: convert sequence B into matrix C with size m × n to obtain the final image C.

Image Decryption Process.
Step 1: the receiver puts the correct initial values into the quantum logistic map and produces three sequencesx, y, z. en, α � 6 is used to generate three new sequences x ′ , y ′ , z ′ by a preprocessing. Sequences L, T, Y, Z can be obtained by the same operations.
Step 2: the cipher image C is arranged into a one-dimensional vectorB, and the sequence Z is used to do the XOR diffusion to obtainA as follows: where j � mn − 1, mn − 2, . . . , 1.
Step 3: XOR diffusion is performed again on A to obtain M by sequence Yas follows: where i � 1, 2, . . . , mn.
Step 4: inverse scrambling operation is performed on the matrix M to obtain the plain image using sequences L and T as follows: where i � 1, 2, . . . , m and j � 1, 2, . . . , n.

Experimental Results
e encryption algorithm presented in this study was implemented with MATLAB (version R2019a) on the Windows 10 platform with a 1.90 GHz processor. In the experiment, two gray-scale images and two-color images were selected randomly as the plain images to do the tests. Initial values x 0 � 0.067, y 0 � 0.247, and z 0 � 0.863 and parameters r � 3.99, β � 7, α � 6 are set. As can be observed from Figure 5, no effective information about the plain image can be seen in the cipher image. Table 2 shows the value s 1 used in different rounds of perturbation for different images. Because different images have different pixels, the values of s 1 are also different. As a result, the random sequence used in the scrambling stage is different, and the final encryption effect is different, which reflects the adaptive encryption method very well.

Key Space.
e key space is a set of all keys in the algorithm. An encryption system with a large key space can resist violent attacks effectively and has enhanced security. In this algorithm, the initial values x 0 , y 0 , z 0 are used in the chaotic map. When the computational accuracy is set as 10 − 14 , the key space can reach 10 14 × 10 14 × 10 14 � 10 42 ≈ 2 139.5 > 2 100 . erefore, the proposed algorithm has a large key space that can effectively resist violent attacks.

Key Sensitivity Analysis.
is part mainly tests the key sensitivity of the proposed algorithm. If an encryption algorithm has high-key sensitivity, the cryptosystem can effectively resist violent attacks and ensure the security of the images. Consider a bridge image with a size of 512 × 512 as an example used for testing purposes. Figure 6 shows the corresponding decryption image when the key is changed only with 10 − 14 during the decryption process. Because the scrambling phase is determined by the sum value s of the plain image, the correct image cannot be decrypted when a small change occurs. It can be observed that when the decryption key changes slightly, the cipher image cannot be restored to the original plain image. So, the proposed encryption algorithm is sensitive to the key.

Histogram Analysis.
e histogram is used to show the distribution of each pixel in an image; we use the histogram to show the encryption effect of the proposed encryption scheme. Usually, the histogram of a plain image has obvious statistical characteristics, while the histogram of the encrypted image is evenly distributed. It can be observed from Figure 7 that the histogram of the cipher image is evenly distributed and can resist statistical attacks. So, if the attacker obtains a cipher image, he or she cannot obtain any information about the plain image.

Correlation Coefficient.
Commonly, each pixel in a meaningful image has a strong correlation with its neighbors in the horizontal, vertical, and diagonal directions; an encryption algorithm is supposed to destroy the correlation between pixels to protect the secret information more effectively. e lower the correlation of adjacent pixels in the secret image is, the better the performance of the algorithm is, and the better the antistatistical attack is. Figure 8 analyzes the correlation between adjacent pixels in the plain and cipher images from three directions: horizontal, vertical, and diagonal. e correlation coefficient is calculated as follows: cov(x, y) Figure 5: Test results. Plain images of (a) bridge, (b) baboon, (c) Earth, and (d) sun; (e) cipher image of (a), (f ) cipher image of (b), (g) cipher image of (c), (h) cipher image of (d), (i) correct decrypted image of (e), (j) correct decrypted image of (f ), (k) correct decrypted image of (g), and (l) correct decrypted image of (h).
where R xy is the correlation coefficient, x and y are the gray values of the two adjacent pixels, and N is the number of adjacent pixels selected from the image. It can be seen from Figure 8 that the correlation of the cipher images is much weaker than that of the original images. Table 3 lists the correlation values in the three directions of the test image. It can be observed that the correlation coefficient of the plain image is close to one, and that of the cipher image is closer to zero. is shows that the proposed encryption algorithm can eliminate the correlation between pixels. is makes the pixel arrangement of the cipher image more random.

Information Entropy.
As we know, the bigger the information entropy is, the more uniform the distribution of the gray value is, and the more random the image is. Table 4 shows the results of gray and color images. As observed from the table, the information entropy value of the plain image is smaller than that of the cipher image, and the information entropy value of the cipher image is closer to the theoretical value of eight. is shows that the cipher image has better randomness and higher security. Compared with [20,21,24], the test results by our method are nearer to the theory value:   First round  416  482  340  395  435  454  326  424  Second round  333  452  388  353  451  427  312  409  ird round  360  427  340  314  332  330  354  313   8 Security and Communication Networks

Security and Communication Networks
H � − P(X(i, j))log 2 P(X(i, j)), (14) where X and Y are two different images and P (X(i, j)) is the number of X(i, j) and is the size of the image M × N.

Differential Attack Analysis.
For an ideal encryption algorithm, the more sensitive the encryption algorithm is to plain images, the more robust the algorithm is to differential attacks. e sensitivity of encryption algorithms to plain images can be measured by the number of pixels change rate (NPCR) and by the unified average changing intensity (UACI), which are defined by When there is only one-pixel difference between two plain images, let the pixel value of point (i, j) in their cipher images be C 1 (i, j) and C 2 (i, j). Table 5 lists the test results of NPCR and UACI. It can be observed    from the table that the proposed image encryption algorithm has the ability to resist differential attacks since the values of NPCR and UACI are close to their theoretical values.

Conclusions
In this study, a self-adaptive image encryption algorithm was proposed based on the quantum logistic map. Because the random sequence used in image encryption needs strong randomicity and the random sequence generated directly by the quantum logistic map does not yield a good performance, we suggested a preprocessing for these random sequences. e test analysis showed that if our preprocessed model was applied, the randomness of the random sequence displayed better behavior. In the process of image encryption, each round of encryption selects a random sequence according to the preencrypted image of the previous rounds of encryption. In other words, the random sequence required in the first round was determined by the plain image, while the second round was determined by the cipher image obtained from the first round, and so on. As a result, the encryption algorithm in our method was dependent both on the keys and on the plain image. erefore, the encryption effect can yield good performance for security communications.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare no conflicts of interest.