# Fast and Robust Image Encryption Scheme Based on Quantum Logistic Map and Hyperchaotic System

Authors: Nehal Abd El-Salam Mohamed; Aliaa Youssif; Hala Abdel-Galil El-Sayed
Journal: Complexity
 (2022)

---

## Abstract

Topic of quantum chaos has begun to draw increasing attention in recent years. So, to ensure the security of digital image, an image encryption algorithm based on combining a hyperchaotic system and quantum 3D logistic map is proposed. This algorithm is applied in four stages. Initially, the key generator builds upon the foundation of mean for any row or column of the edges of the plain image. Its output value is used to yield initial conditions and parameters of the proposed image encryption scheme. Next, it diffuses the plain image by the random sequences generated by 3D hyperchaotic system, and the diffusion process is realized by implementing XOR operation. Then, the diffused image and chaotic sequences are produced by the 3D quantum chaotic logistic map, expressed as a quantum superposition state using density matrix which is a representation of the state of a quantum system, and finally the resulting quantum image is then confused and diffused simultaneously by a unitary matrix generated by logistic chaos using XNOR operation 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. Simulation results and theoretical analysis verify that the presented scheme has high safety performance, a good encryption effect, and a large key space. The method can effectively resist exhaustive, statistical, and differential attacks. Moreover, the encryption time of the proposed method is satisfactory, and the method can be efficiently used in practice for the secure transmission of image information.


---

## Body

## 1. Introduction

In today’s era [1–6], with the fast development of electronic technology and the scale of the communication network, a lot happens over a time of one minute. Along with this rapid development of Internet and multimedia, usage of digital media has increased tremendously in past decades. In this period of digital data technology, today, we are in the sphere of digitally advanced era, where most of the private data and secure digital information is being exchanged by the help of electronic media such as television, smartphones, personal computers, tablets, facsimiles, satellites, and so forth to all corners of the world over just one minute to facilitate the daily needs of people where digital information is being applied in all the fields in the society.Images originated in some scenarios such as any social media servers, business, personal privacy, healthcare or military systems, organizations, banks, and other private sectors contain private information which is placed and maintained in very big databases, since it can be transmitted, shared, and stored on the Internet, so if this information is stolen or an unauthorized person accesses it, this may cause a serious damage and serious consequences to any organization [7–9].With the widespread application of a digital image, providing digital image information security in the transmission channel has become an increasingly serious issue to be urgently solved because the data can be intercepted, cracked, or destroyed [10, 11]. Hence, the security of the important and valuable image information has become a hot recent topic of the field of information security.Image encryption [5, 12, 13] is one of the possible effective solutions used to protect these images from this threat where it is extensively recognized as a useful technique for secure transmission and its objective is to accomplish privacy and integrity of data. It converts images into noise-like encrypted images with key by disrupting pixel positions or changing pixel values and decryption will reveal the original message or information by utilizing same key utilized for encryption.To satisfy the emerging demand, a lot of useful image encryption algorithms based on optical transformation, DNA sequence operations, wave motion, Brownian motion, cellular automata, compressive sensing, and chaotic system [6, 14] were developed in literature to secure these digital images.Since the chaos theory was first proposed by Lorenz, many chaotic phenomena were found in many fields, such as physics, astronomy, chemistry, biology, and medicine. In 1998, Fridrich firstly proposed a chaos-based image encryption algorithm composed of two stages: permutation and diffusion. After that, many scholars have designed numerous efficient algorithms for chaotic systems and chaos-based image encryption to be applied for the secure communications [3, 4, 8, 11].Chaotic systems [2, 4] have many noteworthy features which satisfy the requirements of image encryption, such as random-like behaviors, high sensitivity to initial conditions and control parameters where the wrong initial condition will lead to nonchaotic behavior, nonperiodicity, and ergodicity, and low cost in the computer operation system and microprocessor [8–10]. Therefore, these systems can be rapidly applied to cryptographic systems which achieve superior performance with respect to the trade-offs between the security and efficiency. However, the appearance of quantum computing brought a great challenge to classic encryption methods [15, 16].Additionally, with the advancement in technology in the modern era of computer world, brute-force attack [4, 6] will be quite easily performed in quantum computers which are based on quantum information theory. This vulnerability gives potential danger to idealized security required at national security and protected innovation level. To beat this threat, it is necessary to study novel and safer cryptosystem to meet the current safety requirements in image encryption, and, therefore, quantum encryption can be applied in the image encryption process as it gives us a secure encryption method.Quantum computation [7, 17, 18] has shown great potential for improving information processing speed and enhancing communication security. Combining quantum computing and image encryption is a secure and effective approach to design the encryption algorithms. The essence task of quantum image encryption is to store the images into quantum computers, and then quantum encryption techniques can be exploited to process these images. Due to the promising prospect of quantum image encryption, more and more researchers devoted their attention to developing quantum image representation models and designing image encryption algorithms.For example, Li et al. [3] proposed an efficient chaos-based image encryption scheme, which uses the imitating jigsaw method containing revolving and shifting operations and shows good performance in both security and speed. Liu et al. [7] proposed a quantum image encryption algorithm based on bit-plane permutation and sine logistic map which has good performance in the aspect of security and the computational complexity is superior to its classical counterpart. Dong et al. [9] proposed a self-adaptive image encryption algorithm based on the quantum logistic map, which can achieve secure communications and frustrate the chosen-plaintext and known-plaintext attacks. In [15], an innovative quantum color image encryption method focused on the Lucas series-based substitution box is suggested to enhance the competence of encryption. This cryptosystem has more excellent key space and significant confidentiality. In [19], an image encryption algorithm based on 3D DNA level permutation and substitution scheme is proposed, where the proposed encryption scheme has large key space and high key sensitivity and may resist some typical attacks, and it may effectively secure the secret image information. El-Latif et al. [20] presented a new method for constructing substitution boxes (S-boxes) based on cascaded quantum-inspired quantum walks and chaos inducement, which will offer gains in many cryptographic applications where the performance of the proposed S-box scheme is investigated via established S-box evaluation criterion and outcomes suggest that the constructed S-box has significant qualities for viable applications information security. In [21], a new method for the encryption by utilizing quantum chaotic maps and continuous chaotic dynamical systems is designed which contributes to achieving the security of data with the minimum time of encryption. Sridevi and Philominathan [22] presented a quantum encryption technique which is built by adopting Haar Integer Wavelet Transform (HIWT), RC6 (Rivest Cipher) block cipher, and DNA (deoxyribonucleic acid) sequences. In addition, a Unified Chaotic Logistic Tent Map (ULTM) has been employed in the permutation phase to produce the pseudorandom sequence for shuffling the RGB planes of the quantum represented source image in spatial and transform domains. This cryptosystem has confirmed the significant immune level of the quantum cryptosystem. In [23], an enhanced quantum scheme is proposed for generalized novel enhanced quantum image representation which has good visual effects and high security. Wen et al. [24] proposed an image cryptosystem adopting a quantum chaotic map and the certain security-enhanced mechanisms where the cryptosystem has excellent performance and can resist various cryptographic attacks. Moreover, the feasibility and effectiveness of the image cryptosystem are verified on the Internet of Things secure communication experimental platform. It proves that the proposed image cryptosystem is a preferred and promising secure communication technology solution.After conducting a detailed analysis of the breaking methods, it was found that some chaos-based image encryption schemes have security vulnerabilities, which are as follows: (1) key dependence and fixed key; (2) one cycle of permutation-diffusion architecture; (3) low-dimensional systems used for image encryption; (4) single chaotic system still used for encryption operation, which leads to inability to resist brute-force attack; and (5) low sensitivity to all the chaotic secret keys.To overcome these security shortcomings and design secure and effective image encryption, an image encryption algorithm based on integrating a hyperchaotic system and quantum 3D logistic map is presented in this paper. The essence goals of the proposed scheme are listed as follows:(i)
First, it can fight against the chosen-/known-plaintext attacks due to the use of symmetric key image cryptosystem based on original image.(ii)
Second, the generated key cryptosystem based on the plain image is used to determine the number of cycles of composite chaotic algorithms.(iii)
Third, multidimensional chaotic maps like hyperchaos and 3D quantum logistic map are used which have more chaotic attractors, so the high-dimensional chaotic system has stronger randomness, better confidentiality, greater amount of information, and higher communication efficiency, providing sufficiently large key space and having high security.(iv)
Fourth, two different chaotic systems (quantum logistic map and hyperchaotic Chen’s system) are combined, which have the advantage of excellent random sequence to expand the key space, enhance the performance of resisting brute-force attack, and achieve better encryption effect and high level of security.(v)
Fifth, high sensitivity with respect to all secret keys is achieved, which leads to creating a completely different cipher image when applied to the same plain image whenever flipping one bit in a key.Based on the above literature, it is evident that, for generating excellent encryption effects and producing a highly secure encryption scheme, it is needed to design a combination of hyper- and multidimensional chaotic systems through density matrix which describes the quantum state of a system.


## 2. Preliminary Knowledge

### 2.1. Chen’s Hyperchaotic System

In order to improve the security and efficiency performance, many image encryption methods based on three-dimensional chaotic systems, hyperchaos, and even spatiotemporal chaos have been presented in recent years [25].In 1963, Lorenz [26] found the first chaotic attractor in a three-dimensional autonomous system:(1)x˙=ay−x,y˙=cx−xz−y,z˙=xy−bz,where a, b, and c are constant parameters of the system. Typically, when a = 10, b = 8/3, and c = 28, the system is in a chaotic state.In 1999, Chen [27] discovered another chaotic system with more complex dynamic behaviors than Lorenz system when studying chaotic feedback control. Chen’s hyperchaotic system is defined as follows:(2)x˙1=ax2−x1,x˙2=−x1x3+dx1+cx2−x4,x˙3=x1x2−bx3,x˙4=x1+k,where a, b, c, d, and k are the system parameters. In this system, when the values of the parameters (a, b, c, d, k) = (36, 3, 28, −16, −0.7 <k <0.7), the system is hyperchaotic in a very wide parameter range in this case and has many more interesting complex dynamical behaviors than those of Lorenz system. The hyperchaos attractors of this system are shown in Figure 1, while the corresponding bifurcation diagram of state x with respect to k is given in Figure 2.Figure 1
x−yx−zFigure 1
Hyperchaos attractors of Chen’s chaotic system: (a) Distribution in the direction ofx-y-z. (b) Plane graph of x-y. (c) Plane graph of y-z. (d) Plane graph of x-z.
(a)(b)(c)(d)Figure 2
Bifurcation diagram of Chen’s chaotic system with parameterk.Its Lyapunov exponents areλ1=1.552,λ2=0.023,λ3=0,λ4=−12.573; Lyapunov exponents for this system are depicted in Figure 3. As the hyperchaos has four positive Lyapunov exponents, the prediction time of a hyperchaotic system is shorter than that of a chaotic system [28]; as a result, it is safer than chaos in security algorithm.Figure 3
Phase diagram of quantum logistic map.


