Sei sulla pagina 1di 7

A new chaotic algorithm for image encryption

Haojiang Gao
*
, Yisheng Zhang, Shuyun Liang, Dequn Li
State Key Laboratory of Plastic Forming Simulation, Huazhong University of Science and Technology,
1037 Luoyu Road, Wuhan 430074, PR China
Accepted 16 August 2005
Abstract
Recent researches of image encryption algorithms have been increasingly based on chaotic systems, but the draw-
backs of small key space and weak security in one-dimensional chaotic cryptosystems are obvious. This paper presents
a new nonlinear chaotic algorithm (NCA) which uses power function and tangent function instead of linear function.
Its structural parameters are obtained by experimental analysis. And an image encryption algorithm in a one-time-one-
password system is designed. The experimental results demonstrate that the image encryption algorithm based on NCA
shows advantages of large key space and high-level security, while maintaining acceptable eciency. Compared with
some general encryption algorithms such as DES, the encryption algorithm is more secure.
2005 Published by Elsevier Ltd.
1. Introduction
Image encryption schemes have been increasingly studied to meet the demand for real-time secure image transmis-
sion over the Internet and through wireless networks. Traditional image encryption algorithm such as data encryption
standard (DES), has the weakness of low-level eciency when the image is large [1,2]. The chaos-based encryption has
suggested a new and ecient way to deal with the intractable problem of fast and highly secure image encryption. After
Matthews proposed the chaotic encryption algorithm in 1989 [3], increasing researches of image encryption technology
are based on chaotic systems [48]. Recently there have been many papers on chaotic encryption scheme [913].
Chaotic systems have many important properties, such as the sensitive dependence on initial conditions and system
parameters, pseudorandom property, nonperiodicity and topological transitivity, etc. Most properties meet some
requirements such as diusion and mixing in the sense of cryptography [4]. Therefore, chaotic cryptosystems have more
useful and practical applications.
One-dimensional chaotic system with the advantages of high-level eciency and simplicity [14], such as Logistic
map, has been widely used now. But their weakness, such as small key space and weak security, is also disturbing
[15,16].
To overcome these drawbacks, the objective of this paper is to design a new chaotic algorithm. In Section 2, we pro-
pose a new nonlinear chaotic algorithm (NCA). Section 3 presents the encryption algorithm based on NCA. Section 4
gives the experimental analysis. In Section 5, security of the chaotic encryption algorithm is discussed. It is proved that
0960-0779/$ - see front matter 2005 Published by Elsevier Ltd.
doi:10.1016/j.chaos.2005.08.110
*
Corresponding author. Tel.: +86 27 87544457; fax: +86 27 87547935.
E-mail address: ahustphd@yahoo.com.cn (H. Gao).
Chaos, Solitons and Fractals 29 (2006) 393399
www.elsevier.com/locate/chaos
the new algorithm has the advantages of high-level security, large key space and zero co-correlation while maintaining
acceptable eciency. Finally, Section 6 concludes the paper.
2. A new nonlinear chaotic algorithm (NCA)
2.1. Logistic map analysis
The cryptosystems, based on widely-used one-dimensional discrete chaotic maps, such as Logistic map, are weak in
security. As known Logistic map is dened as: x
n+1
= k x
n
(1 x
n
), where k 2 (0, 4), n = 0, 1, . . . [17]. The parameter
k and initial value x
0
may represent the key. The parameter k can be divided into three segments, which can be examined
by experiments on following conditions: x
0
= 0.3. When k 2 (0, 3), as shown in Fig. 1(a), the calculation results come to
the same value after several iterations without any chaotic behavior. When k 2 [3, 3.6), the phase space concludes sev-
eral points only, as showed in Fig. 1(b), the system appears periodicity. While k 2 [3.6, 4), it becomes a chaotic system
with periodicity disappeared. So we can draw the following conclusions: (1) The Logistic map does not satisfy uniform
distribution property. When k 2 [0, 3.6) the points concentrate on several values and could not be used for encryption
purpose. (2) Cryptosystems based on Logistic map has small key space and weak security.
2.2. The NCA map design
To overcome those limitations, this paper intends to design a new nonlinear chaotic algorithm (NCA). In [18], the
authors demonstrate that chaotic encryption systems can be easily attacked and, in order to improve security, they sug-
gested the adoption of nonlinear functions, limited in time and space, to change the key continuously. In accordance
with such a principle, in this paper the NCA map uses power function (1 x)
b
and tangent function instead of linear
function. The NCA is dened as
x
n1
k tgax
n
1 x
n

