You are on page 1of 5

2009 International Symposium on Information Engineering and Electronic Commerce

Color image cryptography using multiple one-dimensional chaotic maps and OCML

Jun He Jun Zheng


Department of Computer Science Compute Center
East China Normal University East China Normal University
Shanghai, China Shanghai, China
hallyhejun@163.com jzheng@cc.ecnu.edu.cn

Zhi-bin Li Hai-feng Qian


Department of Computer Science Department of Computer Science
East China Normal University East China Normal University
Shanghai, China Shanghai, China
lizb@cs.ecnu.edu.cn hfqian@cs.ecnu.edu.cn

Abstract—In this paper, a stream color image cryptography Spatiotemporal chaos system [10] is regarded as of better
has been proposed based on spatiotemporal chaos system. One- properties suitable for data protection than one-dimensional
way coupled map lattices (OCML) are used to generate chaos system, such as larger parameter space, better
pseudorandom sequences and then encrypt image pixels one by randomness and more chaotic sequences, etc. For example,
one. By iterating randomly chosen chaotic maps from a set of the spatiotemporal chaos is used in a color image
chaotic maps for certain times, the generated pseudorandom authentication scheme [11]. In this scheme, the
sequences obtain high initial-value sensitivity and good spatiotemporal chaos is employed to randomly select the
randomness. The initial conditions of chaotic maps and embedding positions for information embedding and
parameters of the algorithm are generated by a 128-bit
information encryption. The spatiotemporal chaos is also
external key. Simulation results show that the proposed
scheme is efficient and useful for the security of
used in stream cipher designing [12,13]. The one-way
communication system. coupled map lattice system (OCML) [10,14-17] is a
spatiotemporal chaos system.
Keywords-Color image cipher; Chaos; Multiple chaotic maps; In this paper, a stream color cipher based on
OCML spatiotemporal chaos system has been constructed, and
multiple one-dimensional chaotic maps are used to obtain
high key sensitivity. The spatiotemporal chaotic system,
I. INTRODUCTION
which is modeled by one-way coupled map lattices (OCML),
With the rapid growth of multimedia production systems, enhances the key sensitivity. The three components (Red,
electronic publishing and widespread dissemination of Green and Blue) of plain image are encrypted in a coupling
digital multimedia date over the Internet, protection of digital fashion in such a way to strengthen the cryptosystem security.
information against illegal copying and distribution has Furthermore, inclusion of more than one chaotic map
become extremely important. However, the traditional increases the confusion in the encryption process and it
ciphers such as IDEA, AES, DES and RSA are not suitable results in a more secure cryptosystem. The decryption
for real time encryption especially for image and video process is symmetric to the encryption process, in which an
because these ciphers require a large computational time and external secret key is used.
high computing power. Since the chaos theory is used in In Section 2, we will discuss procedure of image
cryptology from the 1980s [1], the chaotic encryption has encryption and in Section 3, we will prove the security of the
gained more and more attention. Chaotic systems have a proposed image encryption scheme by performing statistical
number of interesting properties such as sensitivity to initial analysis, key and plaintext sensitivity analysis etc. Finally, in
condition and system parameter, ergodicity and mixing Section 4, we conclude the paper.
properties. These properties make the chaotic system a
worthy choice for constructing cryptosystem. II. THE PROPOSED IMAGE ENCRYPTION SCHEME
The use of chaos for image encryption has been proposed In this section, we discuss the proposed color image
in [2-5]. In [2], a two-dimensional discrete Baker map encryption as well as decryption process with several one-
together with an invertible one-dimensional map is adopted dimensional chaotic maps and the OCML system. The color
to mix image pixels. Pareek [7] proposed an approach for image of size M u N is converted into its RGB components.
image encryption based on a chaotic logistic map in which And then, each color matrix (R, G or B) is stored in a vector
an external secret key has been used. Pareek [9] has of integers within {0,1,  , 255} . Each vector has a length
developed a symmetric key block cipher algorithm using
multiple one-dimensional chaotic maps. It is a variation of of L M u N . The three vectors obtained P (1), P (2), P (3)
another cryptosystem by the same authors [8].

