1 Introduction

With the development of multimedia information technology, information security issues are gradually put on the agenda. Image is one of the important tools of carrying information, and its security has been widely studied [1,2,3]. Especially because of the unique characteristics of the chaotic system, such as high sensitivity, topological transitivity, and pseudorandomness, a series of image encryption schemes based on chaotic system have been proposed [4,5,6,7].

However, short-period behavior of chaotic system after too many times iteration can lead to degeneration of dynamics [8]. Fortunately, this problem can be solved by impulse injection during the iteration process [9], because chaotic system is extremely sensitive to the initial conditions and a tiny deviation in iterating can result in significantly different trajectory. The injection times can be determined by the size of original image, and the injection moments and injection values can be random numbers.

With the rapid development of network technology, multimedia communication based on Internet is of increasing importance. According to random classical computations, N data need N steps of loading operations for a single processor [10], which reduces the computational efficiency and results in the bottleneck of classical computers. Nowadays, quantum computation is becoming a potentially effective tool to meet the high real-time computational requirements [11, 12]. In 1982, Feynman first presented a computation model named quantum computers based on the principles of quantum physics, which seems more powerful than classical ones [13]. Until the arrival of practical quantum computers, the first task in quantum image processing is the construction of a pattern for capturing and storing the images on quantum computers. A great number of research results concerning quantum image representation exist in the literature, i.e., qubit lattice [14], entangled image [15], RealKet [16], a flexible representation for quantum images (FRQI) [17], a multi-channel representation of quantum image (MCRQI) [18], a normal arbitrary quantum superposition state (NASS) [19], a quantum representation for log-polar images [20], a novel enhanced quantum representation (NEQR) [21] and a novel quantum representation of color digital images (NCQI) [22].

Consequently, some quantum image encryption algorithms were developed to secure quantum images [23,24,25,26,27,28,29,30,31,32,33,34]. In detail, in 2013, based on quantum image geometric transformations, Zhou et al. [23] proposed an encryption algorithm for quantum image. The same year, in order to solve the drawbacks of the optical encryption systems and combine the merits of quantum cryptography, Yang et al. [24] proposed a novel image encryption scheme based on QFT and DRPE. Immediately afterward, in 2014, Yang et al. put forward a quantum cryptographic algorithm for color images using quantum Fourier transform and double random-phase encoding, which can be realized by performing two secret random-phase encoding operations, respectively, in the input and the QFT planes [25]. By using image correlation decomposition, Hua et al. introduced a quantum image encryption algorithm in [26]. Besides, based on generalized affine transform, quantum image encryption schemes in [27, 29, 32] were presented. In the years of 2015 and 2016, based on quantum walks and one-dimensional quantum cellular automata, Yang et al. [28, 30] proposed two kinds of encryption algorithms, respectively. Based on hyper-chaotic system and QFT, Tan et al. [33] proposed a quantum color image encryption algorithm. In 2017, Li and Zhao [34] proposed a simple encryption algorithm for quantum color image by using controlled rotation gates.

However, most of these schemes are proposed for quantum gray images. Out of the ordinary, schemes in [25, 33, 34] are proposed to encrypt quantum color images. Through our analysis, they are found to have some drawbacks. In [25, 33], the color information of each pixel is encoded by three qubits \(\left| r \right\rangle \), \(\left| g \right\rangle \), \(\left| b \right\rangle \) that represent the three primary colors of red, green and blue, respectively. However, the color values of the pixels are encoded with probability amplitude of qubits. By the influence of quantum states collapse, during the measurement, this method is difficult to obtain accurate pixel values. In [34], 24 qubits are employed to represent the pixel color values of each pixel, which makes the scheme free from the influence of quantum states collapse. However, for a \({{2}^{n}}\times {{2}^{n}}\) quantum color original image, the secret key is a vector of length \({{2}^{n}}\times {{2}^{n}}\times 24\), which is more likely to make the keys too large to distribute, store and memorize. In view of the above, we propose a novel quantum color image encryption scheme. In our scheme, we use the NCQI model, the same as the one used in [34], to represent the quantum color original image, in which 24 qubits are employed to represent the pixel color scale values of each pixel. Firstly, three impulse signals are injected into coupled hyper-chaotic Lorenz system during iterations to enhance the complexity of trajectory. Then, six sequences generated are used to encrypt the red, green and blue components by XOR operations and right cyclic shift operations. Six initial values and three impulse signals values are used as keys, which could reduce the burden of keys transmission and make the cryptosystem own a key space large enough to resist exhaustive attack, even the attack from a quantum computer. Numerical simulations demonstrate that the proposed encryption scheme has a good feasibility and effectiveness for protecting quantum color images and has better security in comparison with other encryption algorithms.

This paper is organized as follows: Sect. 2 introduces quantum color image representation and coupled hyper-chaotic Lorenz system and three impulse injections. Quantum color image right cycle shift operation is given in Sect. 3. In Sect. 4, the proposed quantum color image encryption and decryption scheme is described. Section 5 is devoted to the theoretical analyses and numerical simulations. Finally, a brief conclusion is drawn in Sect. 6.

2 Quantum color image representation and coupled hyper-chaotic Lorenz system

2.1 Quantum representation for color digital images

The novel quantum representation for color digital images (NCQI) has been proposed in [22]. The representative expression of a quantum color image sized \({{2}^{n}}\times {{2}^{n}}\) is described as follows:

$$\begin{aligned} \left| I \right\rangle =\frac{1}{{{2}^{n}}}\sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{x=0}^{{{2}^{n}}-1}{\left| C\left( y,x \right) \right\rangle \otimes \left| yx \right\rangle }}, \end{aligned}$$
(1)

where \(\left| C\left( y,x \right) \right\rangle \) denotes the color value of the corresponding pixel and it can be encoded by the binary sequence \({{R}_{q-1}}\cdots {{R}_{0}}{{G}_{q-1}}\cdots {{G}_{0}}{{B}_{q-1}}\cdots {{B}_{0}}\).

$$\begin{aligned} \left| C\left( y,x \right) \right\rangle =\left| \underbrace{R_{yx}^{q-1}\cdots R_{yx}^{0}}_{\hbox {Red}}\underbrace{G_{yx}^{q-1}\cdots G_{yx}^{0}}_{\hbox {Green}}\underbrace{B_{yx}^{q-1}\cdots B_{yx}^{0}}_{\hbox {Blue}} \right\rangle . \end{aligned}$$
(2)

The values of every channel \(\left( R,G,B \right) \) range from 0 to \({{2}^{q}}-1\). Equation (1) indicates the whole NCQI model is stored into a normalized quantum superposition state. There are three parts, i.e., the color information \(\left| C\left( y,x \right) \right\rangle \), the vertical position \(\left| y \right\rangle \) and the horizontal position \(\left| x \right\rangle \) to represent one pixel. The tensor product of these three qubit sequences constitutes the basis state of NCQI. For a \({{2}^{n}}\times {{2}^{n}}\) color image with every channel RGB in the range \(\left[ 0,{{2}^{q}}-1 \right] \), \(2n + 3q\) qubits are employed to store image information into a NCQI state.

Fig. 1
figure 1

A \(4\times 4\) color image (color figure online)

An example of a \(4\times 4\) color image with three channels RGB in the range \(\left[ 0,{{2}^{8}}-1 \right] \), i.e., \(n = 2, q = 8\), is shown in Fig. 1. The representation as shown in Eq. (3) depicts the whole NCQI is stored into a normalized quantum superposition state, in which each basis represents one pixel.

$$\begin{aligned} \left| I \right\rangle =&\frac{1}{\sqrt{{{2}^{4}}}}\left[ \left| \underbrace{11111111}_{R}\underbrace{00000000}_{G}\underbrace{00000000}_{B} \right\rangle \otimes \left( \left| 0000 \right\rangle +\left| 0001 \right\rangle +\left| 0100 \right\rangle +\left| 0101 \right\rangle \right) \right. \nonumber \\&+\left| \underbrace{00000000}_{R}\underbrace{11111111}_{G}\underbrace{00000000}_{B}\right\rangle \otimes \left( \left| 0010 \right\rangle +\left| 0011 \right\rangle +\left| 0110 \right\rangle +\left| 0111 \right\rangle \right) \nonumber \\&+\left| \underbrace{00000000}_{R}\underbrace{00000000}_{G}\underbrace{11111111}_{B}\right\rangle \otimes \left( \left| 1000 \right\rangle +\left| 1001 \right\rangle +\left| 1100 \right\rangle +\left| 1101 \right\rangle \right) \nonumber \\&\left. +\left| \underbrace{11111111}_{R}\underbrace{11111111}_{G}\underbrace{11111111}_{B}\right\rangle \otimes \left( \left| 1010 \right\rangle +\left| 1011 \right\rangle +\left| 1110 \right\rangle +\left| 1111 \right\rangle \right) \right] . \end{aligned}$$
(3)

