chaos-based image encryption algorithm

5
Physics Letters A 346 (2005) 153–157 www.elsevier.com/locate/pla Chaos-based image encryption algorithm Zhi-Hong Guan a,, Fangjun Huang a , Wenjie Guan b a Department of Control Science and Engineering, Huazhong University of Science and Technology, Wuhan, Hubei 430074, PR China b Department of Electrical and Computer Engineering, University of Waterloo, Waterloo, ON N2L 3G1, Canada Received 26 March 2005; received in revised form 2 August 2005; accepted 2 August 2005 Available online 8 August 2005 Communicated by A.R. Bishop Abstract In this Letter, a new image encryption scheme is presented, in which shuffling the positions and changing the grey values of image pixels are combined to confuse the relationship between the cipher-image and the plain-image. Firstly, the Arnold cat map is used to shuffle the positions of the image pixels in the spatial-domain. Then the discrete output signal of the Chen’s chaotic system is preprocessed to be suitable for the grayscale image encryption, and the shuffled image is encrypted by the preprocessed signal pixel by pixel. The experimental results demonstrate that the key space is large enough to resist the brute- force attack and the distribution of grey values of the encrypted image has a random-like behavior. 2005 Elsevier B.V. All rights reserved. Keywords: Chaos; Image encryption; Arnold map; Chen’s chaotic system 1. Introduction With the rapid growth of multimedia production systems, electronic publishing and widespread dis- semination of digital multimedia data over the Inter- net, protection of digital information against illegal copying and distribution has become extremely im- This research was supported by the National Natural Science Foundation of China under Grant 60074009 and 60274004, the Lab Foundation of Institute of Automation, Chinese Academy of Sci- ences. * Corresponding author. E-mail address: [email protected] (Z.-H. Guan). portant. To meet this challenge, a variety of traditional encryption algorithms have been proposed [1–4]. Re- cently, along with the rapid development of theory and application of chaos, many researchers are now fo- cusing on the chaotic cryptography. A lot of image encryption schemes based on chaos theory have been presented [5–10]. These applications have been moti- vated by the chaotic properties such as ergodicity and sensitive dependence on initial conditions and system parameters, in addition to complex dynamics and de- terministic behaviors. In [5], a systematical method was suggested for adapting an invertible two-dimensional chaotic map on a torus or on a square to create a symmetric block 0375-9601/$ – see front matter 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.physleta.2005.08.006

Upload: zhi-hong-guan

Post on 26-Jun-2016

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chaos-based image encryption algorithm

a

values ofrnold cate Chen’sted by thet the brute-

Physics Letters A 346 (2005) 153–157

www.elsevier.com/locate/pl

Chaos-based image encryption algorithm✩

Zhi-Hong Guana,∗, Fangjun Huanga, Wenjie Guanb

a Department of Control Science and Engineering, Huazhong University of Science and Technology, Wuhan, Hubei 430074, PR Chinab Department of Electrical and Computer Engineering, University of Waterloo, Waterloo, ON N2L 3G1, Canada

Received 26 March 2005; received in revised form 2 August 2005; accepted 2 August 2005

Available online 8 August 2005

Communicated by A.R. Bishop

Abstract

In this Letter, a new image encryption scheme is presented, in which shuffling the positions and changing the greyimage pixels are combined to confuse the relationship between the cipher-image and the plain-image. Firstly, the Amap is used to shuffle the positions of the image pixels in the spatial-domain. Then the discrete output signal of thchaotic system is preprocessed to be suitable for the grayscale image encryption, and the shuffled image is encryppreprocessed signal pixel by pixel. The experimental results demonstrate that the key space is large enough to resisforce attack and the distribution of grey values of the encrypted image has a random-like behavior. 2005 Elsevier B.V. All rights reserved.

Keywords: Chaos; Image encryption; Arnold map; Chen’s chaotic system

ndis-r-

alim-

nceLabci-

nal

ndfo-

gebeenti-andtemde-

foraplock

1. Introduction

With the rapid growth of multimedia productiosystems, electronic publishing and widespreadsemination of digital multimedia data over the Intenet, protection of digital information against illegcopying and distribution has become extremely

✩ This research was supported by the National Natural ScieFoundation of China under Grant 60074009 and 60274004, theFoundation of Institute of Automation, Chinese Academy of Sences.

* Corresponding author.E-mail address: [email protected](Z.-H. Guan).

0375-9601/$ – see front matter 2005 Elsevier B.V. All rights reserveddoi:10.1016/j.physleta.2005.08.006

portant. To meet this challenge, a variety of traditioencryption algorithms have been proposed[1–4]. Re-cently, along with the rapid development of theory aapplication of chaos, many researchers are nowcusing on the chaotic cryptography. A lot of imaencryption schemes based on chaos theory havepresented[5–10]. These applications have been movated by the chaotic properties such as ergodicitysensitive dependence on initial conditions and sysparameters, in addition to complex dynamics andterministic behaviors.

