## Abstract

We propose a double image encryption by using random binary encoding and gyrator transform. Two secret images are first regarded as the real part and imaginary part of complex function. Chaotic map is used for obtaining random binary matrix. The real part and imaginary part of complex function are exchanged under the control of random binary data. An iterative structure composed of the random binary encoding method is designed and employed for enhancing the security of encryption algorithm. The parameters in chaotic map and gyrator transform serve as the keys of this encryption scheme. Some numerical simulations have been made, to demonstrate the performance this algorithm.

©2010 Optical Society of America

## 1. Introduction

To protect the secret information in the process of transmission and storage, image encryption has been became a kind of important method. Double random phase encoding (DRPE) [1] is a classical technology in optical encryption scheme. Some encryption algorithms [2–9] have been designed by optical random process, such as DRPE, interferometry and interference of polarized light. During the past decade, DRPE has been reported that it can be attacked under some conditions [10–13]. When the optical system structure, in which only random phase data is unknown, is learned and determined by attacker, an optical sub-system composed of a transform and unknown phase information will be considered in the model of DRPE [10, 11]. Thus phase retrieval algorithm can be introduced for recovering the secret information. Once a part of random phase regarded as key is obtained by illegal user, the basic information of the secret image will be revealed under attack. If transforms or random process are iteratively performed by referring Ref.14 that more keys can be employed, the difficulty of decryption with incomplete or wrong key will increase for attacker. However, these random phase information in [14] need a bigger space for storage and transmission in application.

As a new information security technology, multiple-image encryption has been developed in recent years. More secret images can be hidden with multiple-image encryption algorithm at same times. Situ and Zhang have first proposed a multiple-image encryption by using wavelength multiplexing [15]. Subsequently several schemes of multiple encryption [16–21] have been designed and reported based on amplitude encoding and phase encoding of original images. Furthermore, color image encryption algorithm [22–24] can be used for hiding three gray-level images.

In this paper, we present a double image encryption algorithm by using chaotic map and gyrator transform. Two original images are encoded into the real part and imaginary part of complex function. The chaotic map is used to generate random binary data regarded as the key of the encryption scheme. The random binary encoding is utilized to exchange the real part and imaginary part of the complex function expressing light field. The scrambled data is imported into gyrator transform system. An iterative structure is designed for increasing the security of encryption algorithm. The double image encryption scheme can be implemented with an electro-optical hybrid setup. The chaotic map is achieved with the help of computer. Numerical simulation has been performed to test the validity and security of the proposed encryption algorithm.

The rest of this paper is organized in the following sequence. In section 2, the proposed double encryption algorithm is introduced. In section 3, some numerical simulations are given to demonstrate the performance of the algorithm. Concluding remarks are summarized in the final section.

## 2. Double image encryption algorithm

We recall the chaotic map and gyrator transform, which are used in the encryption scheme, before the proposed double image encryption algorithm is addressed.

#### 2.1 Chaotic map

Chaotic map, such as logistic map [25] and tent map, can generate random series by iteration. Mathematically, the logistic map can be written as

where*r*is the coefficient of the map. When

*r*is located in the interval $\left[3.57,3.82\right],$ Eq. (1) has the chaotic behavior called Pomeau-Manneville scenario [25]. Moreover all the values of $\left\{{s}_{n}\right\}$ appear in the range $\left[0,\text{1}\right].$ In this paper, the Eq. (1) is rewritten as the equation

Equation (2) is employed for the generation of random binary data. According to the relations in Eqs. (1) and 2, an iterative example is calculated and shown in Fig. 1 . Here the initial value calculating ${s}_{n}$ is 0.83 and $r=\text{3}.\text{77}.$ The values of ${s}_{n}$ in Fig. 1 are random. The every value of series ${s}_{n}$ depends on initial value and iterative time.

Random binary data is obtained by use of the iteration of chaotic map in Eq. (2) (it is marked with$C[{s}_{0},n],$ in which ${s}_{0}$ represents initial value and *n* is total iterative time). The random binary function $R(x,y)$ is computed as

#### 2.2 Gyrator transform

Gyrator transform belongs to a kind of linear canonical transform [26, 27]. The transform of a two-dimensional function $f(x,y)$ is calculated as

*α*is an angle parameter of gyrator transform. The function $F(u,v)$ is the output of the transform. The gyrator transform has some properties similar to fractional Fourier transform, such as linearity, additivity and periodicity. The transform can be achieved with an optical system composed of lenses [27]. The gyrator transform will be utilized in the implementation of the double image encryption scheme.

#### 2.3 Double image encryption algorithm

Figure 2 gives the flowchart of the proposed double image encryption algorithm. Firstly the two original images ${I}_{1}$and ${I}_{2}$ are encoded into a complex function, in which a relation is determined as