Notably, for a quantum color image sized \(M\times N\) with every channel RGB in the range \(\left[ 0,{{2}^{q}}-1 \right] \), we can improve NCQI to store it. The improved model is called INCQI. An INCQI image representation can be written as follows:

$$\begin{aligned} \left| I \right\rangle= & {} \frac{1}{{{\sqrt{2}}^{m+n}}}\sum \limits _{y=0}^{N-1}{\sum \limits _{x=0}^{M-1}{\left| C\left( y,x \right) \right\rangle \otimes \left| yx \right\rangle }} \nonumber \\= & {} \frac{1}{{{\sqrt{2}}^{m+n}}}\sum \limits _{y=0}^{N-1}{\sum \limits _{x=0}^{M-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \otimes \left| yx \right\rangle }}, \end{aligned}$$
(4)

where

$$\begin{aligned} m=\left\{ \begin{aligned}&\left\lceil {{\log }_{2}}M \right\rceil , \\&1, \\ \end{aligned} \right. \begin{matrix} {} &{} M>1 \\ {} &{} M=1 \\ \end{matrix} \end{aligned}$$
(5)
$$\begin{aligned} n=\left\{ \begin{aligned}&\left\lceil {{\log }_{2}}N \right\rceil , \\&1, \\ \end{aligned} \right. \begin{matrix} {} &{} N>1 \\ {} &{} N=1. \\ \end{matrix} \end{aligned}$$
(6)

Of course, the encryption scheme put forward in Sect. 4 is also available for quantum color images of arbitrary size \(M\times N\).

2.2 The coupled hyper-chaotic Lorenz system and three impulse injections

By coupling two identical Lorenz systems, the coupled hyper-chaotic Lorenz system was obtained by Grassi et al. [35], and the corresponding differential equation can be described as follows:

$$\begin{aligned} \left\{ \begin{aligned}&{{{\dot{x}}}_{1}}=a\left( {{y}_{1}}-{{x}_{1}} \right) \\&{{{\dot{y}}}_{1}}=b{{x}_{1}}-{{y}_{1}}-{{x}_{1}}{{z}_{1}}+{{k}_{1}}\left( {{x}_{2}}-{{y}_{2}} \right) \\&{{{\dot{z}}}_{1}}={{x}_{1}}{{y}_{1}}-c{{z}_{1}} \\&{{{\dot{x}}}_{2}}=a\left( {{y}_{2}}-{{x}_{2}} \right) \\&{{{\dot{y}}}_{2}}=b{{x}_{2}}-{{y}_{2}}-{{x}_{2}}{{z}_{2}}+{{k}_{2}}\left( {{x}_{1}}-{{y}_{1}} \right) \\&{{{\dot{z}}}_{2}}={{x}_{2}}{{y}_{2}}-c{{z}_{2}}, \\ \end{aligned} \right. \end{aligned}$$
(7)

where \(X={{\left[ {{x}_{1}},{{y}_{1}},{{z}_{1}},{{x}_{2}},{{y}_{2}},{{z}_{2}} \right] }^\mathrm{T}}\) is the state variable vector, ab and c are control parameters, and \({{k}_{1}},{{k}_{2}}>0\) are coupling parameters. The system exhibits hyper-chaotic behavior when \(a=10\), \(b=28\), \(c={8}/{3}\), \({{k}_{1}}={{k}_{2}}=0.05\). Here, we set the initial values of \({{x}_{1}}\left( 0 \right) \ne {{x}_{2}}\left( 0 \right) \), \({{y}_{1}}\left( 0 \right) \ne {{y}_{2}}\left( 0 \right) \) and \({{z}_{1}}\left( 0 \right) \ne {{z}_{2}}\left( 0 \right) \), Fig. 2 shows the four-wing attractors.

Fig. 2
figure 2

Chaotic attractors of coupled hyper-chaotic Lorenz system

When \(a=10\), \(c={8}/{3}\) and \(b\in \left[ 24,51 \right] \), the Lyapunov exponents are shown in Fig. 3. From Fig. 3, it is found that when \(b\in \left[ 24,51 \right] \), the dynamics of system (7) is hyper-chaotic.

Fig. 3
figure 3

Lyapunov exponent in the interval of parameter \(b\in \left[ 24,51 \right] \)

The problems of short period and degradation of dynamics seriously affect the practical applications of chaotic system. In order to solve these problems, one can try to randomly inject several impulse signal values into one of the variables during the iterating process to implement chaotic orbital transfer and remove the degradation of chaos dynamics. What is more, multiple injections can greatly enlarge the key space.

Because a tiny change in the initial value of chaotic system can result in completely different trajectory, assume that the total iterating time of system (7) is N and the injection time I can be designed to depend on the original image size. Here is the simplest example that we set \(I = 2\) and then inject modified impulse signals of \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }}\in \left[ 0.1\min \left( {{x}_{1}} \right) ,0.1\max \left( {{x}_{1}} \right) \right] \) into \({{x}_{1}}\), when \(t=\left\lfloor {N}/{3}\; \right\rfloor \), \(t=\left\lfloor {2N}/{3}\; \right\rfloor \). The hyper-chaotic attractor after injection in three intervals of \(\left[ 1,\left\lfloor {N}/{3}\; \right\rfloor -1 \right] \), \(\left[ \left\lfloor N/3\ \right\rfloor ,\left\lfloor 2N/3\ \right\rfloor -1 \right] \) and \(\left[ \left\lfloor 2N/3\ \right\rfloor ,N \right] \) is marked in different colors of red, green and blue, as shown in Fig. 4.

Fig. 4
figure 4

Chaotic attractor of the coupled hyper-chaotic Lorenz system after impulse injection

In the encryption scheme put forward in Sect. 4, we set \(I = 3\), i.e., inject impulse signal values of \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }},\varDelta {{x}_{1\left( 3 \right) }}\in \left[ 0.1\min \left( {{x}_{1}} \right) ,0.1\max \left( {{x}_{1}} \right) \right] \) into \({{x}_{1}}\), when \(t=\left\lfloor {N}/{4}\; \right\rfloor \), \(t=\left\lfloor {2N}/{4}\; \right\rfloor \) and \(t=\left\lfloor {3N}/{4}\; \right\rfloor \) in the process of iteration.

3 Quantum color image right cycle shift operations

The study [32] has proposed the cycle shift operations for quantum gray images. According to the study, the quantum color image right cycle shift operations are defined in this section. The operations are executed on the pixel color values specially, and it will not be emphasized later.

For a quantum color image sized \({{2}^{n}}\times {{2}^{n}}\) with values of every channel \(\left( R,G,B \right) \) in the range \(\left[ 0,{{2}^{q}}-1 \right] \), the quantum color image right cycle shift operations could be decomposed into \({{2}^{2n}}\) sub-operations and realized by quantum swap gates. The controlled swap gates \({{U}_{YX}}\) controlled by a sequence \(\left| H \right\rangle =\left\{ \left| {{h}_{0,0}} \right\rangle ,\left| {{h}_{0,1}} \right\rangle ,\ldots ,\left| {{h}_{0,{{2}^{n}}-1}} \right\rangle ,\left| {{h}_{1,0}} \right\rangle , \ldots ,\left| {{h}_{{{2}^{n}}-1,{{2}^{n}}-1}} \right\rangle \right\} \) are used to accomplish the sub-operations, where \(\left| {{h}_{YX}} \right\rangle =\left\{ \left| {{r}_{YX}} \right\rangle ,\left| {{s}_{YX}} \right\rangle ,\left| {{t}_{YX}} \right\rangle \right\} \), \(Y=0,1,\ldots ,{{2}^{n}}-1\), \(X=0,1,\ldots ,{{2}^{n}}-1\) are orderly. The color image right cycle shift operation is shown in Fig. 5. Correspondingly, Fig. 6 shows the three channels \(\left( R,G,B \right) \) of the color image right cycle shift operations for rst times, respectively, where rst are nonnegative integers and \(0\le r,s,t\le q-1\).

Fig. 5
figure 5

