Chaos based imaage encryption algorithm
Chaos based imaage encryption algorithm
www.elsevier.com/locate/pla
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.
encryption scheme. The main idea is to shuffle the pixels, we adopt Arnold cat map to shuffle the pixel
positions of the pixels of the plain-image in the spatial- positions of the plain-image. Without loss of general-
domain. In [6], the authors present a new chaotic key- ity, we assume the dimension of the original grayscale
based image encryption algorithm (CKBA) to change image I is N × N . The coordinates of the pixels are
the pixel values of the plain-image. However, Li and S = {(x, y) | x, y = 0, 1, 2, . . . , N − 1}. Arnold cat
Zheng point out that CKBA is very weak to the map is described as [12]
chosen/known-plaintext attack with only one plain-
x x
image, and its security to brute-force ciphertext-only = A (mod N )
attack is overestimated by the authors [7]. In [8], y y
an algorithm for encoding binary images using one- 1 p x
= (mod N ) (1)
dimensional chaotic maps is presented. It can be seen q pq + 1 y
that, this method [8] is not secure enough according
where p and q are positive integers, det(A) = 1. The
to [7]. In order to improve the security of the image
map is area-preserving since the determinant of its lin-
encryption algorithm, many researchers prefer shuf-
ear transformation matrix equals (1). The (x , y ) is the
fling the positions and changing the grey values of
new position of the original pixel position (x, y) when
image pixels simultaneously. For instance, in [9,10]
Arnold cat map is performed once. Iterated actions of
the two-dimensional chaotic map is generalized to 3D
A on a pixel r0 ∈ S form a dynamical system
for designing a real-time secure symmetric encryp-
tion scheme. The new scheme employs the 3D map rn+1 = An r0 (mod N ) or rn+1 = Arn (mod N ),
to shuffle the positions of image pixels and uses an-
other chaotic map to confuse the relationship between where n = 0, 1, 2, . . . . The set of points {r0 , r1 , r2 , . . .}
the cipher-image and plain-image. is an orbit of the system with a period, i.e., there ex-
A new scheme is suggested in this Letter for secure ist positive integers T and n0 , such that rn+T = rn ,
image encryption. Shuffling the positions and chang- n = n0 , n0 + 1, n0 + 2, . . . . The period T depends on
ing the grey values of image pixels are performed si- the parameters p, q and the size N of the original
multaneously in our method. The rest of this Letter is image. Thus the parameters p, q and the number of
organized as follows. Section 2 describes the proposed iterations M all can be used as the secret keys. Since
method. Section 3 presents our experiments. Security there only exists a linear transformation and mod func-
analyses are given in Section 4, and finally this Letter tion, it is very efficient to shuffle the pixel positions
is concluded in Section 5. using the Arnold cat map. After several iterations, the
correlation among the adjacent pixels can be disturbed
completely. Some experiments are given in Section 3
2. The proposed cryptosystem to demonstrate the efficiency of Arnold cat map. How-
ever, the periodicity of Arnold cat map should degrade
The image encryption algorithm includes two steps: the security the encryption, because the possible at-
Firstly, the positions of the pixels of the original image tacks may iterate the Arnold cat map continuously to
are shuffled by Arnold cat map. Then the pixel values reappear the original plain-image. As a remedy, we
of the shuffled image are encrypted by Chen’s chaotic adopt Chen’s chaotic system to change the pixel values
system. next to improve the security.
2.1. Encryption by Arnold cat map 2.2. Encryption by Chen’s chaotic system
Image data have strong correlations among adja- Chen’s chaotic system is first presented by Prof.
cent pixels. Statistical analysis on large amounts of G. Chen in 1999, which is described as following [13],
images shows that averagely adjacent 8 to 16 pixels
are correlative in horizontal, vertical, and also diago- ẋ = a(y − x),
nal directions for both natural and computer-graphical ẏ = (c − a)x − xz + cy,
images. In order to disturb the high correlation among ż = xy − bz,
Z.-H. Guan et al. / Physics Letters A 346 (2005) 153–157 155
where a, b and c are parameters. If one chooses where Abs(x) returns the absolute value of x. Floor(x)
a = 35, b = 3, c ∈ [20, 28.4], the system is chaotic rounds the elements of x to the nearest integers less
as shown by Fig. 1. The equations of Chen’s system than or equal to x. mod(x, y) returns the remainder
are quite similar to those of the Lorenz system [11], after division. The function de2bi(x) converts decimal
but topologically they are not equivalent, essentially number x to binary value. Because in our cryptosys-
due to the parameter c in front of the state vari- tem all the variables declared as type double which has
able y, which leads to abundant dynamic characters a bit-length of 64 bits. When expressed in scientific
of the new system. Therefore, the dynamical property notation, all the variables have a 15-digit precision.
of the Chen’s chaotic system is more complicated than The decimal fractions of the variables are multiplied
the Lorenz chaotic system. This feature is very use- by 1014 . Moreover, in mod(x, y) function the variable
ful in secure communications. The chaotic behavior y is chosen as 256 because the grayscale image with
of Chen’s chaotic system using fourth order Runge– 256 grey levels is used in our scheme. The shuffled
Kutta algorithm is shown in Fig. 1. The step of the image is encrypted as
Runge–Kutta is chosen as 0.001. As we can see, the
trajectory of the Chen’s chaotic system is composed C3×(i−1)+1 = B3×(i−1)+1 ⊕ Bxi ,
of a lot of discrete dots. C3×(i−1)+2 = B3×(i−1)+2 ⊕ Byi ,
In our scheme, three discrete variables of the
C3×(i−1)+3 = B3×(i−1)+3 ⊕ Bzi ,
Chen’s chaotic system are adopted to encrypt the shuf-
fled image. The encryption process consists of three where i = 1, 2, . . . represents the ith iteration of the
steps of operations. Chen’s chaotic system. The symbol ⊕ represents the
(1) The pixels of the shuffled image are arranged exclusive OR operation bit-by-bit. The Chen’s chaotic
by the order from left to right and then top to bottom system is iterated until all the elements in the set B =
and we can get a set S = {S1 , S2 , . . . , SN ×N }, in which {B1 , B2 , . . . , BN ×N } is encrypted. Then every element
each element is the decimal grey value of the pixel. in the encrypted set C = {C1 , C2 , . . . , CN ×N } is con-
Convert decimal pixel values to binary numbers and verted into decimal numbers and we can obtain the
we can get a new set B = {B1 , B2 , . . . , BN ×N }. cipher-image.
(2) Iterate the Chen’s chaotic for N0 times.
(3) The Chen’s chaotic system is iterated continu-
ously. For each iteration, we can get three values xi , yi 3. Experimental results
and zi . These decimal values are preprocessed first as
follows Some experimental results are given in this section
to demonstrate the efficiency of our scheme. In all our
Bxi = de2bi mod Abs(xi ) − Floor Abs(xi ) experiments, the precision is 10−14 , which is easy to
× 1014 , 256 , be realized on today’s personal computer. The plain-
image with the size 124×124 is shown in Fig. 2(a) and
(a) (b)
Fig. 3. Encryption by using Arnold cat map: (a) shuffled image; Fig. 5. Decrypted image and its histogram: (a) decrypted image;
(b) histogram of the shuffled image. (b) histogram of the decrypted image.
Fig. 4. Encryption by Chen’s chaotic system: (a) cipher-image; Fig. 6. The sensitivity to the secret key x0 : (a) decrypted image
(b) histogram of the cipher-image. (x0 = −10.05800000000001, y0 = 0.368, z0 = 37.368); (b) his-
togram of the decrypted image.
5. Conclusions
References