You are on page 1of 6

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 4, July August 2013 ISSN 2278-6856

2D Chaos Based Color Image Encryption Using Pseudorandom Key Generation


Nikhil Debbarma 1, Lalita Kumari2, and Jagdish Lal Raheja 3
1,2

Department of Computer Science & Engineering, NIT Agartala, Tripura, India


3

Digital System Group, CEERI Pilani, Rajasthan, India

Abstract: There are several methods for image encryption


using chaotic function. In recent year, several new image encryption variation of chaotic method has been developed. This paper presents a new 2-D chaos based lossless image encryption method. This method is user key based encryption and decryption. Presented method is based on series of confusion and diffusion processes guided by user key. This method generates large key space which results bruit force attack. In spites of this, proposed algorithm is simple enough to consume fewer amounts of computations resulting fast processing. Statistical analysis of this method has been performed and result shows that proposed method is secure enough and is suitable for image encryption.

It is difficult to apply traditional encryption methods to image encryption. Unlike text messages, image data have special features such as: Bulk capacity, High redundancy, and High correlation among pixels. Image encryption is divided into two sub stream: Secret Share-Based Encryption Schemes and Chaos Based Image Encryption. In Secret Share-Based image encryption, plane image is divided into n secret images share and is transferred to different person through network. On combination of any k secret share, out of all n secret shares, can regenerate original image. This is also called (k, n) secret sharebased image encryption. In chaos-based image encryption method, plane image is confused and diffused iteratively, by some mathematical function, in such a way that final image get encrypted. Both encryption ways has their own merits and limitations. Some existing methods of image encryptions are described below: Shamirs Secret Sharing Scheme In 1979, Adi Shamir founded a method called Secret Sharing Scheme (SSS) [19]. Secret sharing scheme, also known as (k, n)-threshold scheme for 2 <= k <= n, needs to satisfy the following conditions: -Any k or more users can reconstruct the secret by combining their shares. -It is not possible for k 1 or less users to reconstruct or obtain any information about the secret. To compute the shares, SSS uses a polynomial function where a0, the secret number, is taken as the first coefficient; and a1, a2, . . . , ak1 are random numbers used as other co-efficient. The polynomial is shown as f(x) = (a0 + a1x + a2x2 + ... + ak1 xk1 ) mod P, In the above equation, P is a prime number larger than the secret number, and the value of the function f(x) is computed module P. Bit level based secret sharing for image encryption In this scheme {k, n} technique operates directly on the bit planes of the digital input. If the input image with the B-bit code word representation of the samples is decomposed into B bit-levels (planes), each one can be viewed as a binary image. By stacking individually encrypted bit planes, the scheme produces the B-bit shares useful for secure distribution over the un-trusted public networks. Page 387

Keywords: Encryption, 2-D chaos, Chaotic encryption, Pseudorandom Key generation.

