Chaotic Encryption Scheme Based On A Fast Permutation and Diffusion Structure
Chaotic Encryption Scheme Based On A Fast Permutation and Diffusion Structure
Chaotic Encryption Scheme Based On A Fast Permutation and Diffusion Structure
t
observed in Chong's permutation structure. In this scheme, firstly, the sequence generated by the combination of Piecewise
irs
Linear Chaotic Map (PWLCM) with solutions of LDE is used as a permutation key to shuffle the sub-image. Secondly, the
shuffled sub-image is masked by using diffusion scheme based on Chebyshev map. Finally, in order to improve the influence of
the encrypted image to the statistical attack, the recombined image is again shuffle by using the same permutation strategy
n F
applied in the first step. The design of the proposed algorithm is simple and efficient, and based on three phases which provide
the necessary properties for a secure image encryption algorithm. According to NIST randomness tests the image sequence
at IT
encrypted by the proposed algorithm passes all the statistical tests with the high P-values. Extensive cryptanalysis has also
been performed and results of our analysis indicate that the scheme is satisfactory in term of the superior security and high
speed as compared to the existing algorithms.
ic IAJ
Keywords: Fast and secure encryption, chaotic sequence, Linear Diophantine Equation, NIST test.
io
Received March 17, 2015; accepted October 7, 2015
1. Introduction phase, and they form the basis of many existing chaos-
based image encryption algorithms [2, 7].
With the fast development of image transmission Nevertheless, to assure an efficient encryption scheme,
through computer networks, especially the Internet, the
l
bulk data capacities, high redundancy, strong secure encrypted image corresponds to an image that
correlations among pixels, etc. [8]. These features make cannot be statistically distinguished from a truly
conventional cipher systems such as DES, AES and random sequence. Indeed, the cipher-images should
RSA unsuitable for practical image encryption [13]. present a good level of randomness and moreover,
in
In order to overcome image encryption problems, in should be very sensitive to the used of initial key or
recent years, many scientists and engineers have seeds and to the plain-image [1].
nl
designed image encryption algorithms based on one or Some existing image encryption algorithms were
more chaotic maps [5, 11]. Due to desirable properties designed with a fast diffusion strategy, but their
O
of nonlinear dynamical systems such as high sensitive permutation is not fast enough because at this stage
dependence on initial conditions and control parameter, the discretization of chaotic sequences in finite values
ergodicity, unpredictability, mixing, etc., which are is time consuming. To achieve high security level
analogous to the confusion and diffusion properties of performance, they also need more than one round in
Shannon [12], the chaos-based encryption has their permutation-diffusion structure.
suggested a new and efficient way to deal with the The key challenge now in cryptography being to
intractable problem of fast and highly secure image consider the trade-offs between the security level and
encryption [11]. efficiency, in this paper, a chaotic cipher for gray
Fridrich [6] suggested that a suitable chaos-based images by a fast permutation-diffusion structure is
image encryption algorithm should be composed of two proposed.
phases: one phase is to permute the order of the image In the proposed scheme, image is split in n sub-
pixels using chaotic map(s) while the other phase is to images. The design of the proposed algorithm is then
alter the numerical values representing the color of each based on three phases. In phase I, image permutation
pixel, again using chaotic map(s). These two phases are is based on the sorting of the solutions of the Linear
referred to as the confusion phase and the diffusion
Diophantine Equation (LDE) [4] whose coefficients are
integers and dynamically generated from any type of
chaotic systems to enhance the speed at the permutation
stage. This method also leads to a stronger permutation
effect. In phase II, we generate diffusion template using
Figure 1. Permutation based on Chirikov Standard Map: (a) The
image diffusion based on Chebyshev map. Then the plain image of Lena with 512×512 size. (b) The test image after
image is masked by performing XOR operation on the applying the Chirikov standard map once. (c) The test image after
shuffled image and diffusion template. Finally, in phase applying the Chirikov standard map three times. (d) The test
III, the recombined image is encrypted by using image after applying the Chirikov standard map five times.
permutation key based on the sorting of the solutions of However, to get the correlation among the adjacent
the LDE. To avoid the cyclic digitization of chaotic pixels completely disturbed and the image completely
numbers in the generation of permutation key and then unrecognizable this permutation needs five rounds of
achieve high speed performance, we generate iterations. We then propose at the following sub-
permutation key at the initialization step by using section to replace this kind of permutation by a one-
ascending or descending sorting of the solution of LDE; round permutation based on the sorting of chaotic
t
thereafter, this permutation key is just dynamically solutions of the Linear Diophantine Equation (LDE)
irs
updated for each sub-image by including inside d > 3 for permuting the pixel position in the image.
chaotic numbers and then sorting the result for
obtaining and updated permutation key. Also, diffusion
n F
2.2. Image permutation based on the sorting
key is updated for each sub-image.
of chaotic solutions of the LDE
The rest of the paper is organized in the following
manner: comparison between two image permutations
is described in section 2. The diffusion phase in the
at IT The technique used at the permutation stage is based
on the ascending or descending sorting of the chaotic
proposed cryptosystem is presented in section 3. The solutions of the LDE. The LDE is defined by Equation
ic IAJ
simulation and performance analysis are discussed in 2 below [4]:
section 4 and the conclusions are made in section 5.
io
ax + by =
e (2)
2. Comparison Between Two Image where a, b and e are the constants and belongs to the
Permutations set of natural integers, x and y the general solutions.
In order to determine the solutions of LDE as a
In order to decorrelate the strong relationship between random process, coefficients a and b of the LDE can
adjacent pixels, the permutation process is usually used. be evaluated from the chaotic system in the Algorithm
l
1 below:
ub
5. x0 ← Wx /Wr
obtained by changing the range of (x, y) from the square 6. Require: x01, x02 from chaotic system
[0, 2π)×[0, 2π) to the discrete lattice N×N as follows 7. a ← 2× fix(2p x01) +1
O
xi=+1 ( xi + yi ) mod N The control parameter λ and the initial condition x0 are
(1) deduced from the keys T1 and T2. λ0 is a constant such
2π xi +1
y=i +1 yi + K sin mod N that the behavior of Equation (3) remains chaotic for
N
all the range of λ and x. Wr=8160 is the greatest value
where N is the width or length of a square image, and K of Wλ0. T1(k+1) and T2(k+1) respectively correspond to
is a positive integer which can be used as the the values assigned to the ASCII symbols of key T1
permutation key. and T2. fix(.) is the integer part of function. p is the
Chirikov standard map is then employed to shuffle number of bits used for the quantization. The precision
the pixel positions of the plain image. It application to a used for the digitization of the chaotic values by using
grayscale test image with 512×512 size is shown in Matlab is about ε ≈ 10-15.
Figure 1. The ciphering key being K=512. In this work, we have considered as chaotic system,
the Piece Wise Linear Chaotic Map (PWLCM)
described by the following equation:
1
3. Diffusion Phase in the Proposed
x(n − 1) × λ , if 0 ≤ x(n − 1) λ
Cryptosystem
] [ x(n − 1) − λ ] ×
1
n) F [ x(n − 1)
x(= = , if λ ≤ x(n − 1) 0.5 (3)
0.5 −λ
F [1 − x(n − 1) ] , if 0.5 ≤ x(n − 1) 1 In diffusion stage, the pixel values are modified
sequentially to confuse the relationship between cipher
The PWLCM is known to be chaotic when its control image and plain image in order to increase the entropy
parameter λ is within ]0, 0.5[ and its initial condition is of the plain image by making its histogram uniform.
chosen within the interval ]0, 1[ [4]. In this paper, Chebychev map is used to generate
Then the coefficients a and b of the LDE evaluated in keystream K(n) in order to mask the pixel in first time.
the Algorithm Fragment 1 above are used to calculate The Chebychev map is described by:
( xn ) cos ( k .cos −1 xn ) , xn ∈ [ −1, 1]
the solutions of LDE which is sorted to generate the
x(n=
+ 1) Tk = (4)
permutation key for encryption. The procedure is shown
in the Algorithm 2 below: Where k ∈ [2, +∞[ is control parameter. The initial
value x(0) and parameter k are used as the key.
Algorithm 2: Fragment to get permutation key IZ
The diffusion procedure is described as follows:
t
1. Require: N, t
[G, C, D] ← gcd(a,b) 1. Randomly select a parameter k and an initial value
irs
2.
3. x ← mod(C+(b/G)t, N) + 1 x(0) for equation 4. Iterate equation 4 t times to
4. y ← mod(D - (a/G)t, x) + 1 avoid the harmful affect of the initial values, where
5. [I, J] ← sort(x)
n F
t is a preset integer and served as secret encryption
6. [I1, J1] ← sort(y) key, too.
7. Iz ← J(J1)
2. Let I denotes a gray scale permute image with size
Where t=(0, 1,…,N-1), N is the length of image.
gcd(x,y) is the greatest common divisor, mod(x,y) is the
at IT N×M. Reshape
p(2),…p(n),…,p(N×M)}.
I and get P={p(1),
ic IAJ
modulo and sort(x) array elements in ascending or 3. Obtain for each iteration one key stream element
descending order. IZ is the permutation key. from the current state of the chaotic according to:
io
For the security to be strengthened, it is necessary for
the permutation key IZ to be updated for each sub- =K (n) mod floor ( ( ( x(n) + 1) / 2 ) ×1014 ) , L (5)
images. The updating process is carried out by
replacing d>3 number of values of IZ with newly where floor(x) returns the value of x to the nearest
generated d number of chaotic numbers from the integers less than or equal to x, mod(x, y) returns
chaotic system and then sorting it for obtaining the the remainder after division and L is the gray levels
updated IZ. of plain-image
l
t
n F irs
at IT
ic IAJ
io
l
ub
eP
in
nl
t
Linear complexity 0.9905 0.551365 PASSED
irs
4.4. Correlations Between Adjacent Pixels
n F
First, randomly select 1000 pairs of two adjacent
pixels from an image. Then, calculate their correlation
coefficient using the following formulas:
at IT 1
N
N
∑ ( x − x )( y − y )
i i
(12)
rxy = i =1
ic IAJ
1 N
2 1
N
2
For each test, a P-value is computed from binary where xi and yi are greyscale values of i-th pair of
sequence. In all tests, if the computed P-value is < 0.01, adjacent pixels, and N denotes the total numbers of
then conclude that the sequence is non-random. samples.
eP
Otherwise, conclude that the sequence is random. The results of the correlation coefficients for
In our experiment, m = 2000 different keystreams, horizontal, vertical and diagonal adjacent pixels for
each sequence having a length of n = 1000,000 bits the plain images and its cipher images are given in
in
which are generated using our scheme. The P-values for Table 2 and 3. Table 2 shows that the correlations
various tests are listed in Table 1. In this case, we coefficients evaluated with the proposed algorithm are
obtained the confidence interval [0.983, 0.996]. We better than those presented in the others references.
nl
notice that the results of the tests are satisfactory for the
Table 2. Comparative study of the correlation coefficients of the
whole set of tested outputs. All the sequences pass
O
t
p(mi) represents the probability of occurrence of
irs
symbol mi and log denotes the base 2 logarithm so that
the entropy is expressed in bits.
For a purely random source emitting 28 symbols, the
n F
entropy is H(m) = 8 bits. The test result on different
images for one round is defined in Table 4. It appears
that the entropy of the ciphered images is almost equal
to eight, compared to that of the plain-images. It can
also be noticed that the encrypted version of the image
at IT
ic IAJ
“Black” is a truly random image, thus confirming the
efficiency of the proposed cipher.
io
Table 4. Information entropy of plain-images and cipher-images by Figure 5. NPCR and UACI performance of the proposed scheme
the proposed algorithm. and the others existing scheme. (a) NPCR performance. (b) UACI
performance.
Image Type Lena Airplane Black
Plain- 4.7. Key Sensitivity Analysis
7.4456 6.7043 0
image
Recall that secure cryptosystem requires not only a
l
Entropy
Cipher-
large key space but also a high key sensitivity. That is,
ub
x0 = k= T1 = T2 =
(i)
images. The NPCR between two ciphered images A and 0.48729650284971 5.78259581295362 azertyuiopqsdfgj azertyuiopqsdfg0
B of size M×N is [14]:
O
x0 = k= T1 = T2 =
(ii)
0.48729650284970 5.78259581295362 azertyuiopqsdfgj azertyuiopqsdfg0
m n
∑∑ D ( i, j )
i =1 (16) (iii)
x0 = k= T1 = T2 =
= × 100 0.48729650284971 5.78259581295361 azertyuiopqsdfgj azertyuiopqsdfg0
j
NPCRAB
m×n x0 = k= T1 = T2 =
(iv)
0.48729650284971 5.78259581295362 azertyuiopqsdfg1 azertyuiopqsdfg0
where
x0 = k= T1 = T2 =
(v)
1 A ( i, j ) ≠ B ( i, j )
0.48729650284971 5.78259581295362 azertyuiopqsdfgj azertyuiopqsdfg2
D ( i, j ) = (17)
0 otherwise
The corresponding cipher images are shown in Figures
The second criterion, UACI is used to measure the 6(a), (b), (d), (f) and (h), respectively. The differences
average intensity of differences between the two between any two cipher images are computed and
images. It is defined as [13]: given in Table 6. The differential images between (a)
and (b), (a) and (d), (a) and (f) and (a) and (h) are
100 m n A ( i, j ) − B ( i, j )
UACI AB = ∑∑
m×n 1 1 255
(18) shown in (c), (e), (g) and (l) of Figure 6 respectively.
on the key has been investigated. The permutation
process was generated by sorting the chaotic solutions
of the LDE whose coefficients are integers and
dynamically generated from PWLCM. The proposed
scheme thus requires few chaotic numbers for the
generation of complex permutation and diffusion keys.
By using this technique, the permutation step and the
spreading process are significantly accelerated
contrary to that of Chong Fu et al. [3]. As a result, one
Figure 6. Key sensitivity test: (a) Ciphered image using key (i). (b) round of encryption with the proposed algorithm is
ciphered image using key (ii). (c) Differential image between (a) safe enough to resist exhaustive attack, chosen
and (b). (d) Ciphered image using key (iii). (e) Differential image
between (a) and (d). (f) Ciphered image using key (iv). (g)
plaintext attack and statistical attack. Simulations have
Differential image between (a) and (f). (h) Ciphered image using been carried out to compare its performance with that
key (v). (l) Differential image between (a) and (h). of existing methods. We have also performed an
exhaustive testing process of the randomness of the
t
Table 6. Differences between cipher images produced by slightly generated binary sequences using the NIST suite in
irs
different keys.
order to prove the viability of the proposed method.
Test This makes it a very good candidate for real-time
Figure keys Difference (%)
image encryption applications.
n F
(a) (b) (d) (f) (h)
(a) (i) ---- 99.6059 99.6040 99.6014 99.6086
Acknowledgement
(b)
(d)
(f)
(ii) 99.6059 ----
(iii) 99.6040 99.6132
(iv)
99.6132
real-time internet applications. We evaluated the image encryption scheme based on 3D chaotic
performance of encryption scheme by using Matlab cat maps,” Chaos Solitons & Fractals, vol. 21,
7.10.0. Although the algorithm was not optimized, no. 3, pp. 749-761, 2004.
eP
performances measured on a 2.0 GHz Pentium Dual- [3] Chong F., Chen J., Zou H., Meng W., and Zhan
Core with 3GB RAM running Windows XP are Y., “A chaos-based digital image encryption
satisfactory. scheme with an improved diffusion strategy,”
The average computational time required for 256 OPTICS EXPRESS, vol. 20, no. 3, pp. 2363-
in
[14], the scheme can be said high-speed as we only chaotic block cipher for image encryption,”
used a 2.0 GHz processor and the Matlab 7.10.0 Commun. Nonlinear Sci. Numer. Simulat., vol.
O
software. Indeed, the modulus and the XOR functions 19, no. 3, pp. 578-588, 2014.
are the most used basic operations in our algorithm. [5] Faraoun K., “A chaos-based key stream
The comparison between the simulations times generator based on multiple maps combinations
required at the permutation stage shows that the and its application to images ,” The International
computational time required in our experiment is three Arab Journal of Information Technology, vol. 7,
times less than that of Chong Fu et al. [3]. This means no. 3, pp. 231-1215, 2010.
that the actual computational times of our scheme could [6] Fridrich J., “Symmetric ciphers based on two
be at least smaller if implemented in the same dimensional chaotic maps,” International
conditions than the Chong Fu et al’s. algorithm. Journal of Bifurcation and Chaos, vol. 8, no. 6,
pp. 1259-1284, 1998.
5. Conclusions [7] Guan Z., Huang F., and Guan W., “Chaos-based
image encryption algorithm,” Physics Letters A,
In this paper, an encryption algorithm for the fast vol. 346, no. 1-3, pp. 153-157, 2005.
generation of large permutation and diffusion keys with
a good level of randomness and a very high sensitivity
[8] Jastrzebski K., and Kotulski Z., “On improved Jean De Dieu Nkapkop received
image encryption scheme based on chaotic map his Master’s degree in Electronics,
lattices,” Engineering Transactions, vol. 57, no. Electrical Engineering and
2, pp. 69-84, 2009. Automatic, from Department of
[9] Li C., Li S., Asim M., Nunez J., Alvarez G., and Physics of the University of
Chen G., “On the security defects of an image Ngaoundere, Cameroon in 2012.
encryption scheme,” Image and Vision Currently, he is preparing his Ph.D.
Computing, vol. 27, no. 9, pp. 1371-1381, 2009. degree in the field of chaos-based cryptography.
[10] Lian S., Sun J., and Wang Z., “A block cipher
Joseph Effa received his Ph.D. in
based on a suitable use of the chaotic standard
Electronics from the University of
map,” Chaos, Solitons & Fractals, vol. 26, no. 1,
Yaounde I, Cameroon in 2009. His
pp. 117-129, 2005.
research interests include chaos
[11] Mohammad S., and Mirzakuchaki S., “A fast
detection, synchronization of
color image encryption algorithm based on
chaotic systems, nonlinear
coupled two-dimensional piecewise chaotic map,”
transmission line and chaos-based
t
Signal processing, vol. 92, no. 5, pp. 1202-1215,
irs
image encryption.
2012.
[12] Shannon C., “Communication theory of secrecy Monica Borda received his Ph.D.
systems,” Bell Syst. Tech. J., vol. 28, no. 4, pp. in Telecommunication from the
n F
656-715, 1949. University of Bucharest, Romania in
[13] Wang J., and Chen G., “Design of a chaos-based 1987. She is Professor in
digital image encryption algorithm in time
domain,” in IEEE International Conference on
at IT Electronics Engineering
Telecommunication
and
at
Computational Intelligence & Communication Communications Department from
ic IAJ
Technology, pp. 26-29, 2015. the Technical University of Cluj-Napoca, Romania.
[14] Wang Y., Wong K., Liao X., Chen G., “A new She has more than 40 years’ experience of education
io
chaos-based fast image encryption algorithm,” and research in the topics included Information
Appl. Soft Comput., vol. 11, no. 1, pp. 514-522, Theory and Coding, Cryptography and Genomic,
2011. Signal Processing and Image Processing.
[15] Zhu Z., Zhang W., Wong K., and Yu H., “A Laurent Bitjoka received his Ph.D.
chaos-based symmetric image encryption scheme in Biomedical Engineering from the
using bit-level permutation,” Information
l