### 2.2. 3D Quantum Logistic Chaotic Map

Quantum chaotic systems are the quantized of classical chaotic system, such as quantum logistic map which [1, 29, 30] is constructed by the classical logistic system and that is a perfect example of complex chaotic maps which arises from nonlinear dynamical equations. Classical chaotic maps have a small range for key space as they suffer from low control parameters which in turn lead to a limited chaotic range, whereas the chaotic maps with higher dimensional as the used one in the proposed scheme can be lead to increase the key space range, have excessive complexity, high degree of randomness, and high sensitivity to initial conditions and control parameters. Therefore, quantum logistic system is suitable as seed system in encryption algorithm.Based on the classical logistic map and the effect of quantum correlations on a dissipative system [31], the proposed quantum logistic map was applied to image encryption, which can be defined as follows:(3)xn+1=rxn−xn2−ryn,yn+1=−yne−2β+e−βr2−xn−xn∗yn−xnzn∗−xn∗zn,zn+1=−zne−2β+e−βr21−xn∗zn−2xnyn−xn,where β is dissipation parameter and γ represents control parameter. However, the initial conditions xn,yn,zn are set as real numbers to meet the requirement of communication. Figure 3 shows the phase diagram of quantum logistic map, and its bifurcation diagram is displayed in Figure 4.Figure 4
Bifurcation diagram of quantum logistic map.


## 2.1. Chen’s Hyperchaotic System

In order to improve the security and efficiency performance, many image encryption methods based on three-dimensional chaotic systems, hyperchaos, and even spatiotemporal chaos have been presented in recent years [25].In 1963, Lorenz [26] found the first chaotic attractor in a three-dimensional autonomous system:(1)x˙=ay−x,y˙=cx−xz−y,z˙=xy−bz,where a, b, and c are constant parameters of the system. Typically, when a = 10, b = 8/3, and c = 28, the system is in a chaotic state.In 1999, Chen [27] discovered another chaotic system with more complex dynamic behaviors than Lorenz system when studying chaotic feedback control. Chen’s hyperchaotic system is defined as follows:(2)x˙1=ax2−x1,x˙2=−x1x3+dx1+cx2−x4,x˙3=x1x2−bx3,x˙4=x1+k,where a, b, c, d, and k are the system parameters. In this system, when the values of the parameters (a, b, c, d, k) = (36, 3, 28, −16, −0.7 <k <0.7), the system is hyperchaotic in a very wide parameter range in this case and has many more interesting complex dynamical behaviors than those of Lorenz system. The hyperchaos attractors of this system are shown in Figure 1, while the corresponding bifurcation diagram of state x with respect to k is given in Figure 2.Figure 1
x−yx−zFigure 1
Hyperchaos attractors of Chen’s chaotic system: (a) Distribution in the direction ofx-y-z. (b) Plane graph of x-y. (c) Plane graph of y-z. (d) Plane graph of x-z.
(a)(b)(c)(d)Figure 2
Bifurcation diagram of Chen’s chaotic system with parameterk.Its Lyapunov exponents areλ1=1.552,λ2=0.023,λ3=0,λ4=−12.573; Lyapunov exponents for this system are depicted in Figure 3. As the hyperchaos has four positive Lyapunov exponents, the prediction time of a hyperchaotic system is shorter than that of a chaotic system [28]; as a result, it is safer than chaos in security algorithm.Figure 3
Phase diagram of quantum logistic map.


## 2.2. 3D Quantum Logistic Chaotic Map

Quantum chaotic systems are the quantized of classical chaotic system, such as quantum logistic map which [1, 29, 30] is constructed by the classical logistic system and that is a perfect example of complex chaotic maps which arises from nonlinear dynamical equations. Classical chaotic maps have a small range for key space as they suffer from low control parameters which in turn lead to a limited chaotic range, whereas the chaotic maps with higher dimensional as the used one in the proposed scheme can be lead to increase the key space range, have excessive complexity, high degree of randomness, and high sensitivity to initial conditions and control parameters. Therefore, quantum logistic system is suitable as seed system in encryption algorithm.Based on the classical logistic map and the effect of quantum correlations on a dissipative system [31], the proposed quantum logistic map was applied to image encryption, which can be defined as follows:(3)xn+1=rxn−xn2−ryn,yn+1=−yne−2β+e−βr2−xn−xn∗yn−xnzn∗−xn∗zn,zn+1=−zne−2β+e−βr21−xn∗zn−2xnyn−xn,where β is dissipation parameter and γ represents control parameter. However, the initial conditions xn,yn,zn are set as real numbers to meet the requirement of communication. Figure 3 shows the phase diagram of quantum logistic map, and its bifurcation diagram is displayed in Figure 4.Figure 4
Bifurcation diagram of quantum logistic map.


## 3. The Proposed Image Encryption and Decryption Scheme

### 3.1. Image Encryption Process

This section presents the details of the design of the proposed method based on the adopted fundamental Fridrich’s permutation-diffusion model, hyperchaotic system, and a 3D quantum logistic mapping. The proposed algorithm is designed in the context of sensitive information of digital color and gray images. Consider a color imageI with size W×H, where W and H represent the image’s rows and columns, respectively. The R,G, and B components of I are denoted as R, G, and B, respectively. The proposed framework consists of four main phases, and the details of these phases are presented as follows:(i)
The first phase is key extraction from a plain image through computing the mean of any of the four edges of the plain image and then utilizing that mean to make a number of iterations for both Chen’s hyperchaotic system and the quantum logistic map in order to modify the initial seeds and control parameters for them.(ii)
Iterate continuously Chen’s hyperchaotic systemW×H times to generate a random sequence of integers EI whose values range from [0…255], where the length of sequence EI, that is, n, will be equal to the number of pixels in the image. Then split it into three chaotic sequences EiR,EiG,EiB which are computed using the following equations:(4)EiRi,j=unit8roundmodabsx−floorabsx∗1014,256,EiGi,j=unit8roundmodabsy−floorabsy∗1014,256,EiBi,j=unit8roundmodabsz−floorabsz∗1014,256,where i=1,2,…,W×H.(iii)
Diffuse three components of the plain image by the random sequences generated by 3D hyperchaotic system to obtain their corresponding cipher sequences. The diffusion process is performed by implementing XOR operation as follows:(5)CiR=PiR⊕EiR,CiG=PiG⊕EiG,CiB=PiB⊕EiB.(iv)
Perform quantum logistic map to produce a chaotic sequenceQi; after that separate it into three channels QiR,QiG,QiB which can be calculated as follows:(6)QiR=modfloorε1∗xi+1+ε2,256,i=1,2,…,W×H,QiG=modfloorε1∗yi+1+ε2,256,i=1,2,…,W×H,QiB=modfloorε1∗zi+1+ε2,256,i=1,2,…,W×H,whereε1,ε2 are two large prime numbers and xi+1,yi+1,andzi+1 are random sequences which are generated by 3D quantum logistic map (3).(v)
Generate density matrixH using the following equations:(7)H11=p+1−p∗cosa22,H12=1−p∗sina2∗∗cosa2,H21=1−p∗sina2∗cosa2,H22=1−p∗sina22,wherep is probability and a is angle.(vi)
The diffused layersCiR,CiG,CiB and chaotic sequences are produced by the 3D chaotic logistic map QiR,QiG,QiB which are expressed as a quantum superposition state, using the XNOR function as follows:(8)SCiR=CiR⊕H¯,SCiG=CiG⊕H¯,SCiB=CiB⊕H¯,SQiB=QiB⊕H¯,SQiB=QiB⊕H¯,SQiB=QiB⊕H¯,where operator⊕¯ denotes bitwise exclusive NOR.(vii)
Finally, the final cipher channelsFCiR,FCiG,FCiB are obtained by applying XNOR function on both a unitary matrix generated by logistic chaos SQiR,SQiG,SQiB and the diffused components SCiR,SCiG,SCiB generated density matrix to confuse and diffuse pixels simultaneously, which can be expressed as follows:(9)FCiR=SCiR⊕SQiR¯,FCiG=SCiG⊕SQiG¯,FCiB=SCiB⊕SQiB¯.(viii)
CombineFCiR,FCiG,andFCiB into a chaotic matrix FCi with transpose rows and columns of the border of the image to get the final cipher image CW×H.The sketch of the proposed encryption scheme is exhibited in Figure5 with a succinct explanation of each phase presented herewith while the specific implementation process of the proposed image encryption scheme is presented in Algorithm 1.Figure 5
Block diagram of the proposed image encryption algorithm.Algorithm 1: Image encryption method.
Input: Plain ImageP of size W×H, initial conditions and control parameters for hyperchaotic system (3D Chen’s system), and seeds for the chaotic generator.Output: Cipher ImageC of size W×HStep 1: Plain imageP is resized to a dimension of W−2×H−2 pixels and is stored as P2, and compute the mean M of any of the edges of the plain image P.Step 2: Iterate both Chen’s hyperchaotic system (equation (2)) and quantum logistic map (equation (3)) M times according to the computed mean M.Step 3: Generate three chaotic sequencesEiR,EiG,EiB by using a hyperchaotic system with given parameters and initial state values as secret keys.Step 4: Separate each of the color pixelPi∈P2 of the resized image P2 into its three grayscale components of PiR,PiG,PiB, then apply XOR function between three components PiR,PiG,PiB of the resized image P2 and three chaotic sequences EiR,EiG,EiB produced by chen’s hyperchaotic system. The result is considered as diffused R, G, and B components, which are CiR,CiG,CiB.Step 5: Quantum logistic map is initiated and utilized to generate a chaotic keystream sequenceQi, after that split it into R, G, and B components QiR,QiG,QiB.Step 6: Generate Density matrix which is described as Hermitian matrixHW−2×H−2.Step 7: Employ Density matrix on the diffusion componentsCiR,CiG,CiB, as well as the output of quantum logistic map QiR,QiG,QiB using XNOR function to put each of them in a superposition environment.Step 8: The three components of the cipher imageFCiR,FCiG,FCiB are generated by XNORing the output of applying density matrix on the diffused components SCiR,SCiG,SCiB, and quantum logistic map SQiR,SQiG,SQiB.Step 9: Take transpose of the edges of the plain imageP in order to increase the randomness within the plain image by shuffling the pixels.Step 10: Recombine the cipher imageFC with the shuffled edges of the plain image P to obtain the final cipher image C.


### 3.2. Decryption Method

The architecture of the proposed decryption algorithm is shown in Figure6, which is applied on a cipher image to produce a plain image.Figure 6
Block diagram of the proposed image decryption algorithm.Algorithm 2: Image decryption method.
Input: Cipher ImageC of size W×HOutput: Decrypted ImageP of size W×HSteps: Inverse steps of image encryption routine are carried out in the reverse order using the same encryption keys.


