A new image encryption based on chaotic systems

4 downloads 0 Views 832KB Size Report
Ahmed A. Abd El-Latif 1,2, Li Li3, Ning Wang1, Qiong Li1 and Xiamu Niu 1,3 ∗ # ..... pixels change rate (NPCR) and unified average changing intensity (UACI), ...
A New Image Encryption Based on Chaotic Systems and Singular Value Decomposition Ahmed A. Abd El-Latif 1,2, Li Li3, Ning Wang1, Qiong Li1 and Xiamu Niu 1,3 ∗ # 1

3

School of Computer Science and Technology, Harbin Institute of Technology, 150080 Harbin China 2 Department of Mathematics, Faculty of Science, Menoufia University, Shebin El-Koom 32511, Egypt

School of Computer Science and Technology, Harbin Institute of Technology Shenzhen Graduate School, 518055 Shenzhen China ABSTRACT

This paper presents an efficient image encryption scheme based on chaotic systems and singular value decomposition. In this scheme, the image pixel’s positions are scrambled using chaotic systems with variable control parameters. To further enforce the security, the pixel gray values are modified using a combination between singular value decomposition (SVD) and chaotic polynomial map. Simulation results justify the feasibility of the proposed scheme in image encryption purpose. Keywords: Image encryption; chaotic systems; SVD.

1. INTRODUCTION Image encryption is the process of realigning the original image into an incomprehensible/ unintelligible one that is non-recognizable in appearance, disorderly, and unsystematic [1, 2]. Generally, the process of image encryption is divided into two phases, scrambling the image and then diffusing the scrambled image. Image is scrambling to cast the image elements into confusion by changing the position of pixels. To enhance the security, the image pixel values are modified so that a tiny change in one pixel spreads out to as many pixels as possible. Scrambling is done by various methods based on toral automorphism [3], two or high-dimentional chaotic system with fixed control parameters [4] etc., and the diffusion is done through the diffusion cipher like chaos based methods [2-5], DNA based methods [6], and other assorted methods [7, 8]. However, some of the proposed schemes are flawed by some security and performance problems [9]. Here, our work is to enhance and optimize the image encryption method so as to uplift the efficiency required for image encryption purpose. In this regard, this paper introduces a new image encryption scheme based on chaotic systems and singular value decomposition. The superior results of numerical and security analysis justify the feasibility of the proposed scheme in image encryption purpose. The rest of the paper is organized as follows. Section 2 gives the basics of the proposed schemes and the proposed scheme is presented in Section 3. The experimental results are given in Section 4, whereas the conclusion is shown in Section 5.

2. BASICS OF THE PROPOSED SCHEME 2.1 Chaotic cat map The cat map is a 2D map that maps the unit square onto itself in a one-to-one manner. It is defined by Eq. (1) [4] where u and v are positive integers. ( pi , qi ) and ( pi +1 , qi +1 ) are the i-th and the (i+1)-th states, respectively:

⎡ pi+1 ⎤ = ⎡ 1v ⎣ qi+1 ⎦ ⎣

∗ #

u uv +1

⎤⎦ ⎡⎣ qpi ⎤⎦ (mod N ) i

Author’s e-mail: [email protected], {li.li, ning.wang, q.li}@ict.hit.edu.cn. Corresponding author’s e-mail: [email protected]. Fourth International Conference on Digital Image Processing (ICDIP 2012), edited by Mohamed Othman, Sukumar Senthilkumar, Xie Yi, Proc. of SPIE Vol. 8334, 83343F · © 2012 SPIE CCC code: 0277-786X/12/$18 · doi: 10.1117/12.964281 Proc. of SPIE Vol. 8334 83343F-1

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 07/02/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

(1)

2.2 Chaotic polynomial map We consider the one-dimensional families of chaotic maps of the interval [0, 1] with an invariant measure, which can be defined as the ratio of polynomials of degree N as in Eq. (2) [10]: 2

(1,2)

φN

( x, λ ) =

λ F 2

1 + (λ − 1) F

(2)

,

where F is substituted with chebyshev polynomial, TN ( x) , of type one TN ( x) for φN(1) ( x1 , λ1 ) and the chebyshev polynomial , U N ( x) ,of type two U N ( x) for φN(2) ( x1 , λ1 ) . As an example, we give one of these maps as in Eq. (3). 2

(2)

φ2 ( x1 , λ1 ) ⇒ x1 ( n + 1) =

2λ1 (0.5− | x1 ( n ) − 0.5 |) 2

1 + 2(λ1 − 1)(0.5− | x1 ( n ) − 0.5 |)

,

(3)

Note that the map φ2(2) ( x1 , λ1 ) is reduced to tent map if λ1 =1. Figs. 2 and 3 show the bifurcation and the chaotic behavior diagrams of the chaotic map Eq.(3). The continuous blue regions are the spaces that the parameters can be used as valid keys.