b
; 1
where x
n
2 (0, 1), n = 0, 1, 2, . . .
The ranges of parameters k, a and b will be discussed as follows. Firstly, they are positive. Secondly, the absolute
value of the slope of the curve at xed point should not be less than 1 [19], and x
n+1
> x
n
when x
n
= 1/(1 + b), therefore
k may be dened as
k l ctg
a
1 b

1
1
b

b
; l > 0. 2
Finally, parameter l is obtained by experimental analysis; as a result, l = 1 b
4
. So the NCA map is dened as
follows:
x
n1
1 b
4
ctg
a
1 b

1
1
b

b
tgax
n
1 x
n

b
; 3
where x
n
2 (0, 1), a 2 (0, 1.4], b 2 [5, 43], or x
n
2 (0, 1), a 2 (1.4, 1.5], b 2 [9, 38], or x
n
2 (0, 1), a 2 (1.5, 1.57], b 2 [3, 15].
The ranges of a and b are obtained by iteration experimental analysis. The iteration experimental results are shown
in Table 1, here x
0
= 0.3.
Fig. 1. The limitations of Logistic iteration map: (a) iteration property when k = 2.8, (b) iteration property when k = 3.2.
394 H. Gao et al. / Chaos, Solitons and Fractals 29 (2006) 393399
Furthermore, to evaluate the property of the NCA map, other experiments have been done as follows:
Step 1: Set x
0
= 0.3, a = 0.02 and b = 5, do iteration test as formula (3) for one million times. This experiment shows
that the one million data are dierent from each other and satisfy zero co-correlation.
Step 2: Do such test experiment as above by changing the value of b from b = 5 to b = 43, with 0.01 increment of b for
each experiment.
Step 3: Randomly select 100 values of a among (0, 1.4], and for each a do such test experiments as step 2.
Step 4: Similar experiments have been done when a 2 (1.4, 1.5], b 2 [9, 38] and a 2 (1.5, 1.57], b 2 [3, 15].
All these experimental data prove that systems described by formula (3) are chaotic systems with good properties of
balanced 01 ratio, zero co-correlation and ideal nonlinearity, while maintaining acceptable eciency.
Fig. 2 shows the iteration curve of the NCA map when x
0
= 0.3, a = 1.57, and b = 3.5. From these statistical data,
we can see that the new chaotic algorithm spreads the initial region over the entire phase space.
3. Encryption algorithm based on NCA
The image encryption algorithm is based on the proposed NCA map. It uses chaotic sequence generated by NCA
map to encrypt image data with dierent keys for dierent images. Original chaotic sequence {x
0
, x
1
, x
2
, . . .} consists of
decimal fractions. However images are all digital. So a map is dened to transform the chaotic sequence to another
sequence which consists of integers. Then plain-image image can be encrypted by use of XOR operation with the integer
sequence.
Fig. 3 shows the block diagram of the chaotic encryption algorithm. The encryption steps are as follows:
Step 1: Set encryption key for the plain-image, including structural parameters a, b and initial value x
0
.
Step 2: Do 100 times of chaotic iteration as formula (3), and obtain the decimal fraction x
100
.
Step 3: If the encryption work is nished, then go to step 6; otherwise do three times of chaotic iteration; and as a result,
a decimal fraction, such as x
103
, will be generated, which is a double value and we choose its rst 15 signicant
digits.
Step 4: Divide the 15 digits into ve integers with each integer consisting of three digits. For each integer, do mod 256
operation, and another 5 bytes of data will be generated.
Step 5: Do XOR operation using the 5 bytes of data with 5 bytes of image data (grey value or color RGB value).
Output the calculation result to the object image and go to step 3.
Fig. 2. Iteration property of the NCA map.
Table 1
Iteration experiments of the NCA map
Experimental conditions Experimental results
a = 0.13, b = 4.909702 x
3318
= x
3270
a 2 (0, 1.4], b 2 [5, 43] fx
n
g
n1000000
n0
is chaotic sequence
a = 1.4, b = 43.984711 x
4897
= 0
a = 1.41, b = 8.889831 x
243642
= x
237260
a 2 (1.4, 1.5], b 2 [9, 38] fx
n
g
n1000000
n0
is chaotic sequence
a = 1.5, b = 38.5 x
432916
= 0
a 2 (1.5, 1.57], b 2 [3, 15] fx
n
g
n1000000
n0
is chaotic sequence
a = 1.57, b = 15.199957 x
31271
> 1
H. Gao et al. / Chaos, Solitons and Fractals 29 (2006) 393399 395
Step 6: Pass the encrypted image through public communication channel.
Step 7: Pass the encryption key through secure communication channel.
Step 8: End.
The decryption algorithm is similar to the encryption algorithm but receiving encryption key and operating with the
encrypted image.
The rst 100 points of the chaotic iteration curve are abnegated in order to avoid the harmful eect of transitional
procedure. Furthermore, to improve system security, we selected the pseudo-random numbers discontinuously; as
shown in Fig. 3, one was selected after two abnegated points.
4. Experimental analysis
Experimental analysis of the new algorithm presented in this paper has been done with several images. Fig. 4 shows
the experimental results with Lena BMP image. Fig. 4(a) is the 256 grey-scale Lena plain-image of size 256 256.
Fig. 4(b) is its encrypted image with the encryption key K = (x
0
, a, b) = (0.987654321012345, 1.1, 5). As we can see,
the encrypted image is rough-and-tumble and unknowable. Fig. 4(c) is the decrypted image by use of the decryption
algorithm with the same key. It can be seen that the decrypted image is clear and correct without any distortion.
But if we use the wrong key, we will get an unexpected image. For example, Fig. 4(d) shows the decrypted image using
the wrong key K
1
= (x
0
, a, b) = (0.987654321012346, 1.1, 5). So it can be concluded that the chaotic encryption algo-
rithm is sensitive to the key, a small change of the key will generate a completely dierent decryption result and can
not get the correct plain-image.
With a statistical analysis of Lena image and its encrypted image, their grey-scale histograms are given in Fig. 5.
Fig. 5(b) shows uniformity distribution of grey-scale of the encrypted image. It demonstrates that the encryption algo-
rithm has covered up all the characters of the plain image and shows good performance of balanced 01 ratio, zero co-
correlation and high-level security.
To test the correlation between two adjacent pixels in plain-image and ciphered image, the following procedure was
carried out. First, randomly select 1000 pairs of two adjacent (in horizontal, vertical, and diagonal direction) pixels
from an image. Then, referring to [1], calculate the correlation coecient of each pair by using the following formulas:
Ex
1
N
X
N
i1
x
i
;
Dx
1
N
X
N
i1
x
i
Ex
2
;
covx; y
1
N
X
N
i1
x
i
Exy
i
Ey;
c
xy