## 3.1. Image Encryption Process

This section presents the details of the design of the proposed method based on the adopted fundamental Fridrich’s permutation-diffusion model, hyperchaotic system, and a 3D quantum logistic mapping. The proposed algorithm is designed in the context of sensitive information of digital color and gray images. Consider a color imageI with size W×H, where W and H represent the image’s rows and columns, respectively. The R,G, and B components of I are denoted as R, G, and B, respectively. The proposed framework consists of four main phases, and the details of these phases are presented as follows:(i)
The first phase is key extraction from a plain image through computing the mean of any of the four edges of the plain image and then utilizing that mean to make a number of iterations for both Chen’s hyperchaotic system and the quantum logistic map in order to modify the initial seeds and control parameters for them.(ii)
Iterate continuously Chen’s hyperchaotic systemW×H times to generate a random sequence of integers EI whose values range from [0…255], where the length of sequence EI, that is, n, will be equal to the number of pixels in the image. Then split it into three chaotic sequences EiR,EiG,EiB which are computed using the following equations:(4)EiRi,j=unit8roundmodabsx−floorabsx∗1014,256,EiGi,j=unit8roundmodabsy−floorabsy∗1014,256,EiBi,j=unit8roundmodabsz−floorabsz∗1014,256,where i=1,2,…,W×H.(iii)
Diffuse three components of the plain image by the random sequences generated by 3D hyperchaotic system to obtain their corresponding cipher sequences. The diffusion process is performed by implementing XOR operation as follows:(5)CiR=PiR⊕EiR,CiG=PiG⊕EiG,CiB=PiB⊕EiB.(iv)
Perform quantum logistic map to produce a chaotic sequenceQi; after that separate it into three channels QiR,QiG,QiB which can be calculated as follows:(6)QiR=modfloorε1∗xi+1+ε2,256,i=1,2,…,W×H,QiG=modfloorε1∗yi+1+ε2,256,i=1,2,…,W×H,QiB=modfloorε1∗zi+1+ε2,256,i=1,2,…,W×H,whereε1,ε2 are two large prime numbers and xi+1,yi+1,andzi+1 are random sequences which are generated by 3D quantum logistic map (3).(v)
Generate density matrixH using the following equations:(7)H11=p+1−p∗cosa22,H12=1−p∗sina2∗∗cosa2,H21=1−p∗sina2∗cosa2,H22=1−p∗sina22,wherep is probability and a is angle.(vi)
The diffused layersCiR,CiG,CiB and chaotic sequences are produced by the 3D chaotic logistic map QiR,QiG,QiB which are expressed as a quantum superposition state, using the XNOR function as follows:(8)SCiR=CiR⊕H¯,SCiG=CiG⊕H¯,SCiB=CiB⊕H¯,SQiB=QiB⊕H¯,SQiB=QiB⊕H¯,SQiB=QiB⊕H¯,where operator⊕¯ denotes bitwise exclusive NOR.(vii)
Finally, the final cipher channelsFCiR,FCiG,FCiB are obtained by applying XNOR function on both a unitary matrix generated by logistic chaos SQiR,SQiG,SQiB and the diffused components SCiR,SCiG,SCiB generated density matrix to confuse and diffuse pixels simultaneously, which can be expressed as follows:(9)FCiR=SCiR⊕SQiR¯,FCiG=SCiG⊕SQiG¯,FCiB=SCiB⊕SQiB¯.(viii)
CombineFCiR,FCiG,andFCiB into a chaotic matrix FCi with transpose rows and columns of the border of the image to get the final cipher image CW×H.The sketch of the proposed encryption scheme is exhibited in Figure5 with a succinct explanation of each phase presented herewith while the specific implementation process of the proposed image encryption scheme is presented in Algorithm 1.Figure 5
Block diagram of the proposed image encryption algorithm.Algorithm 1: Image encryption method.
Input: Plain ImageP of size W×H, initial conditions and control parameters for hyperchaotic system (3D Chen’s system), and seeds for the chaotic generator.Output: Cipher ImageC of size W×HStep 1: Plain imageP is resized to a dimension of W−2×H−2 pixels and is stored as P2, and compute the mean M of any of the edges of the plain image P.Step 2: Iterate both Chen’s hyperchaotic system (equation (2)) and quantum logistic map (equation (3)) M times according to the computed mean M.Step 3: Generate three chaotic sequencesEiR,EiG,EiB by using a hyperchaotic system with given parameters and initial state values as secret keys.Step 4: Separate each of the color pixelPi∈P2 of the resized image P2 into its three grayscale components of PiR,PiG,PiB, then apply XOR function between three components PiR,PiG,PiB of the resized image P2 and three chaotic sequences EiR,EiG,EiB produced by chen’s hyperchaotic system. The result is considered as diffused R, G, and B components, which are CiR,CiG,CiB.Step 5: Quantum logistic map is initiated and utilized to generate a chaotic keystream sequenceQi, after that split it into R, G, and B components QiR,QiG,QiB.Step 6: Generate Density matrix which is described as Hermitian matrixHW−2×H−2.Step 7: Employ Density matrix on the diffusion componentsCiR,CiG,CiB, as well as the output of quantum logistic map QiR,QiG,QiB using XNOR function to put each of them in a superposition environment.Step 8: The three components of the cipher imageFCiR,FCiG,FCiB are generated by XNORing the output of applying density matrix on the diffused components SCiR,SCiG,SCiB, and quantum logistic map SQiR,SQiG,SQiB.Step 9: Take transpose of the edges of the plain imageP in order to increase the randomness within the plain image by shuffling the pixels.Step 10: Recombine the cipher imageFC with the shuffled edges of the plain image P to obtain the final cipher image C.


## 3.2. Decryption Method

The architecture of the proposed decryption algorithm is shown in Figure6, which is applied on a cipher image to produce a plain image.Figure 6
Block diagram of the proposed image decryption algorithm.Algorithm 2: Image decryption method.
Input: Cipher ImageC of size W×HOutput: Decrypted ImageP of size W×HSteps: Inverse steps of image encryption routine are carried out in the reverse order using the same encryption keys.


## 4. Experimental Results and Numerical Analysis

Due to the absence of a practical and functional quantum computer, the experimental results are performed with MATLAB R2017b platform on a classical computer to verify the security and effectiveness of the proposed quantum image encryption algorithm. The operation system used is Windows 10 Professional operating system with the specific configuration being i7-8550U applied as the central processing unit (CPU) and the random-access memory (RAM) adopted is 8 GB.For simulation, the control parameters and initial values of Chen’s hyperchaotic system, given in (2), are set as a = 36, b = 3, c = 28, and d = −16, and x0 = 0.3, y0 = −0.4, z0 = 1.2, and q = 1, we carry out the encryption scheme. The keys for this proposed cryptosystem include the iteration times of Chen’s hyperchaotic system and quantum logistic chaotic map M, where the discarded number M is set according to the mean of plain image. For color images, the encryption key is the same in RGB channels.To demonstrate the practical benefits of the proposed image encryption scheme, a number of experiments were performed based on the USC-SIPI (the University of Southern California Signal and Image Processing Institute) Image Database [32]. This database is divided into four groups of images: Textures (64 images), Aerials (38 images), Miscellaneous (39 images), and Sequences (69 images). Each group contains images of various sizes m × m, m = 256, 512, 1024. Different sample images (gray and color) are chosen as test images from the USC-SIPI “Miscellaneous” dataset and the simulation results of these encryption and decryption images are presented in Figure 7, where the plain images of “Aerial,” “Boat,” “Male,” “Airplane,” “Lena,” and “Baboon” are shown in Figures 7(a)–7(f), their corresponding cipher images are shown in Figures 7(g)–7(l), and the recovery images from decryption process with correct secret keys are shown in Figures 7(m)–7(r) which are identical to the original images, and their detailed information is listed in Table 1.Figure 7
Encryption and decryption results: ((a)–(f)) plain images of “Aerial,” “Boat,” “Male,” “Airplane,” “Lena,” and “Baboon”; ((g)–(l)) the corresponding encrypted images; and ((m)–(r)) decrypted images.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)Table 1
Selected test images.
ImageAerialBoatMaleAirplaneLenaBaboonSize256 × 256512 × 5121024 × 1024256 × 256512 × 5121024 × 1024TypeGrayscaleGrayscaleGrayscaleColorColorColorAs illustrated in Figures7(g)–7(l) that the proposed encryption scheme can encrypt different size images, besides that it destroys the obvious pattern of the plain image and makes the ciphered image display a space filling with a noise-like pattern which makes the ciphered image seem random to the intruder. Therefore, the proposed encryption algorithm has good encryption and decryption effect; it can attain the image data security and appearance security. The quantitative performance of the newly resulted image encryption algorithm could be measured through different evaluation parameters, including statistical, differential, sensitivity, and key space metrics. Each of these measures is discussed in detail in the accompanying subsections.


### 4.1. Key Space Analysis

The key space of a cryptosystem is the very important factor on security when brute-force attack is happening. For high-security cryptosystem, it should be highly sensitive to a tiny change in the cryptographic keys and the key space is suggested to be much larger than2100 to resist exhaustive attack effectively [33–36]. Moreover, the keys should be easy to establish and exchange for practical communication. The key space is the total number of different keys that can be used in the encryption/decryption procedure. According to the algorithm structure, the secret key format should consist of the following: (1) The parameters of Chen’s hyperchaotic system are a, b, c, d, and k and each of the original variables (x1, x2, x3, x4) has 2 decimal places; there exist 102 possible values for each value. This contributes to 6 possible guesses of value. This applies to (a, b, c, d, k, x1, x2, x3, x4) as well. Thus, there are 254 possible values of (a, b, c, d, k, x1, x2, x3, x4). (2) The initial values of hyperchaotic system (x1, x2, x3) are obtained by iterating system; each has 14 decimal places with the range between 0 and 1, and there exist 1014 possible values for each value. This contributes to 246.5 possible guesses of value. This applies to (x1, x2, x3) as well. Thus, there are 2139.5 possible values of (x1, x2, x3). (3) Parameters β and r are used in the quantum logistic chaotic map, where β consists of 4 decimal places; there exist 104 possible values for each value. This contributes to 212 possible guesses of its value and r consists of 2 decimal places, and there exist 102 possible values for each value. This contributes to 26 possible guesses of its value. Thus, there are 218 possible values of β and r. (4) Each initial value of quantum map consists of 12 decimal places with the range between 0 and 1; there exist 1012 possible values for each value. This contributes to 240 possible guesses of value. This applies to (x0, y0, z0) as well. Thus, there are 2120 possible values of x0, y0, and z0. (5) Two large prime numbers are of 8 decimal places with the range between 0 and 1; there exist 108 possible values for each value. This contributes to 226 possible guesses of value. This applies to ε1,ε2 as well. Thus, there are 252 possible values of ε1,ε2. (6) Density matrix has probability p and an angle a, where p has only one decimal place with the range between 0 and 1, and a has 2 decimal places; thus there exist 101 possible values for p; this contributes to 23 possible guesses of value, whereas there exist 102 possible values for a; this contributes to 26 possible guesses of value. This contributes to 210 possible guesses of value. Thus, there are 29 possible values of p,a.Consequently, the overall key space of the proposed image encryption scheme is(10)TOTAL KEY SPACE=254∗218∗2139.5∗2120∗252∗29=254+139.5+120+52+20=2392.5.As a result, the key space is reasonably large enough for the cryptosystem to withstand exhaustive attacks and even quantum computer attacks. Table2 shows the key space comparison of similar recent algorithms. Obviously, the proposed encryption algorithm has larger key compared to the existing works [4, 15, 24, 35, 37], which is sufficiently large to resist all presently known brute-force attacks.Table 2
Key space comparative analysis.
Encryption schemeKey spaceRef. [4]2256Ref. [15]2125Ref. [24]1015×3 + 2256Ref. [35]2186Ref. [37]2364Proposed algorithm2392.5