1. INTRODUCTION
The high growth in the networking technology leads a common culture for interchanging of the digital images very drastically. Hence it is more vulnerable of duplicating of digital image and re-distributed by hackers. Therefore the images has to be protected while transmitting it, Sensitive information like credit cards, banking transactions and social security numbers need to be protected. For this many encryption techniques are existing which are used to avoid the information theft. The main idea in the image encryption is to transmit the image securely over the network so that no unauthorized user can able to decrypt the image. In recent days of Internet, the encryption of data plays a major role in securing the data in online transmission focuses mainly on its security across the internet. Different encryption techniques are used to protect the confidential data from unauthorized use. Encryption is a very common technique for promoting the image security. Image encryption, video encryption have applications in many fields including the internet communication, multimedia systems, medical imaging, Tele-medicine and military Communication, etc. The evolution of encryption is moving towards a future of endless possibilities. Image encryption is so much demanding and hot topic that new methods of encryption techniques are discovered frequently. Traditional encryption methods are not suitable for image encryption. Volume 2, Issue 4 July August 2013

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 4, July August 2013 ISSN 2278-6856
Chaos Based Image Encryption Scheme The usage of chaotic cryptography for image encryption is now well known, and the nature of chaos has initiated a lot of interests in different engineering disciplines, where cryptography must be one of the most potential applications. The idea of using chaos for encryption can be traced to the classical Shannons paper [7]. Chaotic maps have been applied to cryptography in several different ways. Chaotic sequences have several good properties including the ease of their generation, their sensitive dependence on the initial conditions and their noise-like behavior. Applying the chaos to cryptography was a great contribution to improve the security of data due to the adequate properties of chaotic sequences. The subtle similarity between chaos and cryptography promoted the wide investigation on how to use chaotic maps to design secure and fast multimedia encryption schemes. Generally, two typical ways are adopted: 1) iterate chaotic maps to generate pseudo-random bit sequence to control combination of secret basic encryption operations; 2) use chaotic maps (or fractal-like curves) to realize secret position permutation. In [3], Yen et al. proposed a series of chaos-based image encryption schemes based on 1-D Chaotic Maps. All these schemes comply with the following general design approach -Iterate the Logistic map in finite computing precision L to generate a pseudo-random binary sequence from the binary representation of each chaotic state. -Use the binary sequence to control the random combination of some basic operations, including simple position permutations and/or value substitutions; -The initial condition and the control parameter of the Logistic map are set as the secret key. Image Encryption Schemes of Permutationsubstitution Structure In cryptography, confusion and diffusion are two important properties of a secure encryption scheme. To obtain the properties, the scheme is constructed by two basic parts: permutation and substitution. According to security requirement, the two parts are combined for some rounds alternatively, which is termed as permutationsubstitution structure here. In 1998, 2-D chaotic maps were initially used to design image encryption schemes following the structure also [9, 10]. For plain-image of size M N, the encryption schemes can be described as follows. -Generate permutation matrix of size M N by decentralizing an invertible 2-D chaotic maps, and then permute the location of every pixel of plain-image by the permutation matrix; -Modify the values of every pixel by a substitution scheme; Volume 2, Issue 4 July August 2013 -Repeat the above two parts for some rounds to obtain the cipher-image. In [3, 15], 2-D decentralized chaotic maps were generalized to 3-D counterparts: 3-D Baker map and 3-D Cat map. The 2-D plain image is re-arranged into 3-D lattice and put back to 2-D one after permute it by iterating the 3-D chaotic map. In addition, the following cipher text feedback function is adopted as the substitution scheme. where is a random number, I(k) is the k-th pixel of cipher-image I, and I*(k) is the k-th pixel of permuted plain-image I* In [11], the permutation-only image encryption schemes based on SCAN language are combined with the following cipher text feedback function. In [16], the scheme proposed in [15] is broken successfully when the round number is one. In [17], some security defects of Fridrichs image encryption scheme [9] were analyzed and improved. As pointed out in [18], there is a common security defects in the schemes [14, 15, 16]: the cipher-image is not sensitive to the change of plain-image/sequence { }. Other Image Encryption Schemes Based on 2-D Chaotic Maps In [46], 2-D cat-map was generalized to integer field to realize permutation. The structure of the scheme is similar to the one of DES. The security of this scheme still need further study. In the Choatic Map Lattice based image encryption algorithm suggested by Pisarchik[4], the image color is converted to chaotic logistic maps, pixel by pixel, one way coupled by the initial conditions. The algorithm is as follows. (i) The colour value C of each pixel is converted to the corresponding values of the map variable Xc. Xmin=0.095062, Xmax=0.975, x=XmaxXmin Xc = Xmin + (C/255) (ii) The colour value xcm of the last map m is used as the initial condition for the first map (i=1), i.e., x01 =xcm. (iii) After n iterations of the first map by logistic map, map variable xn1 is obtained and the color value of the pixel xc1 is added to xn1. This sum value is used as the initial condition for the map. Similarly, all maps are iterated, from first to last map and the coupling direction, in which the values of map variables are updated. (iv) All steps are repeated for each color component and three images are superimposed to get the encrypted image. To restore the original image, the algorithm is applied in the reverse direction step by step, starting from the last Page 388

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 4, July August 2013 ISSN 2278-6856
map and moving to the first one by going through same number of iterations for each map as for the encryption. corresponding pixel value. In second step (row circular shift), we interchange all pixel values with another pixel value (as guided by system encryption key) of same row of the corresponding pixel value. One confusion process contains one full column circular shift operation and one full row circular shift operation.

2. PROPOSED METHOD
Proposed method for image encryption is based on 2Dimensonal chaos. It can be implemented on all type of image, e.g. RGB images (colored images), Gray scale images, and Binary images. Chaos is generated separately for red, green, and blue components of RGB image and after chaos generation encrypted image of R, G, and B components are placed at their respective places. If image is gray scale or binary, then there is only one plane to encrypt (instead of 3 for RGB images) by chaos development. Chaos is developed in proposed method by putting confusion and diffusion on plane image. Confusion and diffusion process is guided by key value. At the time of encryption, user has to give a secret numerical key. Chaos is developed by algorithm, guided by that secret key. At the time of decryption, same key is required to perform reverse confusion and reverse diffusion processes.

