Authenticated Image Encryption Scheme Based On Chaotic Maps ND Memory Cellular Automataa
Authenticated Image Encryption Scheme Based On Chaotic Maps ND Memory Cellular Automataa
a r t i c l e i n f o abstract
Article history: This paper introduces a new image encryption scheme based on chaotic maps, cellular automata and
Received 21 August 2012 permutation–diffusion architecture. In the permutation phase, a piecewise linear chaotic map is
Received in revised form utilized to confuse the plain-image and in the diffusion phase, we employ the Logistic map as well as
21 November 2012
a reversible memory cellular automata to obtain an efficient and secure cryptosystem. The proposed
Accepted 3 January 2013
Available online 8 February 2013
method admits advantages such as highly secure diffusion mechanism, computational efficiency and
ease of implementation. A novel property of the proposed scheme is its authentication ability which
Keywords: can detect whether the image is tampered during the transmission or not. This is particularly important
Image encryption in applications where image data or part of it contains highly sensitive information. Results of various
Chaotic map
analyses manifest high security of this new method and its capability for practical image encryption.
Memory cellular automata
& 2013 Elsevier Ltd. All rights reserved.
Diffusion
0143-8166/$ - see front matter & 2013 Elsevier Ltd. All rights reserved.
http://dx.doi.org/10.1016/j.optlaseng.2013.01.001
666 A. Bakhshandeh, Z. Eslami / Optics and Lasers in Engineering 51 (2013) 665–673
þ 1Þ þ 1Þ
automata used in this paper. Section 3 is devoted to our proposed Proposition 1. If f t ðNðTt
i Þ ¼ aðTt
i , then the LMCA given by (5)
method. In Section 4, the security analysis is provided. Finally, is reversible and its inverse is another LMCA with the following local
Section 5 concludes the paper. transition function:
þ 1Þ
X
t2
2. One-dimensional linear memory cellular automata aðT
i
¼ f tm1 ðNTm
i Þ þ aTt
i
þ1
ðmod 2Þ, 0 r ir N1: ð6Þ
m¼0
þ 1Þ
X
r where x A ½0,1 and p A ½0,0:5 are considered as secret keys. The
aðT
i
¼ aj aðTÞ
iþj
ðmod 2Þ, 0 ri rN1, ð3Þ permutation process based on this map is composed of the
j ¼ r
following steps (see Fig. 1):
where aj A Z2 for every j. Since there are 2r þ 1 neighbor cells for
/iS, there exist 22r þ 1 LCAs and each of them can be specified by Step 1 Iterate the piecewise linear map M N times to get the
an integer w called rule number which is defined as follows: values fx1 , . . . ,xMN g, where M and N are the number of
X
r the rows and columns of the plain-image P, respectively.
w¼ aj 2r þ j , ð4Þ Step 2 Sort the above values increasingly and take out the
j ¼ r values fx 1 , . . . ,x MN g.
Step 3 Find the position of values fx 1 , . . . ,x MN g in fx1 , . . . ,xMN g
where 0 rw r 22r þ 1 1.
and form the position set S ¼ fs1 ,s2 , . . . ,sMN g, where x i is
The CAs considered so far are memoryless, i.e., the updated state
the value of xsi .
of a cell depends on its neighborhood configuration only at the
Step 4 Shuffle the pixels of the plain-image P using the set S to
preceding time step. Nevertheless, one can consider cellular auto-
get the shuffled image P 0 .
mata for which the states of neighboring cells at time T as well as
T1,T2,y contribute to determine the state at time T þ 1. This is
the concept of the memory cellular automata (MCA). Hereafter, by a
3.2. Image encrypting phase
CA, we mean a particular type of MCA called the tth order linear MCA
(LMCA) whose local transition function takes the following form:
aðT
i
þ 1Þ
¼ f 1 ðN iðTÞ Þ þf 2 ðN ðT1Þ
i
Þ þ . . . þ f t ðN ðTt
i
þ 1Þ
Þðmod 2Þ, 0 r i rN1, Input: The shuffled image P0 .
ð5Þ Output: The encrypted image c.
Plain-image P
No
H i = f h ( Bi (1),..., Bi (m))
Encrypt A m+1 {A 1,…,A m,A m+1,A m+2} Construct LMCA of order (m+2) with
i ← i +1 using the logistic initial configurations {Bi(1),…,Bi(m),Hi,D}
chaotic map and evolve it.
difficult tasks. In this phase, the key is the initial condition of the where fh is a collision-resistant hash function and
logistic chaotic map, defined according to the following formula: Bi(k) denotes the kth pixel of the ith block. Note that
the collision resistance of fh makes it hard to find
yn þ 1 ¼ 4yn ð1yn Þ yn A ½0,1: ð8Þ
two distinct values x and x0 such that f h ðxÞ ¼ f h ðx0 Þ.
In contrast to most image encryption techniques that are cipher 2.2 Construct L that is a reversible LMCA of order m þ 2
by computing the m þ 2 initial configurations
streams, our image encryption method is a block encryption
fC ð1Þ , . . . ,C ðm þ 2Þ g as follows:
algorithm in which the image is divided into n blocks and each Set C ð1Þ ¼ Bi ð1Þ,C ð2Þ ¼ Bi ð2Þ, . . . ,C ðmÞ ¼ Bi ðmÞ.
b
block will be handled separately. The exact procedure is as Set C ðm þ 1Þ ¼ Hi in which Hi is the hash value of
follows and a graphical representation is depicted in Fig. 1: the block, computed by (9).
If i¼1, i.e. this block is the first block being
processed, assign C m þ 2 to an arbitrary number
Step 1 Divide the shuffled image P0 into nb m-pixel blocks, where between 0 and 255, otherwise assign C ðm þ 2Þ to
nb ¼ ½M N=m. The value of m is arbitrary; however, the value D ¼ Bi1 ð1Þ Bi1 ð2Þ . . . Bi1 ðmÞ that
note that choosing greater values results in less compu- is the XOR of the pixels of the previous block.
tations while choosing smaller values for m leads to more 2.3 Evolve L for w times, starting from the initial con-
precision in data integrity verification phase. Thus, one figurations fC ð1Þ , . . . ,C ðm þ 2Þ g to obtain the new con-
should make a trade-off between two mentioned proper- figurations fAi ð1Þ,Ai ð2Þ, . . . ,Ai ðm þ 2Þg where w can be
ties while choosing the value of m. announced publicly or can be part of the key.
Step 2 For each block Bi, 1 ri rnb , perform the following steps: 2.4 Encrypt the (m þ1)th configuration of the evolved
block, i.e. Ai ðm þ 1Þ as follows:
2.1 Compute the hash value for the block according to
the following formula: Compute K ¼ 1 þ modðAi ð1Þ,4Þ.
Iterate the Logistic chaotic map K times to obtain
Hi ¼ f h ðBi ð1Þ, . . . ,Bi ðmÞÞ, ð9Þ the value y.
668 A. Bakhshandeh, Z. Eslami / Optics and Lasers in Engineering 51 (2013) 665–673
Fig. 2. Histograms of plain-image Boat and its corresponding cipher-image (x ¼0.123456789, p ¼ 0.2, y¼0.5671). (a) Original Boat image. (b) Encrypted Boat image.
(c) Histogram of (a). (d) Histogram of (b).
Step 1 Calculate Ai ðm þ 1Þ using the formula Ai ðm þ 1Þ ¼ Input: The recovered shuffled image P0
A0i ðm þ1Þ modðd þ Ai ðmþ 2Þ,256Þ, where the value d Output: Detecting whether the image is tampered or not.
A. Bakhshandeh, Z. Eslami / Optics and Lasers in Engineering 51 (2013) 665–673 669
The algorithm to verify the image integrity (in case of a 4.1. Key analysis
required authentication) is as follows:
4.1.1. Key space
Step 1 Divide P0 (recovered according to the Section 3.3) into m A good image cryptosystem should provide a fairly large key
pixel blocks fB1 ,B2 , . . . ,Bnb g. For each block Bi, 1 r i rnb , space to resist brute-force attacks. The size of the key space is
perform the following steps: equal to the total number of different keys that can be used in the
scheme. In our scheme, the secret keys are the initial condition of
(a) Compute the value hi ¼ f h ðBi ð1Þ, . . . ,Bi ðmÞÞ where fh is the piecewise linear map ðx A ½0,1Þ, the control parameter of the
the same hash function as in (9) and Bi(k) denotes piecewise linear map ðp A ½0,0:5Þ and the initial condition of the
the kth pixel of the ith block. logistic map ðy A ½0,1Þ. To achieve more security, we recommend
(b) If the value Hi, recovered in Step 2 of the decryption to consider the rule numbers of the LMCA as part of the secret key
procedure, is equal to the value hi, then this block is too, but here, we do not take them into account. Therefore, the
not tampered. secret key includes two floating point numbers of precision 1015
in interval ½0,1 and one floating point number of precision 1015
Note that we employed a collision resistant hash function to in interval ½0,0:5 which causes the key space to be equal to 1015
compute the hash value of the blocks Bi, 1 ri rnb (see Eq. (9)). 1015 1014 5 ¼ 1044 5 that is large enough to make brute-
Therefore, to verify if the image is intact or not, we only need to force attacks infeasible [24].
check if hi equals Hi for every block.
4.1.2. Key sensitivity
A good image encryption scheme should be sensitive to the
secret key, meaning that a slight change in the secret key should
4. Security analysis cause a substantial change in the corresponding cipher-image. To
test the sensitivity of a key parameter K, the plain-image is
In this section, we first provide key analysis of the proposed encrypted with K ¼p, K ¼ pDd and K ¼ p þ Dd, while keeping
cryptosystem. We then consider the behavior of the scheme the other key parameters unchanged. Here Dd is a very small
against statistical attacks and differential attack. Resistance to value and is called the perturbing value. The corresponding
known-plaintext and chosen-plaintext attacks are discussed as encrypted images are denoted by I1, I2 and I3, respectively. The
well. Finally, we analyze the performance of the scheme. sensitivity coefficient for the parameter K is denoted by the
Fig. 3. Histograms of plain-image Lake and its corresponding cipher-image (x¼ 0.123456789, p ¼ 0.2, y¼ 0.5671). (a) Original Lake image. (b) Encrypted Lake image.
(c) Histogram of (a). (d) Histogram of (b).
670 A. Bakhshandeh, Z. Eslami / Optics and Lasers in Engineering 51 (2013) 665–673
Fig. 4. Correlations of two adjacent pixels in the plain-image and in the cipher-image: (a), (c) and (e) corresponds to the plain-image Boat; (b), (d) and (f) corresponds to
the cipher-image Boat.
A. Bakhshandeh, Z. Eslami / Optics and Lasers in Engineering 51 (2013) 665–673 671
Fig. 5. Correlations of two adjacent pixels in the plain-image and in the cipher-image: (a), (c) and (e) corresponds to the plain-image Lake; (b), (d) and (f) corresponds to
the cipher-image Lake.
Table 2 Table 3
Correlation coefficients of two adjacent pixels in the plain-image and the correspond- Information entropy test results.
ing cipher image.
Image H (m)
Plain-image Cipher-image Plain-image Cipher-image
‘‘boat’’ ‘‘boat’’ ‘‘lake’’ ‘‘lake’’ Boat 7.9706
Lake 7.9730
Horizontal 0.9189 0.0063 0.9283 0.0035 Lena 7.9696
Vertical 0.9028 0.0095 0.9444 0.0089 Pepper 7.9717
Diagonal 0.9266 0.0089 0.8927 0.0011
1XN
4.2.3. Information entropy attack
DðxÞ ¼ ðx EðxÞÞ2 , ð13Þ
Ni¼1 i The information entropy is the most significant feature of
randomness. The information entropy H(m) of a message source
m can be measured by the following formula [26]:
1XN
EðxÞ ¼ x, ð14Þ
Ni¼1 i X
L1
HðmÞ ¼ pðmi Þlog2 ðpðmi ÞÞ, ð15Þ
i¼0
where x and y are gray-scale values of two adjacent pixels of the
image. The correlation coefficients of the plain-images and cipher- where L is the total number of symbols in m and pðmi Þ represents
images of Boat and Lake are illustrated in Figs. 4 and 5, respectively. the probability of occurrence of symbol mi. Assuming there are
Also, Table 2 summarizes the results corresponding to these images. 256 symbols with the same probability, we get the ‘‘true random’’
672 A. Bakhshandeh, Z. Eslami / Optics and Lasers in Engineering 51 (2013) 665–673
[12] Li C, Chen G. On the security of a class of image encryption schemes. IEEE [21] Chen RJ, Lai JL. Image security system using recursive cellular automata
Symp Circuits Syst 2008:3290–3. substitution. Pattern Recognition 2007;40:1621–31.
[13] Mao Y, Chen G, Lian S. A novel fast image encryption scheme based on 3D [22] Jin J. An image encryption based on elementary cellular automata. Opt Laser
chaotic baker maps. Int J Bifurcat Chaos 2004;14:3613–24. Eng 2012;50:1836–43.
[14] Shen J, Jin X, Zhou C. A color image encryption algorithm based on magic [23] Eslami Z, Zarepour Ahmadabadi J. A verifiable multi-secret sharing scheme
cube transformation and modular arithmetic operation. Lect Notes Comput based on cellular automata. Inf Sci 2010;180:2889–94.
Sci 2005;3768:270–80. [24] Stinson D. Cryptography: theory and practice. 2nd ed.CRC/C&H; 2002.
[15] He X, Zhu Q, Gu P. A new chaos-based encryption method for color image. [25] Lian S, Sun J, Wang Z. A block cipher based on a suitable use of the chaotic
Lect Notes Artif Int 2006;4062:671–8. standard map. Chaos Solitons Fractals 2005;26:117–29.
[16] Zhang Q, Guo L, Wei X. Image encryption using DNA addition combining with [26] Ye R. A novel chaos-based image encryption scheme with an efficient
chaotic maps. Math Comput Model 2010;52:2028–35. permutation–diffusion mechanism. Opt Commun 2011;284:5290–8.
[17] Yoon JW, Kim H. An image encryption scheme with a pseudorandom permu- [27] Katz J, Lindell Y. Introduction to modern cryptography. CRC/C&H; 2008.
taion based on chaotic maps. Commun Nonlinear Sci 2010;15:3998–4006. [28] Zhang G, Liu Q. A novel image encryption method based on total shuffling
[18] Ismail IA, Amin M, Diab H. A digital image encryption algorithm based a scheme. Opt Commun 2011;284:2775–80.
composition of two chaotic Logistic maps. Int J Network Secur 2010;11:1–10. [29] Philip M, das A. Survey: image encryption using chaotic cryptography
[19] Neumann John Von, Burks AW, editors. Theory of self-reproducing automata.
schemes. In: IJCA Special Issue on Computational Science—New Dimensions
Champaign, IL, USA: University of Illinois Press; 1966.
& Perspectives, vol. 1; 2011. p. 1–4.
[20] Maleki F, Mohades A, Mehdi Hashemi S, Shiri ME. An image encryption
[30] Lian S, Sun J, Wang Z. A block cipher based on a suitable use of the chaotic
system by cellular automata with memory. In: The Third International
standard map. Chaos Solitons Fractals 2005;26:117–29.
Conference on Availability, Reliability and Security. IEEE; 2008. p. 1266–71.