### 4.2. Key Sensitivity Analysis

To resist violent attacks, a password system should be highly sensitive. Hence, key sensitivity [37–40] is an important index to measure the strength of encryption algorithm. The key sensitivity of an image cryptosystem can be evaluated in two aspects: First, the cipher image will be completely different when encrypting the same plain image with slightly different keys, which is measured by the change rate t of the cipher image. Second, a small change in the decryption key makes a huge difference to the result, and the original image will not be decrypted correctly, indicating that the algorithm has a high sensitivity. The Lena color image with size 512 × 512 is utilized to verify the sensitivity of the suggested image encryption scheme. During the test process, one of the keys has undergone a tiny change, while other keys were kept untouched. Suppose that K1 and K2 are the two keys that are slightly different from each other, which gives encrypted outputs of E1 and E2, respectively, where K1 is the correct key and K2 is the wrong one. In the proposed cryptosystem, the control parameters of Chen’s hyperchaos system are set as a = 36, b = 3, c = 28, and d = −16, and the initial values of the system are x0 = 0.3, y0 = −0.4, z0 = 1.2, and q = 1, which are denoted as K1, to obtain encrypted image E1. Another encrypted image E2 is generated with a tiny change in only x0 (x0 = 0.4, y0 = −0.4, z0 = 1.2, and q = 1), which are denoted as K2. As shown in Figures 8(b) and 8(c), the image encrypted using K1 is completely different from the image encrypted using K2. From the result, as shown in Figures 8(e) and 8(f), it is clear that decryption of the encrypted image is possible only when we use the same key. Therefore, it can be seen that only a subtle difference in the secret key can have a huge effect which guarantees the security against brute-force attacks and known plain-text attacks.Figure 8
Key sensitivity analysis. (a) Plain image, (b) correctly encrypted image (E1), (c) incorrectly encrypted image (E2), (d) difference of E1 and E2, (e) incorrectly decrypted image, and (f) correctly decrypted image.
(a)(b)(c)(d)(e)(f)


### 4.3. Statistical Attack Analysis

To verify the security performance of the proposed algorithm, the statistical analyses including histogram, correlation, and entropy analysis are demonstrated in this subsection.


#### 4.3.1. Histogram Statistical Analysis

Histogram statistical analysis is a kind of statistical attack, and the histogram can characterize the image. It has been widely used in image retrieval, classification, and other fields [41–47]. Image histogram is probability density function of discrete gray level, plotted by gray level on horizontal axis and the corresponding frequency on the vertical. The more uniform the histogram distribution for the encrypted image, the stronger the ability of antistatistical analysis. Therefore, the elimination of correlation among pixels was necessary, and pixels of the encrypted image had to be distributed evenly to prevent the opponent from extracting any useful information from the fluctuating histogram. In addition, comparing cipher image histogram with the original image histogram, there is a significant difference.We have analyzed the histograms of two original images as well as their encryptions using the proposed approach. The histogram of the original grayscale image of “Boat” with dimensions 512 × 512 pixels and the histogram of its cipher image are shown in Figure9, while Figure 10 illustrates the histograms of the R, G, and B channels of the color plain image “Lena” alongside its encrypted counterparts with the size 512 × 512, respectively.Figure 9
Histogram distribution analysis of plain and encrypted grayscale image. (a) Plain grayscale “Boat” image; (b) encrypted grayscale “Boat” image.
(a)(b)Figure 10
RGB color histogram of original “Lena” image and its corresponding cipher image.Clearly, it can be seen from Figures9 and 10 that the histograms of the original images have obvious peaks, and the gray value and RGB component histogram of cipher images are very uniform and flat distribution, which indicates that the attack based on histogram analysis is difficult as attackers cannot use a statistical attack to obtain any useful information by analyzing the histogram of the encrypted image. Thus, the proposed scheme is strong enough to withstand statistical attacks.Consequently, it is concluded that the proposed image encryption scheme can achieve good performance and meet the requirements of image encryption.Furthermore, for quantity analyses of the image histogram, a metric called variance of the histogram (var) is measured to evaluate and guarantee the uniformity of pixels values of the encrypted images. The higher the uniformity of ciphered images, the lower the value of variances of histogram [48]. The variance of histogram can be computed as follows:(11)varH=1n2∑i=1n∑j=1n12hi−hj2,where H=h1,h2,…,h256 is a one-dimensional array of the histogram values; hiandhj are considered as the numbers of pixels where gray values are equal to iandj, respectively. Tables 3 and 4 display the values of histogram variance for the experimented grayscale and color images, respectively, and illustrate that the variance of images after encryption is greatly reduced when compared with the variance of those images prior to encryption.Table 3
Variance of histogram for encrypted grayscale images.
Image nameVariance valuePlain imageCipher imageAerial51062780.8235Boat1541901.80399791.7098Male11393958.6980138136.8627Table 4
Variance of histogram for encrypted color images.
Image nameVariance valuePlain imageCipher imageRGBRGBAirplane165621.8980163801.6941274155.3333783.1607765.4039796.7137Lena1021383.0980457505.93721382757.26278929.44318930.28239570.1019Baboon6346579.184310106060.69805938608.9490133133.6470135706.9490136423.2078The simulation results indicate that the difference in variance value shows that the histogram depends on the plain image; in addition, the proposed algorithm can strongly withstand statistical analysis attack as it is efficient to prevent attackers from obtaining any useful statistical information to decrypt the cipher image.


#### 4.3.2. Correlation Coefficient Analysis

It is known that some algorithm was broken by using correlation analysis between the adjacent pixels. So, correlation coefficient analysis [49–52] is performed to evaluate the statistical relationship between image pixels, and its value is in the range of [−1, 1]. This type of analysis visually shows the distribution between the neighborhood pixels of both the original and encrypted images.Due to the intrinsic features of the digital image [53], there is a strong correlation between the adjacent pixels, namely, the gray value of one pixel of the plaintext image is very close to the gray value of the surrounding pixels. Therefore, attackers could try to infer adjacent pixel values based on probability theory. Conversely, in order to resist the statistical attack and achieve better security of the encrypted image, an excellent image encryption algorithm should be able to break high correlation between adjacent pixels of the plain image and produce a very small correlation value near the optimal value of zero.Normally, three different types of correlation are performed to ensure the strength of the encrypted image: the horizontal, the vertical, and the diagonal correlation [54]. To evaluate the proposed encryption scheme, 3000 pairs of adjacent pixels are selected randomly in the three different adjacent directions in both original and encrypted images of the different sample images to calculate the correlation coefficient. Then, the correlation coefficient rxy of each pair, defined in (12), is calculated as follows:(12)rxy=covx,yDx×Dy,covx,y=1N∑i=1Nxi−Exyi−Ey,Dx=1N∑i=1Nxi−Ex2,Ex=1N∑i=1Nxi,where xi and yi are the grayscale pixel values of the ith pair of the selected adjacent pixels in the tested image, N is the total number of the randomized chosen samples, covx,y is the covariance of x and y, and Ex and Dx represent the mean value and the variance of vector x, respectively.Figures11 and 12 show the correlation distribution between neighborhood pixels in the three directions of the grayscale “Boat” image and color “Lena” image with size 512 × 512 before and after image encryption. It is obvious that the correlation of adjacent pixel pairs of the plain image is distributed intensively, but those of encrypted image are scattered randomly which looks very uniform, and the correlation is greatly reduced.Figure 11
Adjacent pixel correlation test for plain grayscale “Boat” image (a) and the corresponding encrypted image (b) for horizontal, vertical, and diagonal directions.Figure 12
Correlation distribution of color “Lena” image: (a)–(c) show RGB layers of plain image; (d)–(f) show RGB layers of cipher image for vertical, horizontal, and diagonal directions, respectively.
(a)(b)(c)(d)(e)(f)Numerically, Table5 demonstrates values of correlation coefficient parameter for the proposed technique in different test images with diverse sizes. According to the quantitative results, it can be concluded that the correlation degrees between adjacent pixels in the plain images are close to 1, while those of the encrypted images are very small and are close to 0, which means that the plain image has strong relationships, but weakness exists in the encrypted image. Therefore, these results show that the proposed image encryption scheme has a good performance in fighting against attacks based on statistical properties of the images.Table 5
Correlation coefficients results.
Image namePlain imageCipher imageVerticalHorizontalDiagonalVerticalHorizontalDiagonalAerial0.86020.90500.82130.0062−0.00170.0031Boat0.97130.93810.9222−0.00120.00070.0004Male0.98130.97740.96710.00010.00020.0023Airplane0.91740.93140.86430.00610.01090.0012Lena0.99020.98040.96950.0040−0.0003−0.0012Baboon0.97650.98770.96710.00230.00120.0001


#### 4.3.3. Information Entropy Analysis