*B*and

*ϕ*are amplitude and phase, respectively. The two functions ${B}^{\prime}$ and ${\varphi}^{\prime}$are received by the gyrator transform of $B\mathrm{exp}(\text{i}\varphi ).$ Two real functions ${A}_{1}$ and ${A}_{2}$ are separated from the complex function${B}^{\prime}\mathrm{exp}(\text{i}{\varphi}^{\prime}).$ The RBE is introduced into the scrambling operation of ${A}_{1}$ and ${A}_{2}$ as

The operations marked with the rectangle composed dash line in Fig. 2 will be implemented by a computer and other process can be performed by using some optical elements. In Fig. 2, the total iterative time *n* of the chaotic mapping operation is calculated by use of Fibonacci number, namely

*k*is the sequence number of the series. Other series or random series can also be introduced for generating the series $n(k).$

In this paper, the initial value ${s}_{0}$ and iterative series *n* of chaotic map serve as the key of the encryption algorithm. Here the angle *α* of gyrator transform is an extra key. In application the total iterative number is more than 8, for which the encrypted data is uniform noise-like image. Moreover the security of the algorithm depends on the total iterative number monotonously. The security of double image encryption will be discussed and analyzed in the next section. The decryption process can be achieved along the anticlockwise direction of the flowchart in Fig. 2.

## 3. Numerical simulation

In our simulation, two gray-level images having $256\times 256$pixels are shown in Fig. 3(a) and (b)
. The total iterative time of encryption algorithm is fixed at 15 in simulation. The angle *α* is taken at $0.\text{55}.$
Figures 3(c) and (d) give the amplitude distribution and phase distribution of the encrypted result, which are random noise-like images. Figure 3(e) and (f) illustrate the two recovered images by using the correct value of all the keys. The time obtaining the encrypted image is in 2.03s on a computer with Pentium(R) Dual E2200 2.20GHz CPU and 2.00GB Mbytes memory under Windows XP system in the environment with MATLAB R2008a.

To express the difference between the original image ${I}_{o}$ and retrieved image${I}_{r},$ we define the normalized mean square error (NMSE) function written as

Firstly, the contribution of the angle *α* on the security of this encryption algorithm is researched and analyzed. By using the correct random data ${s}_{0}$ and series $n(k),$ the NMSE curves representing the error between decrypted image and original image are calculated and illustrated in Fig. 4(a)
. When $\alpha =0.543$ close to the correct value, the two decrypted images regarding as an example of critical status are shown in Fig. 4(b) and (c), from which the original images cannot be recognized in vision. The result has indicated that the interval [0.543, 0.557] is effective for the angle *α* being the last key unknown in the exhaustive test of image decryption.

The series *n*(*k*) regarded as the key is used for the generation of the random binary matrix *R _{k}* in every RBE operation. When the series

*n*(

*k*) is incorrect and other parameters are correct, two groups of decrypted images are illustrated in Fig. 5 . In numerical simulation, the incorrect series

*n*(

*k*) is designed by using two relations $n(k)-1$ and $n(k)+1.$ The two original images cannot be distinguished in Fig. 5(a-d). Moreover the key space of $n(k)$ depends on the total iterative number of encryption process. When only one number of $n(k)$ is wrong, which is a case close to the complete correct decryption, the decrypted images shown in Fig. 5(e) and (f) are a result combined by the two original image with noise data. The basic outline of the original images can be identified in vision. Here $n(1)=2$ and other parameters are correct. In decryption process, the sequence utilizing the iterative series is

*n*(

*k*),

*n*(

*k*-1), …,

*n*(2),

*n*(1). Thereby, the error of

*n*(

*k*) has bigger effect on the quality of decrypted image than the error of

*n*(

*k*-1). The error of the decrypted images will be accumulated according to the sequence during the iterative decryption.

The key ${s}_{0}$ is main body in this encryption scheme. To compare with DRPE technique [1], the case having a half of known data of matrix ${s}_{0}$ is considered and calculated. In Fig. 6(a)
, the data in the random pattern located at the bottom is determined in decryption. The top area marked with pure gray is unknown and replaced with 0.5 in numerical simulation. The picture in Fig. 3 (b) is regarded as the original image for the DRPE, in which the random matrix ${s}_{0}$ is used for the second random phase, i.e. $\mathrm{exp}[2\text{i\pi}{s}_{0}].$ When the wrong data of ${s}_{0}$ shown in Fig. 6(a) is used in the decryption processes of the proposed image encryption method and DRPE, the corresponding recovered images are displayed in Fig. 6(b-d). Here the angle *α* and the series $n(k)$ are fixed at the correct values. For the DRPE, the retrieved image shown in Fig. 6(b) can be identified in vision. The decrypted results of our encryption algorithm drawn in Fig. 6(c) and (d), are close to noise-like images.