Figure 2 Circular shifting directions in confusion process. (a) Row circular shifting direction. (b) Column circular shifting direction. In confusion process Pixel I(x,y) is interchanged with pixel I(x,y) for all 1 x m and 1 y n where m X n is size of plane image. i.e. number of rows and column in image is m and n respectively. In Row Circular Shifting x = x. And y = y + k mod n+1.In Column Circular Shifting x = x + k mod (m+1). And y = y. Here k is instantaneous system generated encryption key, guided by user given encryption key. In order to perform image encryption, proposed algorithm recommends eight rounds of circular row/column shifting. Figure 3 represents confused image. Figure 3(a) shows original image Lina. Figure 3(b) and 3(c) gives output on confusion process after one and two iterations of confusion respectively.

Figure 1 Flow chart of proposed chaos based image encryption scheme Secret key may be of any length between 5 digits to 128 digits. Based on these key numbers, sequence of diffusion locations and confused pixels values are decided. Plane image is confused 8 times and diffused 8 times to get cipher image. Figure 1 shows flow chart of proposed encryption scheme. Proposed algorithm is so efficient that even diffusing two times, histogram of plane image is neutralized to give all pixels value in equal number. 2.1 Confusion Process in Proposed Method Confusion is performed in the proposed method with the help of system encryption key, which is obtained by computation on user encryption key. Confusion in proposed method is of twofold: column circular shift and row circular shift. In first step (column circular shift), we interchange all pixel values with another pixel value (as guided by system encryption key) of same column of the Volume 2, Issue 4 July August 2013

. Figure 3 Confusion process result. (a): Original image. (b): Output after one iteration of confusion. (c): Output after two iteration of confusion Page 389

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 4, July August 2013 ISSN 2278-6856
2.2 Diffusion Process in Proposed Method Diffusion process is also performed in the proposed method with the help of same system encryption key, which is obtained by computation on user encryption key. Diffusion process is applied on all the three (R, G and, B) components of plane image separately. Diffusion process changes pixel values of each and every pixel, present in plane image. In diffusion process I(x,y), i.e. Pixel value at location (x,y) is replaced with I(x,y), for all 1 x m and 1 y n where m X n is size of plane image. i.e. number of rows and column in image is m and n respectively. Here k is instantaneous system generated encryption key, guided by user given encryption key. One diffusion process contains changing of pixels values for one time. In order to perform complete image encryption, we perform diffusion process 8 times to get better result. Our algorithm is so effective that, even two iteration of diffusion process neutralize histogram of all three (R, G and, B) components of plane image. Our diffusion process is dynamic i.e. if same pixel value is occurred at any two places in image; their diffused pixel values are different. It is all due to system encryption keys. Figure 4(a) shows original image Lina. Figure 4(b) and Figure 4(c) shows output after one iteration and two iteration of diffusion process respectively. Step 3: System encryption key, sk[i] = 7 uk[i] (mod 512).

3. IMPLEMENTATION RESULT AND ANALYSIS


The proposed algorithm is implemented in MATLAB for computer simulations. For the experimentation purpose, we consider the picture Jelly_Beans, Lina, mandril_color, and peppers_color as the original digital images to encrypt images. Image encryption in proposed algorithm is done by eight cascaded iteration of confusion and diffusion. The original image mandril_color is shown below in part (a) of figure 5. This RGB image is encrypted by our proposed algorithm. The encrypted result of proposed algorithm is shown in the part (b) of figure given below. The encryption is done using user encryption key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3}. Part (c) of the figure is the output of reverse encryption (decryption). This proposed method is lossless encryption-decryption process.

Figure 4 Diffusion process result. (a): Original image. (b): Output after one iteration of diffusion. (c): Output after two iteration of diffusion For system encryption key generation, we split each digits of user encryption key. Based on each digits and position of that digit in user encryption key, we compute system encryption key. Our system encryption key generation algorithm is designed in such a fashion that even if user key hss repeating occurrence of same digit, computed system encryption key will be different. The System Encryption Key Generation in the proposed encryption algorithm: Step 1: Split user encryption key into uk[i]. Where i = 1, 2, 3, 4. Step 2: Perform uk[i] = 2 * uk[i] + 1. Volume 2, Issue 4 July August 2013