Information entropy [55–57] is the most important criterion to evaluate the efficiency of an image encryption algorithm. In information theory, the entropy parameter is considered as the standard to test randomness. For a digital image, information entropy (IE) is one of the outstanding criteria that is usually utilized to evaluate the degree of disorder or randomness of each gray value in the encrypted image and measure the amount of information hidden in an image. The color-level distribution values in an image can also be determined via entropy analysis. Ideally, in the case of 8-bit grayscale image, a robust encryption scheme has an entropy value of 8; otherwise, it causes a plausibility of consistency which undermines its security. The closer the value is to 8, the greater the uncertainty is and the stronger the randomness of image is, which leads to better-secured encryption where the less visual information can be obtained from the image. The most famous entropy formula is Shannon’s entropy equation, calculated in terms of the probability of each available data value, which can be defined as follows:(13)IE=−∑i=0255Pilog2Pi,where Pi denotes the probability of occurrence of gray level i in an image, that is, the proportion of the number of pixels with gray value i to all pixels in an image. Besides, to verify the randomness, local Shannon entropy should be applied. It can be calculated by the following operations: ① divide the image into noninterlocked K blocks containing a certain fixed number of pixels; ② compute Shannon entropy IEKi using the former equation (12); ③ calculate the sample mean of global Shannon entropy over all these K image blocks as local Shannon entropy.Table6 presents the simulation results of information entropy and local Shannon entropy values, where K=16, on some standard original images and their respective encrypted images, which were encrypted by the proposed image encryption algorithm. It can be seen that the results reveal that the entropy values of each cipher image are very close to the ideal value of 8, while the information entropy of each plain image is much less than the ideal one. This result makes obtaining image information by analyzing this information difficult for attackers. This indicates that the encrypted images have a good randomness. As a conclusion, the proposed scheme is safe against the perspective of information entropy attack.Table 6
Results of information entropy and local Shannon entropy.
Image nameDimensionInformation entropyLocal Shannon entropyPlain imageCipher imagePlain imageCipher imageAerial256 × 2563.35567.99703.28937.9556Boat512 × 5123.31537.99933.10377.9880Male1024 × 10243.35407.99983.21277.9971Airplane256 × 256 × 36.69067.99876.12807.9834Lena512 × 512 × 37.74957.99977.31367.9959Baboon1024 × 1024 × 37.72087.99997.42817.9990Table7 presents the values of information entropy of the proposed scheme as compared with the values which resulted from other recent schemes. It can be seen that the information entropy of the different cipher images is very close to 8 bits and the proposed algorithm has greater superiority or in the same range.Table 7
Information entropy comparison.
Image nameDimensionInformation entropyProposed SchemeRef. [6]Ref. [39]Ref. [58]Ref. [59]Aerial256×2567.9970——7.9024—Boat512 × 5127.9993—7.9993——Male1024 × 10247.9998—7.9998——Airplane512 × 512 × 37.9997———7.9994Lena512 × 512 × 37.99977.9988——7.9994Baboon512 × 512 × 37.9997———7.9993


### 4.4. Differential Attack Analysis

Differential attacks are another effective and commonly used cryptanalysis technique. A differential attack is attempted to learn the key and figure out the encryption scheme by tracing differences. An Assailant may make a trivial change in the plain image, encrypt two plain images, and then carry out cryptanalysis by tracing the meaningful relationship between two cipher images. According to the principles of cryptography, the encryption algorithm should be sufficiently sensitive to the changes of plaintext image or secrete key in order to keep high security, such that a minor change in the plaintext image or the initial key parameters causes a significant change in the ciphertext image [59–64]; then differential analysis may become useless. The high sensitivity of the system shows that the generated algorithm is sturdy against any probable attack, since it would indicate no meaningful relationship between the plain image and the cipher image. In this test, the number of pixels changing rate (NPCR) and unified average changing intensity (UACI) become two widely used security analyses in the image encryption community for differential attacks. The tests signify the chance of occurrence of the attack and its sensitivity towards the source image by changing the value.ConsideringC1 and C2 as the two cipher images obtained from encrypting two one-pixel different images with M × N size or encrypting same plain image with two secret keys of only 1-bit difference, introduce a bipolar array, D, with the sizes similar to images C1 and C2 as follows:(14)Di,j=0,C1i,j=C2i,j,1,C1i,j≠C2i,j.The NPCR reflects the change rate of the gray value of different pixels at the same position between two corresponding encrypted images which are obtained by two original images with one-bit difference. In other words, NPCR helps us to understand the effect of change of single pixel over an image, while the UACI reflects the average change of the gray value within the two paired cipher images (C1 and C2). Then, the formula used to calculate UACI and NPCR is shown in the two following equations:(15)NPCR=∑i=1M∑j=1NDi,jM×N×100%,(16)UACI=1M×N∑i=1M∑j=1NC1i,j−C2i,j255×100%.Taking the images that are listed in Table1 as examples and experimenting on them for 100 times, the theoretical ideal values of the NPCR and UACI for a gray image are 99.6094% and 33.4635%, respectively. Table 8 lists the test results of NPCR and UACI of grayscale encrypted images, whereas the theoretical values of NPCR and UACI for different color images in three channels are shown in Table 9. It can be observed from the former tables that the proposed image encryption algorithm can achieve better performances against differential attacks, since the values of NPCR and UACI are close to their theoretical values. Thus, the system has guaranteed that the designed system is applicable for real-time communication.Table 8
NPCR and UACI results for cipher grayscale images.
Image nameImage sizeNPCR (%)UACI (%)Aerial256 × 25699.645833.5243Boat512 × 51299.651733.4416Male1024 × 102499.630033.4864Table 9
NPCR and UACI scores on color images of different sizes.
Image nameDimensionNPCR (%)UACI (%)RedGreenBlueRedGreenBlueAirplane256 × 256 × 399.689299.638099.6411333.357233.568133.6369Lena512 × 512 × 399.639499.641799.657433.498033.459333.5460Baboon1024 × 1024 × 399.624199.616899.623833.460733.470233.4707


### 4.5. Known-Plaintext Attack and Chosen-Plaintext Attack Analysis

A cryptosystem is supposed to be secure if it resists all known types of cryptographic attacks. In cryptanalysis, the fundamental assumption enunciated by Kerckhoffs's principle is that encryption and decryption algorithms are known or transparent in a cryptosystem [65–68]. Therefore, the security of the cryptosystem depends on the key rather than the encryption algorithm itself. In the cryptanalysis, there are four traditional cryptanalysis attacks: (1) ciphertext-only attack, (2) known-plaintext attack, (3) chosen-plaintext attack, and (4) chosen-ciphertext attack. Among these attacks, chosen-plaintext attack is the most threatening attack. Therefore, it is claimed that the cryptosystem can resist the other three types of attacks if it can resist the chosen-plaintext attack. In order to assess the resistance of encryption algorithms against the main attacks, two tests are generally used, namely, the known-plaintext attack (KPA) and chosen-plaintext attack (CPA). In known-plaintext attack and chosen-plaintext attack, the attackers usually choose special plaintext and make minor changes to observe the changes of ciphertext. Or they choose some plaintext with linear relationship to observe the characteristics of ciphertext. By using this method, they can obtain secret key. By using this method, they can obtain secret key.In the presented encryption scheme, the mean (M) value of the plaintext image is computed to generate the number of preiterations, which is related chaotic sequences generation, and the initial value of diffusion process. In other words, the generated random sequences are related to the plaintext, and the chaotic systems are sensitive to the initial value. Consequently, the keystream used in the proposed algorithm has a high connection with the plain image, which means that a small change in the plaintext image produces a completely different key, as detailed in the “Key Sensitivity Analysis” section. That means the attacker cannot extract any useful information by encrypting certain selected images because the encrypted image is only relevant to the selected image, which implies the excellent performance in withstanding the known-plaintext attack and chosen-plaintext attack.Besides, to test the ability of defending this kind of attack, both plain images with “pure white” and “pure black” images, their encrypted images, and the corresponding histograms are derived, which are shown in Figure13. From the results, it can be seen that the pixels in the cipher image are uniformly distributed with random noise, and the attacker cannot decrypt other cipher images by using the same keys. By observing the resulting encrypted images, we can find that it is impossible to extract any information from the encrypted images. Therefore, the proposed encryption scheme is sufficiently robust to resist all forms of potential attacks.Figure 13
Simulation result of cryptanalysis tests: (a) all white image; (b) cipher image of (a); (c) histogram of (b); (d) all black image; (e) cipher image of (d); (f) histogram of (e).
(a)(b)(c)(d)(e)(f)


### 4.6. Time Complexity Analysis

Apart from security analysis of the image encryption scheme, performance analysis is also an important aspect to evaluate the encryption/decryption time and time complexity of the algorithm [69, 70]. A good encryption algorithm needs to have a fast encryption time and low computation complexity.The encryption/decryption time can be calculated manually where it is mainly analyzed into six parts as follows: (a) mean for any row column of R, G, and B channels, so its complexity isO1; (b) the cyclic process N times for Chen’s hyperchaotic system quantum logistic chaotic map, so it has complexity of On; (c) the generation of three chaotic sequences ER,EG,EG, which are produced by Chen’s hyperchaotic system with length M × N and hence the time cost is 3×M×N; (c) XOR operation having time complexity of O1; (d) time cost of chaotic map sequences and the generation of random matric being On2=maxO1,On2; (e) the computational cost of density matrix being O1; and (f) the computational cost of XNOR operation being O1. From the above analyses, the total time cost of the proposed scheme is On2, so that the time consumption of proposed scheme hinges on t representing the number of code loops.It can be calculated by using the in-built operations of the software used for implementation. Here, the elapsed time was measured by the tic and toc functions of MATLAB. The running speed of the proposed encryption scheme for a number of standard images with diverse sizesM×M is presented in Table 10. As a result, the proposed scheme reflects the efficiency to be used in practical cases.Table 10
Running time analysis.
Image nameImage sizeEncryption/decryption time (s)Grayscale Aerial256 × 2560.4844Color Airplane256 × 2560.8125Grayscale Boat512 × 5121.4375Color Lena512 × 5123.2969Grayscale Male1024 × 10245.7500Color Baboon1024 × 102413.6250Taking the256×256 “Lena” image as an example, comparative analyses of the execution time among different encryption algorithms are illustrated in Table 11. It is observed that the proposed algorithm runs faster than the referenced algorithms [71–73]. In addition, it has less computational complexity.Table 11
Speed performance analysis (seconds).
Encryption schemeEncryption time (s)Processor speedRAMPlatformRef. [71]3.453 GHz4 GBPython 3.6Ref. [22]13.90——MATLAB R2016bRef. [72]1.67——MATLABRef. [73]9.363.60 GHz32 GBMATLAB R2019bProposed algorithm1.111.80 GHz8 GBMATLAB R2017b


## 4.1. Key Space Analysis

