Image encryption based on Walsh Hadamard and fractional Fourier transform using Radial Hilbert Mask Priyanka Maan CSE and IT Department The NorthCap University Gurugram, India
[email protected]
Hukum Singh Applied Sciences Department The NorthCap University Gurugram, India
[email protected]
Abstract² In this letter an approach for double image encryption practicing Double Random Phase Encoding (DRPE) technique that is based on Walsh Hadamard transform (WHT) and fractional Fourier transform (FRT) is proposed. The encryption scheme incorporates Radial Hilbert Mask (RHM), Random Phase Mask (RPM) and fractional order as the keys. Using the 4-f system of DRPE twice in both the WHT and FRT domain, each image is encoded independently with the presented scheme. Matlab simulation tests demonstrate the increase in security level of the classical DRPE technique by the designed optical cryptosystem, and it has a superior insusceptibility to noise also. The efficiency and sensitivity of the presented scheme is tested by calculating MSE and PSNR. The histogram shows that the energy is conserved by using Walsh Hadamard transform and shows that the encrypted image is much easy to transfer due to the compression property of WHT. Keywords² Walsh Hadamard transform (WHT), Radial Hilbert Mask and fractional Fourier transform (FRT).
I. INTRODUCTION Optical data safety and security techniques has been developed and examined for ensuring the secret and important information amid various practical application during storage and transmission. Optical encryption methods have pulled in eloquent attention due to their nature of fast parallel processing of data. They have favorable circumstances over their digital counterparts as optics gives a numerous degrees of opportunity as parameters, for example, wavelength, phase, focal length, amplitude, angular momentum, polarization etc. According to various surveys different encoding schemes have been accounted for the safe transmission of data in the recent decades [1-3]. Among the known techniques for optical encryption of data, DRPE is an established approach[4] investigated by Refregier and Javidi in 1995. Later many variants of the phase encoding and many others came into existence using various other transforms like fractional counterpart of Fourier transform [5-7], Fresnel transform [811], Gyrator transform [12-16], Hartley transform [17,18], jigsaw transform, Mellin transform etc., and utilized in various encryption schemes. The encoding technique has additionally been connected for color image encryption using various
c 978-1-5386-0627-8/17/$31.00 2017 IEEE
A Charan Kumari CSE and IT Department The NorthCap University Gurugram, India
[email protected]
transforms[19-23], multiple encryption [24] and information authentication. The security of DRPE technique has been considered and analysed at different perspectives. DRPE [4] has been tested for security with respect to known plaintext attack [25] , chosen plaintext attack [26], chosen ciphertext attack [27] , and the outcomes demonstrates that the well known DRPE scheme is prone to these mentioned attacks because of the linear nature of encryption method. Later on various asymmetric schemes [28,29] and phase retrieval [30] approaches are taken into consideration for encryption by various researchers. Every developed technique has its own pros and cons. In the presented manifesto, another HI¿FLHQW RSWLFDO cryptosystem for encrypting images in light of DRPE with RHM and RPM as keys and utilising the Walsh Hadamard transform and fractional Fourier transform to fulfil the prerequisites of present day needs with raised security level. Decryption is the reverse process of encryption. II. PROPOSED OPTICAL SECURITY SCHEME In this section, a short introduction of the corelated transforms i.e. FRT and WHT with the structured phase masks are described preceding the detailed schematic diagram of the proposed scheme. The efficiency and security of the given scheme lies on the combination of the two transforms used along with the key space that constitutes of the two masks RHM and RPM. Here, the input image is first transformed using WHT using the two different phase masks in the DRPE domain and then the intermediate output of this part is again transformed using FRT with the given two phase masks in the light of DRPE domain. A. Overview of DRPE According to the classical DRPE [4] scheme to begin with , let (x,y) signify the spatial domain and (u,v) signifies the frequency domain. Let the input plaintext image is denoted by I(x,y) and R1(x,y) is the first random phase mask and R2(u,v) is the second random phase mask both of which are distributed uniformly over the interval [0,1]. The output cipher text image
179
E(x,y) is obtained by applying the DRPE technique and is given as (1): E(x,y) = { IFT [{ FT { I(x,y) . R1(x,y) }} . R2(u,v) ]} (1) B. Fractional Fourier Transform (FRT) The FRT is a generalisation of the conventional Fourier transform with an extra parameter µa¶ WKDWDGGV PRUH VHFXULW\ to the basic Fourier Transform. Scientifically, the ath order FRT is the ath power of the Fourier transform operator. When a=1 the FRT is similar to the customary Fourier transform. The FRT is a linear operator in which the rotation of the signal is QRWGRQHWKURXJKDQDQJOHZKLFKLVQRWDPXOWLSOHRIʌ The FR7LVGH¿ned using the kernel as (FRT of order a, of y(k) denoted by Ya(v)):
(2) where Ka and Ya(v) is defined as:
(5) Inverse Walsh hadamard transform is recovered by (6),
(6) D. Radial Hilbert Transform (RHT) In image processing and its techniques the Hilbert transform is helpful in light of the fact that it can choose which edges of an input image needs to be enhanced and are enhanced to what degree. A mask can be developed from the given transform which serves the purpose of image enhancement with respect to the original input image. The radial Hilbert transform [32, 33] is defined as (7), (7) In the equation 7, P is known as topological charge which actually implies the order of transformation. The phase difference that is calculated between the opposite parts of UDGLDOOLQHRIWKH JHQHUDWHG PDVNLV3ʌUDGLDQV+HQFHHDFK radial line can be treated equal to the 1-D RHT of order P. The RHM having order P=9 is depicted in Fig. 1 below:
Ka(k,v)=
(3) ( ) Ya(v)=
Fig. 1. Radial Hilbert Mask with P=9
(4) C. Walsh Hadamard Transform In the previous decade fast orthogonal transforms have been broadly utilized as a part of numerous zones, for example, data compression, watermarking , linear filtering, pattern recognition and image reconstruction, interpolation, spectral analysis, cryptography, and communication systems. Walsh-Hadamard Transform (WHT) that can be used for image processing techniques such as compression, encryption, feature extraction on image files, text analysis and filtering etc. Hadamard transforms are based on the Hadamard matrices ordered by Hadamard, Walsh and Paley [31]. In the presented scheme fast Walsh hadamard transform is used for the encryption decryption purpose. The Walsh transform of a function f on Fn2 (f considered as real numbers of 0 and 1) is the map W(f): Fn2 ĺ5GHILQHGE\ (5),
180
E. Encryption Technique The process that is followed for encryption is detailed below in the form of steps: 1) Firstly, an arbitrary input image is taken that is treated as plaintext. 2) The input image taken is than compounded by the RHM i.e. the structured phase mask and then subjected to the WHT. 3) Then it is further subjected to the RPM in the frequency domain followed by the inverse of WHT to the resultant to get the intermediate image. 4) DRPE based on the fractional Fourier transform is the second part of encryption which is then applied to the intermediate result in the form of an image itself to get the final encoded image. The flow diagram of the complete encryption process is given in Fig. 2. Two input images are encrypted by employing
2017 International Conference on Computing and Communication Technologies for Smart Nation (IC3TSN)
DRPE twice using Radial Hilbert Mask and Random Phase Mask as two masks i.e. once in the WHT domain and secondly using FRT domain. Decryption is the reverse process of encryption which when employed produces the decoded image which resembles the original image that is taken initially. During decryption, the encrypted result is subjected to the fractional Fourier transform based DRPE scheme. It uses the conjugate of Random Phase Mask as first key and the conjugate of Radial Hilbert Mask as the second key to get the intermediate image. Then this intermediate is now subjected to Walsh Hadamard based DRPE scheme using the conjugate of RPM as first initial key and the conjugate of Radial Hilbert Mask as the second key to get the final decoded result which resembles the original image.
in the WHT domain and secondly using FRT domain following results are obtained. The FRT in the suggested algorithm has been calculated as suggested by Garcia et al. [29]. The final encrypted images are obtained, among them one is for the baboon image Fig. 3(e) and the second one is with respect to original barbara image Fig. 3 (f). Finally when we decrypt the encoded images using the reverse of the proposed scheme we get the output decoded images Fig. 3(g) and Fig. 3 (h) which are similar to the input ones.
Fig. 2. Flow diagram of the proposed technique
The suggested design of the algorithm shows improved performance and adds more security by using Walsh Hadamard transform along with fractional Fourier transform. WHT adds the compression property to the encrypted image which makes it easier to store and transmit the image. III. SIMULATION EXPERIMENTS To analyse the strength of the designed algorithm many numerical experiments have been carried out. The proposed algorithm is implemented using two grayscale images µEDERRQMSJ¶)LJ (a) DQGµEDUEDUDMSJ¶)LJ. 3 (b) of size 256 by 256 as input images, two masks among which one is the Radial Hilbert Mask Fig. 3 (c) and the other one is Random Phase Mask Fig. 3 (d) and after applying the DRPE twice once
Fig. 3. (a) Original input baboon image (b) Original input Barbara image (c) Random Phase Mask (d) Radial Hilbert Mask (P=9) (e) Encrypted baboon image (f) Encrypted Barbara image (g) Decrypted baboon image (h) Decrypted Barbara image.
2017 International Conference on Computing and Communication Technologies for Smart Nation (IC3TSN)
181
A. Histogram Analysis Fig. 4 below illustrates the histograms of all the included image in the process of encryption and decryption. Clearly, it is visible that the encrypted images histograms are identical and we cannot distinguish among them that which histogram corresponds to which input image. It is shown through the histograms of encrypted images that energy is conserved by using Walsh Hadamard transform and finally we get the compressed encrypted image which is much easier to transmit.
decrypted image to analyse the quality of the suggested algorithm defined by (7), (7) PSNR value calculated using the given scheme for baboon image is 333.621 and for Barbara image is 333.721. Fig. 5 depicts the executed results performance of the proposed design. The fractional order versus MSE and fractional order versus PSNR plot is depicted.
Fig. 4. Histograms of the (a) original input baboon image (b) original input barbara image (c) encrypted baboon image (d) encrypted barbara image.
B. Error Analysis As there is a plausibility of alteration of encoded data amid transmission, we additionally checked the efficiency as well as security of the current designed technique by calculating the Mean Square Error (MSE) using the formula in (6), Fig. 5. MSE and PSNR plot for both images (a) MSE vs. Fractional Order (b) PSNR vs. Fractional Order
(6) MSE value calculated using the given scheme for baboon image is 2.792 × 10-29 and for Barbara image is 2.713 × 10-29. Peak Signal to Noise Ratio (PSNR) is also calculated taking O(x, y) as the original input image and D(x, y) as the
182
IV. CONCLUSION An image security scheme in light of the structure of DRPE using the Radial Hilbert Mask in the terminus of fractional Fourier Transform and Walsh Hadamard Transform has been proposed. When an image is encoded using the proposed scheme its security grade has been raised. The plan is likewise helpful for performing an efficient encryption. The key space is
2017 International Conference on Computing and Communication Technologies for Smart Nation (IC3TSN)
enlarged using structured phase mask, a combination of WHT and FRT. If wrong value of any fractional order is taken during encryption or decryption it will produce meaningless result. The scheme can be extended to provide more security by adding more complex mask in future.
[17]
REFERENCES
[19]
[1] [2]
[3]
[4]
[5]
[6]
[7]
[8]
[9] [10]
[11]
[12] [13]
[14]
[15]
[16]
Liu, S., Guo, C. and Sheridan, J.T., 2014. A review of optical image encryption techniques. Optics & Laser Technology, 57, pp.327-342. Javidi, B., Carnicer, A., Yamaguchi, M., Nomura, T., Pérez-Cabré, E., Millán, M.S., Nishchal, N.K., Torroba, R., Barrera, J.F., He, W. and Peng, X., 2016. Roadmap on optical security. Journal of Optics, 18(8), p.083001. Maan, P. and Singh, H., 2016. A survey on the applicability of fourier transform and fractional fourier transform on various problems of image encryption. In Communication and Computing Systems (pp. 475-480). CRC Press. Refregier, P. and Javidi, B., 1995. Optical image encryption based on input plane and Fourier plane random encoding. Optics Letters, 20(7), pp.767-769. Garcia, J., Mas, D. and Dorsch, R.G., 1996. Fractional-Fouriertransform calculation through the fast-Fourier-transform algorithm. Applied optics, 35(35), pp.7013-7018. Unnikrishnan, G., Joseph, J. and Singh, K., 2000. Optical encryption by double-random phase encoding in the fractional Fourier domain. Optics Letters, 25(12), pp.887-889. Tao, R., Xin, Y. and Wang, Y., 2007. Double image encryption based on random phase encoding in the fractional Fourier domain. Optics Express, 15(24), pp.16067-16079. Hennelly, B.M. and Sheridan, J.T., 2004. Random phase and jigsaw encryption in the Fresnel domain. Optical Engineering, 43(10), pp.2239-2249. Situ, G. and Zhang, J., 2004. Double random-phase encoding in the Fresnel domain. Optics Letters, 29(14), pp.1584-1586. Singh, H., Yadav, A.K., Vashisth, S. and Singh, K., 2015. Optical image HQFU\SWLRQ XVLQJ GHYLO¶V YRUWH[ WRURLGDO OHQV LQ WKH )UHVQHO WUDQVIRUP domain. International Journal of Optics, 2015. Singh, H., 2016. Cryptosystem for Securing Image Encryption Using Structured Phase Masks in Fresnel Wavelet Transform Domain. 3D Research, 7(4), p.34. Rodrigo, J.A., Alieva, T. and Calvo, M.L., 2007. Gyrator transform: properties and applications. Optics Express, 15(5), pp.2190-2203. Singh, N. and Sinha, A., 2009. Gyrator transform-based optical image encryption, using chaos. Optics and Lasers in Engineering, 47(5), pp.539-546. Liu, Z., Xu, L., Lin, C., Dai, J. and Liu, S., 2011. Image encryption scheme by using iterative random phase encoding in gyrator transform domains. Optics and Lasers in Engineering, 49(4), pp.542-546. Singh, H., Yadav, A.K., Vashisth, S. and Singh, K., 2014. Fully phase image encryption using double random-structured phase masks in gyrator domain. Applied optics, 53(28), pp.6472-6481. Singh, H., Yadav, A.K., Vashisth, S. and Singh, K., 2015. Double phase-image encryption using gyrator transforms, and structured phase
[18]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28] [29]
[30]
[31]
[32]
[33]
mask in the frequency plane. Optics and Lasers in Engineering, 67, pp.145-156. Chen, L. and Zhao, D., 2006. Optical image encryption with Hartley transforms. Optics letters, 31(23), pp.3438-3440. Hwang, H.E., 2011. An optical image cryptosystem based on Hartley transform in the Fresnel transform domain. Optics Communications, 284(13), pp.3243-3247. Zhang, S. and Karim, M.A., 1999. Color image encryption using double random phase encoding. Microwave and optical technology letters, 21(5), pp.318-323. Joshi, M. and Singh, K., 2007. Color image encryption and decryption using fractional Fourier transform. Optics communications, 279(1), pp.35-42. Vashisth, S., Singh, H., Yadav, A.K. and Singh, K., 2014. Image encryption using fractional Mellin transform, structured phase filters, and phase retrieval. Optik-International Journal for Light and Electron Optics, 125(18), pp.5309-5315. Abuturab, M.R., 2012. Color image security system using double random-structured phase encoding in gyrator transform domain. Applied optics, 51(15), pp.3006-3016. Singh, H., 2016. Optical Cryptosystem of Color Images based on Fractional-, Wavelet Transform Domains using Random Phase Masks. Indian Journal of Science and Technology, 9(S1),pp.1-15. Hwang, H.E., Chang, H.T. and Lie, W.N., 2009. Multiple-image encryption and multiplexing using a modified Gerchberg-Saxton algorithm and phase modulation in Fresnel-transform domain. Optics letters, 34(24), pp.3917-3919. Peng, X., Zhang, P., Wei, H. and Yu, B., 2006. Known-plaintext attack on optical encryption based on double random phase keys. optics letters, 31(8), pp.1044-1046. Peng, X., Wei, H. and Zhang, P., 2006. Chosen-plaintext attack on lensless double-random phase encoding in the Fresnel domain. Optics letters, 31(22), pp.3261-3263. Carnicer, A., Montes-Usategui, M., Arcos, S. and Juvells, I., 2005. Vulnerability to chosen-cyphertext attacks of optical encryption schemes based on double random phase keys. Optics letters, 30(13), pp.16441646. Qin, W. and Peng, X., 2010. Asymmetric cryptosystem based on phasetruncated Fourier transforms. Optics Letters, 35(2), pp.118-120. Singh, H., 2016. Devilʾ s vortex Fresnel lens phase masks on an asymmetric cryptosystem based on phase-truncation in gyrator wavelet transform domain. Optics and Lasers in Engineering, 81, pp.125-139. Wang, X. and Zhao, D., 2013. Amplitude-phase retrieval attack free cryptosystem based on direct attack to phase-truncated Fouriertransform-based encryption using a random amplitude mask. Optics letters, 38(18), pp.3684-3686. Trabocchi, O. and Gómez-Reino, C., 2004. Walsh±Hadamard analysis applied to the study of light propagation in a tapered gradient-index medium. JOSA A, 21(3), pp.388-392. Davis, J.A., McNamara, D.E., Cottrell, D.M. and Campos, J., 2000. Image processing with the radial Hilbert transform: theory and experiments. Optics Letters, 25(2), pp.99-101. Morales, Y., Díaz, L. and Torres, C., 2015. Radial Hilbert Transform in terms of the Fourier Transform applied to Image Encryption. In Journal of Physics: Conference Series (Vol. 582, No. 1, p. 012063). IOP Publishing.
2017 International Conference on Computing and Communication Technologies for Smart Nation (IC3TSN)
183