Color image right cycle shift operation

Fig. 6
figure 6

Three channels of color image right cycle shift operations for rst times, respectively

If the times of three channels \(\left( R,G,B \right) \) right cycle shift operations are rst, respectively, the controlled swap gate can be defined as:

$$\begin{aligned} \begin{aligned}&{{U}_{YX}}\left| C\left( Y,X \right) \right\rangle ={{U}_{YX}}\left| R_{YX}^{q-1}\cdots R_{YX}^{0}G_{YX}^{q-1}\cdots G_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{0} \right\rangle \\&\quad =\left| \underbrace{R_{YX}^{r-1}\cdots R_{YX}^{0}R_{YX}^{q-1}\cdots R_{YX}^{r}}_{\hbox {Red}}\underbrace{G_{YX}^{s-1}\cdots G_{YX}^{0}G_{YX}^{q-1}\cdots G_{YX}^{s}}_{\hbox {Green}}\underbrace{B_{YX}^{t-1}\cdots B_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{t}}_{\hbox {Blue}} \right\rangle . \end{aligned}\nonumber \\ \end{aligned}$$
(8)

Then, the sub-operation \({{S}_{YX}}\) constructed by the controlled swap gate \({{U}_{YX}}\) can be defined as follows:

$$\begin{aligned} {{S}_{YX}}=\left( I\otimes \sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{{\begin{matrix} x=0 \\ yx\ne YX \end{matrix}}}^{{{2}^{n}}-1}{\left| yx \right\rangle \left\langle yx \right| }} \right) +{{U}_{YX}}\otimes \left| YX \right\rangle \left\langle YX \right| . \end{aligned}$$
(9)

The sub-operation \({{S}_{YX}}\) is a unitary matrix, i.e., \({{S}_{YX}}S_{YX}^{\dagger }={{I}^{\otimes 2n+1}}\), where \(S_{YX}^{\dagger }\) is the Hermitian conjugation of matrix \({{S}_{YX}}\). The quantum color image right cycle shift operations could be implemented by the quantum sub-operation \({{S}_{YX}}\):

$$\begin{aligned}&{{S}_{YX}}\left| I \right\rangle ={{S}_{YX}}\left( \frac{1}{{{2}^{n}}}\sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{x=0}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right) \nonumber \\&\quad =\frac{1}{{{2}^{n}}}{{S}_{YX}}\left( \sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{{\begin{matrix} x=0 \nonumber \\ yx\ne YX \end{matrix}}}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right. \nonumber \\&\qquad \left. +\left| R_{YX}^{q-1}\cdots R_{YX}^{0}G_{YX}^{q-1}\cdots G_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{0} \right\rangle \left| YX \right\rangle \right) \nonumber \\&\quad =\frac{1}{{{2}^{n}}}\left( \sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{{\begin{matrix} x=0 \nonumber \\ yx\ne YX \end{matrix}}}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right. \nonumber \\&\qquad \left. +{{U}_{YX}}\left| R_{YX}^{q-1}\cdots R_{YX}^{0}G_{YX}^{q-1}\cdots G_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{0} \right\rangle \left| YX \right\rangle \right) \nonumber \\&\quad =\frac{1}{{{2}^{n}}}\left( \sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{{\begin{matrix} x=0 \nonumber \\ yx\ne YX \end{matrix}}}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right. \nonumber \\&\qquad \left. \text {+}\left| R_{YX}^{r-1}\cdots R_{YX}^{0}R_{YX}^{q-1}\cdots R_{YX}^{r}G_{YX}^{s-1}\cdots G_{YX}^{0}G_{YX}^{q-1}\cdots G_{YX}^{s}B_{YX}^{t-1}\right. \right. \nonumber \\&\quad \quad \left. \left. \cdots B_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{t} \right\rangle \left| YX \right\rangle \right) \end{aligned}$$
(10)
$$\begin{aligned}&{{S}_{{Y}'{X}'}}{{S}_{YX}}\left| I \right\rangle \nonumber \\&\quad ={{S}_{{Y}'{X}'}}\left( {{S}_{YX}}\frac{1}{{{2}^{n}}}\sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{x=0}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right) \nonumber \\&\quad ={{S}_{{Y}'{X}'}}\frac{1}{{{2}^{n}}}\left( \sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{{\begin{matrix} x=0 \nonumber \\ yx\ne YX \end{matrix}}}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right. \nonumber \\&\qquad +\left. \left| R_{YX}^{r-1}\cdots R_{YX}^{0}R_{YX}^{q-1}\cdots R_{YX}^{r}G_{YX}^{s-1}\cdots G_{YX}^{0}G_{YX}^{q-1}\cdots G_{YX}^{s}B_{YX}^{t-1}\right. \right. \nonumber \\&\quad \left. \left. \cdots B_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{t} \right\rangle \left| YX \right\rangle \right) \nonumber \\&\quad =\frac{1}{{{2}^{n}}}\left( \sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{{\begin{matrix} x=0 \nonumber \\ yx\ne YX,{Y}'{X}' \end{matrix}}}^{{{2}^{n}}-1}{\left| R_{yx}^{q-1}\cdots R_{yx}^{0}G_{yx}^{q-1}\cdots G_{yx}^{0}B_{yx}^{q-1}\cdots B_{yx}^{0} \right\rangle \left| yx \right\rangle }} \right. \nonumber \\&\qquad +\left| R_{YX}^{r-1}\cdots R_{YX}^{0}R_{YX}^{q-1}\cdots R_{YX}^{r}G_{YX}^{s-1}\cdots G_{YX}^{0}G_{YX}^{q-1}\right. \nonumber \\&\left. \quad \quad \cdots G_{YX}^{s}B_{YX}^{t-1}\cdots B_{YX}^{0}B_{YX}^{q-1}\cdots B_{YX}^{t} \right\rangle \left| YX \right\rangle \nonumber \\&\qquad +\left. \left| R_{{Y}'{X}'}^{{r}'-1}\cdots R_{{Y}'{X}'}^{0}R_{{Y}'{X}'}^{q-1}\cdots R_{{Y}'{X}'}^{{{r}'}}G_{{Y}'{X}'}^{{s}'-1}\cdots G_{{Y}'{X}'}^{0}G_{{Y}'{X}'}^{q-1}\right. \right. \nonumber \\&\left. \left. \quad \quad \cdots G_{{Y}'{X}'}^{{{s}'}}B_{{Y}'{X}'}^{{t}'-1}\cdots B_{{Y}'{X}'}^{0}B_{{Y}'{X}'}^{q-1}\cdots B_{{Y}'{X}'}^{{{t}'}} \right\rangle \left| {Y}'{X}' \right\rangle \right) , \end{aligned}$$
(11)