The key space of a cryptosystem is the very important factor on security when brute-force attack is happening. For high-security cryptosystem, it should be highly sensitive to a tiny change in the cryptographic keys and the key space is suggested to be much larger than2100 to resist exhaustive attack effectively [33–36]. Moreover, the keys should be easy to establish and exchange for practical communication. The key space is the total number of different keys that can be used in the encryption/decryption procedure. According to the algorithm structure, the secret key format should consist of the following: (1) The parameters of Chen’s hyperchaotic system are a, b, c, d, and k and each of the original variables (x1, x2, x3, x4) has 2 decimal places; there exist 102 possible values for each value. This contributes to 6 possible guesses of value. This applies to (a, b, c, d, k, x1, x2, x3, x4) as well. Thus, there are 254 possible values of (a, b, c, d, k, x1, x2, x3, x4). (2) The initial values of hyperchaotic system (x1, x2, x3) are obtained by iterating system; each has 14 decimal places with the range between 0 and 1, and there exist 1014 possible values for each value. This contributes to 246.5 possible guesses of value. This applies to (x1, x2, x3) as well. Thus, there are 2139.5 possible values of (x1, x2, x3). (3) Parameters β and r are used in the quantum logistic chaotic map, where β consists of 4 decimal places; there exist 104 possible values for each value. This contributes to 212 possible guesses of its value and r consists of 2 decimal places, and there exist 102 possible values for each value. This contributes to 26 possible guesses of its value. Thus, there are 218 possible values of β and r. (4) Each initial value of quantum map consists of 12 decimal places with the range between 0 and 1; there exist 1012 possible values for each value. This contributes to 240 possible guesses of value. This applies to (x0, y0, z0) as well. Thus, there are 2120 possible values of x0, y0, and z0. (5) Two large prime numbers are of 8 decimal places with the range between 0 and 1; there exist 108 possible values for each value. This contributes to 226 possible guesses of value. This applies to ε1,ε2 as well. Thus, there are 252 possible values of ε1,ε2. (6) Density matrix has probability p and an angle a, where p has only one decimal place with the range between 0 and 1, and a has 2 decimal places; thus there exist 101 possible values for p; this contributes to 23 possible guesses of value, whereas there exist 102 possible values for a; this contributes to 26 possible guesses of value. This contributes to 210 possible guesses of value. Thus, there are 29 possible values of p,a.Consequently, the overall key space of the proposed image encryption scheme is(10)TOTAL KEY SPACE=254∗218∗2139.5∗2120∗252∗29=254+139.5+120+52+20=2392.5.As a result, the key space is reasonably large enough for the cryptosystem to withstand exhaustive attacks and even quantum computer attacks. Table2 shows the key space comparison of similar recent algorithms. Obviously, the proposed encryption algorithm has larger key compared to the existing works [4, 15, 24, 35, 37], which is sufficiently large to resist all presently known brute-force attacks.Table 2
Key space comparative analysis.
Encryption schemeKey spaceRef. [4]2256Ref. [15]2125Ref. [24]1015×3 + 2256Ref. [35]2186Ref. [37]2364Proposed algorithm2392.5


## 4.2. Key Sensitivity Analysis

To resist violent attacks, a password system should be highly sensitive. Hence, key sensitivity [37–40] is an important index to measure the strength of encryption algorithm. The key sensitivity of an image cryptosystem can be evaluated in two aspects: First, the cipher image will be completely different when encrypting the same plain image with slightly different keys, which is measured by the change rate t of the cipher image. Second, a small change in the decryption key makes a huge difference to the result, and the original image will not be decrypted correctly, indicating that the algorithm has a high sensitivity. The Lena color image with size 512 × 512 is utilized to verify the sensitivity of the suggested image encryption scheme. During the test process, one of the keys has undergone a tiny change, while other keys were kept untouched. Suppose that K1 and K2 are the two keys that are slightly different from each other, which gives encrypted outputs of E1 and E2, respectively, where K1 is the correct key and K2 is the wrong one. In the proposed cryptosystem, the control parameters of Chen’s hyperchaos system are set as a = 36, b = 3, c = 28, and d = −16, and the initial values of the system are x0 = 0.3, y0 = −0.4, z0 = 1.2, and q = 1, which are denoted as K1, to obtain encrypted image E1. Another encrypted image E2 is generated with a tiny change in only x0 (x0 = 0.4, y0 = −0.4, z0 = 1.2, and q = 1), which are denoted as K2. As shown in Figures 8(b) and 8(c), the image encrypted using K1 is completely different from the image encrypted using K2. From the result, as shown in Figures 8(e) and 8(f), it is clear that decryption of the encrypted image is possible only when we use the same key. Therefore, it can be seen that only a subtle difference in the secret key can have a huge effect which guarantees the security against brute-force attacks and known plain-text attacks.Figure 8
Key sensitivity analysis. (a) Plain image, (b) correctly encrypted image (E1), (c) incorrectly encrypted image (E2), (d) difference of E1 and E2, (e) incorrectly decrypted image, and (f) correctly decrypted image.
(a)(b)(c)(d)(e)(f)


## 4.3. Statistical Attack Analysis

To verify the security performance of the proposed algorithm, the statistical analyses including histogram, correlation, and entropy analysis are demonstrated in this subsection.


### 4.3.1. Histogram Statistical Analysis

Histogram statistical analysis is a kind of statistical attack, and the histogram can characterize the image. It has been widely used in image retrieval, classification, and other fields [41–47]. Image histogram is probability density function of discrete gray level, plotted by gray level on horizontal axis and the corresponding frequency on the vertical. The more uniform the histogram distribution for the encrypted image, the stronger the ability of antistatistical analysis. Therefore, the elimination of correlation among pixels was necessary, and pixels of the encrypted image had to be distributed evenly to prevent the opponent from extracting any useful information from the fluctuating histogram. In addition, comparing cipher image histogram with the original image histogram, there is a significant difference.We have analyzed the histograms of two original images as well as their encryptions using the proposed approach. The histogram of the original grayscale image of “Boat” with dimensions 512 × 512 pixels and the histogram of its cipher image are shown in Figure9, while Figure 10 illustrates the histograms of the R, G, and B channels of the color plain image “Lena” alongside its encrypted counterparts with the size 512 × 512, respectively.Figure 9
Histogram distribution analysis of plain and encrypted grayscale image. (a) Plain grayscale “Boat” image; (b) encrypted grayscale “Boat” image.
(a)(b)Figure 10
RGB color histogram of original “Lena” image and its corresponding cipher image.Clearly, it can be seen from Figures9 and 10 that the histograms of the original images have obvious peaks, and the gray value and RGB component histogram of cipher images are very uniform and flat distribution, which indicates that the attack based on histogram analysis is difficult as attackers cannot use a statistical attack to obtain any useful information by analyzing the histogram of the encrypted image. Thus, the proposed scheme is strong enough to withstand statistical attacks.Consequently, it is concluded that the proposed image encryption scheme can achieve good performance and meet the requirements of image encryption.Furthermore, for quantity analyses of the image histogram, a metric called variance of the histogram (var) is measured to evaluate and guarantee the uniformity of pixels values of the encrypted images. The higher the uniformity of ciphered images, the lower the value of variances of histogram [48]. The variance of histogram can be computed as follows:(11)varH=1n2∑i=1n∑j=1n12hi−hj2,where H=h1,h2,…,h256 is a one-dimensional array of the histogram values; hiandhj are considered as the numbers of pixels where gray values are equal to iandj, respectively. Tables 3 and 4 display the values of histogram variance for the experimented grayscale and color images, respectively, and illustrate that the variance of images after encryption is greatly reduced when compared with the variance of those images prior to encryption.Table 3
Variance of histogram for encrypted grayscale images.
Image nameVariance valuePlain imageCipher imageAerial51062780.8235Boat1541901.80399791.7098Male11393958.6980138136.8627Table 4
Variance of histogram for encrypted color images.
Image nameVariance valuePlain imageCipher imageRGBRGBAirplane165621.8980163801.6941274155.3333783.1607765.4039796.7137Lena1021383.0980457505.93721382757.26278929.44318930.28239570.1019Baboon6346579.184310106060.69805938608.9490133133.6470135706.9490136423.2078The simulation results indicate that the difference in variance value shows that the histogram depends on the plain image; in addition, the proposed algorithm can strongly withstand statistical analysis attack as it is efficient to prevent attackers from obtaining any useful statistical information to decrypt the cipher image.


### 4.3.2. Correlation Coefficient Analysis

It is known that some algorithm was broken by using correlation analysis between the adjacent pixels. So, correlation coefficient analysis [49–52] is performed to evaluate the statistical relationship between image pixels, and its value is in the range of [−1, 1]. This type of analysis visually shows the distribution between the neighborhood pixels of both the original and encrypted images.Due to the intrinsic features of the digital image [53], there is a strong correlation between the adjacent pixels, namely, the gray value of one pixel of the plaintext image is very close to the gray value of the surrounding pixels. Therefore, attackers could try to infer adjacent pixel values based on probability theory. Conversely, in order to resist the statistical attack and achieve better security of the encrypted image, an excellent image encryption algorithm should be able to break high correlation between adjacent pixels of the plain image and produce a very small correlation value near the optimal value of zero.Normally, three different types of correlation are performed to ensure the strength of the encrypted image: the horizontal, the vertical, and the diagonal correlation [54]. To evaluate the proposed encryption scheme, 3000 pairs of adjacent pixels are selected randomly in the three different adjacent directions in both original and encrypted images of the different sample images to calculate the correlation coefficient. Then, the correlation coefficient rxy of each pair, defined in (12), is calculated as follows:(12)rxy=covx,yDx×Dy,covx,y=1N∑i=1Nxi−Exyi−Ey,Dx=1N∑i=1Nxi−Ex2,Ex=1N∑i=1Nxi,where xi and yi are the grayscale pixel values of the ith pair of the selected adjacent pixels in the tested image, N is the total number of the randomized chosen samples, covx,y is the covariance of x and y, and Ex and Dx represent the mean value and the variance of vector x, respectively.Figures11 and 12 show the correlation distribution between neighborhood pixels in the three directions of the grayscale “Boat” image and color “Lena” image with size 512 × 512 before and after image encryption. It is obvious that the correlation of adjacent pixel pairs of the plain image is distributed intensively, but those of encrypted image are scattered randomly which looks very uniform, and the correlation is greatly reduced.Figure 11
Adjacent pixel correlation test for plain grayscale “Boat” image (a) and the corresponding encrypted image (b) for horizontal, vertical, and diagonal directions.Figure 12
Correlation distribution of color “Lena” image: (a)–(c) show RGB layers of plain image; (d)–(f) show RGB layers of cipher image for vertical, horizontal, and diagonal directions, respectively.
(a)(b)(c)(d)(e)(f)Numerically, Table5 demonstrates values of correlation coefficient parameter for the proposed technique in different test images with diverse sizes. According to the quantitative results, it can be concluded that the correlation degrees between adjacent pixels in the plain images are close to 1, while those of the encrypted images are very small and are close to 0, which means that the plain image has strong relationships, but weakness exists in the encrypted image. Therefore, these results show that the proposed image encryption scheme has a good performance in fighting against attacks based on statistical properties of the images.Table 5
Correlation coefficients results.
Image namePlain imageCipher imageVerticalHorizontalDiagonalVerticalHorizontalDiagonalAerial0.86020.90500.82130.0062−0.00170.0031Boat0.97130.93810.9222−0.00120.00070.0004Male0.98130.97740.96710.00010.00020.0023Airplane0.91740.93140.86430.00610.01090.0012Lena0.99020.98040.96950.0040−0.0003−0.0012Baboon0.97650.98770.96710.00230.00120.0001


### 4.3.3. Information Entropy Analysis