978-0-7695-3686-6/09 $25.00 © 2009 IEEE 85


DOI 10.1109/IEEC.2009.23
TABLE I. SHOWING MAP NUMBER, EQUATIONS AND SYSTEM TABLE II. SHOWING MAP NUMBER (N) AND NUMBER OF ITERATIONS
PARAMETER VALUE FOR THE ONE-DIMENSIONAL CHAOTIC MAPS USED IN FOR THE MAP(IT) OF EACH IMAGE PIXEL USING SECRET KEY
THE SCHEME 'ABCDEF0123456789ABCDEF0123456789'
Index Name Equation System Pixel Map number (N) Iterations number for map N
parameter sequence (IT)
0 Logistic
x n 1 O x n (1  x n ) O 3.99 1 0 71
2 2 3

^
1 Tent
O xn xn ! 0.5 O 1.97 3 1 5
x n 1 , 4 3 37
O (1  xn ) xn d 0.5 5 3 1
-- -- --
2 Sine
x n 1 O sin(S xn ) O 0.99 -- -- --
3 Cubic 2 O 2.59
x n 1 O x n (1  x n ) 16
8
x0 (2) ((( k9 † k10 † k11 † k12 )  ¦ ( ki )10 ) / 2 ) mod1
represent the RGB components of plaintext which will be i 1
encrypted. 16
8
x0 (3) ((( k13 † k14 † k15 † k16 )  ¦ ( ki )10 ) / 2 ) mod1
A. One-way coupled map lattice system (OCML) i 1
The OCML used for the plaintext is given by (3)
xn 1 ( j ) (1  H j ) f ( xn ( j ))  H j f ( xn ( j  1)) When the secret key 'ABCDEF0123456789ABCDEF01234
56789' is used, the parameters of chaotic maps for each
n 0,1,  , L; j 1, 2, 3. (1) pixel are given in Table 2. Each row shows encryption
where H j
is the system parameters, x0 ( j ) and xn (0) are /decryption with one image pixel and three columns: the
first column for the sequence number of the image pixel, the
the initial conditions and the key sequence of the OCML
second for the map number (N) and the last for the number
respectively, and f () is a one-dimensional chaotic map. of chaotic map iterations (IT). Value of N and IT are
calculated with the help of a congruential random number
B. Chaotic map
generator (LCG), which generates a sequence of random
Four one-dimensional chaotic maps are employed to numbers with the following recurrence relation
make function f () : logistic map, tent map, sine map and Yn 1 ( aYn  c ) mod m (4)
cubic map, and each chaotic map is identified by an integer
where a, c and m are multiplier, increment and modulus,
index (map number N). The name, equation and system
respectively. We set a 16 , b 7 and m 81 here. The
parameter value of each map used in our algorithm are
given in Table 1. value of the seed ( y0 ) for the LCG, the map number (N)
C. Generation of the initial conditions and parameters and iteration number (IT) described above are generated as
follows
Based on the three components (Red, Green and Blue), 16

there are four initial conditions (x0 (0), x0 (1), x0 (2), x0 (3)) Y0 ¦ (k ) i 10
mod 256
i 1
in Equation 1 with one definitive chaotic map function. At
the beginning, the four chaotic maps have the same initial Nn Yn mod 4
conditions. With the encryption/decryption of each pixel of ITn ( ki )10 mod100 , (i (Yn mod16)  1) (5)
plaintext/ciphertext, the initial conditions for these maps are
updated and further the updating depends on the outcome of D. Design of the encryption and decryption algorithm
the previous pixel of image.
1) Encryption
Firstly, the proposed image encryption process utilizes a
128-bit external secret key (K). This key is divided into 8-bit First, the three color vectors ( P (1), P (2), P (3) ) are read
blocks ( ki ) referred to session keys. The 128-bit external from the image file. Then, the values of the nth image pixel
are represented as .
secret-key (K) is given by
Next, the encryption for the pixel Pn ( k ) is given by
K k1 , k 2 ,  , k16 (2)
Cn ( k ) ( Pn ( k )  int( xn ( k ) u L )  C n 1 ( k )) mod(256) ,
The initial conditions for each chaotic map are the same
and generated from the session keys as n 0,1,  , L; k 1, 2, 3. (6)

