1 Introduction

The optical information security technology has been deeply researched since (Refregier and Javidi 1995) proposed an optical image encryption system based on double random phase encoding (DRPE). Optical image encryption technology is extensively explored due to its parallel processing and high speed. Various encryption algorithms have been reported based on different optical systems, such as optical transforms (Liu and Liu 2007; Alfalou and Brosseau 2009; Liu et al. 2011; Lang 2012; Chen et al. 2013a, b; Mehra et al. 2014; Abuturab 2014; Sui et al. 2014), interference (Zhu et al. 2009), holography (Chen et al. 2012) and interferometry (Meng et al. 2006). In some optical encryption systems, like double random phase encoding technology (Refregier and Javidi 1995), the secret image is modulated and the pixel value is randomized by random phase function. Moreover some scrambling operations, such as jigsaw transform and Arnold transform, are considered to change the sequence of image pixels (Hennelly and Sheridan 2003; Zhong et al. 2012; Chen et al. 2015). Typically a secret image can be randomized by encryption scheme composed of random reversible process.

As a trend of optical information security, various color image encryption algorithms (Chen et al. 2009, 2015; Liu et al. 2015; Abuturab 2012, 2013) have been reported in recent years. In these encryption schemes (Chen et al. 2009, 2015; Liu et al. 2015; Abuturab 2012, 2013), the color image is separated into red, green and blue components, which are regarded as the corresponding channels. Subsequently the corresponding color components can be encoded by some encryption method of gray-level image. Different optical systems, such as dual fractional Fourier–wavelet transform (Chen et al. 2009), Fresnel transform (Liu et al. 2015) and fractional Fourier transform (Chen et al. 2015), have been introduced for hiding color image encryption. Some latest color image encryption schemes in gyrator transform domain have been proposed (Abuturab 2012, 2013, 2014), the gyrator transform are well used in these schemes and the security, validity and capability of the algorithms are improved.

In this work, we present a novel color image encryption scheme based on a hyperchaotic system in gyrator domains. In the encryption process, three hyperchaotic phases generated by a 4D Lorenz system are considered and utilized. To enhance the security of the encryption algorithm, the original color image will be divided into RGB components and converted into one dimension format. Subsequently the hyperchaotic sequences are blended into the one dimensional data as the imaginary part. Then the complex function is scrambled by employing discrete cosine transform (DCT) and then encoded back to image format. Finally the three scrambled components will be changed as the real part and the imaginary part of a light field in the gyrator transform. The random hyperchaotic sequences are regarded as the main keys in this cryptosystem and the parameters in the hyperchaotic system and the gyrator transform can serve as the extra keys for enhancing the security. Numerical simulation is given to validate the performance of the proposed color image encryption.

The rest of the paper is organized in the following sequence. In Sect. 2, the proposed encryption/decryption algorithm is addressed in detail. In Sect. 3, numerical simulation results are made to demonstrate the validity of the algorithm. Concluding remarks are summarized in the final section.

2 Color image encryption algorithm

In this section, a new 4D Lorenz hyperchaotic system and gyrator transform are introduced briefly in this section. Thereafter, the intact encryption algorithm in gyrator transform domains is addressed in detail.

2.1 Hyperchaotic system

Referring to (Chee and Xu 2005; Lin et al. 2010; Zhu 2012), hyperchaotic dynamics provides a fast approach for building superior performance cryptosystem. The properties of hyperchaotic maps, like sensitive to initial conditions and random-like behavior, makes it suitable for protecting the secret information. Besides, it is believed that higher dimensional chaotic systems have larger key space and can improve the security of encryption scheme by generating more complex dynamical behavior or high randomness (Zhu 2012).

In proposed encryption scheme, a new hyperchaotic system is used in key scheming, which can be modeled as follows