Information entropy [55–57] is the most important criterion to evaluate the efficiency of an image encryption algorithm. In information theory, the entropy parameter is considered as the standard to test randomness. For a digital image, information entropy (IE) is one of the outstanding criteria that is usually utilized to evaluate the degree of disorder or randomness of each gray value in the encrypted image and measure the amount of information hidden in an image. The color-level distribution values in an image can also be determined via entropy analysis. Ideally, in the case of 8-bit grayscale image, a robust encryption scheme has an entropy value of 8; otherwise, it causes a plausibility of consistency which undermines its security. The closer the value is to 8, the greater the uncertainty is and the stronger the randomness of image is, which leads to better-secured encryption where the less visual information can be obtained from the image. The most famous entropy formula is Shannon’s entropy equation, calculated in terms of the probability of each available data value, which can be defined as follows:(13)IE=−∑i=0255Pilog2Pi,where Pi denotes the probability of occurrence of gray level i in an image, that is, the proportion of the number of pixels with gray value i to all pixels in an image. Besides, to verify the randomness, local Shannon entropy should be applied. It can be calculated by the following operations: ① divide the image into noninterlocked K blocks containing a certain fixed number of pixels; ② compute Shannon entropy IEKi using the former equation (12); ③ calculate the sample mean of global Shannon entropy over all these K image blocks as local Shannon entropy.Table6 presents the simulation results of information entropy and local Shannon entropy values, where K=16, on some standard original images and their respective encrypted images, which were encrypted by the proposed image encryption algorithm. It can be seen that the results reveal that the entropy values of each cipher image are very close to the ideal value of 8, while the information entropy of each plain image is much less than the ideal one. This result makes obtaining image information by analyzing this information difficult for attackers. This indicates that the encrypted images have a good randomness. As a conclusion, the proposed scheme is safe against the perspective of information entropy attack.Table 6
Results of information entropy and local Shannon entropy.
Image nameDimensionInformation entropyLocal Shannon entropyPlain imageCipher imagePlain imageCipher imageAerial256 × 2563.35567.99703.28937.9556Boat512 × 5123.31537.99933.10377.9880Male1024 × 10243.35407.99983.21277.9971Airplane256 × 256 × 36.69067.99876.12807.9834Lena512 × 512 × 37.74957.99977.31367.9959Baboon1024 × 1024 × 37.72087.99997.42817.9990Table7 presents the values of information entropy of the proposed scheme as compared with the values which resulted from other recent schemes. It can be seen that the information entropy of the different cipher images is very close to 8 bits and the proposed algorithm has greater superiority or in the same range.Table 7
Information entropy comparison.
Image nameDimensionInformation entropyProposed SchemeRef. [6]Ref. [39]Ref. [58]Ref. [59]Aerial256×2567.9970——7.9024—Boat512 × 5127.9993—7.9993——Male1024 × 10247.9998—7.9998——Airplane512 × 512 × 37.9997———7.9994Lena512 × 512 × 37.99977.9988——7.9994Baboon512 × 512 × 37.9997———7.9993


## 4.3.1. Histogram Statistical Analysis

Histogram statistical analysis is a kind of statistical attack, and the histogram can characterize the image. It has been widely used in image retrieval, classification, and other fields [41–47]. Image histogram is probability density function of discrete gray level, plotted by gray level on horizontal axis and the corresponding frequency on the vertical. The more uniform the histogram distribution for the encrypted image, the stronger the ability of antistatistical analysis. Therefore, the elimination of correlation among pixels was necessary, and pixels of the encrypted image had to be distributed evenly to prevent the opponent from extracting any useful information from the fluctuating histogram. In addition, comparing cipher image histogram with the original image histogram, there is a significant difference.We have analyzed the histograms of two original images as well as their encryptions using the proposed approach. The histogram of the original grayscale image of “Boat” with dimensions 512 × 512 pixels and the histogram of its cipher image are shown in Figure9, while Figure 10 illustrates the histograms of the R, G, and B channels of the color plain image “Lena” alongside its encrypted counterparts with the size 512 × 512, respectively.Figure 9
Histogram distribution analysis of plain and encrypted grayscale image. (a) Plain grayscale “Boat” image; (b) encrypted grayscale “Boat” image.
(a)(b)Figure 10
RGB color histogram of original “Lena” image and its corresponding cipher image.Clearly, it can be seen from Figures9 and 10 that the histograms of the original images have obvious peaks, and the gray value and RGB component histogram of cipher images are very uniform and flat distribution, which indicates that the attack based on histogram analysis is difficult as attackers cannot use a statistical attack to obtain any useful information by analyzing the histogram of the encrypted image. Thus, the proposed scheme is strong enough to withstand statistical attacks.Consequently, it is concluded that the proposed image encryption scheme can achieve good performance and meet the requirements of image encryption.Furthermore, for quantity analyses of the image histogram, a metric called variance of the histogram (var) is measured to evaluate and guarantee the uniformity of pixels values of the encrypted images. The higher the uniformity of ciphered images, the lower the value of variances of histogram [48]. The variance of histogram can be computed as follows:(11)varH=1n2∑i=1n∑j=1n12hi−hj2,where H=h1,h2,…,h256 is a one-dimensional array of the histogram values; hiandhj are considered as the numbers of pixels where gray values are equal to iandj, respectively. Tables 3 and 4 display the values of histogram variance for the experimented grayscale and color images, respectively, and illustrate that the variance of images after encryption is greatly reduced when compared with the variance of those images prior to encryption.Table 3
Variance of histogram for encrypted grayscale images.
Image nameVariance valuePlain imageCipher imageAerial51062780.8235Boat1541901.80399791.7098Male11393958.6980138136.8627Table 4
Variance of histogram for encrypted color images.
Image nameVariance valuePlain imageCipher imageRGBRGBAirplane165621.8980163801.6941274155.3333783.1607765.4039796.7137Lena1021383.0980457505.93721382757.26278929.44318930.28239570.1019Baboon6346579.184310106060.69805938608.9490133133.6470135706.9490136423.2078The simulation results indicate that the difference in variance value shows that the histogram depends on the plain image; in addition, the proposed algorithm can strongly withstand statistical analysis attack as it is efficient to prevent attackers from obtaining any useful statistical information to decrypt the cipher image.


## 4.3.2. Correlation Coefficient Analysis

It is known that some algorithm was broken by using correlation analysis between the adjacent pixels. So, correlation coefficient analysis [49–52] is performed to evaluate the statistical relationship between image pixels, and its value is in the range of [−1, 1]. This type of analysis visually shows the distribution between the neighborhood pixels of both the original and encrypted images.Due to the intrinsic features of the digital image [53], there is a strong correlation between the adjacent pixels, namely, the gray value of one pixel of the plaintext image is very close to the gray value of the surrounding pixels. Therefore, attackers could try to infer adjacent pixel values based on probability theory. Conversely, in order to resist the statistical attack and achieve better security of the encrypted image, an excellent image encryption algorithm should be able to break high correlation between adjacent pixels of the plain image and produce a very small correlation value near the optimal value of zero.Normally, three different types of correlation are performed to ensure the strength of the encrypted image: the horizontal, the vertical, and the diagonal correlation [54]. To evaluate the proposed encryption scheme, 3000 pairs of adjacent pixels are selected randomly in the three different adjacent directions in both original and encrypted images of the different sample images to calculate the correlation coefficient. Then, the correlation coefficient rxy of each pair, defined in (12), is calculated as follows:(12)rxy=covx,yDx×Dy,covx,y=1N∑i=1Nxi−Exyi−Ey,Dx=1N∑i=1Nxi−Ex2,Ex=1N∑i=1Nxi,where xi and yi are the grayscale pixel values of the ith pair of the selected adjacent pixels in the tested image, N is the total number of the randomized chosen samples, covx,y is the covariance of x and y, and Ex and Dx represent the mean value and the variance of vector x, respectively.Figures11 and 12 show the correlation distribution between neighborhood pixels in the three directions of the grayscale “Boat” image and color “Lena” image with size 512 × 512 before and after image encryption. It is obvious that the correlation of adjacent pixel pairs of the plain image is distributed intensively, but those of encrypted image are scattered randomly which looks very uniform, and the correlation is greatly reduced.Figure 11
Adjacent pixel correlation test for plain grayscale “Boat” image (a) and the corresponding encrypted image (b) for horizontal, vertical, and diagonal directions.Figure 12
Correlation distribution of color “Lena” image: (a)–(c) show RGB layers of plain image; (d)–(f) show RGB layers of cipher image for vertical, horizontal, and diagonal directions, respectively.
(a)(b)(c)(d)(e)(f)Numerically, Table5 demonstrates values of correlation coefficient parameter for the proposed technique in different test images with diverse sizes. According to the quantitative results, it can be concluded that the correlation degrees between adjacent pixels in the plain images are close to 1, while those of the encrypted images are very small and are close to 0, which means that the plain image has strong relationships, but weakness exists in the encrypted image. Therefore, these results show that the proposed image encryption scheme has a good performance in fighting against attacks based on statistical properties of the images.Table 5
Correlation coefficients results.
Image namePlain imageCipher imageVerticalHorizontalDiagonalVerticalHorizontalDiagonalAerial0.86020.90500.82130.0062−0.00170.0031Boat0.97130.93810.9222−0.00120.00070.0004Male0.98130.97740.96710.00010.00020.0023Airplane0.91740.93140.86430.00610.01090.0012Lena0.99020.98040.96950.0040−0.0003−0.0012Baboon0.97650.98770.96710.00230.00120.0001


## 4.3.3. Information Entropy Analysis