x0 (0)
16
((( k1 † k 2 † k3 † k 4 )  ¦ ( ki )10 ) / 2 ) mod1
8 xn ( k ) is generated by the OCML system like Equation 1.
i 1 The initial conditions are given by Equation 3 and we set the
parameter H j 0.5 , for j 1, 2, 3 . Function f () is one of
16
8
x0 (1) ((( k5 † k 6 † k 7 † k8 )  ¦ ( ki )10 ) / 2 ) mod1
i 1
the four chaotic maps in Table 1. For the nth pixel, a chaotic

86
map equation is chosen from Table 1 by the value of map
number ( N n ) and iterate ( ITn ) times which are generated
by Equation 5. The two operations compose function f ()
The key sequence of the OCML xn (0) is given by
xn (0) Cn (3) / 28 (7)
The stream cipher of color components depends on each
other due to the coupling structure of the OCML. These
characteristics strengthen the security of the encryption.
2) Decryption Figure 1. Frame (a) show the Lena image, Frame (b) show the
In the receiver's side, the dynamics of the OCML is encryption image of Lena using the key 'ABCDEF0123456789ABCDEF01
regenerated as Equation 1 and the value of parameters are 23456789'.
the same as the encryption.
The decryption transformation is
Pn ( k ) (C n ( k )  int( xn ( k ) u L )  C n 1 ( k )) mod 256 ,
xn (0) Cn (3) / 28
n 1,  , L; k 1, 2, 3. (8)
Note that the receiver must have the same keystream
which can decrypt the color image, so it has the same secret
key K k1 , k 2 ,  , k16 . Therefore, it is possible to generate
the same initial conditions and parameters x0 ( j ) and H ,
j

for j 1, 2, 3.
Figure 2. Histogram analysis: Frame (a), (b) and (c),
III. PERFORMANCE ANALYSIS respectively, show the histogram of red, green and blue channels of the
A good encryption procedure should be robust against all Lena image. Frame (d), (e) and (f) show the encrypted image of Lena
kinds of cryptanalytic, statistical and brute-force attacks. In (Fig.1 b).
this section, the security includes statistical analysis,
1 N
sensitivity analysis and differential attacks. cov( x, y )
N i1
¦ ( x  E ( x))( y
i i
 E ( y ))
A. Statistical analysis
In order to resist statistical attacks, the encryption images cov( x, y )
rxy (9)
should possess certain random properties. A detail study has D( x) D( y)
been explored and the results are summarized. However, due
where x and y are the grey-scale value of two adjacent pixels
to the page limit, only results for the Lena (Fig.1 a) are used
in the image and N is the total number of pixels selected
for illustration.
from the image for the calculation. In numerical computation,
1) Color histogram the following discrete formulas are used
In Fig.2, Frame (a), (b) and (c) show the histogram of
1 N
RGB colors for original (Fig.1 a), Frame (e), (f) and (g) show
the histogram of the encrypted images (Fig.1 b). The figure
E ( x) ¦ xi
N i1
clearly presents the random-like appearance of the histogram
1 N
of the encrypted images.
2) Correlation of adjacent pixels
D( x)
N i1
¦
( xi  E ( x))
2
(10)

For an ordinary image, each pixel is always highly In Table 3, the correlation coefficients of Lena image and
correlated with its adjacent pixels either in horizontal or those of its encrypted image with the secret key 'ABCDEF
vertical directions. These high-correlation properties can be 0123456789ABCDEF0123456789' are given. It is clear that
quantified as their correlation coefficients for comparison. there is negligible correlation between these two adjacent
The correlation between two vertically and horizontally pixels in the encrypted image. However, the two adjacent
adjacent pixels is analyzed in the several images and their pixels in the original image are highly correlated.
encrypted images. For this calculation, the following two
formulas are used B. Sensitivity analysis
An ideal image encryption procedure should be sensitive
with the secret key. It means that the change of a single bit in
the secret key should produce a completely different

