Double image encryption by using iterative random binary encoding in gyrator domains Zhengjun Liu,1,4,* Qing Guo,2 Lie Xu,1 Muhammad Ashfaq Ahmad3, and Shutian Liu2 1
Department of Automation Measurement and Control Engineering, Harbin Institute of Technology, Harbin 150001 P. R. China 2 Department of Physics, Harbin Institute of Technology, Harbin 150001 P. R. China 3 Department of Physics, COMSATS Institute of Information Technology, Lahore 54000, Pakistan 4
[email protected] *
[email protected],
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 OCIS codes: (100.2000) Digital image Processing; (070. 0070) Fourier optics and signal processing.
References and links 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.
P. Refregier, and B. Javidi, “Optical image encryption based on input plane and Fourier plane random encoding,” Opt. Lett. 20(7), 767–769 (1995). 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). 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). 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). G. Situ, and J. Zhang, “Double random-phase encoding in the Fresnel domain,” Opt. Lett. 29(14), 1584–1586 (2004). B. Hennelly, and J. T. Sheridan, “Optical image encryption by random shifting in fractional Fourier domains,” Opt. Lett. 28(4), 269–271 (2003). X. F. Meng, L. Z. Cai, X. F. Xu, X. L. Yang, X. X. Shen, G. Y. Dong, and Y. R. Wang, “Two-step phaseshifting interferometry and its application in image encryption,” Opt. Lett. 31(10), 1414–1416 (2006). 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). 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). 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). 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). 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). 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). Y. Zhang, C.-H. Zheng, and N. Tanno, “Optical encryption based on iterative fractional Fourier transform,” Opt. Commun. 202(4-6), 277–285 (2002). G. Situ, and J. Zhang, “Multiple-image encryption by wavelength multiplexing,” Opt. Lett. 30(11), 1306–1308 (2005). 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).
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12033
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). 18. Z. Liu, and S. Liu, “Double image encryption based on iterative fractional Fourier transform,” Opt. Commun. 275(2), 324–329 (2007). 19. H. Li, and Y. Wang, “Double-image encryption based on iterative gyrator transform,” Opt. Commun. 281(23), 5745–5749 (2008). 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). 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). 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). 23. M. Joshi, K. Chandrashakher, and K. Singh, “Color image encryption and decryption using fractional Fourier transform,” Opt. Commun. 279(1), 35–42 (2007). 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). 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). 26. J. A. Rodrigo, T. Alieva, and M. L. Calvo, “Gyrator transform: properties and applications,” Opt. Express 15(5), 2190–2203 (2007). 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).
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
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12034
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
sn +1 = r ⋅ sn (1 − sn ) ,
(1)
where r is the coefficient of the map. When r is located in the interval [3.57, 3.82] , Eq. (1) has the chaotic behavior called Pomeau-Manneville scenario [25]. Moreover all the values of {sn } appear in the range [ 0, 1] . In this paper, the Eq. (1) is rewritten as the equation (2) sn +1 = ( 3.57 + sn / 4 ) ⋅ sn (1 − sn ) . 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 sn is 0.83 and r = 3.77. The values of sn in Fig. 1 are random. The every value of series sn depends on initial value and iterative time.
Fig. 1. An example of chaotic map: (a) logistic map, (b) the map expressed in Eq. (2)
Random binary data is obtained by use of the iteration of chaotic map in Eq. (2) (it is marked with C[ s0 , n], in which s0 represents initial value and n is total iterative time). The random binary function R( x, y ) is computed as R ( x, y ) = round ( C[ s0 ( x, y ) , n]) ,
(3)
where the function ‘round’ is to obtain a nearest integer for the input. The variables ( x, y ) are the coordinates matched to the imported images. From Fig. 1 and Eq. (3), the function R( x, y ) is random and binary. The function R( x, y ) will be used in the random binary encoding (RBE).
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12035
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 F ( u , v ) = G α f ( x, y ) ( u, v ) =
( xy + uv ) cos α − ( xv + yu ) 1 f ( x, y ) exp i2π dxdy, ∫∫ | sin α | sin α
(4)
where α 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 I1 and I 2 are encoded into a complex function, in which a relation is determined as I1 + iI 2 = B ( x, y ) exp iφ ( x, y ) ,
(5)
where the functions B and φ are amplitude and phase, respectively. The two functions B′ and φ ′ are received by the gyrator transform of B exp(iφ ). Two real functions A1 and A2 are separated from the complex function B ′ exp(iφ ′). The RBE is introduced into the scrambling operation of A1 and A2 as
A1′ ( r ) = A1 ( r ) ⋅ 1 − Rk ( r ) + A2 ( r ) ⋅ Rk ( r ) , A2′ ( r ) = A1 ( r ) ⋅ Rk ( r ) + A2 ( r ) ⋅ 1 − Rk ( r )
(6)
where the variable r represents the position vector. The functions A1′ and A2′ are the scrambled output of RBE. The function Rk generated by the chaotic map in Eqs. (2) and 3, is binary and random. And then A1′ and A2′ are encoded into the real part and imaginary part of complex function, respectively. The process mentioned above is performed iteratively, after which the encrypted data En is received.
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12036
Fig. 2. The process of double image encryption
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 n ( k ) = 1, 1, 2, 3, 5, 8, ...
(7)
where 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 s0 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 × 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.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.
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12037
Fig. 3. The result of double image encryption: (a) Elaine regarded as I1 , (b) leopard regarded as I 2 , (c) the amplitude of encrypted data, (d) the phase of encrypted data, (e) the decrypted image for Elaine, (f) the decrypted image for leopard.
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 NMSE = nmse ( I r , I o ) =
∑ I ( m, n ) − I ( m, n ) r
2
o
∀m , n
∑ I ( m, n )
2
.
(8)
o
∀m , n
Firstly, the contribution of the angle α on the security of this encryption algorithm is researched and analyzed. By using the correct random data s0 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 α = 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.
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12038
Fig. 4. The decrypted results with various values of the angle α : (a) the NMSE curves, (b) the decrypted image for Elaine, (c) the decrypted image for leopard. Here the two recovered images are obtained by using the angle α = 0.543.
Fig. 5. The decrypted result by using a wrong series
n : (a) for Elaine and (b) for leopard with
the series n( k ) − 1, (c) for Elaine and (d) for leopard with the series n( k ) + 1, (e) and (f) are the decrypted images under the case
n(1) = 2 and other parameters are correct.
The series n(k) regarded as the key is used for the generation of the random binary matrix Rk 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 )
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12039
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.
Fig. 6. the decryption results by use of a half of correct data in random matrix s0: (a) a half of data in the key s0 is known by attacker, (b) the retrieved image for DRPE, (c) the recovered image for Elaine, (d) the recovered image for leopard.
Fig. 7. The flowchart of (a) the designed DRPE and (b) the phase retrieval algorithm for the ciphertext-only attack on this encryption algorithm.
The key s0 is main body in this encryption scheme. To compare with DRPE technique [1], the case having a half of known data of matrix s0 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 s0 is used for the second random phase, i.e. exp[2iπs0 ]. When the wrong data of s0 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
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12040
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 φ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).
Fig. 8. The result of the ciphertext-only attack: (a) NMSE curve, (b) recovered image for Elaine, (c) recovered image for leopard. α = 0.55.
A phase retrieval algorithm is designed and represented in Fig. 7 (b). The encrypted data En is first transformed by G −α and is imported into the phase retrieval algorithm, in which exists a relation as G −α ( En ) = B2 ( u, v ) exp iφ2 ( u, v ) ,
(9)
where φ2,0 is the initial value of the phase φ2 and is fixed at π for all the positions (u , v) in simulation. In the next step, the complex function B exp(iφ ) is obtained by B exp ( iφ ) = G −α B2 exp ( iφ2 ) . (10) 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 exp(iφ ) overflows a predefined scope,
the amplitude function B( x, y ) will be adjusted. According to this condition, a constraint γ is defined as follows
#127060 - $15.00 USD Received 15 Apr 2010; revised 16 May 2010; accepted 17 May 2010; published 21 May 2010
(C) 2010 OSA
24 May 2010 / Vol. 18, No. 11 / OPTICS EXPRESS 12041
B ( x, y ) ,
γ : B ′ ( x, y ) =
if 0