covx; y

Dx
p
Dy
p ;
where x and y are grey-scale values of two adjacent pixels in the image.
Fig. 3. Block diagram of the chaotic encryption algorithm.
396 H. Gao et al. / Chaos, Solitons and Fractals 29 (2006) 393399
Fig. 6 shows the correlation distribution of two horizontally adjacent pixels in the plain-image and that in the ci-
phered image. And the correlation coecients are shown in Table 2. These correlation analysis prove that the chaotic
encryption algorithm satisfy zero co-correlation.
Some other experimental tests indicate that the running speed of the proposed algorithm is acceptable. The personal
computer used in the tests is 1.5 GHz Pentium IV with 512 M memory and 40 G hard-disk capacity. The average time
used in encryption/decryption on 256 grey-scale images of size 256 256 is shorter than 0.5 s, which is close to the speed
of the algorithm proposed in reference [1].
5. Security analysis
The chaotic image encryption algorithm presented in this paper belongs to one-time-one-password system which was
proved to be secure by Shannon [20]. The oating-point-number a, b and x
0
of the chaotic map may represent the key of
Fig. 4. Image encryption and decryption experimental result: (a) plain-image, (b) encrypted image, (c) decrypted image by correct key,
(d) decrypted image by wrong key.
Fig. 5. Histograms of the plain-image and the cipher-image: (a) histogram of plain-image, (b) histogram of cipher-image.
H. Gao et al. / Chaos, Solitons and Fractals 29 (2006) 393399 397
the encryption algorithm. Compared with the Logistic maps key space consisting of k 2 (3.6, 4) and x
0
2 (0, 1), the key
space of the new algorithm is much larger.
Experimental analysis shows that the phase space of the proposed NCA map satises uniform distribution property.
Trials show that the NCA map has many characteristics of traditional cryptography, such as balanced 01 ratio, zero
co-correlation and ideal nonlinearity. Therefore, image encryption based on NCA can resist grey code attack and sta-
tistic attack strongly [4].
The encryption algorithm proposed in the paper has the ability to resist brute-force attack. Encryption key is pivotal
and integrant for cryptanalysis [21]. The key of the new algorithm consists of three oating-point numbers. If we use the
rst 15 digits of a oating-point number, then there are 15 + 15 + 15 = 45 uncertain digits. So the possible key number
is 10
45
, which is much more than that of the 56-bit-DES algorithm: 2
56
. While DES is an acknowledged secure encryp-
tion algorithm. So it can be seen that the new chaotic image encryption algorithm is good at resisting brute-force attack.
Some chaotic encryption algorithms are very weak to the chosen/known-plain-text attack [22], but the new algo-
rithm has the ability to resist it. At times, attackers can get some plaintexts and their cryptographs. In such cases it
is demanded that other plaintexts and the system key should not be caught by the attackers. An easy-taken way to re-
solve the problem is trying to make the relationship between x
n
and x
n+1
complex, so as to keep parameters a and b
secure from attackers. For this purpose, the method of choosing pseudo-random numbers with an interval is taken
in this paper. For example, if the chosen interval between x
n
and x
n+1
is 1, then the relationship between x
n
and
x
n+1
will be as follows:
x
n1
1 b
4
tga 1 b
4
tgax
n
1 x
n

