Double color image encryption using iterative phase retrieval algorithm in quaternion gyrator domain

: This paper describes a novel algorithm to encrypt double color images into a single undistinguishable image in quaternion gyrator domain. By using an iterative phase retrieval algorithm, the phase masks used for encryption are obtained. Subsequently, the encrypted image is generated via cascaded quaternion gyrator transforms with different rotation angles. The parameters in quaternion gyrator transforms and phases serve as encryption keys. By knowing these keys, the original color images can be fully restituted. Numerical simulations have demonstrated the validity of the proposed encryption system as well as its robustness against loss of data and additive Gaussian noise.


Introduction
The image encryption technique, by its capability to ensure the security of information transmission and communication, has attracted a growing attention since the double random phase encoding technique was proposed by Refregier and Javidi [1] in 1995. In general, the input image is encrypted into an undistinguishable image and decrypted when received with the proper granted keys. In the past decades, various optical or digital encryption algorithms for gray images have been developed [1][2][3][4]. Some advanced techniques of optical encryption have emerged lately, such as the spatially incoherent image encryption system [5], ptychography based encryption [6] as well as asymmetric cryptosystem using random binary phase modulations [7]. Furthermore, a new and effective optical system using phase modulation with sparse representation was reported in [8], which achieves higher security by employing optical authentication method.
Color images remain however of major importance in many applications [9,10]. Zhang and Karim [11] were the first to introduce a single-channel encryption algorithm for color image using double random phase encoding in the Fourier domain. Multiple channels encryption algorithms for color image were meanwhile investigated by applying the existing encryption algorithms for gray image on the red, green and blue channels independently. They make use, for example, of Fresnel transform [12], fractional Fourier transform [13,14] or gyrator transform [15,16]. Based on the quaternion theory [17], recent works introduced color image encryption algorithms in a fully vectorial form. They rely on the discrete quaternion Fourier transform [18] and the quaternion gyrator transform [19], respectively. The interest of the quaternion gyrator transform is that the presence of rotation angle enlarges the keys space and thus enhances the system security.
In addition to the aforementioned encryption algorithms for single gray or color image, multiple-image encryption algorithm capable to fuse more than one target image into a single illegible image has attracted great interest [20][21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37]. The superiority of multiple-image ! encryption relies on the minimization of storage requirements for secret data and the improvement in transmission efficiency. Although the previous encryption algorithms for single gray or color image can be directly used for successive encryption of multiple images, the cost and the complexity of such systems will be expected to significantly increase. The drawbacks of such approach have been discussed for the double random phase (DRP) encoding technique in [25]. To surmount these deficiencies, advanced encryption algorithms for multiple images have been proposed these last years. By combining the iterative Fourier transform algorithm with the classical double random phase encryption system, Alfalou and Mansour [25] proposed a two level encryption/decryption system to encode multiple images. Meanwhile, the iterative phase retrieval algorithm for gray or binary images associated or not with other techniques in Fresnel transform domain [21][22][23][24], fractional Fourier transform domain [28][29][30][31][32][33][34][35] as well as in gyrator transform domain [36,37] were also intensively investigated. The fractional Fourier transform is widely used due to the fact that its parameter, the fractional order, enlarges the key space. In contrast, the gyrator transform has not received so far much attention and in particular for image encryption.
Throughout the literature, however, there are few studies focused on the encryption algorithm for double or multiple color images. An encryption algorithm for double color images implemented in the fractional Fourier domain was reported in [34], where two color images were in a first step converted into their indexed formats, a data matrix and a colormap matrix. Afterwards, the encryption is implemented on both data matrices. In most cases, such method will degrade the quality of the restituted images due to the approximation made in the transformation between the RGB color space and its indexed format. The same pre-processing strategy was used for four color images encryption scheme in [35], this encryption being carried out through cascaded fractional Fourier transforms.
In this paper, our main objective is the design of a double color image encryption algorithm based on quaternion algebra. The rest of the paper is organized as follows. Section 2 briefly reviews the main features of quaternions and quaternion gyrator transform (QGT) for describing color images. In section 3, the algorithm for encryption and decryption of double color images in quaternion gyrator domain is described. Numerical simulations are reported in section 4 to demonstrate the performance of the proposed solution. Some conclusions are drawn in section 5.