(a) (b) Fig. 1: (a) Chaotic behavior of the chaotic map Eq.(3) ( x1 (0) = 0.3, λ1 = 1.97 ). (b) Bifurcation behavior of the chaotic map Eq.(3), 2.3 Singular Value Decomposition (SVD)

Formally, the singular value decomposition of an m × n real or complex matrix X is a factorization of the form X= USVT , where U is an m × m real or complex unitary matrix, S is an m × n diagonal matrix with nonnegative real numbers on the diagonal and V T (the conjugate transpose of V) is an n × n real or complex unitary matrix. The diagonal entries of S are known as the singular values of X. The m columns of U and the n columns of V are called the left singular vectors and right singular vectors of X, respectively.

3. THE PROPOSED IMGAE ENCRYPTION METHOD The encryption process is performed according to the following steps Step 1: Do scrambling for image pixel positions using chaotic cat map with variable control parameters by iterating it l times. Let us denote l times permuted image by P l . The control parameters u and v of the chaotic cat map are generated according to Eq. (4) where x(K) is the state of the chaotic polynomial map (Eq.(3)) after K iterations. ⎧⎪u = floor ( x ( K ) ∗ 2 24 ) mod N (4) ⎨ ⎪⎩v = floor ( x ( K ) ∗ 2 48 ) mod 224 mod N Step 2: The permuted image P l is then encrypted as following.

i.

Apply SVD to the image P l i.e., P l = U x S x VxT

Proc. of SPIE Vol. 8334 83343F-2 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 07/02/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

ii.

Obtain a Hankel Matrix with the help of singular values of P

l

i.e. S x = {λi : i = 1, 2,..., r} with

r = min( M , N ) , denoted by H z and given by

H

iii. iv.

x

⎛ λ1 ⎜ ⎜ λ2 = ⎜ M ⎜ ⎜ λ r −1 ⎜ λ ⎝ r

λ2 λ3

λ3 λ4

K K

λ r −1 λr

λr

M

M 0

O K

M 0

0

0

K

0

λr ⎞ ⎟ 0 ⎟ M ⎟ ⎟ 0 ⎟ 0 ⎟⎠

Perform SVD on obtaining a Hankel matrix T H x = U Hx S Hx V Hx Obtain the matrix (Kuv) by U Hx and VHx as K u v = U H x V HTx

v.

where the matrix key Kuv is an orthogonal matrix i.e. K uv K uvT = I . Since, it is the multiplication of two orthogonal matrices. Adapt the chaotic secret key Kchaotic based on the obtained sequence of chaotic polynomial mn

map, {ui }i =1 , and the secret key ω . Then, use it for calculating the keystream K for encryption

Kchaotic = mod( floor(ω × ui + ω)2 ,256), i = 1,2,..., mn K = mod( K uv + K chaotic , 256)

vi.

(7)

where bitxor (a, b) returns the bitwise XOR of the arguments a and b, bitget (a, bit ) returns the value of the bit at position bit in a. Transform the encrypted bit matrix C into decimal matrix size m × n as. 7

Cimage = ∑ 2t × C t (i, j )

(8)

t =0

viii.

(6)

Do the encryption for the permuted image P l by C = bitxor (bitget ( K ,1: 8), bitget ( P l ,1: 8))

vii.

(5)

The encryption process is completed and final encrypted image Cimage is generated.

4. EXPERIMENTAL ANALYSES 4.1 Visual tests, sensitivity and histogram analyses

Several images of size 256×256 are adopted in our experiments. For convenience, the “Baboon” image is taken as an example for our discussion. Set the initial parameter x1 (0) = 0.3 and control parameter λ1=1. 97. The encrypted image is shown in Fig. 2 (b). However, with a tiny change (for instance 10-14) in initial or control parameter, we cannot decrypt the original plainimage; for example, (c) of Fig. 2 shows the wrong decrypted image. Moreover, we can observe the huge difference between parts (b) and (c) in Fig. 1 (d). So, the proposed encryption method is very sensitive to tiny changes in the keys. To test the histogram, Fig. 3 (a) and (b) shows the histogram of the original image and cipherimage, respectively. The latter figure shows that the histogram of cipherimage is nearly flat implying a good statistical property.

(a) (b) (c) (d) Fig. 2. (a) Original image (b) encrypted image with x1 (0) = 0.3 and λ1=1. 97 (c) decrypted image with x1 (0) = 0.300000001 and λ1=1. 9700000001 (d) difference between (b) and (c)

Proc. of SPIE Vol. 8334 83343F-3 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 07/02/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

(a) (b) Fig. 3. Histograms of original Baboon and its cipherimage 4.2 Information Entropy

To calculate the entropy H (s) of a source s, we have: M

H ( s ) = ∑ P ( si ) log 2 i =0

1 bits P ( si )

(9)

where M is the total number of symbols si ∈s; p(si) represents the probability of occurrence of symbol si and log denote the base 2 logarithm so that the entropy is expressed in bits. For a random source emitting 256 symbols, its entropy is H(s) = 8 bits. For the cipherimage of Baboon, the corresponding entropy is 7.9992. This implies that the information leakage in the proposed encryption process is negligible and the encryption algorithm is secure against the entropy attack. 4.3 Resistance to differential attack