b
1 1 b
4
tgax
n
1 x
n

b
.
The relationship becomes very complex. And the relationship will be much more complex and uncertain with the inter-
val increasing, so chosen/known-plain-text attack would become very inecient and practically useless.
6. Conclusions
To overcome the drawbacks of small key space and weak security in the widely used one-dimensional Logistic sys-
tems, this paper presents a new nonlinear chaotic algorithm. Its structural parameters and initial value can all be used as
Fig. 6. Correlations of two horizontally adjacent pixels in the plain-image and in the cipher-image: (a) correlation analysis of plain-
image, (b) correlation analysis of cipher-image.
Table 2
Correlation coecients of two adjacent pixels in two images
Plain-image Ciphered image
Horizontal 0.92401 0.01589
Vertical 0.95612 0.06538
Diagonal 0.92659 0.03231
398 H. Gao et al. / Chaos, Solitons and Fractals 29 (2006) 393399
encryption key in chaotic cryptosystems. Experimental analysis demonstrates that the image encryption algorithm
based on NCA shows advantages of large key space and high-level security, while maintaining acceptable eciency.
It is particularly suitable for Internet image encryption and transmission applications. Although the algorithm pre-
sented in this paper aims at the image encryption, it is not just limited to this area and can be widely applied in other
information security elds.
Acknowledgements
This work was supported by the Funds for Golden Shield Project of Hubei Province Police Department of China.
The authors would like to thank Prof. Huamin Zhou, Prof. Weiwei Fan, Dr. Xiaogang Wu and Dr. Yanwu Wang at
Huazhong University of Science and Technology for their helpful discussion and advices.
References
[1] Chen GR, Mao YB, et al. A symmetric image encryption scheme based on 3D chaotic cat maps. Chaos, Solitons & Fractals
2004;21:74961.
[2] Chiaraluce F, Ciccarelli L, et al. A new chaotic algorithm for video encryption. IEEE Trans Consum Electron 2002;48:83843.
[3] Matthews R. On the derivation of a chaotic encryption algorithm. Cryptologia 1989;13:2942.
[4] Zhang LH, Liao XF, Wang XB. An image encryption approach based on chaotic maps. Chaos, Solitons & Fractals
2005;24:75965.
[5] Wu XG, Hu HP, Zhang BL. Analyzing and improving a chaotic encryption method. Chaos, Solitons & Fractals 2004;22:36773.
[6] Li S, Mou X. Improving security of a chaotic encryption approach. Phys Lett A 2001;290:12733.
[7] Jakimoski G, Kocarev L. Analysis of some recently proposed chaos-based encryption algorithms. Phys Lett A 2001;291:3814.
[8] Wang YW, Guan ZH, Wen XJ. Adaptive synchronization for Chen chaotic system with fully unknown parameters. Chaos,
Solitons & Fractals 2004;19:899903.
[9] Bu SL, Wang BH. Improving the security of chaotic encryption by using a simple modulating method. Chaos, Solitons & Fractals
2004;19:91924.
[10] A