Recently, the phase retrieval algorithm was reported for the attack on DRPE [10–13]. In this paper, we introduce a phase retrieval algorithm into the ciphertext-only attack on the proposed encryption algorithm as a primary test. Supposing that the encryption scheme is equivalent to the DRPE with a phase${\varphi}_{2}$regarding as the second random phase, the phase retrieval algorithm is considered for decrypting the original images. By use of gyrator transform, the corresponding encryption process is illustrated in Fig. 7 (a) .

A phase retrieval algorithm is designed and represented in Fig. 7 (b). The encrypted data ${E}_{n}$ is first transformed by ${G}^{-\alpha}$ and is imported into the phase retrieval algorithm, in which exists a relation as

We consider that the attacker has known the data scope of the two original images. If the real part or imaginary part of the complex function$B\mathrm{exp}(\text{i}\varphi )$ overflows a predefined scope, the amplitude function $B(x,y)$ will be adjusted. According to this condition, a constraint *γ* is defined as follows

By using the phase retrieval algorithm shown in Fig. 7(b), the ciphertext-only attack is simulated for 6000 iterations. The corresponding NMSE curves are displayed in Fig. 8(a) . The convergence of the phase retrieval algorithm stops after 1000 iterations. Figure 8(b) and (c) represent two decrypted images obtained after 6000 iterations. The two secret images cannot be identified from Fig. 8(b) and (c) in vision. The result has demonstrated the original images are safe under the ciphertext-only attack.

The noise attack is designed and defined as

where the function ${E}_{n}^{\prime}$ is the encrypted image with noise. The parameter*d*represents the coefficient of the noise intensity. The function ${Q}_{0,1}$ is random number satisfying uniform distribution with the mean value 0 and standard deviation 1. By using correct decryption process and keys, the image ${E}_{n}^{\prime}$ is decrypted with the various values of the parameter $d.$ The corresponding result is calculated and shown in Fig. 9 . When $d=1,$ the two decrypted image are illustrated in Fig. 9(b) and (c), from which the original images can be identified in vision.

## 4. Conclusion

We have represented a kind of double image encryption by using random binary encoding in the gyrator transform domains. The two original images are encoded into the real part and imaginary part of complex number. The data of random binary encoding is generated by a chaotic map. The real part and imaginary part of complex function are exchanged randomly with the help of random binary encoding method. The encryption process is performed iteratively in order to enhance the security of algorithm. Some numerical simulations have validated the performance and security of the proposed encryption algorithm. The simulated result has shown that the encryption method is safer in the comparison with double random phase encoding.

## Acknowledgments

This work was supported by the National Natural Science Foundation of China under Grant No. 10974039, National Basic Research Program of China under Grant 2006CB302901, the development program for outstanding young teachers in Harbin Institute of Technology (HITQNJS. 2008. 027), the Fundamental Research Funds for the Central Universities (Grant No.HIT.NSRIF. 2009038) and China Postdoctoral Science Foundation (Nos. 20080430913 and 200902409). The authors are indebted to the anonymous reviewers for their invaluable comments and suggestions.

## References and links

**1. **P. Refregier and B. Javidi, “Optical image encryption based on input plane and Fourier plane random encoding,” Opt. Lett. **20**(7), 767–769 (1995). [CrossRef] [PubMed]

**2. **Y. Sheng, Z. Xin, M. S. Alam, L. Xi, and L. Xiao-Feng, “Information hiding based on double random-phase encoding and public-key cryptography,” Opt. Express **17**(5), 3270–3284 (2009). [CrossRef] [PubMed]

**3. **M. He, Q. Tan, L. Cao, Q. He, and G. Jin, “Security enhanced optical encryption system by random phase key and permutation key,” Opt. Express **17**(25), 22462–22473 (2009). [CrossRef]

**4. **G. Unnikrishnan, J. Joseph, and K. Singh, “Optical encryption by double-random phase encoding in the fractional Fourier domain,” Opt. Lett. **25**(12), 887–889 (2000). [CrossRef]

**5. **G. Situ and J. Zhang, “Double random-phase encoding in the Fresnel domain,” Opt. Lett. **29**(14), 1584–1586 (2004). [CrossRef] [PubMed]

**6. **B. Hennelly and J. T. Sheridan, “Optical image encryption by random shifting in fractional Fourier domains,” Opt. Lett. **28**(4), 269–271 (2003). [CrossRef] [PubMed]