where \({r}',{s}',{t}'\) are nonnegative integers and \(0\le {r}',{s}',{t}' \le q-1\). The sub-operations \({{S}_{YX}}\) and \({{S}_{{Y}'{X}'}}\) are controlled by \(\left\{ \left| r \right\rangle ,\left| s \right\rangle ,\left| t \right\rangle \right\} \) and \(\left\{ \left| {{r}'} \right\rangle ,\left| {{s}'} \right\rangle ,\left| {{t}'} \right\rangle \right\} \), respectively.

Therefore, the quantum color image right cycle shift operations on its homologous pixels can be realized by \({{2}^{2n}}\) sub-operations \({{S}_{YX}}\) as follows:

$$\begin{aligned} S {=} \prod \limits _{Y=0}^{{{2}^{n}}-1}{\prod \limits _{X=0}^{{{2}^{n}}-1}{{{S}_{YX}}}}. \end{aligned}$$
(12)

Corresponding to the quantum color image right cycle shift operations, the inverse sub-operation \(S_{YX}^{-1}\) could be built up by the three channels \(\left( R,G,B \right) \) of color image right cycle shift operations for \(q-r,q-s,q-t\) times, respectively. So the details about \(S_{YX}^{-1}\) and \({S}^{-1}\) are not needed to be addressed here.

4 Quantum color image encryption and decryption scheme

4.1 Quantum color image encryption scheme based on coupled hyper-chaotic Lorenz system with three impulse injections

Firstly, it is necessary to emphasize that the quantum color image encryption scheme proposed in this section is also available for quantum color images of arbitrary size \(M\times N\). For simplicity, assume that the original quantum color image sized \({{2}^{n}}\times {{2}^{n}}\) with values of every channel \(\left( R,G,B \right) \) in the range \(\left[ 0,{{2}^{8}}-1 \right] \) to be encrypted is \(\left| I \right\rangle \) and its NCQI representation can be written as:

$$\begin{aligned} \left| I \right\rangle&=\frac{1}{{{2}^{n}}}\sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{x=0}^{{{2}^{n}}-1}{\left| C\left( y,x \right) \right\rangle \otimes \left| yx \right\rangle }}\nonumber \\&=\frac{1}{{{2}^{n}}}\sum \limits _{y=0}^{{{2}^{n}}-1}{\sum \limits _{x=0}^{{{2}^{n}}-1}{\left| \underbrace{{{R}_{yx}^{7}}\cdots {{R}_{yx}^{0}}}_{\hbox {Red}}\underbrace{{{G}_{yx}^{7}}\cdots {{G}_{yx}^{0}}}_{\hbox {Green}}\underbrace{{{B}_{yx}^{7}}\cdots {{B}_{yx}^{0}}}_{\hbox {Blue}} \right\rangle \otimes \left| yx \right\rangle }}\nonumber \\&=\frac{1}{{{2}^{n}}}\sum \limits _{i=0}^{{{2}^{2n}}-1}{\left| C\left( i \right) \right\rangle \otimes \left| i \right\rangle }\nonumber \\&=\frac{1}{{{2}^{n}}}\sum \limits _{i=0}^{{{2}^{2n}}-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle }, \end{aligned}$$
(13)

where \(\left| R_{i}^{k} \right\rangle ,\left| G_{i}^{k} \right\rangle ,\left| B_{i}^{k} \right\rangle \in \left\{ \left| 0 \right\rangle ,\left| 1 \right\rangle \right\} \), \(i=0,1,\ldots ,{{2}^{2n}}-1\), \(k=0,1,\ldots ,7\). The proposed quantum color image encryption scheme consists of the following steps. The encryption procedure is shown in Fig. 7.

Fig. 7
figure 7

Proposed quantum color image encryption scheme procedure

Input Original quantum color image \(\left| I \right\rangle \).

Keys \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) \) and \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }},\varDelta {{x}_{1\left( 3 \right) }}\) represent keys which can be selected randomly.

Output The encrypted quantum color image \(\left| E \right\rangle \) with the same size.

Step 1 Iterating system (7) with six initial values of \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) \) for \(N={{2}^{n}}\times {{2}^{n}}\) times. When the iterating times \({{t}_{1}}=\left\lfloor {N}/{4}\; \right\rfloor \), \({{t}_{2}}=\left\lfloor {2N}/{4}\; \right\rfloor \) and \({{t}_{3}}=\left\lfloor {3N}/{4}\; \right\rfloor \), inject \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }} \) and \(\varDelta {{x}_{1\left( 3 \right) }}\) into \({{x}_{1}}\left( {{t}_{1}} \right) \), \({{x}_{1}}\left( {{t}_{2}} \right) \) and \({{x}_{1}}\left( {{t}_{3}} \right) \), respectively, to produce six sequences of \({{X}_{1}},{{Y}_{1}},{{Z}_{1}},{{X}_{2}},{{Y}_{2}},{{Z}_{2}}\).

$$\begin{aligned}&{{X}_{1}}=\left\{ {{x}_{1}}\left( 0 \right) ,{{x}_{1}}\left( 1 \right) ,\ldots ,{{x}_{1}}\left( N-1 \right) \right\} \nonumber \\&{{Y}_{1}}=\left\{ {{y}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 1 \right) ,\ldots ,{{y}_{1}}\left( N-1 \right) \right\} \nonumber \\&{{Z}_{1}}=\left\{ {{z}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 1 \right) ,\ldots ,{{z}_{1}}\left( N-1 \right) \right\} \nonumber \\&{{X}_{2}}=\left\{ {{x}_{2}}\left( 0 \right) ,{{x}_{2}}\left( 1 \right) ,\ldots ,{{x}_{2}}\left( N-1 \right) \right\} \nonumber \\&{{Y}_{2}}=\left\{ {{y}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 1 \right) ,\ldots ,{{y}_{2}}\left( N-1 \right) \right\} \nonumber \\&{{Z}_{2}}=\left\{ {{z}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 1 \right) ,\ldots ,{{z}_{2}}\left( N-1 \right) \right\} . \end{aligned}$$
(14)

Step 2 Compute

$$\begin{aligned}&{{T}_{i}}=\hbox {floor}\left( \bmod \left( {{x}_{1}}\left( i \right) \times 10^{14},256 \right) \right) \nonumber \\&{{V}_{i}}=\hbox {floor}\left( \bmod \left( {{y}_{1}}\left( i \right) \times 10^{14},256 \right) \right) \nonumber \\&{{W}_{i}}=\hbox {floor}\left( \bmod \left( {{z}_{1}}\left( i \right) \times 10^{14},256 \right) \right) \nonumber \\&{{J}_{i}}=\hbox {floor}\left( \bmod \left( {{x}_{2}}\left( i \right) \times 10^{14},8 \right) \right) \nonumber \\&{{K}_{i}}=\hbox {floor}\left( \bmod \left( {{y}_{2}}\left( i \right) \times 10^{14},8 \right) \right) \nonumber \\&{{L}_{i}}=\hbox {floor}\left( \bmod \left( {{z}_{2}}\left( i \right) \times 10^{14},8 \right) \right) , \end{aligned}$$
(15)

where \(i=0,1,\ldots ,N-1\), and floor stands for the rounding operation.

Then transform \(\left\{ {{T}_{i}} \right\} \), \(\left\{ {{V}_{i}} \right\} \) and \(\left\{ {{W}_{i}} \right\} \) into binary qubit sequences:

$$\begin{aligned}&\left| {{T}_{i}} \right\rangle =\underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| T_{i}^{k} \right\rangle =\left| T_{i}^{7} \right\rangle \left| T_{i}^{6} \right\rangle \cdots \left| T_{i}^{0} \right\rangle \nonumber \\&\left| {{V}_{i}} \right\rangle =\underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| V_{i}^{k} \right\rangle =\left| V_{i}^{7} \right\rangle \left| V_{i}^{6} \right\rangle \cdots \left| V_{i}^{0} \right\rangle \nonumber \\&\left| {{W}_{i}} \right\rangle =\underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| W_{i}^{k} \right\rangle =\left| W_{i}^{7} \right\rangle \left| W_{i}^{6} \right\rangle \cdots \left| W_{i}^{0} \right\rangle , \end{aligned}$$
(16)

where \(\left| T_{i}^{k} \right\rangle ,\left| V_{i}^{k} \right\rangle ,\left| W_{i}^{k} \right\rangle \in \left\{ \left| 0 \right\rangle ,\left| 1 \right\rangle \right\} \), \(i=0,1,\ldots ,N-1\), \(k=0,1,\ldots ,7\).

Step 3 Define the sub-operation \({{P}_{t}}\):

$$\begin{aligned} {{P}_{t}}=\left( I\otimes \sum \limits _{i=0,i\ne t}^{N-1}{\left| i \right\rangle \left\langle i \right| }+{{D}_{t}}\otimes \left| t \right\rangle \left\langle t \right| \right) , \end{aligned}$$
(17)

where

$$\begin{aligned} {{D}_{t}}\left| C\left( t \right) \right\rangle&={{D}_{t}}\left| R_{t}^{7}\cdots R_{t}^{0}G_{t}^{7}\cdots G_{t}^{0}B_{t}^{7}\cdots B_{t}^{0} \right\rangle \nonumber \\&={{D}_{t}}\left( \underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| R_{t}^{k} \right\rangle \underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| G_{t}^{k} \right\rangle \underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| B_{t}^{k} \right\rangle \right) \nonumber \\&=\underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| R_{t}^{k}\oplus T_{t}^{k} \right\rangle \underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| G_{t}^{k}\oplus V_{t}^{k} \right\rangle \underset{k=0}{\overset{7}{\mathop {\otimes }}}\,\left| B_{t}^{k}\oplus W_{t}^{k} \right\rangle \nonumber \\&=\left| \left( R_{t}^{7}\oplus T_{t}^{7} \right) \cdots \left( R_{t}^{0}\oplus T_{t}^{0} \right) \left( G_{t}^{7}\oplus V_{t}^{7} \right) \cdots \left( G_{t}^{0}\oplus V_{t}^{0} \right) \right. \nonumber \\&\quad \left. \left( B_{t}^{7}\oplus W_{t}^{7} \right) \cdots \left( B_{t}^{0}\oplus W_{t}^{0} \right) \right\rangle . \end{aligned}$$
(18)