87
TABLE III. CORRELATION COEFFICIENTS FOR THE TWO ADJACENT
PIXELS IN THE ORIGINAL AND ENCRYPTED IMAGE SHOWN IN FIG.1

Original image (Fig.1 a) Encrypted image (Fig.1 b)


Horizontal 0.9720 - 0.0260
Vertical 0.9851 - 0.0005

Figure 4. Key sensitivity test II: Frame (a) and (b) show the
Baboon image and its encrypted image by using the secret key
'ABCDEF0123456789ABCDEF0123456789'. Frame (c) and (d) show the
images after the decryption of the encrypted image in Frame (b) using the
secret key 'BBCDEF0123456789ABCDEF0123456789' and 'ABCDEF
0123456789ABCDEF0123456780'.

Figure 3. Key sensitivity test I: Frame (a) show the Lena


image, Frame (b), (c) and (d) show the encryption image of the Lena image TABLE V. CORRELATION COEFFICIENTS BETWEEN THE
using tiny different secret keys. CORRESPONDING PIXELS OF THE ORIGINAL IMAGE (FIG.4 A) AND
DECRYPTED IMAGE(FIG.4 C AND FIG.4 D).

Image1 Image2 Correlation


TABLE IV. CORRELATION COEFFICIENTS BETWEEN THE
coefficient
CORRESPONDING PIXELS OF THE THREE DIFFERENT ENCRYPTED IMAGES
OBTAINED BY USING SLIGHT DIFFERENT SECRET KEY OF AN IMAGE SHOWN Original image (Fig.4 a) Decrypted image (Fig.4 c) 0. 0298
IN FIG.3. Original image (Fig.4 a) Decrypted image (Fig.4 d) 0. 0185

Image1 Image2 Correlation C. Differential attack


coefficient
Encrypted image (Fig.3 b) Encrypted image (Fig.3 c) - 0. 0029
NPCR [3] means the change rate of the number of pixels
Encrypted image (Fig.3 c) Encrypted image (Fig.3 d) - 0. 0003 of ciphered image while the one pixel of plain-image is
Encrypted image (Fig.3 d) Encrypted image (Fig.3 b) - 0. 0010 changed. UACI measures the average intensity of differences
encrypted image. (Fig.3 a) is the original image. In Fig.3, between the plain-image and cipher-image. The NPCRR ,G , B
Frame (b), (c) and (d) illustrate the corresponding encrypted
images using different secret keys 'ABCDEF0123456789AB and UACI R ,G , B have been computed with the proposed
CDEF0123456789', 'BBCDEF0123456789ABCDEF012345 algorithm to assess the influence of changing a single pixel
6789' and 'ABCDEF0123456789ABCDEF0123456780'. The in the original image on the encrypted image. The results of
correlation coefficients of the three encrypted images are some well-known images are shown in Table 6.
calculated in Table 4.
Moreover, in Fig.4, the results of some attempts are D. Speed performance
shown to decrypt an encrypted image with slightly different Apart from the security consideration, running speed of
secret keys from the one used for the encryption of the the algorithm is also an important aspect for a good
original image. In Table 5, the correlation coefficients encryption algorithm. The simulator for the proposed scheme
between the decryption image with a slightly different key is implemented using Matlab 7.0. Performance was
and its original image are shown. It can be observed that the measured on a 2.0 GHz Pentium Dual-Core with 1 GB RAM
decryption with a slightly different key fails completely. running Windows XP. Simulation results show that the
Therefore, the proposed image encryption procedure is average running speed is 22.02 MB/s for encryption and
highly key sensitive. 23.04 MB/s for decryption.