In [5], a systematical method was suggestedadapting an invertible two-dimensional chaotic mon a torus or on a square to create a symmetric b

.

Page 2: Chaos-based image encryption algorithm

154 Z.-H. Guan et al. / Physics Letters A 346 (2005) 153–157

theial-ey-gendein-nly

ne-eengeuf-of

3Dyp-

apan-een

ureng-si-

r isdity

ps:gees

otic

dja-of

xelso-

icalng

elal-alere

lin-

of

ex-

fncenc-s

thebednw-deat-to

welues

rof.

encryption scheme. The main idea is to shufflepositions of the pixels of the plain-image in the spatdomain. In[6], the authors present a new chaotic kbased image encryption algorithm (CKBA) to chanthe pixel values of the plain-image. However, Li aZheng point out that CKBA is very weak to thchosen/known-plaintext attack with only one plaimage, and its security to brute-force ciphertext-oattack is overestimated by the authors[7]. In [8],an algorithm for encoding binary images using odimensional chaotic maps is presented. It can be sthat, this method[8] is not secure enough accordinto [7]. In order to improve the security of the imagencryption algorithm, many researchers prefer shfling the positions and changing the grey valuesimage pixels simultaneously. For instance, in[9,10]the two-dimensional chaotic map is generalized tofor designing a real-time secure symmetric encrtion scheme. The new scheme employs the 3D mto shuffle the positions of image pixels and usesother chaotic map to confuse the relationship betwthe cipher-image and plain-image.

A new scheme is suggested in this Letter for secimage encryption. Shuffling the positions and chaing the grey values of image pixels are performedmultaneously in our method. The rest of this Letteorganized as follows. Section2 describes the proposemethod. Section3 presents our experiments. Securanalyses are given in Section4, and finally this Letteris concluded in Section5.

2. The proposed cryptosystem

The image encryption algorithm includes two steFirstly, the positions of the pixels of the original imaare shuffled by Arnold cat map. Then the pixel valuof the shuffled image are encrypted by Chen’s chasystem.

2.1. Encryption by Arnold cat map

Image data have strong correlations among acent pixels. Statistical analysis on large amountsimages shows that averagely adjacent 8 to 16 piare correlative in horizontal, vertical, and also diagnal directions for both natural and computer-graphimages. In order to disturb the high correlation amo

pixels, we adopt Arnold cat map to shuffle the pixpositions of the plain-image. Without loss of generity, we assume the dimension of the original grayscimageI is N × N . The coordinates of the pixels aS = {(x, y) | x, y = 0,1,2, . . . ,N − 1}. Arnold catmap is described as[12][

x′y′

]= A

[x

y

](modN)

(1)=[

1 p

q pq + 1

][x

y

](modN)

wherep andq are positive integers, det(A) = 1. Themap is area-preserving since the determinant of itsear transformation matrix equals(1). The(x′, y′) is thenew position of the original pixel position(x, y) whenArnold cat map is performed once. Iterated actionsA on a pixelr0 ∈ S form a dynamical system

rn+1 = Anr0 (modN) or rn+1 = Arn (modN),

wheren = 0,1,2, . . . . The set of points{r0, r1, r2, . . .}is an orbit of the system with a period, i.e., thereist positive integersT and n0, such thatrn+T = rn,n = n0, n0 + 1, n0 + 2, . . . . The periodT depends onthe parametersp, q and the sizeN of the originalimage. Thus the parametersp, q and the number oiterationsM all can be used as the secret keys. Sithere only exists a linear transformation and mod fution, it is very efficient to shuffle the pixel positionusing the Arnold cat map. After several iterations,correlation among the adjacent pixels can be disturcompletely. Some experiments are given in Sectio3to demonstrate the efficiency of Arnold cat map. Hoever, the periodicity of Arnold cat map should degrathe security the encryption, because the possibletacks may iterate the Arnold cat map continuouslyreappear the original plain-image. As a remedy,adopt Chen’s chaotic system to change the pixel vanext to improve the security.

2.2. Encryption by Chen’s chaotic system

Chen’s chaotic system is first presented by PG. Chen in 1999, which is described as following[13],

x = a(y − x),

y = (c − a)x − xz + cy,

z = xy − bz,

Page 3: Chaos-based image encryption algorithm

Z.-H. Guan et al. / Physics Letters A 346 (2005) 153–157 155

escm

lly

ersrty

hanse-iore–

, thesed

thehuf-ree

edm

xel.nd

nu-

t as

ssrls-

ificon.ed

withfled

tic

nt

