Optics Communications 254 (2005) 361–367 www.elsevier.com/locate/optcom
Optical image encryption based on fractional wavelet transform Linfei Chen, Daomu Zhao
*
Department of Physics, Zhejiang University, Hangzhou 310027, China Received 21 January 2005; received in revised form 21 April 2005; accepted 24 May 2005
Abstract Based on the fractional wavelet transform (FWT) a novel method for the image encryption is proposed. We encrypt the image by two fractional orders and a series of scaling factors. There are two series of keys in this method. Only when all of these keys are correct, the image could be decrypted. We can also realize the partial encryption by using this method. Meanwhile, the optical implementation is suggested and some numerical simulations prove its possibility. 2005 Elsevier B.V. All rights reserved. PACS: 42.30.d; 42.30.Kq; 42.30.Va Keywords: Image encryption; Decryption; Fractional wavelet transform; Fractional fourier transform
1. Introduction In order to protect peoples privacy, information security problem has been paid more and more attention with the development of the science and technology. In the past decade, a lot of work has been done on the security of information, and quite many optical image encryption methods were presented [1–11]. Some of the encryptions are based on the fractional Fourier *
Corresponding author. Tel./fax: +8657188863887. E-mail address:
[email protected] (D. Zhao).
transform (FRT) [1–8], the fractional orders are the additional keys compared with the traditional Fourier transform. Among them, some techniques secure and store the information by multiplying random phases in the input planes or in some fractional domains [2–7], and the digital holography is also used to encrypt the image [8]. Some other methods are proposed by using the polarization, coherence properties of the light to realize the encryption [9,10]. All these encryptions are performed either in digital computational forms or in optical experimental forms. The digital computational technique is based on
0030-4018/$ - see front matter 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.optcom.2005.05.052
362
L. Chen, D. Zhao / Optics Communications 254 (2005) 361–367
the concept of the optical experiment that is called the virtual-optics system [11]. CCD cameras are used to record the encryption results. Meanwhile, the corresponding decryption methods are also given in these methods. We know that the wavelet transform (WT) has been applied widely in the signal processing, because it can successfully analyze and process non-stationary signals compared with the ordinary Fourier transform. The WT has also been applied effectively in the image encryption and compression in the network, multimedia and communications [12]. Much work has been done on the image encryption with WT. It can also realize the partial encryption by the data decomposition and hiding the important parts. Two methods were proposed for the partial encryption based on the quadtree compression and zerotree wavelet image compression [13]. The FWT was first defined by Mendlovic and Zalevsky [14] in 1997. And the optical realization of the WT for two-dimensional objects was also proposed by Mendlovic and Kontorti [15] in 1993. Therefore, it is possible for us to realize the optical image encryption based on the FWT. In this paper, we provide a novel method to encrypt and decrypt the image based on the FWT. It is better than the encryptions based on FRT and WT and can join the virtues of FRT and WT. The fractional orders of FRT and scaling factors of WT are the important keys. The keys can be randomly chosen, and the unauthorized people can not obtain information without the correct keys, so the image can be well protected. This method can be used both in optical encryption and wireless signal processing. And partial encryption technique can also be realized by this method. The partial encryption is also called selected encryption that can be realized by wavelet decomposition or wavelet packet decomposition. It is useful in signal processing and wireless data communication.
2. Basic theory As we know, the two-dimensional (2-D) FRT is defined as [16–18]:
F /1 ;/2 ½f ðx; yÞðx0 ; y 0 Þ Z Z ¼ Bp1 ;p2 ðx.y; x0 ; y 0 Þf ðx; yÞ dx dy;
ð1Þ
with the kernel Bp1 ;p2 ðx; y; x0 ; y 0 Þ ¼ Bp1 ðx; x0 ÞBp2 ðy; y 0 Þ; ð2Þ and expfi½psgnðsin /1 Þ=4 /1 =2g Bp1 ðx; x0 Þ ¼ jkfs1 sin /1 j1=2 x2 þ x0;2 xx0 exp ip 2pi ; kfs1 tan /1 kfs1 sin /1 ð3Þ Bp2 ðy; y 0 Þ ¼
expfi½psgnðsin /2 Þ=4 /2 =2g 1=2
jkfs2 sin /2 j y 2 þ y 0;2 yy 0 exp ip 2pi ; kfs2 tan /2 kfs2 sin /2
ð4Þ where /1 = p1p/2 and /2 = p2p/2, /1 and /2 correspond to the rotating angles in Wigner domains, p1 and p2 are the fractional orders. When p1 = p2 = 1, Eq. (1) corresponds to the conventional Fourier transform. And the 2-D hybrid FWT of the signal f(x,y) can be defined Z as Z follows: Z Z W ðamn ; bÞ ¼
Bp1 ;p2 ðx; y; x0 ; y 0 Þf ðx; yÞ
hamn b ðx0 ; y 0 Þ dx dy dx0 dy 0 . ð5Þ When p1 = p2 = 1, it reduces to the conventional WT. And in the fractional domains it can be written as Z Z ¼ ðam an Þ1=2 H ðam u; an vÞ W ðamn ; bÞ expðj2pubx0 ; j2pvby 0 Þ F F /1 ;/2 ½f ðx; yÞðx0 ; y 0 Þ ðu; vÞ du dv; ð6Þ while its back-reconstructing formula in the fractional domains is 1 f ðx; yÞ ¼ C
Z Z F
X X Z Z m
n
1 W ðamn ; bÞ am an
H ðam u; an vÞ expðj2pubx0 ; j2pvby 0 Þ dbx0 dby 0 ðx0 ; y 0 ÞBp1 ;p2 ðx; y; x0 ; y 0 Þ dx0 dy 0 ; ð7Þ
L. Chen, D. Zhao / Optics Communications 254 (2005) 361–367
363
where F{ Æ } denotes the Fourier transform, C is a constant, * means the complex conjugate, and hamn b ðx0 ; y 0 Þ are the scaled and shifted wavelet functions of mother wavelet function given by 0 x bx0 y 0 by 0 hamn b ðx0 ; y 0 Þ ¼ ðam an Þ1=2 h ; . ð8Þ am an And amn = (am,an) is the discrete scaling vector, ¼ ðbx0 ; by 0 Þ is the shift vector. b 3. Optical realization A lot of methods have been proposed for optical realization for the 2-D WT [15,19]. There is a relatively simple technique proposed by Mendovic and Kontorti [15] in 1993. It is proposed that multireference matched filter (MRMF) is placed at the Fourier plane, and the result at the output plane is the Fourier transform of F[f(x, y)](u, v) multiplying MRMF(u, v). Where F[f(x, y)](u, v) is the Fourier transform of f(x, y), and the MRMF(u, v) is described as XX MRMFðu; vÞ ¼ fH ½amn ðu nu0 ; v mv0 Þg m
n
ð9Þ And the spatial multiplexing distribution of the MRMF can be realized by a Dammann grating [15]. On the basis of above and the definition of the FWT, the optical realization of 2-D FWT can be obtained as shown in Fig. 1 [14]. We notice that a 2-D FWT can be realized by joining a 2-D FRT and a 2-D WT together. The distribution at the output plane is integral result of Eq. (6). From Eqs. (8) and (9), we notice that if we choose a certain mother wavelet function and a series of discrete scaling factors am and an, the distribution of the MRMF is determined. A bigger am corresponds to lower frequency being included at the output plane, whereas a smaller am corresponds to higher frequency. Therefore, if we choose the fractional orders p1 and p2, and the discrete scaling factors am, for a certain mother wavelet function h(x 0 , y 0 ), it will be encrypted at the output plane. Only when the correct keys are given, the image would reappear and it is decrypted.
Fig. 1. Schematic of the optical implementation for a 2-D FWT.
At the output plane, we can also mask some parts of the picture and realize the partial encryption. From Fig. 1, we can also find the encryption and decryption process. The original image first passes a FRT process and is encrypted for the first time with fractional orders as its keys. The MRMF is placed at the Fourier plane of the following WT. The final encryption result at the output plane is the Fourier transform of the F fF /1 ;/2 ½f ðx; yÞ ðx0 ; y 0 Þgðu; vÞ multiplying MRMF(u, v). So it is encrypted for the second time and the scaling factors are its other important keys. The optical realization of the encryption and decryption is proposed in Fig. 2. The encryption result is recorded by a CCD camera and fed into a computer. The reference beam is used to record the complex data after FWT operation. The amplitude and phase of the encryption result can be displayed at the input plane by the SLM when we
Fig. 2. Optical realization of the encryption and decryption. SLM denotes spatial light modulator.
364
L. Chen, D. Zhao / Optics Communications 254 (2005) 361–367
perform decryption. The back-reconstructing optical implementation of the 2-D FWT can be obtained by a WT with the MRMF having the distribution of H[amn(u nu0, v mv0)] and a corresponding FRT with p order.
4. Numerical simulations In the simulation, we use fast Fourier transform (FFT) and discrete wavelet transform (DWT) algorithms. The FRT can be realized by the FFT algorithm with some variable replacements, while the WT can be realized by the DWT algorithm. And both two algorithms can be obtained in the Matlab. It makes the numerical simulation process much simpler. We assume p1 = 2/5, p2 = 1/3 and the haar wavelet function is mother wavelet function. Commonly, the horizontal and vertical scal-
ing factors are the same, am = an, and we choose a0 = 1, a1 = 2, a2 = 4 for computational convenience. Practically, we can choose any am, an and p1, p2. Fig. 3 gives the results. Fig. 3(a) is the original input image and its size is 240 · 320 pixels, and Fig. 3(b) is the encrypted image at the output plane. Fig. 3(c) gives the result with the incorrect keys. And Fig. 3(d) is the decrypted result with the correct keys. We can see that the encryption effect is quite good in the simulation. Only when the correct keys are given, the image can be reconstructed. The fractional orders and the scaling factors can be determined randomly, therefore, it is impossible to get them for the unauthorized people. The fractional orders are one of important factors in the encryption. When the other parameters are correct, the different incorrect fractional order keys give the different results. It is shown in Fig. 4.
Fig. 3. Computer simulations of the encryption and decryption images (240 · 320). (a) Original input image; (b) encrypted image at the output plane; (c) decrypted image with incorrect keys; (d) decrypted image with correct keys.
L. Chen, D. Zhao / Optics Communications 254 (2005) 361–367
365
Fig. 4. Computer simulations of the decryption images (240 · 320) with different fractional orders. (a) p1 = 0.2000, p2 = 0.1654; (b) p1 = 0.6667, p2 = 0.5658; (c) p1 = 0.4200, p2 = 0.3675; (d) p1 = 0.3800, p2 = 0.3163.
From the optical realization we can also find that p2 is dependent on p1, because the propagation distance are the same both in x and y directions and fs1, fs2 must be unchanged to keep the continuity property of the FRT. We give the incorrect fractional orders and get the incorrect decryption results as shown in Fig. 4. It is easy to find that when the fractional orders are quite different from the correct keys, the image could not be seen or only some obscure feature could be found as shown in Fig. 4(a) and (b). But when the fractional orders are quite close to the correct keys, then some significant characteristics could be seen as shown in the Fig. 4(c) and (d). Fig. 5 gives the total square error root (TSER) of the decryption image and the original image versus different fractional orders p1 in the inverse FRT. The TSER is defined as
Fig. 5. Total square error root (TSER) of the decrypted image and the original image versus the fractional orders.
366
L. Chen, D. Zhao / Optics Communications 254 (2005) 361–367
Fig. 6. Computer simulations of the encryption and decryption images (256 · 256). (a) Original input image; (b) encrypted image at the output plane; (c) and (d) results with partial encrypted image; (e) decrypted image with incorrect scaling factors; (f) decrypted image with correct keys.
TSER ¼
Z Z
2
½f ðx; yÞ f0 ðx; yÞ dx dy
1=2 . ð10Þ
From Fig. 5, we can see that the above analysis is quite right. And only when p1 = 2/5, the TSER
is the minimal and the image can be well decrypted. We know that the WT could also be used to encrypt the image and a well-known partial encryption technique was proposed. The principle is that when the image passes though a wavelet
L. Chen, D. Zhao / Optics Communications 254 (2005) 361–367
matched filters, it is decomposed into several parts and different parts correspond to different scaling factors with different frequency. If we mask some parts of them at the output plane and let the other parts come back, then the image will be partially encrypted. When the part with small scaling factor is masked, it means the high frequency is blocked, and the profile of the image will be reconstructed, whereas the detail can be seen and the profile is obscure. We can also use this method to realize the partial encryption based on the FWT when the fractional orders are given. Fig. 6 shows the simulation results. This time the image is 256 · 256 pixels as shown in Fig. 6(a). The fractional orders and the scaling factors are the same as those of the above simulations and the correct inverse FRT are given in this time. Fig. 6(b) is the encrypted image at the output plane. And Fig. 6(c) and (d) are partial encryption results. Fig. 6(c) shows the result when the part with small scaling factor is masked. We find that the image becomes obscure, because some high frequency is masked and the image only shows the profile clearly. Fig. 6(d) is the result when we mask the part with big scaling factor, this time the profile is obscure while the detail is clear. If we want to see the image clearly, the lost part must be compensated. The decrypted image with the incorrect scaling factors is shown in Fig. 6(e), and Fig. 6(f) is the decrypted image with the correct keys.
5. Conclusions In summary, we have proposed a new optical encryption method on the basis of FWT for possible application in security systems in this paper. It can encrypt the image effectively with two series of keys. Fractional orders are additional keys compared to the conventional WT, and it can also realize partial encryption that is better than the encryption based on FRT. Some numerical simu-
367
lations verify its possibility. In fact, we can also add the keys by the multifractional and multiwavelet transforms to realize the optical image encryption.
Acknowledgements This work was supported by the joint foundation of National Natural Science Foundation of China and the Chinese Academy of Engineering Physics under Grant 10276034.
References [1] B. Zhu, S. Liu, Q. Ran, Opt. Lett. 25 (2000) 1159. [2] G. Unnikrishnan, J. Joseph, K. Singh, Opt. Lett. 25 (2000) 887. [3] S. Liu, Q. Mi, B. Zhu, Opt. Lett. 26 (2001) 1242. [4] B. Hennelly, J.T. Sheridan, Opt. Lett. 28 (2003) 269. [5] B. Hennelly, J.T. Sheridan, Opt. Commun. 226 (2003) 61. [6] Y. Zhang, C.H. Zheng, N. Tanno, Opt. Commun. 202 (2002) 277. [7] S. Liu, L. Yu, B. Zhu, Opt. Commun. 187 (2001) 57. [8] N.K. Nishchal, J. Joseph, K. Singh, Opt. Commun. 235 (2004) 253. [9] G. Unnikrishnan, M. Pohit, K. Singh, Opt. Commun. 185 (2000) 25. [10] P. Naulleau, Opt. Commun. 189 (2001) 55. [11] X. Peng, Z. Cui, T. Tan, Opt. Commun. 212 (2002) 235. [12] P.P. Dang, P.M. Chau, IEEE Trans. Consum. Electr. 46 (2000) 395. [13] H. Cheng, X. Li, IEEE. Trans. Signal. Process. 48 (2000) 2439. [14] D. Mendlovic, Z. Zalevsky, D. Mas, J. Garcia, C. Ferreira, Appl. Opt. 36 (1997) 4801. [15] D. Mendlovic, N. Konforti, Appl. Opt. 32 (1993) 6542. [16] A.W. Lohmann, J. Opt. Soc. Am. A 10 (1993) 2181. [17] D. Mendlovic, H.M. Ozaktas, J. Opt. Soc. Am. A 10 (1993) 1875. [18] A.W. Lohmann, D. Mendlovic, Z. Zalevsky, Prog. Opt. 38 (1998) 263. [19] J. Garcia, Z. Zalevsky, D. Mendlovic, Appl. Opt. 35 (1996) 7019.