Information entropy [55–57] is the most important criterion to evaluate the efficiency of an image encryption algorithm. In information theory, the entropy parameter is considered as the standard to test randomness. For a digital image, information entropy (IE) is one of the outstanding criteria that is usually utilized to evaluate the degree of disorder or randomness of each gray value in the encrypted image and measure the amount of information hidden in an image. The color-level distribution values in an image can also be determined via entropy analysis. Ideally, in the case of 8-bit grayscale image, a robust encryption scheme has an entropy value of 8; otherwise, it causes a plausibility of consistency which undermines its security. The closer the value is to 8, the greater the uncertainty is and the stronger the randomness of image is, which leads to better-secured encryption where the less visual information can be obtained from the image. The most famous entropy formula is Shannon’s entropy equation, calculated in terms of the probability of each available data value, which can be defined as follows:(13)IE=−∑i=0255Pilog2Pi,where Pi denotes the probability of occurrence of gray level i in an image, that is, the proportion of the number of pixels with gray value i to all pixels in an image. Besides, to verify the randomness, local Shannon entropy should be applied. It can be calculated by the following operations: ① divide the image into noninterlocked K blocks containing a certain fixed number of pixels; ② compute Shannon entropy IEKi using the former equation (12); ③ calculate the sample mean of global Shannon entropy over all these K image blocks as local Shannon entropy.Table6 presents the simulation results of information entropy and local Shannon entropy values, where K=16, on some standard original images and their respective encrypted images, which were encrypted by the proposed image encryption algorithm. It can be seen that the results reveal that the entropy values of each cipher image are very close to the ideal value of 8, while the information entropy of each plain image is much less than the ideal one. This result makes obtaining image information by analyzing this information difficult for attackers. This indicates that the encrypted images have a good randomness. As a conclusion, the proposed scheme is safe against the perspective of information entropy attack.Table 6
Results of information entropy and local Shannon entropy.
Image nameDimensionInformation entropyLocal Shannon entropyPlain imageCipher imagePlain imageCipher imageAerial256 × 2563.35567.99703.28937.9556Boat512 × 5123.31537.99933.10377.9880Male1024 × 10243.35407.99983.21277.9971Airplane256 × 256 × 36.69067.99876.12807.9834Lena512 × 512 × 37.74957.99977.31367.9959Baboon1024 × 1024 × 37.72087.99997.42817.9990Table7 presents the values of information entropy of the proposed scheme as compared with the values which resulted from other recent schemes. It can be seen that the information entropy of the different cipher images is very close to 8 bits and the proposed algorithm has greater superiority or in the same range.Table 7
Information entropy comparison.
Image nameDimensionInformation entropyProposed SchemeRef. [6]Ref. [39]Ref. [58]Ref. [59]Aerial256×2567.9970——7.9024—Boat512 × 5127.9993—7.9993——Male1024 × 10247.9998—7.9998——Airplane512 × 512 × 37.9997———7.9994Lena512 × 512 × 37.99977.9988——7.9994Baboon512 × 512 × 37.9997———7.9993


## 4.4. Differential Attack Analysis

Differential attacks are another effective and commonly used cryptanalysis technique. A differential attack is attempted to learn the key and figure out the encryption scheme by tracing differences. An Assailant may make a trivial change in the plain image, encrypt two plain images, and then carry out cryptanalysis by tracing the meaningful relationship between two cipher images. According to the principles of cryptography, the encryption algorithm should be sufficiently sensitive to the changes of plaintext image or secrete key in order to keep high security, such that a minor change in the plaintext image or the initial key parameters causes a significant change in the ciphertext image [59–64]; then differential analysis may become useless. The high sensitivity of the system shows that the generated algorithm is sturdy against any probable attack, since it would indicate no meaningful relationship between the plain image and the cipher image. In this test, the number of pixels changing rate (NPCR) and unified average changing intensity (UACI) become two widely used security analyses in the image encryption community for differential attacks. The tests signify the chance of occurrence of the attack and its sensitivity towards the source image by changing the value.ConsideringC1 and C2 as the two cipher images obtained from encrypting two one-pixel different images with M × N size or encrypting same plain image with two secret keys of only 1-bit difference, introduce a bipolar array, D, with the sizes similar to images C1 and C2 as follows:(14)Di,j=0,C1i,j=C2i,j,1,C1i,j≠C2i,j.The NPCR reflects the change rate of the gray value of different pixels at the same position between two corresponding encrypted images which are obtained by two original images with one-bit difference. In other words, NPCR helps us to understand the effect of change of single pixel over an image, while the UACI reflects the average change of the gray value within the two paired cipher images (C1 and C2). Then, the formula used to calculate UACI and NPCR is shown in the two following equations:(15)NPCR=∑i=1M∑j=1NDi,jM×N×100%,(16)UACI=1M×N∑i=1M∑j=1NC1i,j−C2i,j255×100%.Taking the images that are listed in Table1 as examples and experimenting on them for 100 times, the theoretical ideal values of the NPCR and UACI for a gray image are 99.6094% and 33.4635%, respectively. Table 8 lists the test results of NPCR and UACI of grayscale encrypted images, whereas the theoretical values of NPCR and UACI for different color images in three channels are shown in Table 9. It can be observed from the former tables that the proposed image encryption algorithm can achieve better performances against differential attacks, since the values of NPCR and UACI are close to their theoretical values. Thus, the system has guaranteed that the designed system is applicable for real-time communication.Table 8
NPCR and UACI results for cipher grayscale images.
Image nameImage sizeNPCR (%)UACI (%)Aerial256 × 25699.645833.5243Boat512 × 51299.651733.4416Male1024 × 102499.630033.4864Table 9
NPCR and UACI scores on color images of different sizes.
Image nameDimensionNPCR (%)UACI (%)RedGreenBlueRedGreenBlueAirplane256 × 256 × 399.689299.638099.6411333.357233.568133.6369Lena512 × 512 × 399.639499.641799.657433.498033.459333.5460Baboon1024 × 1024 × 399.624199.616899.623833.460733.470233.4707


## 4.5. Known-Plaintext Attack and Chosen-Plaintext Attack Analysis

A cryptosystem is supposed to be secure if it resists all known types of cryptographic attacks. In cryptanalysis, the fundamental assumption enunciated by Kerckhoffs's principle is that encryption and decryption algorithms are known or transparent in a cryptosystem [65–68]. Therefore, the security of the cryptosystem depends on the key rather than the encryption algorithm itself. In the cryptanalysis, there are four traditional cryptanalysis attacks: (1) ciphertext-only attack, (2) known-plaintext attack, (3) chosen-plaintext attack, and (4) chosen-ciphertext attack. Among these attacks, chosen-plaintext attack is the most threatening attack. Therefore, it is claimed that the cryptosystem can resist the other three types of attacks if it can resist the chosen-plaintext attack. In order to assess the resistance of encryption algorithms against the main attacks, two tests are generally used, namely, the known-plaintext attack (KPA) and chosen-plaintext attack (CPA). In known-plaintext attack and chosen-plaintext attack, the attackers usually choose special plaintext and make minor changes to observe the changes of ciphertext. Or they choose some plaintext with linear relationship to observe the characteristics of ciphertext. By using this method, they can obtain secret key. By using this method, they can obtain secret key.In the presented encryption scheme, the mean (M) value of the plaintext image is computed to generate the number of preiterations, which is related chaotic sequences generation, and the initial value of diffusion process. In other words, the generated random sequences are related to the plaintext, and the chaotic systems are sensitive to the initial value. Consequently, the keystream used in the proposed algorithm has a high connection with the plain image, which means that a small change in the plaintext image produces a completely different key, as detailed in the “Key Sensitivity Analysis” section. That means the attacker cannot extract any useful information by encrypting certain selected images because the encrypted image is only relevant to the selected image, which implies the excellent performance in withstanding the known-plaintext attack and chosen-plaintext attack.Besides, to test the ability of defending this kind of attack, both plain images with “pure white” and “pure black” images, their encrypted images, and the corresponding histograms are derived, which are shown in Figure13. From the results, it can be seen that the pixels in the cipher image are uniformly distributed with random noise, and the attacker cannot decrypt other cipher images by using the same keys. By observing the resulting encrypted images, we can find that it is impossible to extract any information from the encrypted images. Therefore, the proposed encryption scheme is sufficiently robust to resist all forms of potential attacks.Figure 13
Simulation result of cryptanalysis tests: (a) all white image; (b) cipher image of (a); (c) histogram of (b); (d) all black image; (e) cipher image of (d); (f) histogram of (e).
(a)(b)(c)(d)(e)(f)


## 4.6. Time Complexity Analysis

Apart from security analysis of the image encryption scheme, performance analysis is also an important aspect to evaluate the encryption/decryption time and time complexity of the algorithm [69, 70]. A good encryption algorithm needs to have a fast encryption time and low computation complexity.The encryption/decryption time can be calculated manually where it is mainly analyzed into six parts as follows: (a) mean for any row column of R, G, and B channels, so its complexity isO1; (b) the cyclic process N times for Chen’s hyperchaotic system quantum logistic chaotic map, so it has complexity of On; (c) the generation of three chaotic sequences ER,EG,EG, which are produced by Chen’s hyperchaotic system with length M × N and hence the time cost is 3×M×N; (c) XOR operation having time complexity of O1; (d) time cost of chaotic map sequences and the generation of random matric being On2=maxO1,On2; (e) the computational cost of density matrix being O1; and (f) the computational cost of XNOR operation being O1. From the above analyses, the total time cost of the proposed scheme is On2, so that the time consumption of proposed scheme hinges on t representing the number of code loops.It can be calculated by using the in-built operations of the software used for implementation. Here, the elapsed time was measured by the tic and toc functions of MATLAB. The running speed of the proposed encryption scheme for a number of standard images with diverse sizesM×M is presented in Table 10. As a result, the proposed scheme reflects the efficiency to be used in practical cases.Table 10
Running time analysis.
Image nameImage sizeEncryption/decryption time (s)Grayscale Aerial256 × 2560.4844Color Airplane256 × 2560.8125Grayscale Boat512 × 5121.4375Color Lena512 × 5123.2969Grayscale Male1024 × 10245.7500Color Baboon1024 × 102413.6250Taking the256×256 “Lena” image as an example, comparative analyses of the execution time among different encryption algorithms are illustrated in Table 11. It is observed that the proposed algorithm runs faster than the referenced algorithms [71–73]. In addition, it has less computational complexity.Table 11
Speed performance analysis (seconds).
Encryption schemeEncryption time (s)Processor speedRAMPlatformRef. [71]3.453 GHz4 GBPython 3.6Ref. [22]13.90——MATLAB R2016bRef. [72]1.67——MATLABRef. [73]9.363.60 GHz32 GBMATLAB R2019bProposed algorithm1.111.80 GHz8 GBMATLAB R2017b


## 5. Conclusion

Complex nonlinearity was preserved by choosing suitable chaotic maps. By choosing a high-dimensional chaotic system, the key space is increased. This study employed a chaotic quantum logistic map, combining with both confusion and diffusion operations, to propose a new symmetric image encryption algorithm. This algorithm is based on Chen’s hyperchaotic system to diffuse image pixels. Among them, the keystreams extracted are different for the same secret key associated with the plain image, which are true random numbers generated from noise arrays. Thus, the presented approach can achieve high resistance to the known-plaintext attack and chosen-plaintext attack as well as high level of sensitivity where the randomness of the random sequence displayed better behavior. At last, to confuse the relationship between original and encrypted images, the transpose process is applied to rows and columns of image. Through the results of extensive experiments and corresponding security analysis, it can be found that the salient features of the proposed symmetric image encryption algorithm can be summarized as follows: (a) large enough key space to resist brute-force attacks, (b) high level of security and being quite worthy of being called a good security system, (c) less computational complexity, and (d) being suitable for applications like wireless communications due to its fast implementation. An actual implementation of different kinds of operations in the scrambling stage to increase the security without affecting drastically the processing time is concerned and more detailed analysis on the chaotic or hyperchaotic dynamical systems deserves further investigation in the near future.



---

*Source: 3676265-2022-03-29.xml*