Figure 5 (a): Original image of picture mandril_color (b) Encrypted image by proposed algorithm (C) After decrypting encrypted image, showing lossless encryption/decryption. 3.1 Confusion and Diffusion Process Analysis Proposed algorithm is recommending 8 iterations of cascaded confusion and diffusion, but at the time of implementation in MATLAB, only 2 iterations of confusion and diffusion is implemented. Figure 6(a) shows the original image Lina. Figure 6(b) represent encrypted image using user secret key {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3}. Figure6(c), 6(d) and figure 6(e) shows histogram of Red, Green, and Blue components (from original image) respectively. Figure 6(f), 6(g) and figure 6(h) shows histogram of Red, Green, and Blue components (from encrypted image) respectively. Page 390

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 4, July August 2013 ISSN 2278-6856
3.2 Key Sensitivity Analysis Decryption in the proposed algorithm is user key sensitive. If key is changed with even one digit, decryption gives garbage image. Figure 7(a) and 7(b) represents original image peppers_color, and its encrypted image using user encryption key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3} respectively. Figure 7(c) and 7(d) shows decrypted image using keys: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5} and {1 0 3 2 5 7 8 3 2 4 3 0 2 3} respectively. Figure 8(e) shows decrypted image using encryption key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3}. Analysis of figure 7 deduces the fact that for decryption of an encrypted image, same key is required otherwise it will always give garbage image, no matter how far the key is matched with original encryption key. In our testing case encryption key was {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3} (17 digits).At time of decryption we used {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5} i.e. 16 digits of original keys except one digits. There was matching of key up to 94 % (16*100 / 17) but output of decryption key was garbage.

Figure 6 (a): Original image of picture Lina (b) Encrypted image by proposed algorithm. Histogram Result: Histogram result (c), (d), and (e): of red, green, and blue components of original image respectively. Histogram Result: Histogram result (f), (g), and (h): of red, green, and blue components of encrypted image respectively. From analysis of figure 6, it is clearly reflected that histogram of R, G, and B components of original image and encrypted image are entirely different. Statistical analysis of histogram cannot give any information about original image. Therefore we can say that proposed method is much more efficient as it is obtained by only two iteration of diffusion instead of eight proposed iteration.

4. CONCLUSIONS
A new image encryption scheme using a chaotic method was presented here. This method has drastically disrupted statistic property of image. It also neutralized histogram of R, G, and B components of image. Its cryptographic qualities have been evaluated through different statistical analyses. It can also resist brute-force attacks because of large key space. This supports portability architecture because only integers are used during the encryption/decryption processes. Therefore we can conclude that the proposed algorithm for image encryption is useful for application of image encryption, based on guiding user.

References
[1] Joshi Rohit A, Joshi Sumit S, G. P. Bhole, Improved Image Encryption Algorithm using Chaotic Map, in International Journal of Computer Applications (0975 8887), Volume 32 No.9, October 2011 [2] M. Franc-ois a, T.Grosges a,n, D.Barchiesi a, R.Erra b, A new image encryption scheme based on a chaotic function, in SignalProcessing: ImageCommunication 27(2012)249259 [3] Y. Mao, G. Chen and S. Lian, A Novel Fast Image Encryption Scheme Based on 3D Chaotic Baker Maps , International Journal of Bifurcation and Chaos, Vol. 14, No. 10, pp. 3613-3624, 2004. [4] F. Dachselt, K. Kelber and W. Schwarz, Chaotic Coding and Cryptoanalysis , Proceedings of IEEE International Symposium on Circuits and Systems, Hong Kong, pp. 1061-1064, 9-12 June, 1997. [5] S. Li and X. Zheng, Cryptanalysis of A Chaotic Image Encryption Method , In Proceedings of IEEE Page 391

Figure 6 (a): Original image of picture peppers_color (b) Encrypted image by proposed algorithm using user key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3}. (c) Decrypted image by proposed algorithm using user key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5}. (d) Decrypted image by proposed algorithm using user key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3}. (c) Decrypted image by proposed algorithm using user key: {1 0 3 2 5 7 8 3 2 4 3 0 2 3 1 5 3}.