$$\left\{ {\begin{array}{*{20}l} {\dot{x} = a(y - x),} \hfill \\ {\dot{y} = cx - y - xz + u,} \hfill \\ {\dot{z} = xy - bz,} \hfill \\ {\dot{u} = - kx.} \hfill \\ \end{array} } \right.$$
(1)

where a, b, c and k are constant parameters. When a = 35, b = 8/3, c = 28 and k = 5, the Lyapunov exponents of the hyperchaotic system are λ 1 = 0.3997, λ 2 = 0.3113, λ 3 = 0 and λ 4 = −14.3776. Here, the fourth order Runge–Kutta algorithm has been performed to solve Eq. 1 with the initial conditions x 0 = y 0 = z 0 = u 0 = −10 and the (x − y) hyperchaotic Lorenz attractor is illustrated in Fig. 1.

Fig. 1
figure 1

The (x–y) hyperchaotic Lorenz attractor used in this paper

For better randomness (Zhu 2012), a considerable pretreatment for the hyperchaotic sequences is applied as follows

$$s_{i}^{ * } = s_{i} \times 10^{4} - round\left( {s_{i} \times 10^{4} } \right),\quad \left( {i = 1,2,3,4} \right).$$
(2)

where s i represents the value of the original chaotic sequence from the hyperchaotic system mentioned above, which is x i , y i , z i or u i . The symbol s i * denotes the improved sequences corresponding to s i .

The hyperchaotic Lorenz attractor sequences will be employed to design the proposed algorithm.

2.2 Gyrator transform

The mathematical definition of gyrator transform is given briefly in this subsection. The gyrator transform (Simon and Wolf 2000; Rodrigo et al. 2007) is a kind of linear canonical transform (Ozaktas et al. 2000) and only has a two-dimensional format. For the two-dimension function g(x, y), the gyrator transform can be expressed as

$$\begin{aligned} G(u,v) & = \xi^{\alpha } [g(x,y)](u,v) \\ & = \frac{1}{{\left| {\sin \alpha } \right|}}\iint {g(x,y)}\exp \left[ {i2\pi \frac{{\left( {xy + uv} \right)\cos \alpha - xv - yu}}{\sin \alpha }} \right]{\text{d}}x{\text{d}}y, \\ \end{aligned}$$
(3)

where G(u, v) and g(x, y) are the output and input of the gyrator transform, respectively. The parameter α is a fractional order and the gyrator transform will becomes a Fourier transform when α = π/2 with the rotation of the coordinates (u, v). Besides, the gyrator has some properties similar to fractional Fourier transform, such as index additivity, energy conversation and linearity. For hardware architecture, the gyrator transform can be implemented in the optical system composed of six thin cylinder lenses (Simon and Wolf 2000).

2.3 Encryption algorithm

The flowchart of the proposed image encryption is depicted in Fig. 2. Both the hyperchaotic system and gyrator transform are considered and utilized to complete the intact secure scheme. In the initial stage of the encryption process, the original color image is separated into RGB components and then encoded into one dimensional stream, respectively. Simultaneously, three random sequences generated by the hyperchaotic system are blended into the corresponding stream as the imaginary part. Here the blending operation can be calculated as follows

$$\left\{ {\begin{array}{*{20}c} {Se1 = \cos \left( {sr. * \left[ {\left( {0.01 * s_{4}^{ * } } \right) + 0.005} \right]} \right) + i * \cos \left( {s_{1}^{ * } * \pi /2} \right)} \\ {Se2 = \cos \left( {sg. * \left[ {\left( {0.01 * s_{4}^{ * } } \right) + 0.005} \right]} \right) + i * \cos \left( {s_{2}^{ * } * \pi /2} \right)} \\ {Se3 = \cos \left( {sb. * \left[ {\left( {0.01 * s_{4}^{ * } } \right) + 0.005} \right]} \right) + i * \cos \left( {s_{3}^{ * } * \pi /2} \right)} \\ \end{array} } \right.$$
(4)

where Se and s* denote the blended sequences and the improved sequences calculated by using Eq. 2, respectively. Here sr, sg and sb are the one dimension sequences of the RGB components.

Fig. 2
figure 2

The flowchart of the color image encryption algorithm. (Color figure online)

In the following step, DCT is employed in the process of image encryption. After the blending the stream, the mixed data is converted by DCT. DCT can change the distribution of pixel value of the whole stream to achieve a higher level random output pattern. Subsequently, the output stream of DCT is encoded back to RGB components with the format as complex function. Finally, the results from the calculations described above are encoded by using gyrator transform simultaneously. The amplitude of the output from gyrator transform is regarded as the final encrypted image in this paper.

For decryption process, the inverse gyrator transform and inverse DCT are performed along the reverse direction of the encryption process. Since every steps of the encryption flowchart is reversible, the secret image can be retrieved completely with the correct keys. Moreover, the phase function of the encrypted result is the main key for our encryption algorithm for their high random-like behavior and sensitivity to initial conditions properties. The rotation angle α 1, α 2 and α 3 used in each gyrator transform can be regarded as the extra keys to enhance to the security of the encryption scheme. To retrieve the original image, the users must provide both the main keys and extra keys. It is impossible to decrypt the intact information if any keys are inexistence. Some simulations will be given to test the result of missing keys in next section.

The encryption/decryption scheme proposed in this paper can be implemented with an electro-optical setup illustrated in Fig. 3. The gyrator transform G α and its inverse transform G −α are achieved by an optical system (Simon and Wolf 2000). Three kinds of optical beam (red, green and blue) are utilized to encode the RGB channels of the color image. Here, the amplitudes and phases will be encoded into the optical encryption system of the gyrator transform by using the spatial light modulator (SLM) (Simon and Wolf 2000). At the output plane, we record the phase information by using in-line holography technique. Besides, the calculation of dimension encoding and DCT can be performed on the computer. Moreover, the devices SLM and CCD will accomplish the data communication between computer and optical system will be the SLM and CCD. The algorithm can serve in the hardware-based cryptographic.

Fig. 3
figure 3

The electro-optical setup of the proposed encryption scheme

3 Numerical simulation

Numerical simulation is considered to demonstrate the effectiveness of the encryption algorithm. In this section, we select a color image ‘Lena’ having 256 × 256 pixels shown in Fig. 4 to serve as the original image. The rotation angles in gyrator transform are set in 0.2, 0.3, 0.5, respectively. In addition, the first 65,536 values of the hyperchaotic sequences are calculated and encoded. In calculation we use a computer with Core 2, CPU 2.5 GHz and 2048 Mbytes memory under Windows 7 system. The encryption process and decryption processes for this picture take 0.1815 and 0.1882 s, respectively. By using the parameters mentioned above, the encrypted data is displayed in Fig. 5. For showing the complex function, the encrypted/decrypted images in the following section are shown for their real part.

Fig. 4
figure 4

The original secret image used in this paper

Fig. 5
figure 5

Encrypted results: a the encrypted image and b decrypted image

To weight the difference between the decrypted image and original image, the peak signal-to-noise ratio (PSNR) function is performed and expressed as

$${\text{PSNR}}\left( {I_{\text{d}} ,I_{o} } \right) = 10\log_{10} \frac{{255^{2} M \times N}}{{\sum\limits_{\forall x,y} {\left[ {I_{\text{d}} (x,y) - I_{o} (x,y)} \right]^{2} } }}({\text{dB}}).$$
(5)

where I d and I 0 represent the decrypted image and original image, respectively. The symbols ‘d’ and ‘o’ are short for ‘decrypted’ and ‘original’. Moreover, the parameter M and N denote the size of the two images in this calculation.

In the aspect of security, the sensitivity of fractional order α in gyrator transform is calculated first. As mentioned above, the parameters α1, α2 and α3 used in RGB channels are regarded as the additional keys in this encrypted scheme. Therefore, all these three extra keys are selected to serve as a variable to test the sensitivity in the encryption algorithm, respectively. In this experiment, we suppose that the main keys and the initial conditions of the hyperchaotic system are stolen by the attacker. Therefore, the additional keys α have to protect the secret color image. In numerical simulations, the angle parameters α1, α2 and α3 in RGB channels are taken at 0.52, 0.5 and 0.48, respectively. When the main key (the encrypted phase data) and the initial conditions of hyperchaotic system are correct, the angles α1, α2 and α3 are changed around the correct value and the corresponding PSNR curve is illustrated in Fig. 6. Here the sampling step length of the additional keys in the experiments is taken at 0.005. As we can see from the experiment result, the left image in Fig. 6 is almost random pattern and the right one has critical noise even if the keys α are very close to the correct value. In other words, the parameters α regarding as the additional key perform well in protecting the secret image.

Fig. 6
figure 6

The PSNR calculated by the different values of the parameter α in gyrator transform

In addition, the normalized correlation coefficient (NCC) is also considered to judge the correctness between the encrypted/decrypted image and the original color image. The mathematical definition of NCC can be expressed as

$${\text{NCC}}(I_{r} ,I_{o} ) = \frac{1}{h \times w}\sum\limits_{x = 1}^{h} {\sum\limits_{y = 1}^{w} {I_{r} (x,y)I_{o} (x,y)} }$$
(6)

where w and h denote the width and height of the secret image, respectively. Similarly, I r and I o represent the retrieved image and original image, the pixel values of which have been normalized in the range [−1, 1]. Moreover, the value of NCC is in the range of [−1, 1]. The value of NCC between the original secret image displayed in Fig. 4 and the decrypted image displayed in Fig. 5b is 1, which implies that there is no difference between the two images. Furthermore, the NCC values between the original image and the incorrect decrypted images shown in Fig. 6 are 0.2187 and 0.3688, which also indicate the sensitivity of the extra key α. The small effective interval of the additional keys will cause prodigious difference of the decrypted results.

On the other hand, we demonstrate that the secret color image is impossible to be recovered without the main key. In the following experiment, some situations, like missing the main key or using the modified main key, are considered and simulated. Firstly, we suppose that the additional keys are known by the illegal user, the decrypted result by using an incorrect main key is drawn in Fig. 7a. Subsequently the decryption result without main key is illustrated in Fig. 7b. As we can see from Fig. 7, the decrypted results are noise-like pattern and lost the detail information of the image. The NCC values between the original image and these two decrypted results are 0.2973 and 0.0312, which indicate the results are far different from the secret image.

Fig. 7
figure 7

The test of decryption: a main key is incorrect while additional keys are known, b main key is missing while the additional keys are known

In the follow step, a worse situation is considered. When the main key and the additional keys α are revealed, the initial conditions of the hyperchaotic system will serve as the last protection key for the total encryption scheme. As described above, the initial conditions of the hyperchaotic system is set as x 0 = y 0 = z 0 = u 0 = −10 for the encryption/decryption experiment shown in Fig. 5. In the following experiment, we suppose that x 0, y 0 and z 0 are cracked by the illegal user, and u 0 is set as −9.9999, which is very close to the correct value −10. Besides, another case is considered as follows, y 0, z 0 and u 0 are known and x 0 is set as −10.0001 for the decryption process. The decrypted images of these two situations have been displayed in Fig. 8a, b, from which the secret information of the original image is completely under protect. The NCC values between the original image and the two decrypted results are 0.0793 and 0.0684, respectively. Therefore, the initial conditions of the chaotic system are very sensitive for protecting the color image, the small change of the initial values cause prodigious difference. Furthermore, more decryption experiments have been designed to test the sensitivity of the initial values and the results are listed in Table 1, in which the NCC and PSNR value are calculated between the decrypted results and original image. Here, we suppose that all the other keys are known and the initial value of the chaotic system serve as the last protection instrument. The result listed in Table 1 proves the capability of x 0, y 0, z 0 and u 0 in protecting the secret data.

Fig. 8
figure 8

The decryption results: a using the initial condition [−10 −10 −10 −9.9999], b using the initial condition [−10.0001 −10 −10 −10]

Table 1 The decrypted results by using different initial conditions

The encrypted image will be checked by occlusion attack and noise attack as the aspect of robustness analysis. In the attack experiments, the decryption process is performed with the correct key from an encryption image occluded partly, which is shown in Fig. 9a, b. Supposing that the encrypted image is lost or destroyed partly and the values of occluded pixels are replaced with 0 and the corresponding results are represented in Fig. 9c, d. As shown in Fig. 9, the main information of the original input image can be recognized in vision even if there are serious noises in the recovered images. The recovered image shown in Fig. 9c is more clear than that in Fig. 9d because of the different occluded acreage.

Fig. 9
figure 9

The test of occlusion attack: a the occluded encrypted image 1, b the occluded encrypted image 2, c the recovered result of (a) and d the recovered result of (b)

For the noise attack experiment, the noise data are added into the secret data by using the following model

$$I^{\prime } (x,y) = I(x,y)\left[ {1 + \delta \cdot \sigma_{0,1} (x,y)} \right],$$
(7)

where \(I (x ,y )\) represents the original encrypted data. I (x, y) is the polluted by the noise σ 0,1(xy), which denotes random function with the mean value 0 and standard deviation 1. The parameter δ represents the intensity of the added noise and we named it intensity factor. The corresponding PSNR curve is calculated and depicted in Fig. 10 by using the images I (xy) generated with various values of intensity factor δ. Also, for δ = −0.05 and δ = 0.5, two decrypted images have been attached in Fig. 10, in which the outline of the secret image can be identified.

Fig. 10
figure 10

The PSNR curve of noise attack including decrypted images obtained with δ = −0.05, and δ = 0.5

Finally, the experiments of known plaintext attack (Peng et al. 2006) and chosen plaintext attack (Peng et al. 2006) are considered to test the random phase encoding of the proposed encryption scheme. An encryption model is defined as follows

$$E(u,v) = \xi^{\alpha } \left\{ {I(x,y)\exp \left[ {i \cdot \phi_{1} (x,y)} \right]} \right\}\exp \left[ {i \cdot \phi_{2} \left( {x^{{\prime }} ,y^{{\prime }} } \right)} \right],$$
(8)

where the function functions ϕ 1(xy) and ϕ 2(x y ) represent two random phase masks and the symbol ξ α denotes gyrator transform as mentioned before. E(xy) is the output function, which can be regarded as the red, green and blue components of the encrypted image obtained by the proposed encryption algorithm. Therefore, iterative phase retrieval algorithm and impulse function can be used for the known plaintext attack (Peng et al. 2006) and chosen plaintext attack (Peng et al. 2006), respectively.

Two test color images ‘Baboon’ and ‘Peppers’ have 128 × 128 pixels are selected in the plaintext attack experiment. First of all, the test images are encrypted by using the algorithm described in Sect. 2 and the original images and encrypted data are illustrated in Fig. 11a–d, respectively. In the following step, we suppose that the original secret image ‘Baboon’ and its encrypted data are filched by the attacker. In this situation, the decrypted data of image ‘Peppers’ shown in Fig. 11d will be attacked in simulation. For the known plaintext attack experiment, the phase retrieval algorithm is employed with 500 iterations in gyrator domain for red, green and blue components, respectively. Besides, the impulse function is employed in chosen plaintext attack experiment. The experimental results obtained by known plaintext attack and chosen plaintext attack illustrated in Fig. 11e, f, respectively. As we can see from the results, the recovered images are random pattern and cannot be identified entirely.

Fig. 11
figure 11

The test of known plaintext attack and chosen plaintext attack: a original image, b original image, c the encrypted data of (a), d the encrypted data of (b), e the result of known plaintext attack and f the result of chosen plaintext attack

4 Conclusion

We have proposed a color image encryption algorithm by using a hyperchaotic system in gyrator transform domains. An original color image is divided into red, green and blue components and encoded as three 1-D streams. Subsequently the streams and three other hyperchaotic sequences are blended to synthesize new complex sequences. The complex functions are scrambled by employing discrete cosine transform and then encoded back to RGB channels. Then the RGB components are modulated in the optical gyrator transform system and the amplitude and phase in the output plane of optical system are regarded as the encrypted information and main key. The parameters of the optical system and the initial conditions of the hyperchaotic system can serve as additional keys for security enhancement. Some numerical simulations have demonstrated the validity, security and robustness of the color image encryption scheme.