88
IV. CONCLUSION [6] M. S. Baptista, “Cryptography with chaos”. Phys Lett A, vol. 240,
1998, pp. 50-54.
In this paper, a color image encryption scheme is [7] N. K. Pareek, V. Patidar, K. K. Sud, “Image encryption using chaotic
proposed, which is based on OCML dynamic system with logistic map”. Image Vision Comput, vol. 24, 2006, pp. 926-934.
multiple one-dimensional chaotic maps. The transformation [8] N. K. Pareek, V. Patidar, “Discrete chaotic cryptography using
modeled by the coupling structure of the OCML can external key”, Phys Lett A, vol. 309, 2003, pp. 75-82.
contribute to the diffusion of the encrypted image. While the [9] N. K. Pareek, V. Patidar V, K. K. Sud, “Cryptography using multiple
use of multiple chaotic maps further increase the confusion one-dimensional chaotic maps”. Comm Nonl Sci Num Sim, vol. 10,
of ciphered image. All of the initial conditions and 2005, pp. 715-723.
parameters are generated by an 128-bit-long external key as [10] S. H. Wang, J. Y. Kuang, J. H. Li, et al, “Chaos-based secure
communications in a large community”. Phys Rev E, vol. 66, 2002,
well. Indeed, all performance analysis prove the security pp. 065202-4.
robustness of the proposed algorithm.
[11] Z. Peng, W. Liu, “Color image authentication based on
spatiotemporal chaos and SVD”. Chaos Soliton Fract, vol. 36(4),
ACKNOWLEDGEMENT 2008, pp. 946-952.
This work was supported by the National Key Basic [12] P. Li, Z. Li, W. A. Halanga, G. Chen, “A multiple pseudorandom-bit
Research Project of China (Grant No 2004CB318000), the generator based on a spatiotemporal chaotic map”. Phys Lett A, vol.
National Natural Science Foundation of China (Grant No 349(6), 2006, pp. 467-473.
10771072) and the National Natural Science Foundation of [13] P. Li, Z. Li, W. A. Halanga, G. Chen, “A stream cipher based on a
spatiotemporal chaotic system”. Chaos Soliton Fract, vol. 32(5), 2007,
China (Grant No 60703004). pp. 1867-1876.
[14] G. N. Tang, S. H. Wang, H. P. Lu, G. Hu, “Chaos-based cryptograph
incorporated with S-box algebraic operation”. Phys Lett A vol. 318,
REFERENCES 2003, pp. 388-398.
[1] R. Matthews, “On the derivation of a "chaotic" encryption algorithm”. [15] H. P. Lu, S. H. Wang, X. W. Li, et al. “A new spatiotemporally
Cryptologia, vol. 13, 1989, pp. 29-42. chaotic cryptosystem and its security and performance analyses”.
[2] J. Fridrich, “Symmetric ciphers based on two dimensional chaotic Chaos, vol. 14(3), 2004, pp. 617-629.
maps”. Int J Bifur Chaos, vol. 8(6), 1998, pp. 1259-1284. [16] Y. Zhang, C. Tao, G. Du, J. J. Jiang, “Synchronized pseudorandom
[3] G. Chen, Y. Mao, C. K. Chui, “A symmetric image encryption systems and their application to speech communication”. Phys Rev E,
scheme based on 3D chaotic cat maps”. Chaos Soliton Fract, vol. 21, vol. 71, 2005, pp. 016217.
2004, pp. 749-761. [17] R. Rhouma, S. Meherzi, S. Belghith. “OCML-based colour image
[4] S. J. Li, X. Zheng, “Cryptanalysis of a chaotic image encryption encryption”. Chaos Soliton Fract, 2007 in press, doi:10.1016/j.chaos.
method”. Proc IEEE Int Conf Circ Syst, vol. 2, 2002, pp. 708-711. 2007.07.083.
[5] Y. B. Mao, G. R. Chen, S. G. Lian, “A novel fast image encryption
scheme based on the 3D chaotic baker map”. Int J Bifur Chaos, vol.
14(10), 2004, pp. 3613-3624.

89

You might also like