To test the influence of a one-pixel change in cipher image, two common measures [1-5] are used, i.e., number of pixels change rate (NPCR) and unified average changing intensity (UACI), they can be defined as in Eq. (10) and (11). m

NPCR =

∑∑ f (i, j ) i =1 j =1

m× n m

UACI =

n

(10)

× 100%,

n

[∑∑ | f ′(i, j ) − f ′′(i, j ) |] / 255 i =1 j =1

m× n

× 100%,

(11)

where f ′ and f ′′ are two images with the same size m × n . m and n are width and height of the image. Define a bipolar array, f, with the same size as images f ′ and f ′′ . Then, f(i,j) is determined by f ′(i, j ) and f ′′(i, j ) , namely, if f ′(i, j ) = f ′′(i, j ) then f(i,j) = 1; otherwise, f(i,j)= 0. Here, we test NPCR and UACI for several images. The percentages of pixels changed into encrypted images are greater than 99.6% even with one bit difference in plainimage. UACI is near 0.334 as required. This result demonstrates that our algorithm has a strong ability to resist differential attack. 4.4 Comparison

Here, we compare the proposed algorithm with Bhantnagar et al. [3]. We mainly focus on the security consideration and the results are shown in Table 1. From Table 1 we can see that our algorithm has a better security performance than Ref. [3].

Proc. of SPIE Vol. 8334 83343F-4 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 07/02/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

5. CONCLUSION A new image encryption scheme based on chaotic maps and SVD is proposed. In this scheme, the original image is scrambled based on 2D chaotic map with variable control parameters and the gray values of the image pixels are encrypted based on a combination of SVD of the image and 1D chaotic map. The control parameters of the chaotic cat map are randomly generated by 1D chaotic map to make the scrambling key dependent. Moreover, the keystream used to encrypt a scrambled image is extracted from left and right singular vectors and chaotic map. Experimental results show that the proposed method has superior performance than Bhantnagar et al. [3] method. Table 1: Comparison between the proposed algorithm and Bhantnagar et al. [3] Considered items Bhantnagar et al. [3] Proposed algorithm 0.00181 Horizontal -0.1107 Correlation 0.00148 Vertical -0.1123 coefficient 0.00193 Diagonal 0.0083 NPCR (%) 99.28 99.62 UACI (%) 28.27 33.51

6. ACKNOWLEDGMENT This work is supported by the National Natural Science Foundation of China (Grant No. 60832010, 61100187), the Fundamental Research Funds for the Central Universities (Grant No. HIT. NSRIF. 2010046), and Higher Education Commission of Egypt.

7. REFERENCES [1]. Amin, M., Faragallah, O. S. and Abd El-Latif, A. A., “A chaotic block cipher algorithm for image cryptosystems,” Commun Nonlinear Sci Numer Simulat, Papers 15(11), 3484–3497 (2010). [2]. Ye, G. D., “Image scrambling encryption algorithm of pixel bit based on chaos map”, Pattern Recognition, Papers 31, 347-354 (2010). [3]. Bhatnagar, G. , Q. M. Jonathan Wu and Raman, B. ,” A Novel Image Encryption Framework Based on Markov Map and Singular Value Decomposition” Image Analysis and Recognition, LNCS 6754, 286-296 (2011). [4]. Chen, G. R., Mao, Y. B. and Chui, C. K., ”A symmetric image encryption scheme based on 3D chaotic cat maps”, Chaos, Solitions and Fractals. Papers 21, 749–761 (2004). [5]. Amin, M. and Abd El-Latif, A. A., ”Efficient Modified RC5 Based on Chaos Adapted to Image Encryption” Journal of Electronic Imaging 19(1), 013012 (Jan–Mar 2010) [6]. Zhang, Q., Guo, L. and Wei, X. P., “Image encryption using DNA addition combining with chaotic maps ” Mathematical and Computer Modelling 52, 2028-2035 (2010). [7]. Maniccam, S. S. and Bourbakis, N.G., “Image and video encryption using SCAN patterns,” Pattern Recognition, Papers 37(4), 725-737 (2004). [8]. Li X. B., Knipe, J. and Knipe, H. Cheng, ”Image compression and encryption using tree structures,” Pattern Recognition Letters, Papers 18, 1253–1259 (1997). [9]. Li, C. Q., Li, S. J., Asim, M., Nunez, J., Alvarez, G. and Chen, G. R., “On the security defects of an image encryption scheme,” Image and Vision Computing, Papers (27) 1371-1381 (2009). [10]. Jafarizadeh, M. A. and Behnia, S., “Hierarchy of chaotic maps with an invariant measure and their compositions,” J. Nonlinear Math. Phys., Papers 9 (1) 1–16 (2002).

Proc. of SPIE Vol. 8334 83343F-5 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 07/02/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx