Secure Communication Based on Rubik's Cube Algorithm and Chaotic Baker Map

Secure Communication Based on Rubik's Cube Algorithm and Chaotic Baker Map

Available online at www.sciencedirect.com ScienceDirect Procedia Technology 24 (2016) 782 – 789 International Conference on Emerging Trends in Engin...

413KB Sizes 41 Downloads 143 Views

Available online at www.sciencedirect.com

ScienceDirect Procedia Technology 24 (2016) 782 – 789

International Conference on Emerging Trends in Engineering, Science and Technology (ICETEST - 2015)

Secure Communication Based On Rubik’s Cube Algorithm And Chaotic Baker Map Abitha K.A a,* , Pradeep K Bharathan b b

a PG student, Dept. of AEI, GEC West hill, Kozhikode-673005, India Assistant professor, Dept. of AEI, GEC West hill, Kozhikode-673005, India

Abstract In the field of digital and multimedia applications, more multimedia data are developed and transmitted in art, entertainment, advertising, commercial areas, education and training through the networks, which may have important information that should not be accessed by the unauthorized persons. Therefore issue of protecting the confidentiality, integrity, security, privacy as well as the authenticity of images has become an important issue for communication and storage of images. In this paper an efficient method for image encryption based on Rubik’s cube principle with chaotic Baker map is presented. It consists of two layers. The first layer is a preprocessing layer used to improve the security of the system which is implemented with the chaotic baker map. In the second layer, the Rubik’s cube principle is utilized. The original image is first converted in to baker mapped image and then Rubik’s cube principle is applied. The proposed technique will enhance the security level of the Rubik’s cube encryption technique. © Published bybyElsevier Ltd. This is an open access article under the CC BY-NC-ND license © 2016 2016The TheAuthors. Authors.Published Elsevier Ltd. (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the organizing committee of ICETEST – 2015. Peer-review under responsibility of the organizing committee of ICETEST – 2015 Keywords: Chaotic Baker Map; Rubik’s Cube Algorithm;Encryption

* Corresponding author. Tel.: 9809527528 E-mail address:[email protected]

2212-0173 © 2016 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the organizing committee of ICETEST – 2015 doi:10.1016/j.protcy.2016.05.089

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

783

1. Introduction During the past years the amazing developments in the field of network communications have created a great requirement for secure image transmission over the Internet. Since the Internet is a public network it is not so secure for the transmission of confidential images. Cryptographic techniques need to be applied to meet this challenge. Today security is an integral part of every technology and implementation. Cryptography is perhaps the most widespread form of secure communication. In this IT driven society. Image protection has become an important issue for communication of digital images through the networks. Encryption is the one of the ways to provide the security of digital images. Image encryption techniques convert original image to another image that is hard to understand. To keep the image confidential, it is essential that nobody could get to know the content without a key for decryption. Image encryption is the process of transforming information using an algorithm and a key to make it unreadable to anyone except authorised person. Secure transmission of digital images has many applications such as cable-TV, military image communications, etc. Cryptography is the art and science of protecting information from undesirable individuals by converting it into a form non-recognizable by the unauthorised users while stored and transmitted. The raw information in its understandable form is called as plaintext that is converted into its cipher text by applying certain algorithms and key using the steps of encryption. The encrypted information formed by this process in cryptography is referred to as cipher text. The reverse process of making the encryption in readable and understandable forms is known as decryption. A key is a variable value that is applied using an algorithm to a string or block of unencrypted text. The rest of this paper is organized as follows. In Section II Rubik’s Cube Algorithm is explained. Section III explains chaotic Baker mapping, which is used as the pre-processing layer. In Section IV simulation results are presented. Concluding remarks are summarized in the final section. Among many encryption methods, highly successful encryption scheme is the DPRE [1],[4],[7]. Refregier and Javidi proposed the DRPE scheme. Two random phase masks are used in this method. One mask is used in the input plane and the second one is used in the Fourier plane. To improve the security of the system, DRPE with chaotic mapping had been implemented by Ahmed N.Z et al. Here the pre-processing layer is used to increase the security level of the system. But this method has a mean square error (MSE) and a lower NPCR (Number of Pixel Change Rate) value compared to the proposed method. The schematic diagram of the proposed method is shown in fig 1.This method consists of two layerspreprocessing layer and encryption layer. In this method baker mapping is used as the preprocessing layer which increases the security of the cryptosystem. And the encryption algorithm is the Rubik’s cube algorithm [2]. In the retrieval process Rubik’s cube decryption algorithm and the reverse chaotic baker map is used to retrieve the original image. Here the input image is converted in to a scrambled image by chaotic baker mapping and then in to encrypted image by Rubik’s cube encryption algorithm during the encryption process. During the decryption process the encrypted image is first transformed in to another form by Rubik’s cube decryption algorithm and then to the original form by reverse chaotic baker map. By implementing this method the security level and the NPCR (Number of Pixel Change Rate) can be improved. 2. Rubik’s Cube Algorithm Rubik’s cube principle is used to scramble the pixels of original gray scale image. This process changes the position of the of the pixels. Here two random keys are used. Using these two secret keys, the circular shift is applied to each of the rows and columns. Then odd rows and columns are bitwise XOR-ed with two secret keys. Then by using flipped secret keys, bitwise XOR is also applied in to the even rows and columns. In order to improve the security these steps can be repeated. 2.1 Algorithm Consider a gray scale image I 0 x, y of size M X N .Here each ( x, y ) co-ordinates represent the pixel values of the image. In the proposed system, the input image to the rubik’s cube algorithm is the chaotic baker mapped image. The encryption algorithm includes the following steps.

784

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

Chaotic Key

Input Image

Chaotic Baker Map

Encrypted Image

Rubik’s cube keys

ENCRYPTION

Rubik’s Cube Encryption Algorithm

Rubik’s Cube Decryption Algorithm

Reverse Chaotic Baker Map

Rubik’s cube keys

Chaotic Key

Encrypted Image

Decrypted Image

DECRYPTION

Fig.1. Proposed method of cryptosystem

(1) (2) (3) (4)

Two keys K R and K C of length M and N respectively, are generated randomly .Each element in K R i and KC j can take 0 to 255. Initialize a counter ITR which represents the number of iterations. Increment ITR by one: ITR = ITR+1. Row operations of the input image includes (a) For each row i , compute the sum of all elements and it is denoted by S R i .

S R i = ¦ I 0 (i, j ) N

,

i 1,2,3,....., M

(1)

j 1

(b) Compute modulo 2 of S R i , denoted by M R i . According to M R i , the row i is left or right circular shifted by K R i positions as follows: If M R i 0

right circular shift.

Otherwise

left circular shift.

Column operations of the input image include: (5)

For each column

SC j

j compute the sum of all elements and it is denoted by SC j .

M

¦S

R

(i, j )

,

j 1,2,3,....., N

i 1



j , denoted by M C j . (b) According to M C j ,the row i is left or right circular shifted by K C j positions as follows:

(a) Compute modulo 2 of SC

(2)

785

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

If M C j 0 otherwise

up circular shift. down circular shift.

A scrambled image denoted by (6)

I SCR will be created by steps 4 and 5.

Each row is bit wise xor-ed with key KC .

I XOR 2i  1, j = I SCR (2i  1, j ) XOR KC j

& I XOR 2i, j = I SCR (2i, j ) XOR rot180( KC j ),

Where rot 180( K C ) represents the flipping of (7)

(3)

K C from left to right.

Then each column of scrambled image IXOR is bit wise xor-ed with random key K R .

I ENC i,2 j  1 = I XOR i,2 j  1 XOR K R j & I ENC i,2 j = I XOR i,2 j XOR rot 180( K R j ),

(4)

Where rot 180( K R ) represents the flipping of K R from left to right. (8) Repeat the steps from 3 to 7 until all iterations ( ITR = ITRMAX) are completed. Then an encrypted image will be created. 3. Chaotic Baker Map Chaotic Baker mapping randomizes the pixels in an image. Here chaotic mapping is used as a preprocessing layer to improve the security. In the proposed encryption technique, two layers are used. Thus it increases the security of the system. The chaotic Baker map is a tool for encryption to the image processing community. It randomizes the pixel positions of the input image by using a secret key. It replaces each pixels with another one. Here pixel positions are changed based on permutation. The discretized Baker map is denoted by B v1, v2 , v3 ,.....vk , where k is the set of integers. v1,v2 , v3 ,......, vk is selected such that each integer vi divides



by to



M ,and M i

v1  v2  .......  vk . B is the baker map. With M I  l  M i  vi ,the pixel at indices l, s is mapped

· § B n1, n2 ,....., nk l , s = M  l  M i  s mod M , vi ¨ s  s mod M ¸  M i , ¨ vi vi M © vi ¸¹

Fig.2. Example of chaotic baker map randomization

(5)

786

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

The equation (5) is implemented in the steps following: x First, M x M image matrix is divided into k rectangles. Each rectangle should have a width of x x

vi and

contains M elements. Select each rectangle, and arrange the elements are to a row in the permuted rectangle. Rectangles are selected from right to left. And then select upper rectangles, and then select lower rectangles. Each rectangle is scanned from bottom left corner towards upper elements.

Figure 4 shows a Baker map randomization of an (8 x 8) matrix (M=8). Here the secret key is S= [2, 4, 2] . 4. Experimental Results Matlab is used to implement the proposed method. Here three images such as Lena, Plane and Peppers are used as input images for experimentation. Figure 3 shows the three input images. Experimental visual results of the Lena image are shown, and results of other images are tabulated. 4.1 Visual Testing The purpose of visual testing is to highlight presence of similarities between plain-image and ciphered image. Visual testing was performed on the pixels, 8-bit, gray level, Lena standard test image. Figure 9 depicts the test image (a), along with its encrypted versions by baker map and rubik’s cube algorithm. By comparing them, one can say that there is no perceptual similarity (i.e., no visual information can be observed in processed versions of plain-image).

Fig.3. Lena, Plane and Peppers images

Fig.4. Input, baker mapped, encrypted and decrypted images

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

Fig.5. Histograms of input, encrypted and decrypted Lena image for proposed method

4.2 Analysis of Histograms Histograms of the encrypted decrypted and the original images are analyzed to validate the proposed method. For an efficient encryption algorithm, the histogram of the input and encrypted image should be entirely different. Figure 5 shows the histograms of DRPE with baker map method and proposed method respectively. Here the histograms of the input and the decrypted images are equal. 4.3 Correlation Coefficient Analysis Correlation computes the degree of similarity between two variables. This parameter is useful for calculating the quality of the cryptosystem. The correlation coefficient is given by the following equation. cov( f , g ) , where f - input image and g - encrypted image. (6) R var f var g The correlation values between the input and the encrypted images for Rubik’s cube algorithm, DRPE with baker map and Rubik’s cube with baker map are tabulated in Table 1. The strength of the algorithm is reflected by the lower correlation coefficient values. Here the proposed system has lower correlation coefficient values. Table 1.Correlation coefficient analysis of three images lena, plane And peppers Encryption Technique

Lena

Plane

Peppers

Rubik’s cube

0.0063

0.0059

0.0074

DRPE with baker map

-0.0063

-0.0027

-0.0015

Rubik’s cube with baker map

-0.0026

-0.0054

-0.0024

4.4 Mean Square Error (MSE) Mean Square Error (MSE) between the decrypted and input images evaluate the reliability of an encryption technique. It is given by the following equation:

787

788

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

1 XY

MSE

X

Y

¦¦ f x, y  f x, y ^

2

, where f x, y - input image and f ^ x, y - decrypted image

(7)

x 1 y 1

Lower MSE values indicate strength of the system. Table 2 shows the MSE values obtained for the Rubik’s cube algorithm, DRPE with baker map method and the proposed method. There is no MSE for the proposed method. Table 2. MSE values of three images lena, plane and peppers Encryption Technique

Lena

Plane

Peppers

Rubik’s cube

0

0

0

DRPE with baker map

0.0133

0.0119

0.0132

Rubik’s cube with baker map

0

0

0

4.5 NPCR Analysis Different pixels between two images expressed in percentage indicates the number of pixel change rate (NPCR). NPCR values indicate how much pixels are randomly changed. If pixel values of input and encrypted images are represented as I 0 i, j and I ENC i, j respectively. Then M

N

¦¦ D i, j p

NPCR

i 1 j 1

MXN

X 100% , where D p (i, j )

0, if I 0 i, j

I ENC i, j , else 1

(8)

If NPCR are high, it indicates that much pixels have been changed. Table 3 shows NPCR values of the Rubik’s cube algorithm, DRPE with baker map and the proposed method. Here NPCR values are improved for Rubik’s cube with baker map encryption. Table 3. NPCR Values of three images Lena, plane and peppers Encryption Technique

Lena

Plane

Peppers

Rubik’s cube

99.60 %

99.59 %

99.6 %

DRPE with baker map

99.54 %

99.53 %

99.5 %

Rubik’s cube with baker map

99.61 %

99.6 %

99.64 %

4.6. Time Analysis The processing time is the time required for encryption-decryption process is important for a cryptosystem . The smaller the processing time, the higher the speed of encryption. Table 4 shows the estimated time for different images for Rubik’s cube algorithm, DRPE with baker map and proposed technique. Here it uses more time for encryption. But time can be manageable by using hardware with high processing speed.

K.A. Abitha and Pradeep K. Bharathan / Procedia Technology 24 (2016) 782 – 789

Table 4. Encryption-decryption time for three images Encryption Technique

Lena

Plane

Peppers

Rubik’s cube

1.8074 sec

1.8954 sec

1.8486 sec

DRPE with baker map

1.8954 sec

1.8876 sec

1.9110 sec

Rubik’s cube with baker map

2.3251 sec

2.5612 sec

2.1134 sec

5. Conclusion An encryption technique with a preprocessing layer chaotic baker map and Rubik’s cube algorithm has been presented. The preprocessing layer is used to improve the security level. It is simple and achieves good permutation and diffusion mechanisms in reasonable time. The proposed system will work efficiently for image encryption and will provide several advantages over existing systems. The algorithm provides user flexibility by providing Encryption to a wide range of images. The software provides the flexibility of choosing standard format images of any shape and size. Lossless encryption and decryption is provided by this algorithm. There is no data loss during the process of encryption and decryption. Image quality is also maintained. References [1] Ahmed M. Elshamy, Ahmed N. Z. Rashed, Abd El-Naser A. Mohamed, Osama S. Faragalla, Yi Mu,Saleh A. Alshebeili, and F. E. Abd El-Samie, Optical Image Encryption Based on Chaotic Baker Map and Double Random Phase Encoding,VOL. 31, NO. 15, AUGUST 1, 2013. [2] Khaled Loukhaoukha,Jean-Yves Chouinard, and Abdellah Berdai, A secure image encryption algorithm based on Rubiks cube principle 2012. [3] Y. Honglei, W. Guang-shou, W. Ting, L. Diantao, Y. Jun, M. Weitao, F. Y. Shaolei, and M. Yuankao An image encryption algorithm based on two dimensional Baker map, in Proc. ICICTA, 2009. [4] P. Refregier and B. Javidi, Optical image encryption based on input plane and Fourier plane random encoding ,Opt. Lett., vol. 20, pp.767769, 1995. [5] Khaled Loukhaoukha,Nabti M, and Zebbiche K, An efficient image encryption based on blocks permutation and Rubiks cube principle for iris images,IEEE-Systems,Signal processing and their applications (WoSSPA) Publications,MAY 2013,Page(s):267-272. [6] M.Sirish,a and SVV Lakshmi,”Pixel transformation based on Rubik’s cube principle”, International journal of application or innovation in engineering and management(IJAIEM),volume 3,issue 5,May 2014. [7] Aloha Sinha, Kehar Singh, A technique for image encryption using digital signature ,Optics Communications, Vol-2 I8 (2203),229-234. [8] G. Unnikrishnan, J. Joseph, and K. Singh, Optical encryption by double random phase encoding in the fractional Fourier domain ,Opt. Lett., vol. 25, pp. 887889, 2000. [9] J. Fridrich, Symmetric Ciphers Based on Two-Dimensional Chaotic Maps, Singapore: World Scientific, 1998. [10] Y. Honglei, W. Guang-shou, W. Ting, L. Diantao, Y. Jun, M. Weitao, F. Y. Shaolei, and M. Yuankao, An image encryption algorithm based on two dimensional Baker map, in Proc. ICICTA, 2009. [11] Rinki Pakshwar et al, A Survey On Different Image Encryption and Decryption Techniques, IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 4 (1) , 2013, 113 - 116 [12] C.K. Huang and H.H. Nien (2009), Multi chaotic systems based pixel shuffle for image encryption, Optics Communications 282 (2009) 21232127. In: Proceedings of the International Conference on Uncertainty in Artificial Intelligence. (2011) [13] Z. Liu, L. Xu, C. Lin, J. Dai, and S. Liu , Image encryption scheme by using iterative random phase encoding in gyrator transform domains , Optics and Lasers in Engineering, vol. 49, no. 4, pp. 542546, 2011.

789