The color image color-information XOR operations could be implemented by the quantum sub-operation \({{P}_{t}}\):

$$\begin{aligned}&{{P}_{t}}\left( \left| I \right\rangle \right) ={{P}_{t}}\left( \frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right) \nonumber \\&\quad =\frac{1}{\sqrt{N}}{{P}_{t}}\left( \sum \limits _{i=0,i\ne t}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right. \nonumber \\&\qquad +\left. \left| R_{t}^{7}\cdots R_{t}^{0}G_{t}^{7}\cdots G_{t}^{0}B_{t}^{7}\cdots B_{t}^{0} \right\rangle \otimes \left| t \right\rangle \right) \nonumber \\&\quad =\frac{1}{\sqrt{N}}\left( \sum \limits _{i=0,i\ne t}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right. \nonumber \\&\qquad +{{D}_{t}}\left. \left| R_{t}^{7}\cdots R_{t}^{0}G_{t}^{7}\cdots G_{t}^{0}B_{t}^{7}\cdots B_{t}^{0} \right\rangle \otimes \left| t \right\rangle \right) \nonumber \\&\quad =\frac{1}{\sqrt{N}}\left( \sum \limits _{i=0,i\ne t}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right. \nonumber \\&\qquad +\left. \left| \left( R_{t}^{7}\oplus T_{t}^{7} \right) \cdots \left( R_{t}^{0}\oplus T_{t}^{0} \right) \left( G_{t}^{7}\oplus V_{t}^{7} \right) \cdots \left( G_{t}^{0}\oplus V_{t}^{0} \right) \left( B_{t}^{7}\oplus W_{t}^{7} \right) \right. \right. \nonumber \\&\quad \left. \left. \cdots \left( B_{t}^{0}\oplus W_{t}^{0} \right) \right\rangle \otimes \left| t \right\rangle \right) \end{aligned}$$
(19)
$$\begin{aligned}&{{P}_{s}}{{P}_{t}}\left( \left| I \right\rangle \right) ={{P}_{s}}\left( {{P}_{t}}\left( \frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right) \right) \nonumber \\&\quad ={{P}_{s}}\frac{1}{\sqrt{N}}\left( \sum \limits _{i=0,i\ne t}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right. \nonumber \\&\qquad +\left. \left| \left( R_{t}^{7}\oplus T_{t}^{7} \right) \cdots \left( R_{t}^{0}\oplus T_{t}^{0} \right) \left( G_{t}^{7}\oplus V_{t}^{7} \right) \cdots \left( G_{t}^{0}\oplus V_{t}^{0} \right) \left( B_{t}^{7}\oplus W_{t}^{7} \right) \right. \right. \nonumber \\&\quad \quad \left. \left. \cdots \left( B_{t}^{0}\oplus W_{t}^{0} \right) \right\rangle \otimes \left| t \right\rangle \right) \nonumber \\&\quad =\frac{1}{\sqrt{N}}\left( \sum \limits _{i=0,i\ne t,s}^{N-1}{\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \right. \nonumber \\&\qquad +\left| \left( R_{t}^{7}\oplus T_{t}^{7} \right) \cdots \left( R_{t}^{0}\oplus T_{t}^{0} \right) \left( G_{t}^{7}\oplus V_{t}^{7} \right) \cdots \left( G_{t}^{0}\oplus V_{t}^{0} \right) \left( B_{t}^{7}\oplus W_{t}^{7} \right) \right. \nonumber \\&\quad \quad \left. \cdots \left( B_{t}^{0}\oplus W_{t}^{0} \right) \right\rangle \otimes \left| t \right\rangle \nonumber \\&\qquad +\left. \left| \left( R_{s}^{7}\oplus T_{s}^{7} \right) \cdots \left( R_{s}^{0}\oplus T_{s}^{0} \right) \left( G_{s}^{7}\oplus V_{s}^{7} \right) \cdots \left( G_{s}^{0}\oplus V_{s}^{0} \right) \left( B_{s}^{7}\oplus W_{s}^{7} \right) \right. \right. \nonumber \\&\quad \quad \left. \left. \cdots \left( B_{s}^{0}\oplus W_{s}^{0} \right) \right\rangle \otimes \left| s \right\rangle \right) . \end{aligned}$$
(20)

From (19) and (20), it is distinct that the color image color-information XOR operations on its homologous pixels can be realized by quantum transform P:

$$\begin{aligned} P=\prod \limits _{i=0}^{N-1}{{{P}_{i}}}. \end{aligned}$$
(21)

By performing operation P on \( \left| I \right\rangle \), one can obtain the image \(\left| {{I}'} \right\rangle \):

$$\begin{aligned} P\left( \left| I \right\rangle \right)&=\prod \limits _{i=0}^{N-1}{{{P}_{i}}}\left( \left| I \right\rangle \right) \nonumber \\&=\frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}{{{D}_{i}}\left| R_{i}^{7}\cdots R_{i}^{0}G_{i}^{7}\cdots G_{i}^{0}B_{i}^{7}\cdots B_{i}^{0} \right\rangle \otimes \left| i \right\rangle } \nonumber \\&=\frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}\left| \left( R_{i}^{7}\oplus T_{i}^{7} \right) \cdots \left( R_{i}^{0}\oplus T_{i}^{0} \right) \left( G_{i}^{7}\oplus V_{i}^{7} \right) \right. \nonumber \\&\quad \left. \cdots \left( G_{i}^{0}\oplus V_{i}^{0} \right) \left( B_{i}^{7}\oplus W_{i}^{7} \right) \cdots \left( B_{i}^{0}\oplus W_{i}^{0} \right) \right\rangle \otimes \left| i \right\rangle \nonumber \\&=\frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}{\left| R{{_{i}^{7}}^{\prime }}\cdots R{{_{i}^{0}}^{\prime }}G{{_{i}^{7}}^{\prime }}\cdots G{{_{i}^{0}}^{\prime }}B{{_{i}^{7}}^{\prime }}\cdots B{{_{i}^{0}}^{\prime }} \right\rangle \otimes \left| i \right\rangle } \nonumber \\&=\left| {{I}'} \right\rangle . \end{aligned}$$
(22)

Step 4 The sequence

$$\begin{aligned} \left| H \right\rangle =\left\{ \left| {{h}_{0}} \right\rangle ,\left| {{h}_{1}} \right\rangle ,\ldots ,\left| {{h}_{N-1}} \right\rangle \right\} \end{aligned}$$
(23)

should be generated before performing the quantum color image right cycle shift operations, where \(\left| {{h}_{i}} \right\rangle =\left\{ \left| {{J}_{i}} \right\rangle ,\left| {{K}_{i}} \right\rangle ,\left| {{L}_{i}} \right\rangle \right\} \), \(i=0,1,\ldots ,N-1\), are orderly. The controlled swap gate \({{U}_{i}}\) is constructed by \(\left| {{h}_{i}} \right\rangle \). Quantum color image right cycle shift operation is executed on \(\left| {{I}'} \right\rangle \) by quantum transform S to acquire the quantum image \( \left| E \right\rangle \), where \( \left| E \right\rangle \) stands for the final encrypted image:

$$\begin{aligned} S\left| {{I}'} \right\rangle&=\prod \limits _{i=0}^{N-1}{{{S}_{i}}}\left| {{I}'} \right\rangle \nonumber \\&=\frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}{{U}_{i}}\left| R{{_{i}^{7}}^{\prime }}\cdots R{{_{i}^{0}}^{\prime }}G{{_{i}^{7}}^{\prime }}\cdots G{{_{i}^{0}}^{\prime }}B{{_{i}^{7}}^{\prime }}\cdots B{{_{i}^{0}}^{\prime }} \right\rangle \otimes \left| i \right\rangle \nonumber \\&=\frac{1}{\sqrt{N}}\sum \limits _{i=0}^{N-1}\left| R_{i}^{{{\left( {{J}_{i}}-1 \right) }^{\prime }}}\cdots R{{_{i}^{0}}^{\prime }}R{{_{i}^{7}}^{\prime }}R{{_{i}^{{{J}_{i}}}}^{\prime }}G_{i}^{{{\left( {{K}_{i}}-1 \right) }^{\prime }}}\cdots G{{_{i}^{0}}^{\prime }}G{{_{i}^{7}}^{\prime }}G{{_{i}^{{{K}_{i}}}}^{\prime }}B_{i}^{{{\left( {{L}_{i}}-1 \right) }^{\prime }}}\right. \nonumber \\&\quad \left. \cdots B{{_{i}^{0}}^{\prime }}B{{_{i}^{7}}^{\prime }}B{{_{i}^{{{L}_{i}}}}^{\prime }} \right\rangle \otimes \left| i \right\rangle \nonumber \\&=\left| E \right\rangle . \end{aligned}$$
(24)

4.2 Quantum color image decryption scheme

The image decryption scheme is as follows.

Step 1 The six sequences \(\{T_i\}\), \(\left\{ {{V}_{i}} \right\} \), \(\left\{ {{W}_{i}} \right\} \), \(\left\{ {{J}_{i}} \right\} \), \(\left\{ {{K}_{i}} \right\} \) and \(\left\{ {{L}_{i}} \right\} \) should be generated with the six initial values \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) \) and three impulse injections \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }},\varDelta {{x}_{1\left( 3 \right) }}\) according to Step 1 and Step 2 in the encryption scheme.

