An Improved Image Encryption Algorithm Based On CH
An Improved Image Encryption Algorithm Based On CH
net/publication/220405355
CITATIONS READS
55 686
3 authors, including:
All content following this page was uploaded by Zhengquan Xu on 05 June 2014.
Abstract—The security of stream cipher, which is known nature will be deteriorated when a finite precision with
as one of the main cipher techniques, is dependents fixed-point arithmetic is used. Moreover, some severe
completely on the quality of generated pseudo-stochastic problems have been observed,such as short cycle length,
sequences. Chaotic systems can produce the
non-ideal distribution and high-correlation[4].
pseudo-random sequences with good randomness ,
In this paper, the protection of images is particularly
therefore, these systems are suitable to the stream cipher.
In this paper, a new encryption algorithm is proposed by
in interested, while most conventional ciphers, such as
analyzing the principle of the chaos encryption algorithm DES, IDEA, and AES [5, 6], are not suitable for image
based on logistic map. Moreover, the security and encryption in real time,because their speed is slow due
performance of the proposed algorithm is also estimated. to a large data volume and strong correlation among
The experimental results based on coupled chaotic maps image pixels. In recent years, a number of chaos-based
approve the effectiveness of the proposed method, and the cryptographic schemes have been proposed [3, 25, 7-22],
coupled chaotic maps shows advantages of large key space where most of them are based on block transform
and high-level security. The ciphertext generated by this
utilizing the chaotic map. To enhance security, the
method is the same size as the plaintext and is suitable for
practical use in the secure transmission of confidential dimension of these maps has been extended from one to
information over the Internet. three. Among them, chaos based encryption techniques
are considered good for practical use as these techniques
Index Terms—Logistic map; Stream cipher; Image provide a good combination of speed, high security,
encryption; complexity, reasonable computational overheads and
computational power etc.
The characteristics of the chaotic maps have attracted
I. INTRODUCTION the attention of cryptographers to develop new
encryption algorithms with higher security and speed.
Chaos theory has been established since 1970s by There are some chaos-based image cryptosystems with
many different research areas, such as physics, their own structure. For example, Pareek et al. [13]
mathematics, engineering, and biology, etc. [1]. Since proposed an image encryption scheme which utilizes two
1990s, many researchers have noticed that there exists chaotic logistic maps and an external key of 80-bit. The
the close relationship between chaos and cryptography [2, initial conditions for both logistic maps were derived
3]. The distinct properties of chaos, such as ergodicity, using the external secret key. The first logistic map was
quasi-randomness, sensitivity dependence on initial used to generate numbers in the range between 1 and 24
conditions and system parameters, have granted chaotic and the initial condition of the second logistic map was
dynamics as a promising alternative for the conventional modified by the numbers generated by the first logistic
cryptographic algorithms. Chaos-based cryptography is map. The authors showed that by modifying the initial
relied on the complex dynamics of nonlinear systems or condition of the second logistic map in this way, its
maps which are deterministic but simple. Therefore, it dynamics became more random. Kwok et al. [15]
can provide a fast and secure means for data protection, proposed a fast chaos-based image cryptosystem with the
which is crucial for multimedia data transmission over architecture of a stream cipher. In particular, the
fast communication channels, such as the broadband plain-image pixels are masked by a pseudo-random
internet communication. keystream generated by a cascade of the skewed tent
Chaos seems to be a good candidate due to its map and a high-dimensional cat map. Behnia et al. [20]
ergodicity and complex dynamics. However, chaotic proposed a novel algorithm for image encryption based
systems are usually assumed to work in the real number on mixture of chaotic maps, using one dimensional
domain, and hence the speed is limited for actual chaotic map and their coupling to obtain high level
implementation. On the other hand, its randomness security [23,24].
It can be noticed that most of the image encryption
Project number:No. 2006CB303104 and No. 40871200. designs are in the form of block cipher, which is usually
Corresponding author: Zhengquan Xu. considered faster than its counterpart, stream cipher,
although stream cipher may provide better security under
the concept of perfect security. In this paper, a novel The organization of this paper is as follow. In Section
image encryption algorithm based on logistic map is 2, the design of the proposed chaos-based image
proposed, and it is demonstrated that a well-designed encryption scheme is discussed in detail, while the
chaos-based stream cipher can be a good candidate and design of a new chaos-based pseudo-random generator is
may even outperform the block cipher, on speed and given. The performances and the cryptanalysis of the
security. In it, the keystream generator is based on proposed image encryption scheme are studied in Section
coupled chaotic logistic maps that one logistic chaotic 3. Finally, conclusion remarks are drawn in Section 4.
system generates the satisfied random number to update
the parameter of the other. The chaotic binary sequence II. THE PROPOSED IMAGE ENCRYPTION ALGORITHM
is perturbed by XOR operation on its own three parts.
The encryption step proposed in the algorithm consists of A. Chaos-Based Pseudo-Random Keystream Generator
a simple bitwise XOR operation of the plaintext binary In this paper, the major part of the design is a newly
sequence with the keystream binary sequence to produce proposed chaos-based pseudo-random keystream
the ciphertext binary sequence. Then, a detailed generator (PRKG) based on a couple of chaotic systems.
statistical analysis on the proposed encryption scheme is The structure of the PRKG system is presented in Fig. 1.
given. The experimental results based on coupled chaotic The two logistic chaotic systems use the same principle
maps approve the effectiveness of the proposed method, with different initial values. In our design, the first
and the coupled chaotic maps shows advantages of large logistic chaotic system generates the random numbers to
key space and high-level security. Having a high update the parameters of the second, while some
throughput, the proposed system is ready to be applied in conditions are satisfied. The generator system is
fast real time encryption applications. proposed in the following.
(1)
(a) Quantification Method xn +1 = µ xn (1 − xn )
Generating a pseudorandom binary sequence from the (3)
(2)
yn +1 = µ yn (1 − yn ), n = 0, 1, 2...
orbit of the logistic map
xn +1 = µ xn (1 − xn ) (1) for χn∈(0,1) and µ∈(3.569945,4], evolve successive
states from the first logistic map by χn+1=µ(1) χn(1-χn), and
For χn∈(0,1) and µ∈(3.569945,4], µ and χn are the obtain the real number χn+1 , turn the real number χn+1 to
system control parameter and initial condition. its binary representation Xn+1 by Eq. (2), suppose that
Depending on the value of µ, the dynamics of the system L=45, thus Xn+1 is {b1,b2,b3,…b45}. By defining three
can change dramatically. The choice of µ in the equation variables whose binary representation is Xl=b1…b15,
above guarantees the system is in chaotic state and output Xm=b16…b30, Xh=b31…b45, respectively, the following
chaotic sequences {χn} have perfect randomness [25, 26]. equations are obtained.
A simple way for turning a real number χn to a discrete bits
symbol Xn is presented by Eq. (2). Change the decimal part X n +1′ = X l ⊕ X m ⊕ X h (4)
of the real into the binary sequences, and then extract Suppose that Xn+1′ is {p1…p15} after XOR operation,
some bits form it, so Xn is {bn1,bn2,bn3,…bnL}. We also we turn the Xn+1′ to its real representation χn+1′ by Eq. (5).
can turn the binary representation Xn to its corresponding χn+1′ is extended till tens to meet the condition:
real representation χn by the reverse operation of Eq. (2). χi+1′′∈(3.569945,4], so that the value can make the
xn = 0.bn1bn 2 ...bnL sequences into chaos. Then, judge whether the condition:
-1 -2 -L
(2) 3.569945< χi+1′′ ≤4 and c≥100 is valid or not, in it,
= 2 bn1 + 2 bn 2 + ... + 2 bnL variable c is the iterative times since last update of µ(2). If
(b) Keystream Generator valid, χi+1′′ is used to update the parameter µ(2) of the
second logistic map system. In the iterative process, χn+1′
The new generator system adopting two logistic maps is
proposed for the generation of pseudorandom binary sequences. is always to update the value of previous iteration χn.
This algorithm consists of two logistic maps: xn +1′ = 2 p1 + 2 p2 + ... + 2
-1 -2 -15
p15 (5)
(a) (b)
(c) (d)
Figure 4. Frame (a) and (c) respectively, show the original images of Girl and Couple. Frame (b) and (d) respectively, show the encrypted images of
the plain images shown in frame (a) and (c) using the secret key’4000000000000, 1C28F5C28F5C,3F851EB851EB8, 333333333333 ’(in
hexadecimal).
some gray-scale values are still not existed in the the same property is obtained, which also shows that the
encrypted image although the existed gray-scale values proposed chaos-based PRKG can generate chaotic
are uniformly distributed. Different images have been sequences with good pseudo-random properties.
tested by the proposed image encryption procedure, and
(a) (d)
(b) (e)
(c) (f)
Figure 5. Histogram analysis: Frames (a), (b) and (c) respectively, show the histograms of red, green and blue channels of the plain image shown in
Fig. 4 (a). Frames (d), (e) and (f) respectively, show the histograms of red, green and blue channels of the encrypted image shown in Fig. 4 (b).
Figure 6. Correlation of two adjacent pixels: Frames (a) and (b) respectively, show the distribution of two horizontally adjacent pixels in the plain and
encrypted images shown in Fig. 4 (a) and Fig. 4 (b). Frames (c) and (d) respectively, show the distribution of two vertically adjacent pixels in the
plain and encrypted images shown in Fig. 4 (a) and Fig. 4 (b).
(b) Correlation Coefficient Analysis Where x and y are the gray-scale values of two
adjacent pixels in the image and N is total number of
In order to test the correlation between two vertically
pixels selected from the image for the calculation. In the
adjacent pixels, and two horizontally adjacent pixels in
Table 1, we have given the correlation coefficients for
the several images and their encrypted images, we also
the original and encrypted images shown in Fig. 4 (a)
take Girl (Fig. 4 (a)) for example. In Fig. 6, we have
and Fig. 4 (b) respectively. In the Fig. 6 and Table 1, it is
shown the distribution of two adjacent pixels in the
clear that the two adjacent pixels in the original image
original and encrypted images shown in Fig. 4 (a) and
are highly correlated, but there is negligible correlation
Fig. 4 (b). Particularly, in Frames (a) and (b), we have
between the two adjacent pixels in the encrypted image.
depicted the distributions of two horizontally adjacent
Additionally, we have also done extensive study of the
pixels in the original and encrypted images respectively.
correlation between image and its corresponding
Similarly, in Frames (c) and (d) respectively, the
encrypted image by using the proposed encryption
distributions of two vertically adjacent pixels in the
algorithm. We have used the USC-SIPI image database
original and encrypted images have been depicted.
which is referred in Ref.13 (freely available at
Compared with Fig. 2 in Ref.13, distribution of two
http://sipi.usc.edu/database/).
adjacent pixels are more uniform in our results, but in the
The secret key ’4000000000000, 1C28F5C28F5C,
Fig. 2 in Ref.13, distribution displays concentrated trend.
3F851EB851EB8, 333333333333 ’(in hexadecimal) has
Moreover, we have also calculated the correlation
been used for encryption process. Results are shown in
between two vertically as well as horizontally adjacent
the Table 2. The correlation coefficient is very small
pixels in the original encrypted images, using the
which implies that no correlation exists between original
following formula referred in Ref.13.
N N N
and its corresponding encrypted images. Compared with
N ∑ (x j × y j ) − ∑ x j × ∑ y j Table3 in Ref.13, the correlation coefficient between
j =1 j =1 j =1 (8) original and its corresponding encrypted images are
Cr =
N N N N generally smaller in our results.
( N ∑ x j 2 − (∑ x j ) 2 ) × ( N ∑ y j 2 − (∑ y j ) 2 )
j =1 j =1 j =1 j =1
Table 1. Correlation coefficients for the two adjacent pixels in the original and encrypted images shown in Fig. 4.
Original image (Fig.4(a)) Encrypted image (Fig.4(b))
Horizontal 0.9635 -0.0030
Vertical 0.9711 -0.0028
Table 2. Correlation coefficients between the image and corresponding encrypted image for a number of images of the USC-SIPI image database. The
encryption has been done using the secret key ’4000000000000, 1C28F5C28F5C, 3F851EB851EB8, 333333333333 ’.
File name File description Size Type Correlation coefficient Correlation coefficient
between the image and for the two adjacent
corresponding pixels in the encrypted
encrypted image image
4.1.01 Girl 256x256 Color -0.000492 -0.002887
4.1.02 Couple 256x256 Color -0.001949 -0.002184
4.1.03 Girl 256x256 Color 0.001619 -0.000796
4.1.04 Girl 256x256 Color 0.001906 -0.003210
4.1.05 House 256x256 Color 0.001563 -0.001986
4.1.06 Tree 256x256 Color -0.001921 -0.003900
4.1.07 Jelly beans 256x256 Color 0.000114 -0.002231
4.1.08 Jelly beans 256x256 Color 0.002656 -0.002368
4.2.01 Splash 512x512 Color 0.001096 -0.001326
4.2.02 Girl(Tiffany) 512x512 Color -0.001220 -0.002239
4.2.03 Baboon 512x512 Color 0.000744 -0.000542
4.2.04 Girl(lenna) 512x512 Color 0.001857 -0.000983
4.2.05 Airplane(F-16) 512x512 Color 0.001911 -0.001005
4.2.06 Sailboat on lake 512x512 Color 0.002089 0.000037
4.2.07 Peppers 512x512 Color 0.002248 -0.001883
House House 512x512 Color 0.000607 -0.000728
5.1.09 Moon surface 256x256 Gray 0.000265 -0.001291
5.1.10 Aerial 256x256 Gray 0.004396 -0.002667
5.1.11 Airplane 256x256 Gray 0.007487 -0.000216
5.1.12 Clock 256x256 Gray 0.014194 -0.002033
5.1.13 Resolution chart 256x256 Gray 0.006588 0.001655
5.1.14 Chemical plant 256x256 Gray 0.000024 -0.003028
5.2.08 Couple 512x512 Gray 0.003597 -0.000508
5.2.09 Aerial 512x512 Gray 0.003001 -0.002298
5.2.10 Stream and bridge 512x512 Gray 0.002980 -0.000530
7.1.01 Truck 512x512 Gray 0.001955 -0.001081
7.1.02 Airplane 512x512 Gray 0.003604 -0.001460
7.1.03 Tank 512x512 Gray 0.002931 0.000002
7.1.04 Car and APCs 512x512 Gray 0.001468 -0.001481
7.1.05 Truck and APCs 512x512 Gray 0.004383 -0.001513
7.1.06 Truck and APCs 512x512 Gray 0.003054 -0.002319
7.1.07 Tank 512x512 Gray -0.000167 -0.002164
7.1.08 APC 512x512 Gray 0.000198 -0.001414
7.1.09 Tank 512x512 Gray 0.003317 -0.002334
7.1.10 Car and APCs 512x512 Gray 0.000862 -0.003146
boat.512 Fishing Boat 512x512 Gray -0.000342 0.000087
elaine.512 Girl(Elaine) 512x512 Gray 0.002869 -0.001650
gray21.512 21 level step wedge 512x512 Gray 0.001652 -0.000524
numbers.512 256 level test 512x512 Gray 0.001638 -0.002177
ruler.512 Pixel ruler 512x512 Gray 0.000079 -0.000790
5.3.01 Man 1021x1024 Gray 0.000413 -0.000102
5.3.02 Airport 1021x1024 Gray 0.001564 -0.000221
7.2.01 Airplane 1021x1024 Gray 0.001389 0.000430
testpat.1k General test pattern 1021x1024 Gray 0.001466 -0.000247
(a) (b)
(c) (d)
Figure 7. Key sensitivity test 1: Frame (a): plain image; Frame (b): encrypted image A by key1 ‘µ(1)=3F9F6C38FB143, µ(2) =3F9F6C38FB143’;
Frame (c): encrypted image B by key2 ‘µ(1)=3F9F6C38FB144, µ(2) =3F9F6C38FB144’; Frame (d): encrypted image C by key3
‘µ(1)=3FAF6C38FB143, µ(2) =3FAF6C38FB143’.
Table 3. Correlation coefficients between the plain image and the three different encrypted images obtained by using slightly different secret keys.
Image 1 Image 2 Correlation
coefficient
Plain image (Fig.7 (a)) Encrypted image A(Fig.7 (b)) -0.005490
Plain image(Fig.7 (a)) Encrypted image B(Fig.7 (c)) 0.003207
Plain image(Fig.7 (a)) Encrypted image C(Fig.7 (d)) 0.001584
Table 4. Correlation coefficients between the corresponding pixels of the three different encrypted images obtained by using slightly different secret
key of an image.
Image 1 Image 2 Correlation Difference pixels
coefficient (mean NPCR)
Encrypted image A(Fig.7 (b)) Encrypted image B(Fig.7 (c)) 0.000246 99.611%
Encrypted image B(Fig.7 (c)) Encrypted image C(Fig.7 (d)) 0.001116 99.623%
Encrypted image C(Fig.7 (d)) Encrypted image A(Fig.7 (b)) -0.000474 99.605%
For comparison, we use the same ways which is keys. In Table 4, it can be observed that the values are
referred in Ref.13, using the same formula as given in very close to the expected value of pixel difference on
Eq.8 except that in this case x and y are the values of two randomly generated images (99.609375%). We also
corresponding pixels in the two encrypted images to be obtained NPCR for a large number of images by using
compared. In table 3 and 4, as can be seen, the our encryption scheme, and found the same results that
correlation between a plain image and the corresponding the encryption scheme is very sensitive with respect to
encrypted images is negligible around zero, which shows small changes in the key.
that the plain image is nearly independent from the Moreover, if we use a trivially modified key to
encrypted images. This is consistent with the perfect decrypt the ciphered image, then the decryption should
security defined by Shannon [27]. Similarly, the not succeed. Figure 8 has verified this, where the image
correlation between different encrypted images is also encrypted by the key1 was not be correctly decrypted by
negligible around zero, which shows that the encrypted using the key2 and key3. Here, there is only one bit
images are independent from each other. We have difference between the three keys explained before.
measured the number of pixel change rate (NPCR) of Those results clearly show high key-sensitivity of the
two cipher images with only one bit difference in the proposed chaotic encryption algorithm.
(d) (e)
Figure 8. Key sensitivity test 2: Frame (a) is the plain image, with its encrypted image Frame (b) by key1 ‘µ(1)=3F9F6C38FB143, µ(2)
=3F9F6C38FB143’. Frame (c), (d), and (e) respectively, show the decrypted images by the key1 ‘µ(1)=3F9F6C38FB143, µ(2) =3F9F6C38FB143’,
key2 ‘µ(1)=3F9F6C38FB144, µ(2) =3F9F6C38FB144’, and key3 ‘µ(1)=3FAF6C38FB143, µ(2) =3FAF6C38FB143’ to decrypt encrypted image Frame
(b).