Volume 2, Issue 4 July August 2013

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 4, July August 2013 ISSN 2278-6856
International Symposium on Circuits and Systems (ISCAS), Vol. 2, pp. 708 711, 2002. [6] J. Wei, X. Liao, K. W. Wong and T. Zhou, Cryptanalysis of Cryptosystem Using Multiple OneDimensional Chaotic Maps , Communications in Nonlinear Science and Numerical Simulation, In Press, pp. 814-822, 19 September 2005. [7] C. E. Shannon, Communication theory of secrecy systems, Bell System Technical Journal, vol. 28, no. 4, pp. 656715, 1949. A. N. Pisarchik, N. J. FloresCarmona, and M. Carpio-Valadez, Encryption and decryption of images with chaotic map lattices, Chaos, vol. 16, no. 3, p. art. no. 033118, 2006. [8] D. Arroyo, R. Rhouma, G. Alvarez, S. Li, and V. Fernandez, On the security of a new image encryption scheme based on chaotic map lattices, p. art. no. 033112, 2008. [9] J. Fridrich, Symmetric ciphers based on twodimensional chaotic maps, Int. J. Bifurcation and Chaos, vol. 8, no. 6, pp. 12591284, 1998. [10] J. Scharinger, Fast encryption of image data using chaotic Kolmogorov flows, J. Electronic Imaging, vol. 7, no. 2, pp. 318325, 1998. S. S. Maniccam and N. G. Bourbakis, Image and video encryption using scan patterns, Pattern Recognition, vol. 37, no. 4, pp. 725737, 2004. [11] N. G. Bourbakis and A. Dollas, SCAN-based compression-encryption-hiding for video on demand, IEEE Multimedia, vol. 10, no. 3, pp. 79 87, 2003 [12] K.-W. Wong, B. S.-H. Kwok, and W.-S. Law, A fast image encryption scheme based on chaotic standard map, PHYSICS LETTERS A, vol. 372, no. 15, pp. 26452652, 2008. [13] Y. Zhang, Y. Wang, and X. Shen, A chaos-based image encryption algorithm using alternate structure, Science in China Series F: Information Sciences, vol. 50, no. 3, pp. 334341, 2007. J.-C. Yen and J.-I. Guo, A new chaotic key-based design for image encryption and decryption, in Proc. IEEE Int. Symposium on Circuits and Systems (ISCAS2000), vol. 4, 2000, pp. 4952. [14] H.-C. Chen, J.-I. Guo, L.-C. Huang, and J.-C. Yen, Design and realization of a new signal security system for multimedia data transmission, EURASIP J. Applied Signal Processing, vol. 2003, no. 13, pp. 12911305, 2003. [15] J.-C. Yen, H.-C. Chen, and S.-S. Jou, A new cryptographic system and its VLSI implementation, in Proc. IEEE Int. Symposium on Circuits and Systems, vol. 2, 2004, pp. 221224. [16] G. Chen, Y. Mao, and C. K. Chui, A symmetric image encryption scheme based on 3D chaotic cat maps, Chaos, Solitons& Fractals, vol. 21, no. 3, pp. 749761, 2004 [17] K. Wang, W. Pei, L. Zou, A. Song, and Z. He, On the security of 3D cat map based symmetric image encryption scheme, Physics Letters A, vol. 343, pp. Volume 2, Issue 4 July August 2013 432439, 2005 S. Lian, J. Sun, and Z. Wang, Security analysis of a chaos-based image encryption algorithm, Physica A-Statistical Mechanics and its Applications, vol. 351, no. 2-4, pp. 645661, 2005. [18] S. S. Maniccam and N. G. Bourbakis, Image and video encryption using scan patterns, Pattern Recognition, vol. 37, no. 4, pp. 725737, 2004. [19] Shamir, Adi (1979), "How to share a secret", Communications of the ACM 22 (11): 612613, doi:10.1145/359168.359176

AUTHOR
Nikhil Debbarma is working as Assistant Professor in Department of Computer Science & Engineering, NIT Agartala, India. His area of interest is Image Processing, Database Management System.

Lalita Kumari is working as Assistant Professor in Department of Computer Science & Engineering, NIT Agartala, India. Her area of interest is Image Processing, Pattern recognition, etc

Dr. Ing. Jagdish Lal Raheja is Sr. Pr. Scientist in Central Electronics Engineering Research Institute (CEERI) Pilani, Rajasthan, India, under Council of Scientific and Industrial Research (CSIR), Govt. of India. He has published number of publication in International journal and Conferences along with patents. His area of research is Image Processing, Pattern recognition, Computer Vision.

Page 392

You might also like