the

tionour

ain-

ram

where a, b and c are parameters. If one choosa = 35, b = 3, c ∈ [20,28.4], the system is chaotias shown byFig. 1. The equations of Chen’s systeare quite similar to those of the Lorenz system[11],but topologically they are not equivalent, essentiadue to the parameterc in front of the state vari-able y, which leads to abundant dynamic charactof the new system. Therefore, the dynamical propeof the Chen’s chaotic system is more complicated tthe Lorenz chaotic system. This feature is very uful in secure communications. The chaotic behavof Chen’s chaotic system using fourth order RungKutta algorithm is shown inFig. 1. The step of theRunge–Kutta is chosen as 0.001. As we can seetrajectory of the Chen’s chaotic system is compoof a lot of discrete dots.

In our scheme, three discrete variables ofChen’s chaotic system are adopted to encrypt the sfled image. The encryption process consists of thsteps of operations.

(1) The pixels of the shuffled image are arrangby the order from left to right and then top to bottoand we can get a setS = {S1, S2, . . . , SN×N }, in whicheach element is the decimal grey value of the piConvert decimal pixel values to binary numbers awe can get a new setB = {B1,B2, . . . ,BN×N }.

(2) Iterate the Chen’s chaotic forN0 times.(3) The Chen’s chaotic system is iterated conti

ously. For each iteration, we can get three valuesxi , yi

andzi . These decimal values are preprocessed firsfollows

Bxi= de2bi

(mod

((Abs(xi) − Floor

(Abs(xi)

))× 1014,256

)),

Fig. 1. Chaotic behavior of Chen’s system.

where Abs(x) returns the absolute value ofx. Floor(x)

rounds the elements ofx to the nearest integers lethan or equal tox. mod(x, y) returns the remaindeafter division. The function de2bi(x) converts decimanumberx to binary value. Because in our cryptosytem all the variables declared as typedouble which hasa bit-length of 64 bits. When expressed in scientnotation, all the variables have a 15-digit precisiThe decimal fractions of the variables are multipliby 1014. Moreover, in mod(x, y) function the variabley is chosen as 256 because the grayscale image256 grey levels is used in our scheme. The shufimage is encrypted as

C3×(i−1)+1 = B3×(i−1)+1 ⊕ Bxi,

C3×(i−1)+2 = B3×(i−1)+2 ⊕ Byi,

C3×(i−1)+3 = B3×(i−1)+3 ⊕ Bzi,

where i = 1,2, . . . represents theith iteration of theChen’s chaotic system. The symbol⊕ represents theexclusive OR operation bit-by-bit. The Chen’s chaosystem is iterated until all the elements in the setB ={B1,B2, . . . ,BN×N } is encrypted. Then every elemein the encrypted setC = {C1,C2, . . . ,CN×N } is con-verted into decimal numbers and we can obtaincipher-image.

3. Experimental results

Some experimental results are given in this secto demonstrate the efficiency of our scheme. In allexperiments, the precision is 10−14, which is easy tobe realized on today’s personal computer. The plimage with the size 124×124 is shown inFig. 2(a) and

(a) (b)

Fig. 2. Plain-image and its histogram: (a) plain-image; (b) histogof the plain-image.

Page 4: Chaos-based image encryption algorithm

156 Z.-H. Guan et al. / Physics Letters A 346 (2005) 153–157

ge;

ge;

arenofthe

aresare

ni--theatis-

nde-

tim-

age;

canse-

toargeour’sreci-

largeheeme

he

,

(a) (b)

Fig. 3. Encryption by using Arnold cat map: (a) shuffled ima(b) histogram of the shuffled image.

(a) (b)

Fig. 4. Encryption by Chen’s chaotic system: (a) cipher-ima(b) histogram of the cipher-image.

the histogram of the plain-image is shown inFig. 2(b).Fig. 3(a) is the shuffled image andFig. 3(b) is thehistogram of the shuffled image. The secret keyschosen asp = 1, q = 1 andM = 5. As can be seethat, Arnold cat map only shuffle the pixel positionsthe image since the histogram of the plain-image issame as the shuffled image.

Fig. 4(a) illustrates the cipher-image andFig. 4(b)is the corresponding histogram. The parametersselected asa = 35, b = 3, c = 28. The secret keyto change the pixel values of the shuffled imagex0 = −10.058, y0 = 0.368, z0 = 37.368. As we cansee, the histogram of the ciphered image is fairly uform and is significantly different from that of the original image. The encryption procedure complicatesdependence of the statistics of the output on the sttics of the input.

Fig. 5(a) illustrates the decrypted image aFig. 5(b) is the corresponding histogram. The paramters are selected asa = 35, b = 3, c = 28. The secrekeys to change the pixel values of the shuffledage arex0 = −10.058,y0 = 0.368,z0 = 37.368. Since