Quaternions
A quaternion number can be written as: q a ib jc kd = + + + , where a, b, c, d are real numbers and i, j, k are orthogonal imaginary parts obeying the following rules: ( representing the eigenaxis and the eigenangle, respectively. An RGB image f(x, y) can be represented by a pure quaternion matrix as .
where the subscripts {R, G, B} represent the color components of the image. Based on the quaternion representation, each color pixel is encoded as a pure quaternion, thus the ! correlations between them can be effectively preserved.

Quaternion gyrator transform
The gyrator transform, with rotation angle !, has been introduced by Rodrigo et al. in the field of optics [38]. Some applications have been already reported for image encryption and specific noise reduction [15,16,[36][37][38][39]. Like the fractional Fourier transform, the gyrator transform belongs to a class of linear canonical integral transform and can be viewed as an extension of the Fourier analysis. Its advantage is also to enlarge the key space and consequently strengthen the system security. The traditional gyrator transform for gray image can be extended to quaternion domain for describing color image. Due to the non-commutative property of quaternion multiplication, the right-side quaternion gyrator transform (QGT) with rotation angle ! is defined as [19] where µ is a pure unit quaternion and the right-side of Eq. (2) reduces to the right-side quaternion Fourier transform with the rotation of coordinates at "/2; for ! = 3"/2, to the inverse quaternion Fourier transform with the rotation of coordinates at "/2. The inverse quaternion gyrator transform corresponds to the QGT at angle ! " . The implementation of QGT is achieved through two left-side quaternion Fourier transforms (for more details about quaternion Fourier transform and quaternion gyrator transform, refer to [19,40]).

Principle of encryption and decryption
Encryption algorithms using iterative phase retrieval technique for double gray images have been reported in [28,37]. They consist of a series of forward and backward iterations. To deal with double color images, three groups of gray images (the color image is decomposed into red, green and blue channels and each component is viewed as a gray image) will be respectively encrypted. However, this approach does not make use of the inter-relationships between color components. It also leads to three times larger iteration loops and phase functions (e.g. the phase functions will go up to 12). Obviously, this can be a serious handicap for modern applications. Here, a novel encryption algorithm for double color images is proposed by combining the iterative phase retrieval algorithm with quaternion gyrator transform.

Description of the proposed algorithm
Without loss of generality, suppose that f(x, y) and g(x, y) be two color images to be encrypted, and h(x, y) the ciphertext image. The phase functions 1 ! , and assume that the following relationship between the images and the phases holds   2 ] ! are randomly generated.
After n-th iteration, with the known of the phase functions 1 n ! , 2 n ! and 2 n ! , we define Then, the phase 1 n ! can be determined by To evaluate the quality of the recovered color image with respect to the reference one and also to end the iteration, the correlation coefficient (CC) in color space is used where n c g denotes the R, G, B channels of the recovered color image at the n-th iteration step, and E{·} the expected value operator. Once the CC value, selected as the convergence criterion, reaches a predefined threshold, then the iteration process stops.
Finally, the optimized four phases are obtained as follows Alternatively, it can be achieved by the cascaded QGT performed on color image g(x, y) with rotation angles # 1 , # 2 and phase functions $ 1 , $ 2 as As pointed in [25], a perfect encryption algorithm should parallel a decryption algorithm to allow us retrieving the secret information by means of the granted keys as a receiver. In other words, the encryption algorithm should be reversible. In the proposed encryption algorithm, the accompanied phase function % can be considered as the public key. The rotation angles ! 1 , ! 2 and the phase masks 1 ! , 2 ! are private keys for recovering the color image f(x, y), while the angles # 1 , # 2 and the phase masks $ 1 , $ 2 are private keys for recovering the color image g(x, y). The parameters µ, µ 11 , µ 12 , µ 21 , µ 22 can be viewed as auxiliary keys. With the above known essential keys, the two target color images f(x, y) and g(x, y) can be restituted by implementing the inverse encryption algorithm process as follows

Complexity analysis
The computational complexity of the proposed encryption algorithm will be analyzed next. It depends on two main factors. First, to extract each phase function in the n-th loop, the quaternion gyrator transform and its inverse transform must be computed four times. Here, the left-side quaternion Fourier transform is obtained via the 2D fast complex-valued Fourier transform [40] and introduced into the calculation of quaternion gyrator transform. For an image with size M " N, the computation complexity of the 2D fast Fourier transform has been shown to be ! [23]. The second factor is the number of iterations. It has been set to 1000 in all experiments, a value considered as a good balance between time computation and accuracy in image recovery. In short, the computation load depends largely upon the image size and the iteration number.

Numerical simulation results
To corroborate the validity and the effectiveness of the proposed encryption algorithm, numerical simulations were carried out on a computer with Intel Core2 Duo CPU E8400@3.00GHz and 3G DRAM and with the MATLAB 2011a. The tested color images selected from USC-SIPI image database [41] consist of four groups as shown in Fig. 1 [12,36] were used to evaluate the similarity between the decrypted image ˆ( , ) f x y and its reference f(x, y), which is defined by " " (16) Simulations have been done first to test the security and the reversibility of the algorithm. The four phase functions for each tested group were obtained after 1000 iteration loops. The evolution of CC values is displayed in Fig. 2, where the images in the upper row and the lower row for each tested group shown in Fig. 1 are respectively used as the reference image to terminate the iteration in the phase retrieval process. Table 1 lists the NMSE values of decrypted images, where all the images in the lower row are used as reference image to obtain the four phases. It should be noted that for any tested group, four sets of decrypted results can be obtained due to the fact that each of them can be used as the reference to determine the convergence or for encryption. From the results of table 1, it can be observed that for each tested group, the error of the first decrypted image is larger due to the fact that the encypted data h obtained from the second tested image g(x, y) is used as the public keys. When using Eq. (12), the error of the second decrypted image will be larger which is caused by the smaller residual error when obtaining phase functions by means of the phase retrieval algorithm. Figure 3 shows the results of encryption and granted decryption of the first tested group (Lena and Pepper). It can be seen that with the knowledge of the granted keys, the original color images can be restituted with a high quality. In contrast, without knowing the rotation angles or phase functions, almost no useful information can be recovered from the decrypted results, as demonstrated in Fig. 4.   In order now to test the sensitivity of rotation angles to small changes, the decryption was performed by fixing one angle value and by varying the other, where the deviation # ranges from -0.10 to 0.10 with step 0.005. Others keys used for encryption and decryption in this simulation are set to the correct values. From the NMSE values shown in Fig. 5, it can be concluded that when the deviation is equal or greater than 0.01, the decrypted images (for brevity not displayed here) cannot be recognized clearly. Therefore, the rotation angles of QGT are sensitive keys.  During data transmission, information loss or noise contamination may occur. Another simulation was carried out so as to evaluate the performance of the proposed encryption algorithm against loss of data. To demonstrate the interest of the present encryption algorithm for double color images, a comparison with the encryption algorithm based on fractional Fourier transforms (FrFT) [34] is provided. To do so, the information loss severity p (varying from 10% to 60% with an increment 10%) around the center is regarded as an occlusion attack to the encrypted data. From the results illustrated in Fig. 6, it can be seen that the NMSE values of the FrFT-based encryption algorithm are more stable. However, the NMSE values of the present algorithm evolve linearly with the percentage p. When increasing the occlusion percentage p, the similarity between recovered image and its original one becomes obviously smaller. This behavior can be explained by the fact that a significant part of the QGT information is distributed around the image center considered as the origin. Although the NMSE values of the FrFT-based encryption algorithm are smaller in some limited intervals, we found that no useful information can be recovered from the decrypted image even when the smallest occlusion percentage 10% is used in reduplicative experiments. Conversely, as displayed in Fig. 7, relevant decrypted information can be obtained when using the proposed algorithm for p values up to 50%. In other words, the proposed encryption ! algorithm shows more robustness against loss of encrypted data.  In order to test the robustness of our approach against noise attack, a white Gaussian noise with zero mean and varying standard deviations & was added to the four tested group images. The same noise was added to the encrypted images obtained with fractional Fourier transforms [34] for comparison purpose. Fig. 8 displays the NMSE values of the decrypted images from these noisy encrypted images with the FrFT-based and the QGT-based encryption algorithm. The NMSE values corresponding to the proposed algorithm are much smaller. Two examples of the resulting decrypted images are shown in Fig. 9, where the noise standard deviation is 0.05. It can be concluded that the proposed encryption algorithm shows here also more robustness against noise.

Conclusion
A novel double color image encryption algorithm was presented in this paper. The originality stands on the holistic representation for color image by using quaternion algebra and iterative phase retrieval algorithm in quaternion gyrator domain. The phase masks used for encryption are obtained through iterative phase retrieval algorithm in quaternion gyrator domain, and the encrypted image is obtained via cascaded quaternion gyrator transforms. Knowing all the ! granted keys, as the parameters of quaternion gyrator and phases, two color images can be restituted with a high quality. The results of the numerical simulations have demonstrated the feasibility and the effectiveness of the proposed encryption system. When compared with the double color images encryption algorithm in the fractional Fourier domain, the proposed encryption algorithm has shown a better robustness to occlusions and additive Gaussian noise. It must be also emphasized that, when both color images need to be encrypted for the FrFT-based encryption algorithm, our encryption approach only requires to encrypt one image, and thus provides savings in data storage while improving the transmission efficiency. To further reinforce the encryption system, other techniques such as sparse representation will be taken into consideration in the near future. In addition, the proposed encryption algorithm can also be extended to encrypt multiple gray or colored images.