Step 2 The inverse color image right cycle shift operation \({{S}^{-1}}\) controlled by sequence \(\left| H \right\rangle =\left\{ \left| {{h}_{0}} \right\rangle ,\left| {{h}_{1}} \right\rangle ,\ldots ,\left| {{h}_{N-1}} \right\rangle \right\} \) is performed on \(\left| E \right\rangle \) to obtain the quantum image \(\left| {{I}'} \right\rangle \), where \(\left| {{h}_{i}}\right\rangle =\left\{ \left| {{J}_{i}} \right\rangle ,\left| {{K}_{i}} \right\rangle ,\left| {{L}_{i}} \right\rangle \right\} \), \(i=0,1,\ldots ,N-1\).

Step 3 The XOR operations controlled by sequences \(\left\{ \left| {{T}_{i}} \right\rangle \right\} \), \(\left\{ \left| {{V}_{i}} \right\rangle \right\} \) and \(\left\{ \left| {{W}_{i}} \right\rangle \right\} \), \(i=0,1,\ldots ,N-1\), are performed on quantum image \(\left| {{I}'} \right\rangle \) to obtain the decrypted quantum color image \(\left| I \right\rangle \).

5 Theoretical analyses and numerical simulations

Quantum communication and computation is based on the preparation and manipulation of qubit states. Qubit states are very fragile and easily destroyed by decoherence due to unwanted coupling with the environment. However, not all states are equally fragile when interacting with the environment. Indeed, if the qubit–environment interaction exhibits some symmetry, there are states which are immune to this interaction and can therefore be used to protect quantum information. These states are called decoherence-free (DF) states [36]. The amount of quantum information that a given DF subspace is able to protect depends on the number N of qubits [37]. For N even, the DF subspace spanned by states which are eigenstates of the whole Hamiltonian of the qubit-bath system and also eigenstates of the interaction Hamiltonian with eigenvalue zero has dimension:

$$\begin{aligned} d\left( N \right) =\frac{N!}{\left( {N}/{2}\; \right) !\left( {N}/{2+1}\; \right) !}. \end{aligned}$$
(25)

The number of qubits encoded in DF states is \({{\log }_{2}}d\left( N \right) \). For a large N,

$$\begin{aligned} {{\log }_{2}}d\left( N \right) \simeq N-\frac{3}{2}{{\log }_{2}}N. \end{aligned}$$
(26)

Therefore, the encoding efficiency is asymptotically unity.

For N qubits to be processed by quantum computation (N is even and large), suppose the N-dimensional space is \({\mathbb {S}}\), due to the fact that the existence of DF subspace whose dimension is \(\frac{{{2}^{N}}}{{{N}^{{3}/{2}\;}}}\), and we have

$$\begin{aligned} {\mathbb {S}}={{{\mathbb {S}}}_{1}}\oplus {{{\mathbb {S}}}_{2}}, \end{aligned}$$
(27)

where \({{{\mathbb {S}}}_{2}}\) is the \(\frac{{{2}^{N}}}{{{N}^{{3}/{2}\;}}}\)-dimensional DF subspace. Because \(\frac{{{2}^{N}}}{{{N}^{{3}/{2}\;}}}>\frac{N}{2}\), there exists a subspace \({\mathbb {S}}_{1}^{*}\subset {{{\mathbb {S}}}_{2}}\), satisfying that the projection of \({{{\mathbb {S}}}_{1}}\) on the \({{{\mathbb {S}}}_{2}}\) is \({\mathbb {S}}_{1}^{*}\), i.e., we can construct a unitary transformation \(\sigma \), which makes \(\sigma \left( {{{\mathbb {S}}}_{1}} \right) ={\mathbb {S}}_{1}^{*}\subset {{{\mathbb {S}}}_{2}}\).

As suggested above, for N qubits in quantum communication and computation, in order to suppress the effect of decoherence, the N qubits are separated into two parts to process. On the one hand, for the part projecting on the DF subspace \({{{\mathbb {S}}}_{2}}\), because the DF states are immune to the interaction with the environment, we can process it directly according to our requirement; on the other hand, for the part projecting on the subspace \({{{\mathbb {S}}}_{1}}\), we can first use a unitary transformation to project it on \({{{\mathbb {S}}}_{2}}\) and obtain \({\mathbb {S}}_{1}^{*}\), where \({\mathbb {S}}_{1}^{*}\subset {{{\mathbb {S}}}_{2}}\), and then the process is done as we need on the subspace \({\mathbb {S}}_{1}^{*}\). Finally, integrate the two parts of the processed qubits together and we can get the processed N qubits with lower cost of decoherence. Because unitary transformation is invertible, the processed N qubits are easily recovered to the original N qubits by the corresponding inverse processing and inverse unitary transformation.

Here, inspired by DF subspace, we only give a method for suppressing decoherence. In the future, if possible, we will study this method systematically and theoretically including the construction of orthogonal basis of DF subspace, the construction of unitary transformation and the concrete realization of this method on a quantum computer.

Furthermore, quantum Zeno effect, dynamical decoupling and quantum error correction are three important protection methods of quantum information, which also can suppress the decoherence effect and error. According to quantum Zeno effect, the decoherence effect of quantum computation process will be suppressed by making very frequent measurements of the system [38, 39]; different from the measurement used in quantum Zeno effect, dynamical decoupling is used to suppress the decoherence process by imposing a time-dependent hamiltonian \({{H}_{c}}\left( t \right) \) on the target system [40, 41]; last, for errors that occur at a certain probability in channel transmission, one can use quantum error correction to correct there random errors [42,43,44].

Due to the lack of quantum hardware, the simulations are executed with software MATLAB on a classical computer. The whole simulation is based on linear algebraic constructions. The quantum states are simulated by complex vectors, while the quantum operations are simulated by unitary matrices. So what needs to be emphasized is that, in the numerical simulations, we do not consider the effect of decoherence and errors.

In order to verify the performance of the proposed encryption scheme, three encryption schemes for color image in [25, 33, 34] are chosen as the comparison schemes. We select three groups of keys randomly for experimental simulations. The six initial values and three impulse injections are set as follows, respectively.

$$\begin{aligned}&\hbox {Keys 1: }{{x}_{1}}\left( 0 \right) =4.175, {{y}_{1}}\left( 0 \right) =8.203, {{z}_{1}}\left( 0 \right) =1.376, {{x}_{2}}\left( 0 \right) =14.362, \\&{{y}_{2}}\left( 0 \right) =0.800,\quad {{z}_{2}}\left( 0 \right) =2.364,\varDelta {{x}_{1\left( 1 \right) }}=0.523, \varDelta {{x}_{1\left( 2 \right) }}=1.290, \varDelta {{x}_{1\left( 3 \right) }}=0.875\\&\hbox {Keys 2: }{{x}_{1}}\left( 0 \right) =5.564, {{y}_{1}}\left( 0 \right) =3.408, {{z}_{1}}\left( 0 \right) =10.875, {{x}_{2}}\left( 0 \right) =2.966, \\&\quad {{y}_{2}}\left( 0 \right) =8.862, {{z}_{2}}\left( 0 \right) =1.640, \varDelta {{x}_{1\left( 1 \right) }}=0.624, \varDelta {{x}_{1\left( 2 \right) }}=2.875, \varDelta {{x}_{1\left( 3 \right) }}=4.558 \\&\hbox {Keys 3: }{{x}_{1}}\left( 0 \right) =15.778, {{y}_{1}}\left( 0 \right) =6.521, {{z}_{1}}\left( 0 \right) =0.643, {{x}_{2}}\left( 0 \right) =2.390, \\&\quad {{y}_{2}}\left( 0 \right) =4.864, {{z}_{2}}\left( 0 \right) =5.779, \varDelta {{x}_{1\left( 1 \right) }}=1.482, \varDelta {{x}_{1\left( 2 \right) }}=0.855, \varDelta {{x}_{1\left( 3 \right) }}=1.645. \end{aligned}$$

Six color images sized \(512\times 512\) are chosen as original images, shown in Fig. 8, and the corresponding encrypted images are shown in Fig. 9, where the six child figures in Fig. 9a belong to encrypted images with keys 1, the six child figures in Fig. 9b belong to the encrypted images with keys 2, and the six child figures in Fig. 9c belong to encrypted images with keys 3. It is shown that one cannot obtain any information of the original images from the encrypted images. Therefore, the encryption scheme proposed in this paper is effective.

Fig. 8
figure 8

Original images: a Splash, b Baboon, c Lena, d Sailboat, e Peppers and f House

Fig. 9
figure 9

Encrypted images: a using keys 1, b using keys 2 and 3 using keys 3

5.1 Mean square error

An ideal encrypted image should be significantly different from the original one. The difference between encrypted images and original ones can be characterized by mean square error (MSE) defined as follows:

$$\begin{aligned} \hbox {MS}{{\hbox {E}}_{R}}= & {} \frac{1}{m\times n}\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{{{\left( {{I}_{R}}\left( i,j \right) -{{E}_{R}}\left( i,j \right) \right) }^{2}}}} \end{aligned}$$
(28)
$$\begin{aligned} \hbox {MS}{{\hbox {E}}_{G}}= & {} \frac{1}{m\times n}\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{{{\left( {{I}_{G}}\left( i,j \right) -{{E}_{G}}\left( i,j \right) \right) }^{2}}}} \end{aligned}$$
(29)
$$\begin{aligned} \hbox {MS}{{\hbox {E}}_{B}}= & {} \frac{1}{m\times n}\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{{{\left( {{I}_{B}}\left( i,j \right) -{{E}_{B}}\left( i,j \right) \right) }^{2}}}}, \end{aligned}$$
(30)

where \(m\times n\) is the size of image. The parameters \({{I}_{R}}\left( i,j \right) \) and \({{E}_{R}}\left( i,j \right) \) are R values of pixel (ij) in original and encrypted images, \({{I}_{G}}\left( i,j \right) \) and \({{E}_{G}}\left( i,j \right) \) are G values of pixel (ij) in original and encrypted images, \({{I}_{B}}\left( i,j \right) \) and \({{E}_{B}}\left( i,j \right) \) are B values of pixel (ij) in original and encrypted images, respectively. The larger the MSE value, the better the encryption security.

For the six original color images shown in Fig. 8, the MSE values with three groups of keys are calculated as shown in Table 1. The numerical values indicate the different keys chosen randomly have analogous effect to the encryption results.

For the six images encrypted by using our proposed scheme with keys 3, the MSE values are calculated as shown in Table 2. The MSE of the proposed encrypted image is more than the MSE of the scheme in [34], which shows that our scheme is more effective.

Table 1 MSE values of the encrypted images with three keys
Table 2 Comparison of MSE of the encrypted images between the proposed scheme and the scheme in [34]
Fig. 10
figure 10

Correlation distributions between two horizontal adjacent pixels in R channel: a image “Lena” and b encrypted image

5.2 Statistical analysis

5.2.1 Correlation analysis of two adjacent pixels

Correlation reflects the degree of similarity of two variables. An efficient image cryptosystem should produce the encrypted image with sufficiently low correlation in horizontal, vertical and diagonal directions. In this subsection, we choose keys 1 as an example. In order to test the correlations of adjacent pixels in color images “Baboon,” “Lena,” “Peppers” and the corresponding encrypted images, for three channels (RGB), we randomly choose 8000 pairs of two adjacent pixels from horizontal, vertical and diagonal directions, respectively. Correlation coefficients can be calculated as:

$$\begin{aligned} {{C}_{XY}}=\frac{\sum \nolimits _{i=1}^{N}{\left( {{x}_{i}}-\frac{1}{N}\sum \nolimits _{i=1}^{N}{{{x}_{i}}} \right) \left( {{y}_{i}}-\frac{1}{N}\sum \nolimits _{i=1}^{N}{{{y}_{i}}} \right) }}{\sqrt{\sum \nolimits _{i=1}^{N}{{{\left( {{x}_{i}}-\frac{1}{N}\sum \nolimits _{i=1}^{N}{{{x}_{i}}} \right) }^{2}}\sum \nolimits _{i=1}^{N}{{{\left( {{y}_{i}}-\frac{1}{N}\sum \nolimits _{i=1}^{N}{{{y}_{i}}} \right) }^{2}}}}}}, \end{aligned}$$
(31)

where \({{x}_{i}}\), \({{y}_{i}}\) are gray-level values of two adjacent pixels in each primary color channel. Take R channel of “Lena” as an example; Figs. 10, 11 and 12 show the correlation distributions between two adjacent pixels in horizontal, vertical and diagonal directions. The correlation coefficients of color original images “Baboon,” “Lena,” “Peppers” and the corresponding encrypted images in horizontal, vertical and diagonal directions are listed in Tables 3, 4 and  5, respectively. It is clear from Table 3, 4 and 5 that the correlation between the adjacent pixels in the original image is very strong and adjacent pixels in the encrypted image is almost irrelevant, and in all three directions of horizontal, vertical and diagonal, the correlation of our scheme is weaker than that of [25, 34]. This indicates that our scheme is more secure than the schemes in [25, 34]. The proposed encryption scheme generally provides a satisfactory correlation performance to resist the attack based on statistical analysis.

Fig. 11
figure 11

Correlation distributions between two vertical adjacent pixels in R channel: a image “Lena” and b encrypted image

Fig. 12
figure 12

Correlation distributions between two diagonal adjacent pixels in R channel: a image “Lena” and b encrypted image

Table 3 Results of correlation coefficients in horizontal direction
Table 4 Results of correlation coefficients in vertical direction
Table 5 Results of correlation coefficients in diagonal direction

5.2.2 Histogram analysis

Histogram reflects the pixel color value distribution of an image. If the histogram of an encrypted image is uniform, the encryption scheme is more robust against statistical attack and differential attack. The histograms of the pixel RGB values before and after encryption are shown in Fig. 13, where the three child figures in the first line belong to the original image “Lena,” the three child figures in the second line belong to the encrypted image with keys 1, the three child figures in the third line belong to the encrypted image with keys 2, and the three child figures in the last line belong to the encrypted image with keys 3.

Fig. 13
figure 13

Histogram distributions of the original and encrypted images

It can be seen that the encrypting operation can exhibit a uniform distribution of the histogram and does not provide any clue for eavesdroppers who perform statistical attack and differential attack on the encrypted image.

5.2.3 Information entropy

Information entropy is a statistical measure of uncertainty feature of the image. And the entropy \(H\left( s \right) \) of a message source can be calculated as:

$$\begin{aligned} H\left( s \right) =-\sum \limits _{i=0}^{{{2}^{N}}-1}{p\left( {{s}_{i}} \right) {{\log }_{2}}p\left( {{s}_{i}} \right) }, \end{aligned}$$
(32)

where \(p\left( {{s}_{i}} \right) \) represents the probability of the occurrence of symbol \({{s}_{i}}\) and the ideal entropy value for an encrypted image should be 8 bits. A cryptosystem is reliable if and only if the entropy value of encrypted image is close to the ideal value to resist the entropy attacks. With the proposed image encryption scheme and the scheme in [33], counting times of each pixel in three primary colors (RGB) and calculating the corresponding probability, three color channels corresponding to the information entropy are listed in Table 6. From the results of statistics, the loss in the processing of information encryption is completely weak; thus, the proposed scheme is stable and secure against entropy attack. Compared with the scheme in [33], the entropy values of the encrypted images using our scheme are more close to the ideal value. Hence, our scheme is more secure against the entropy attack.

Table 6 Information entropy of the original and encrypted images (bit)

5.3 Key security analysis

5.3.1 Key space analysis

A desirable image encryption scheme should have a sufficiently large key space to resist brute-force attacks. It is recommended that the ideal key space should be larger than \({{2}^{100}}\) considering the current computer computation speed [45]. In our proposed encryption scheme, the total number of injection times is 3 and the key space is composed of: (1) six initial values selected randomly \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) \) and (2) three injected impulse signal values \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }},\varDelta {{x}_{1\left( 3 \right) }}\). Generally, the valid precision of state variables of nonlinear differential chaotic system is \(10^{-14}\) [46], so the total key space reaches \(S = {{10}^{14\times \left( 6\text {+}3 \right) }}\gg {{2}^{100}}\). Thus, the encryption scheme proposed in this paper has high security. It can resist brute-force attacks, even the attack from a quantum computer.