(a) (b)

Fig. 5. Decrypted image and its histogram: (a) decrypted im(b) histogram of the decrypted image.

(a) (b)

Fig. 6. The sensitivity to the secret keyx0: (a) decrypted image(x0 = −10.05800000000001,y0 = 0.368, z0 = 37.368); (b) his-togram of the decrypted image.

the chaotic systems are deterministic, the receiverreconstruct the same plain-image exactly using thecret keys.

4. Security analyses

A good encryption scheme should be sensitivethe secret keys, and the key space should be lenough to make brute-force attacks infeasible. Inencryption algorithm, the initial values of Chenchaotic system are used as secret keys. If the psion is 10−14, the key space size is 1042. Moreover,the parametersp, q and M of Arnold cat map arealso used as the secret keys. The key space isenough to resist all kinds of brute-force attacks. Texperimental results also demonstrate that our schis very sensitive to the secret key mismatch (10−14).Fig. 5 illustrates the sensitivity of our scheme to tsecret keyx0. The cipher-image is shown inFig. 4(a),which is decrypted usingx0 = −10.05800000000001

Page 5: Chaos-based image encryption algorithm

Z.-H. Guan et al. / Physics Letters A 346 (2005) 153–157 157

-

if-ere-

omis

searet at-

isthene-ro-haste-

sta-ry

37

58

(6)

00)

forIn-

000,

ionIn-02,

1D11

ookm-ag,

04)

97/

(a) (b)

Fig. 7. The sensitivity to the secret keyy0: (a) decrypted image(x0 = −10.058, y0 = 0.36800000000001,z0 = 37.368); (b) his-togram of the decrypted image.

(a) (b)

Fig. 8. The sensitivity to the secret keyz0: (a) decrypted image(x0 = −10.058, y0 = 0.368, z0 = 37.36800000000001); (b) histogram of the decrypted image.

y0 = 0.368,z0 = 37.368,p = 1, q = 1 andM = 5. Ascan be seen that, even the secret keyx0 is changed alittle (10−14), the decrypted image is absolutely dferent from the plain-image. Similar results for othsecret keysy0 andz0 all can be obtained, which arshown inFigs. 6–8. As we can see, the decrypted image with wrong keys has a histogram with randbehavior. The sensitivity to initial conditions whichthe main characterization of chaos guarantees thecurity of our scheme. Undoubtedly, the secret keyssecure enough even a chosen plaintext/ciphertextack is adopted.

-

5. Conclusions

In this Letter, a new image encryption schemepresented. Shuffling the positions and changinggrey values of image pixels are combined simultaously to ensure the security of our method. The pposed algorithm has three merits: (1) the algorithma large enough key space to resist all kinds of bruforce attacks; (2) the cipher-image has a goodtistical property; (3) the encryption algorithm is vesensitive to the secret keys.

References

[1] S.S. Maniccam, N.G. Bourbakis, Pattern Recognition(2004) 725.

[2] C.-C. Chang, M.-S. Hwang, T.-S. Chen, J. Syst. Software(2001) 83.

[3] N. Bourbakis, C. Alexopoulos, Pattern Recognition 25(1992) 567.

[4] H. Cheng, X.B. Li, IEEE Trans. Signal Process. 48 (8) (202439.

[5] J. Fridrich, Int. J. Bifur. Chaos 8 (6) (1998) 1259.[6] J.-C. Yen, J.-I. Guo, A New Chaotic Key-Based Design

Image Encryption and Decryption, in: Proceedings IEEEternational Conference on Circuits and Systems, vol. 4, 2pp. 49–52.

[7] S. Li, X. Zheng, Cryptanalysis of a Chaotic Image EncryptMethod, Scottsdale, AZ, USA, 2002, in: Proceedings IEEEternational Symposium on Circuits and Systems, vol. 2, 20pp. 708–711.

[8] F. Beldhouche, U. Qidwai, Binary Image Encoding UsingChaotic Maps, in: IEEE Annual Technical Conference,April 2003, pp. 39–43.

[9] Y. Mao, G. Chen, Chaos-Based Image Encryption, Handbof Computational Geometry for Pattern Recognition, Coputer Vision, Neurocomputing and Robotics, Springer-VerlBerlin, 2003.

[10] G. Chen, Y. Mao, C.K. Chui, Chaos Solitons Fractals 21 (20749.

[11] E.N. Lorenz, J. Atmos. Sci. 20 (1963) 130.[12] http://online.redwoods.cc.ca.us/instruct/darnold/laproj/Fall

Gabe/catmap.pdf.[13] G. Chen, T. Ueta, Int. J. Bifur. Chaos 9 (7) (1999) 1465.