**7. **X. F. Meng, L. Z. Cai, X. F. Xu, X. L. Yang, X. X. Shen, G. Y. Dong, and Y. R. Wang, “Two-step phase-shifting interferometry and its application in image encryption,” Opt. Lett. **31**(10), 1414–1416 (2006). [CrossRef] [PubMed]

**8. **N. Zhu, Y. Wang, J. Liu, J. Xie, and H. Zhang, “Optical image encryption based on interference of polarized light,” Opt. Express **17**(16), 13418–13424 (2009). [CrossRef] [PubMed]

**9. **J. Wu, L. Zhang, and N. Zhou, “Image encryption based on the multiple-order discrete fractional cosine transform,” Opt. Commun. **283**(9), 1720–1725 (2010). [CrossRef]

**10. **X. Peng, H. Wei, and P. Zhang, “Chosen-plaintext attack on lensless double-random phase encoding in the Fresnel domain,” Opt. Lett. **31**(22), 3261–3263 (2006). [CrossRef] [PubMed]

**11. **X. Peng, P. Zhang, H. Wei, and B. Yu, “Known-plaintext attack on optical encryption based on double random phase keys,” Opt. Lett. **31**(8), 1044–1046 (2006). [CrossRef] [PubMed]

**12. **W. Liu, G. Yang, and H. Xie, “A hybrid heuristic algorithm to improve known-plaintext attack on Fourier plane encryption,” Opt. Express **17**(16), 13928–13938 (2009). [CrossRef] [PubMed]

**13. **Y. Frauel, A. Castro, T. J. Naughton, and B. Javidi, “Resistance of the double random phase encryption against various attacks,” Opt. Express **15**(16), 10253–10265 (2007). [CrossRef] [PubMed]

**14. **Y. Zhang, C.-H. Zheng, and N. Tanno, “Optical encryption based on iterative fractional Fourier transform,” Opt. Commun. **202**(4-6), 277–285 (2002). [CrossRef]

**15. **G. Situ and J. Zhang, “Multiple-image encryption by wavelength multiplexing,” Opt. Lett. **30**(11), 1306–1308 (2005). [CrossRef] [PubMed]

**16. **Z. Liu, Q. Li, J. Dai, X. Sun, S. Liu, and M. A. Ahmad, “A new kind of double image encryption by using a cutting spectrum in the 1D fractional Fourier transform domains,” Opt. Commun. **282**(8), 1536–1540 (2009). [CrossRef]

**17. **R. Tao, Y. Xin, and Y. Wang, “Double image encryption based on random phase encoding in the fractional Fourier domain,” Opt. Express **15**(24), 16067–16079 (2007). [CrossRef] [PubMed]

**18. **Z. Liu and S. Liu, “Double image encryption based on iterative fractional Fourier transform,” Opt. Commun. **275**(2), 324–329 (2007). [CrossRef]

**19. **H. Li and Y. Wang, “Double-image encryption based on iterative gyrator transform,” Opt. Commun. **281**(23), 5745–5749 (2008). [CrossRef]

**20. **Z. Liu, H. Chen, T. Liu, P. Li, J. Dai, X. Sun, and S. Liu, “Double-image encryption based on the affine transform and the gyrator transform,” J. Opt. **12**(3), 035407 (2010). [CrossRef]

**21. **Z. Liu, J. Dai, X. Sun, and S. Liu, “Triple image encryption scheme in fractional Fourier transform domains,” Opt. Commun. **282**(4), 518–522 (2009). [CrossRef]

**22. **L. Chen and D. Zhao, “Color information processing (coding and synthesis) with fractional Fourier transforms and digital holography,” Opt. Express **15**(24), 16080–16089 (2007). [CrossRef] [PubMed]

**23. **M. Joshi, K. Chandrashakher, and K. Singh, “Color image encryption and decryption using fractional Fourier transform,” Opt. Commun. **279**(1), 35–42 (2007). [CrossRef]

**24. **Z. Liu, J. Dai, X. Sun, and S. Liu, “Color image encryption by using the rotation of color vector in Hartley transform domains,” Opt. Lasers Eng. **48**(7-8), 800–805 (2010). [CrossRef]

**25. **C. Jeffries and J. Perez, “Observation of a Pomeau-Manneville intermittent route to chaos in a nonlinear oscillator,” Phys. Rev. A **26**(4), 2117–2122 (1982). [CrossRef]

**26. **J. A. Rodrigo, T. Alieva, and M. L. Calvo, “Gyrator transform: properties and applications,” Opt. Express **15**(5), 2190–2203 (2007). [CrossRef] [PubMed]

**27. **J. Rodrigo, T. Alieva, and M. L. Calvo, “Experimental implementation of the gyrator transform,” J. Opt. Soc. Am. A **24**(10), 3135–3139 (2007). [CrossRef]