5.3.2 Key sensitivity analysis

Key sensitivity is an essential property for any good cryptosystem, which ensures that one cannot obtain any useful information from the decrypted image when a tiny change occurs to the keys. Here, for the original color image “Lena,” keys 1 is taken as an example to simulate the key sensitivity of our proposed encryption scheme. Figure 14a shows the decrypted image “Lena” with correct keys. Figure 14b–j shows the decrypted images “Lena” with incorrect keys deviated \({{10}^{-14}}\) from \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) , \varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }}\) and \(\varDelta {{x}_{1\left( 3 \right) }}\), respectively, while the other keys are all right.

Fig. 14
figure 14

Decrypted images with: a correct keys, b incorrect \({{x}_{1}}\left( 0 \right) +{{10}^{-14}}\), c incorrect \({{y}_{1}}\left( 0 \right) +{{10}^{-14}}\), d incorrect \({{z}_{1}}\left( 0 \right) +{{10}^{-14}}\), e \({{x}_{2}}\left( 0 \right) +{{10}^{-14}}\), f \({{y}_{2}}\left( 0 \right) +{{10}^{-14}}\), g \({{z}_{2}}\left( 0 \right) +{{10}^{-14}}\), h \(\varDelta {{x}_{1}}\left( 1 \right) +{{10}^{-14}}\), i \(\varDelta {{y}_{1}}\left( 1 \right) +{{10}^{-14}}\), j \(\varDelta {{z}_{1}}\left( 1 \right) +{{10}^{-14}}\)