lvarez G, Montoya F, Romera M, Pastor G. Cryptanalyzing an improved security modulated chaotic encryption scheme using
ciphertext absolute value. Chaos, Solitons & Fractals 2005;23:174956.
[11] Wu CW, Chua LO. A simple way to synchronize chaotic systems with applications to secure communication systems. Int J
Bifurcat Chaos 1993;3(6):161927.
[12] Yang T. A survey of chaotic secure communication systems. Int J Comp Cognit 2004;2:81130.
[13] Chee CY, Xu D, Steven R, Bishop B. A zero-crossing approach to uncover the mask by chaotic encryption with periodic
modulation. Chaos, Solitons & Fractals 2004;21:112934.
[14] Elnashaie SSEH, Abasha ME. On the chaotic behaviour of forced uidized bed catalytic reactors. Chaos, Solitons & Fractals
1995;5:797831.
[15] Kocarev L. Chaos-based cryptography: a brief overview. IEEE Circ Syst 2001;1:621.
[16] Ponomarenko VI, Prokhorov MD. Extracting information masked by the chaotic signal of a time-delay system. Phys Rev E
2002;66:02621521.
[17] Marek B, Artur G. Chaotic and non-chaotic mixed oscillations in a logistic system with delay and heat-integrated tubular
chemical reactor. Chaos, Solitons & Fractals 2002;14:174956.
[18] Sobhy MI, Shehata AR. Methods of attacking chaotic encryption and countermeasures. IEEE Acoust Speech Signal Process
2001:10014.
[19] Wheeler DD, Matthews RAJ. Super computer investigations of a chaotic encryption algorithm. Cryptologia 1991;15:4052.
[20] Shannon CE. Communication theory of security systems. The Bell Syst Tech J 1949;28:656715.
[21] Chien T-I, Liao T-L. Design of secure digital communication systems using chaotic modulation, cryptography and chaotic
synchronization. Chaos, Solitons & Fractals 2005;24:24155.
[22] Li SJ, Zheng X. Cryptanalysis of a chaotic image encryption method. IEEE Int Symp Circ Syst 2002;2:70811.
H. Gao et al. / Chaos, Solitons and Fractals 29 (2006) 393399 399

Potrebbero piacerti anche