In order to evaluate the quality of the color images restored from the encrypted images with the modified secret key, the RGB peak signal-to-noise ratio (RGB-PSNR) is used as defined below:

$$\begin{aligned} \hbox {PSNR}=20{{\log }_{10}}\left( \frac{255}{\sqrt{\frac{1}{3\times m\times n}\sum \nolimits _{i=1}^{m}{\sum \nolimits _{j=1}^{n}{\sum \nolimits _{k=1}^{3}{{{\left[ {I}'\left( i,j,k \right) -I\left( i,j,k \right) \right] }^{2}}}}}}} \right) ,\nonumber \\ \end{aligned}$$
(33)

where \(m\times n\) is the size of image, and \({I}'\left( i,j \right) \) and \(I\left( i,j \right) \) denote the restored image and the original image, respectively. After the comparison our restored images \({I}'\) to the original images I, the RGB-PSNR values of six restored images are obtained as shown in Table 7.

From Fig. 14, when the decryption key deviated \({{10}^{-14}}\) from the correct key including \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) \), the decryption image has become an uniform white noise without any visual information. From Table 7, when the decryption key deviated \({{10}^{-14}}\) from the correct key including \({{x}_{1}}\left( 0 \right) ,{{y}_{1}}\left( 0 \right) ,{{z}_{1}}\left( 0 \right) ,{{x}_{2}}\left( 0 \right) ,{{y}_{2}}\left( 0 \right) ,{{z}_{2}}\left( 0 \right) \), there is almost no difference in the PSNR of the decrypted image and the corresponding encrypted image, and when the decryption key deviated \({{10}^{-14}}\) from the correct key including \(\varDelta {{x}_{1\left( 1 \right) }},\varDelta {{x}_{1\left( 2 \right) }}, \varDelta {{x}_{1\left( 3 \right) }}\), a part of the visual information of the original image is decrypted and the PSNR of the decrypted image is only about 9, 11 or 14. It is proved that the correct image can be reconstructed only when the decryption key and the encryption key match accurately. Because the key space of the proposed encryption scheme is very big, unless someone has obtained in advance the correct secret key, it is almost impossible to accurately restore the original image.

5.4 The influence of noises in transmission

In the transmission process, the encrypted image is always interfered by noises. In order to test the impact of the noise interference on the proposed image encryption scheme, the noise is added into the encrypted image in the following method:

$$\begin{aligned} {E}'=E+k\cdot D, \end{aligned}$$
(34)

where E and \({E}'\) are encrypted image and noisy encrypted image, respectively, k is a coefficient indicating the noise strength, and D represents Gaussian random data with zero mean and standard deviation. In this subsection, for our proposed encrypted scheme, keys 1 is taken as an example to simulate the influence of noises in transmission. The decrypted images when k equals 0, 1, 3, 5, 7, 10 are shown in Fig. 15. It is found that the major information of the original color images can still be recognized from the decrypted images, although the decrypted images turn blurrier with the noise intensity increasing. Thus, the encryption scheme proposed in this paper can resist noise interference to some degree.

Table 7 RGB-PSNR values of six encrypted images and the restored images by the secret keys with a slight change
Fig. 15
figure 15

Results of noise attack with different noise intensities: a \(k=0\), b \(k=1\), c \(k=3\), d \(k=5\), e \(k=7\) and f \(k=10\)

5.5 Computational complexity

Assume the original color image to be encrypted is divided into three gray components and each component is represented by a channel. The channel can be viewed as a \({{2}^{n}}\times {{2}^{n}}\) gray image. In our scheme, the computational complexity depends on XOR operations and right cycle shift operations. According to the parallel characteristics of quantum computation, the grayscale information for each pixel of the quantum image is performed by the quantum XOR operation, which is realized by using a 2n-CNOT gate. It is understood that each n-CNOT gate can be decomposed into \(4n-8\) Toffoli gates, and the Toffoli gate can be realized by six controlled NOT gates [26]. Thus, the quantum image XOR operation needs \(128-256\) basic gates. Consequently, the computational complexity of the quantum image XOR operation is \(O\left( n \right) \). The complexity of the quantum color image right cycle shift operations could be evaluated via the complexity of the quantum sub-operation \({{S}_{YX}}\). The quantum sub-operation \({{S}_{YX}}\) is implemented by operation \({{U}_{YX}}\). A color image right cycle shift operation involves \(8 \times (r+s+t)\) swap gates, and each swap gate can be broken down into three CNOT gates. The number of unit gates included in the operations \({{U}_{YX}}\) is \(24 \times (r+s+t)\), where rst represent the times of three channels of each pixel right cycle shift operations, respectively. Because \(0\le r,s,t\le 7\), the color image right cycle shift operation consists of \(24\times 21\) basic gates at most. Therefore, the total computational complexity of the proposed quantum color image encryption scheme is \(O\left( n \right) \), while the total computational complexity in the corresponding classical case is \(O\left( 3 \times {2}^{2n} \right) \). It is easily seen that the proposed quantum color image encryption scheme has a better performance than the classical counterparts in terms of the computational complexity.

6 Conclusion

In this paper, we have proposed a quantum color image encryption scheme based on coupled hyper-chaotic Lorenz system with three impulse injections. Firstly, since the short-period behavior of chaotic system after too many iterations can lead to degeneration of dynamics, three impulse signal values are injected into coupled hyper-chaotic Lorenz system during iterations to enhance the complexity of trajectory and make the encryption scheme whose key streams are generated from this system safer. Then, in the encryption process, we use the NCQI model to represent the quantum color original image, in which 24 qubits are employed to represent the pixel color scale values of each pixel and six sequences generated from coupled hyper-chaotic Lorenz system are used to encrypt the red, green and blue components by XOR operations and right cyclic shift operations. Therefore, our scheme has three merits: (1) It is free from the influence of quantum states collapse and can obtain accurate pixel values in quantum measurement; (2) three impulse signal values are injected into coupled hyper-chaotic Lorenz system during iterations which can enhance the complexity of trajectory; (3) six initial values and three impulse signals values are used as keys, which could reduce the burden of keys transmission and make the cryptosystem own a key space large enough to resist exhaustive attack, even the attack from a quantum computer. Numerical simulations demonstrate that the proposed encryption scheme has a good feasibility and effectiveness for protecting quantum color images and is more secure in comparison with other encryption algorithms.