A Novel Image Encryption Scheme Based On DNA Sequence Operations and Chaotic Systems
A Novel Image Encryption Scheme Based On DNA Sequence Operations and Chaotic Systems
DOI 10.1007/s00521-017-2993-9
ORIGINAL ARTICLE
Abstract In the paper, a novel image encryption algorithm Keywords Image encryption . DNA encoding . DNA
based on DNA sequence operations and chaotic systems is sequence operation . Chaotic system . 2D-LASM
proposed. The encryption architecture of permutation and dif-
fusion is adopted. Firstly, 256-bit hash value of the plain im-
age is gotten to calculate the initial values and system param- 1 Introduction
eters of the 2D Logistic-adjusted-Sine map (2D-LASM) and a
new 1D chaotic system; thus, the encryption scheme highly With the fast development and extensive applications of mul-
depends on the original image. Next, the chaotic sequences timedia technology and Internet, more and more digital im-
from 2D-LASM are used to produce the DNA encoding/ ages carrying all kinds of information are produced and trans-
decoding rule matrix, and the plain image is encoded into a mitted over the network, and security of images becomes
DNA matrix according to it. Thirdly, DNA level row permu- more and more important [1–3]. Chaotic systems have many
tation and column permutation are performed on the DNA soaring and eminent characteristics, such as highly sensitivity
matrix of the original image, inter-DNA-plane permutation to initial conditions and control parameters, ergodic behavior,
and intra-DNA-plane permutation can be attained simulta- deterministic in nature, pseudo randomness, non-periodicity,
neously, and then, DNA XOR operation is performed on the boundedness, and topological transitivity, those are similar to
permutated DNA matrix using a DNA key matrix, and the key the counterparts in cryptography, and many image encryption
matrix is produced by the combination of two 1D chaotic algorithms based on chaotic systems are introduced to protect
systems. Finally, after decoding the confused DNA matrix, the images by transforming a meaningful original image into
the cipher image is obtained. Experimental results and security an unrecognizable and noise-like cipher images [4–14].
analyses demonstrate that the proposed scheme not only has However, some of them have been broken and found insecure
good encryption effect, but also is secure enough to resist from the modern cryptographical point of view [15–24]. For
against the known attacks. example, aiming at a cryptosystem based on a spatiotemporal
chaos with a dynamic keystream generator, Rabei Bechikh
et al. [23] found that it was not sufficiently secure against
chosen plaintext attack, and Li et al. [24] had broken a novel
* Xiuli Chai image encryption scheme based on improved hyperchaotic
[email protected]
sequences with only one known-plaintext attack. Therefore,
* Zhihua Gan new and secure cryptosystems should be introduced to ensure
[email protected]
information security.
Due to the massive parallelism, huge storage, and ultra-
1
Institute of Image Processing and Pattern Recognition, Henan low-power consumption of DNA molecules, DNA computing
University, Kaifeng 475004, China has entered into the field of cryptography [25–27]. A number
2
Department of Electrical and Computer Engineering, Duke of image encryption schemes combining chaos and DNA
University, Durham, NC 27708, USA computing have been presented [27–40]. The kernel of these
3
School of Software, Henan University, Kaifeng 475004, China algorithms is DNA encoding/decoding and DNA computing,
Neural Comput & Applic
and it consists of some algebra operations and biological op- the chaotic sequences generated by 2D-LASM, and it is used
erations, such as the complementary rule of bases, DNA ad- to encode each pixel in the plain image; that is to say, every
dition operation, DNA subtraction operation, and DNA XOR pixel has its own encoding rule and the rule depends on the
operation. A novel image encryption algorithm was presented original image; therefore, our algorithm may effectively resist
in ref. [28]; Lorenz and Chen chaotic systems were used to the known-plaintext, chosen-plaintext and statistical attacks.
give the chaotic sequences; and DNA elongation operation, Besides, DNA level row permutation and column permutation
truncation operation, deletion operation, and addition opera- scheme are adopted, inter-DNA-plane permutation and intra-
tion were employed. Guesmi et al. [29] introduced a novel DNA-plane permutation schemes can make the DNA base
chaos-based image encryption scheme using DNA sequence elements of the plain image move to the same and other
operation and SHA-2 hash function, three-dimensional DNA planes, this can improve the encryption effect, and cha-
Lorenz system was used to generate the chaotic sequences, otic sequences used in confusion process are gotten from
and DNA XOR operation was for diffusion. Wang et al. [30] DNA encoding process, which can make full use of chaotic
proposed a novel image encryption method based on DNA sequences and save encryption time. Lastly, in the diffusion
sequence operations and coupled map lattice, extended ham- process, highly random chaotic sequences are generated from
ming distance was employed to produce the initial values of two new 1D chaotic systems, the key matrix is produced by
the coupled map lattice (CML) system, and DNA addition the DNA encoding rule in many existing methods, whereas
operation and DNA subtraction operation are utilized in the DNA base elements of the key matrix are gotten according
DNA level diffusion process. to the sequence values in our method, which may shorten the
However, recent cryptanalysis results about DNA-based encryption time, and we get the cipher image from the DNA
image encryption algorithms have shown that some algo- XOR operation of the key matrix and the permutated original
rithms have security flaws. For example, Liu et al. [31] gave image.
a RGB image encryption algorithm using DNA encoding and The remaining of the paper is organized as follows: Sect. 2
1D Logistic map, Ozkaynak et al. [32] broke it using chosen- describes the preliminary works, including two chaotic sys-
plaintext attack and obtained the secret key by four chosen tems and DNA sequence operations. The detailed encryption
plain images, and subsequently, the security of this algorithm scheme is presented in Sect. 3. Section 4 discusses the advan-
was reevaluated by Liu et al. [33], and it has two shortcom- tages of the encryption algorithm and Section 5 gives simula-
ings: one is that the encryption scheme has no sensitivity with tion results, the security analyses have been discussed in Sect.
the plain images, and the other is that it cannot resist against 6, and conclusions are drawn in the last section.
the known-plaintext and chosen-plaintext attacks. Recently,
Hermassi et al. [34] analyzed an image encryption algorithm
based on DNA addition and chaotic maps in ref. [35] and
found that firstly, it is non-invertible, and the receiver cannot 2 Preliminary works
recover the plain image even if he gets the secret key, and
secondly, it may not withstand chosen-plaintext attack. In ad- 2.1 Chaotic systems
dition, the previous DNA-based encryption schemes have
demonstrated that the DNA encoding/decoding rules of the 2.1.1 2D Logistic-adjusted-Sine map
plain image and key image are set and the same for all the
pixels [27, 28, 36, 37], it has nothing to do with the original Employing the 1D Logistic map to adjust the input of the Sine
image, which means that there are the same encoding rules for map, a new 2D chaotic map named 2D Logistic-adjusted-Sine
different original images, and at many times, the rules are map (2D-LASM) is proposed [41], and it is defined as
secret keys and varying from 1 to 8 [29–31, 38–40]. This will
downgrade the ability of the algorithm to resist against brute xiþ1 ¼ sinðπμðyi þ 3Þxi ð1−xi ÞÞ
ð1Þ
force attacks and chosen-plaintext attack. yiþ1 ¼ sinðπμðxiþ1 þ 3Þyi ð1−yi ÞÞ
In order to overcome the previous shortcomings from the
image encryption algorithms based on chaotic maps and DNA where μ is the system parameter, μ ∈ [0, 1], and x and y are
computing, we present a novel image encryption scheme in state variables, x , y ∈ (0, 1).
the paper. The contributions of the proposed encryption The bifurcation diagrams of the chaotic system are shown
scheme are described as follows. Firstly, a 2D Logistic- in Fig. 1, with the initial values x0 = 0.8 and y0 = 0.5.
adjusted-Sine map (2D-LASM) and a new 1D chaotic system Compared to Logistic map and Sine map, 2D-LASM has a
are used in the paper; their initial values and system parame- wider chaotic range and better ergodicity and unpredictability
ters are computed from the SHA 256 hash value of the plain and is suitable for image encryption. From the figure, we can
image, so the scheme is highly sensitive to the original image. see that the system has good chaotic characteristics and the
Furthermore, a DNA encoding rule matrix is obtained from Lyapunov exponents are 0.8157 and 0.9787 with μ = 0.8.
Neural Comput & Applic
0.6 0.6
y
x
0.4 0.4
0.2 0.2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
µ µ
(a) x and µ (b) y and µ
2.1.2 1D chaotic map 2 f 1 z1i ; r1 þ f 2 z2i ; r2
ui ¼ f 1 z1i ; r1 * f 2 zi ; r 2 ¼ ð6Þ
1− f 1 ðz1i ; r1 Þ f 2 ðz2i ; r2 Þ
A new 1D chaotic map [42] is used in the diffusion process,
and it can be described by Eqs. (2) and (3): Here, the system parameters r1 , r2 ∈ [1, 10], the initial
values of the chaotic systemz10 ; z20 ∈½−1; 1, and the values pro-
znþ1 ¼ f p ðzn Þ ð2Þ duced by Eq. (6) are used to design the diffusion matrix in the
2 diffusion process.
f p : ½−1; 1→½−1; 1; f p ðzÞ ¼ arctgðctgðrzÞÞ ð3Þ
π
where the system parameter r ∈ [1, 10] and the state variable 2.2 DNA sequence operations
z ∈ [−1, 1].
Its bifurcation diagram is shown in Fig. 2. From the figure, 2.2.1 DNA encoding and decoding rules
it can be known that the chaotic map has a dense set of peri-
odic orbits, and its period is in the [−1, 1] interval with r > π/2. Each DNA sequence contains four nucleic acid bases, which
In order to obtain highly random chaotic sequence, the are A (adenine), C (cytosine), G (guanine), and T (thymine),
combination of two 1D chaotic maps is employed, and it can where A and T, G, and C are complementary pairs. Because 0
be shown in the following equations: and 1 are complementary in the binary, so 00 and 11, 01, and
10 are also complementary. By using four bases A, C, G, and
2 T to encode 00, 01, 10, and 11, there are 24 kinds of encoding
f 1 : ½−1; 1→½−1; 1; f 1 z1i ; r1 ¼ arctg ctg r1 z1i ð4Þ
π rules. But there are only 8 kinds of them satisfying the
2 Watson-Crick complementary rule [43], which are shown in
f 2 : ½−1; 1→½−1; 1; f 2 z2i ; r2 ¼ arctg ctg r2 z2i ð5Þ
π Table 1. DNA decoding rules are the reverse operation of
DNA encoding rules.
In this paper, we employ the DNA encoding rules to en-
code the plain image. For an 8-bit grayscale image, each pixel
can be expressed as a DNA sequence whose length is 4. For
example, when the pixel value is 174, its binary sequence is
10101110, and the DNA sequence is GGTG using the DNA
encoding rule 1 to encode it, whereas using DNA encoding
Rule 1 2 3 4 5 6 7 8
A 00 00 01 01 10 10 11 11
T 11 11 10 10 01 01 00 00
C 01 10 00 11 00 11 01 10
G 10 01 11 00 11 00 10 01
Fig. 2 Bifurcation diagram of the chaotic system
Neural Comput & Applic
rule 1 to decode this DNA sequence, we can get a binary The intermediate parameters ti can be calculated as follows:
sequence 10101110, but if we utilize rule 2 to decode it, we !
obtain another binary sequence 01011101. Obviously, it is a k 3i−1 þ ð3i−1Þ 32 k 28ð j−1Þ
j
ti ¼ li þ ∑ mod1; i
simple way of encryption. k 3i þ 3i j¼1 2256
¼ 1; 2; ⋯; 7 ð8Þ
2.2.2 DNA XOR algebraic operation
where li(i = 1, 2, 3, 4, 5, 6, 7) are the initial given
With the rapid development of DNA computing, some biolo-
parameters and values of the 2D-LASM and the 1D
gy operations and algebraic operation based on DNA se- 0 0 0 0
chaotic system, and they are μ0, x0 , and y0 and r1 , r2 ,
quence are presented, such as XOR operation. XOR operation 1 0 2 0
of DNA sequences is manipulated according to traditional z0 , and z0 , respectively. And ti is the processed
XOR in the binary. For there are eight kinds of DNA encoding value, and mod is the modular operator.
rules, there exist eight types of DNA XOR rules, and one type In view of the boundedness of parameters, the param-
of DNA XOR is listed in Table 2. eters and initial values of the chaotic systems can be
In the paper, the DNA XOR operation is used to fuse the given by
plain image and the key image. For instance, there are two μ ¼ modðt 1 ; 0:4Þ þ 0:5 ð9Þ
DNA sequences ACGT and CTAG; the XOR operation result
of them is CGGC according to Table 2. From Table 2, it is
x0 ¼ mod 10* t 2 ; 0:4 þ 0:5 ð10Þ
obvious that every DNA base in every row or column is
unique; therefore, the result of XOR operation is one and only.
y0 ¼ mod 100* t 3 ; 0:4 þ 0:5 ð11Þ
r1 ¼ 1 þ 9t 4 ð12Þ
the ranges of 0 and 1, and then, the encoding rule matrix IT can After all rows have been permutated, a new matrix P3 is
be obtained as Eq. (16). obtained.
8 Step 4: Implement column permutation to the jth (1 ≤ j ≤
>
> 1; 0 < M ði; jÞ ≤ 0:125
>
> 2; 0:125 < M ði; jÞ ≤ 0:25
4n) column of the matrix P3 according to the following rules:
>
>
>
>
>
> 3; 0:25 < M ði; jÞ ≤ 0:375 0
< Case 1: Perform up cyclic shift on the jth column y j times
4; 0:375 < M ði; jÞ ≤ 0:5
IT ði; jÞ ¼ ð16Þ with j % 2 ≠ 0.
>
> 5; 0:5 < M ði; jÞ≤ 0:625 0
>
> Case 2: Implement down cyclic shift on the jth column y j
>
> 6; 0:625 < M ði; jÞ ≤ 0:75
>
> times with j % 2 = = 0.
>
> 7; 0:75 < M ði; jÞ ≤ 0:875
:
8; 0:875 < M ði; jÞ < 1
After every column has been permutated, the matrix P4 is
where M(i, j) and IT(i, j) denote the elements of M and IT obtained and the permutation process is finished.
located at the ith row and jth column, respectively, and 1 ≤
i ≤ m, 1 ≤ j ≤ 4n. 3.4 DNA level diffusion
Step 4: Group every two elements of matrix P1 from left to
right and from top to bottom, then encode every element ac- In this section, a key DNA matrix is firstly produced by the
cording to the corresponding DNA rule number of matrix IT, chaotic system, and then, it is used to diffuse the permutated
and finally obtain the encoded DNA matrix P2(m × 4n). DNA plain image and upgrade the encryption effect. The de-
From the DNA encoding steps of the original image, we tailed steps can be described as follows:
can see that the dynamical DNA encoding process is achieved Step 1: Compute the parameters r1, r2, z10 , and z20 as de-
and it is highly sensitive to the plain image. Encoding rule scribed in Sect. 3.1, and next, iterate the 1D chaotic system
matrix is generated from the chaotic sequences, different orig-
shown in Eq. (4) with r1 andz10 (1000 + 4mn) times, iterate the
inal image has different encoding rule matrix, and every pixel
1D chaotic system shown in Eq. (5) with r2 and z20 (1000 +
has its own encoding rule. Therefore, the proposed scheme is
4mn) times, discard the former 1000 values to avoid the tran-
highly sensitive with the plain image.
sient effect, and obtain sequences Z1 and Z2.
Step 2: Sequence U is gotten by importing the correspond-
3.3 DNA level permutation ing elements of Z1 and Z2 into Eq. (5), and U = {u1, u2, ⋯ ,
u4mn} is obtained, where ui is its ith element, 1 ≤ i ≤ 4mn.
The DNA level permutation process is composed of row per- Step 3: In order to modify the elements of the plain image,
mutation and column permutation. The detailed steps are as we need a key matrix. Then, U is employed to generate the
follows: DNA key matrix Q by the following equation. Without the
Step 1: In order to save the encryption time and fully utilize DNA encoding process, we can directly obtain the DNA base
the chaotic sequences, the sequences X and Y generated in elements of the key matrix through Eq. (18), which can reduce
Sect. 3.2 are used, X = {x1, x2, ⋯ , xs}, Y = {y1, y2, ⋯ , ys}. the computation complexity of the algorithm and improve the
Step 2: Two matrices X′ and Y′ are gotten through modify- encryption speed.
ing the elements of the X and Y according to the following 8
>
> A; −1 ≤ ui ≤ −0:5
equation: <
T ; −0:5 < ui ≤ 0
( 0 qi ¼ ð18Þ
>
> C; 0 < ui ≤ 0:5
xi ¼ xi 1014 modð4nÞ; i ¼ 1; 2; ⋯; s :
0 ð17Þ G; 0:5 < ui ≤ 1
yi ¼ yi 1014 modm; i ¼ 1; 2; ⋯; s
And here, Q = {q1, q2, ⋯ , q4mn}, qidenotes its ith ele-
And here, xi and yi are the corresponding elements of X and ments, 1 ≤ i ≤ 4mn.
Y, and after finishing Step 2, we may obtain two sequences, Next, transform the Q to a key matrix KK with the size of
0 0 0 0 0 0 0 0
and they are X ¼ x1 ; x2 ; ⋯; xs , Y ¼ y1 ; y2 ; ⋯; ys . m × 4n.
Step 3: Manipulate the row permutation to the ith (1 ≤ i ≤ Step 4: Manipulate DNA XOR operation to the permutated
m) row of the encoded DNA matrix P2(m × 4n) gotten from matrix P4 and key matrix KK through Eq. (19).
Sect. 3.2 by the following rules: 8
< P4ði; jÞ⊕KK ði; jÞ; i ¼ 1; j ¼ 1
0 C ði; jÞ ¼ P4ði; jÞ⊕KK ði; jÞ⊕C ði−1; 4nÞ; 1 < i≤ m; j ¼ 1 ð19Þ
Case 1: Perform left cyclic shift on the ith row xi times with :
P4ði; jÞ⊕KK ði; jÞ⊕C ði; j−1Þ; 1 ≤ i≤m; 1 < j ≤4n
i % 2 ≠ 0.
0
Case 2: Implement right cyclic shift on the ith row xi times where C is the cipher DNA matrix and C(i, j) is its element
with i % 2 = = 0. located at ith row, jth column.
Neural Comput & Applic
6 Security analyses
(a) Plain image of Lena (b) Corresponding cipher image (c) Decrypted image
(d) Plain image of Baboon (e) Corresponding cipher image (f) Decrypted image
(g) Plain image of City (h) Corresponding cipher image (i) Decrypted image
(j) Plain image of Brone (k) Corresponding cipher image (l) Decrypted image
histogram analysis results by our algorithm are illustrated in Fig. 7b, d, f, h. It is clear that the gray value distribution is
Fig. 7. Figure 7a, c, e, g are the histograms of the plain images, fairly uniform and significant from the original images.
and those of the corresponding cipher images are shown in Hence, our algorithm can withstand statistical attack.
Neural Comput & Applic
0 0
0 50 100 150 200 250 0 50 100 150 200 250
2000 1500
1500
1000
1000
500
500
0 0
0 50 100 150 200 250 0 50 100 150 200 250
4000 2000
3000 1500
2000 1000
1000 500
0 0
0 50 100 150 200 250 0 50 100 150 200 250
8000 1500
6000
1000
4000
500
2000
0 0
0 50 100 150 200 250 0 50 100 150 200 250
Furthermore, χ2 test and variances of histograms are used Table 4 Information entropies of the plain and cipher images
to evaluate the uniformity of the pixel-value distribution. The Name Plain Ours Ref. Ref. Ref.
χ2 value and variances of histograms of an image with 256- image [47] [48] [49]
Gy levels can be calculated as follows:
Lena (512 × 512) 7.4456 7.9993 7.9993 7.9993 7.9984
. 2
Satellite 6.7327 7.9998 7.9998 7.9997 7.9986
255 ni −n 256
χ ¼ ∑
2 . ð21Þ (1024 × 1024)
Baboon (512 × 512) 7.3579 7.9994 7.9992 7.9992 7.9984
i¼0 n 256
Cameraman 7.0097 7.9969 7.9969 7.9968 7.9970
1 n n 1 2 (256 × 256)
varðZ Þ ¼ 2 ∑ ∑ zi −z j ð22Þ Barbara (512 × 512) 7.4664 7.9992 7.9991 7.9992 7.9973
n i¼1 j¼1 2
City (512 × 512) 6.7469 7.9993 7.9993 7.9992 7.9981
where ni is the occurrence frequency of gray level i, n/256 is Brone (512 × 512) 5.9399 7.9994 7.9991 7.9992 7.9971
the expected occurrence frequency of each gray level, and n is
the number of all the pixels. Here, in Eq. (22), Z = {z1, z2, ⋯ ,
z256} is the vector of the histogram values, and zi and zj are the
6.2 Information entropy
numbers of pixels which gray values are equal to i and j,
respectively.
6.2.1 Information entropy
The quantitatively results for different images are listed in
Table 3. When the significant level is 0.05, the corresponding
Information entropy is an important parameter to describe the
χ2(0.05, 255) is 293.25 [44]. The lower the variance is, the
degree of disorder of a system. It has been applied in many
higher the uniformity of the image is [45]. From the table, we
fields, such as lossless data compression, statistical inference,
can come to two conclusions: firstly, the χ2 results of the
cryptography, and machine learning. In general, the more un-
cipher images are less than 293.25, which means that the
certain or random the information source is, the more infor-
proposed algorithm has passed the χ2 test and it has enough
mation entropy that it will contain. So, it is very useful for
high security level; secondly, the variances of the cipher im-
analyzing the randomness of an encryption algorithm.
ages are lesser than those of the plain images, especially for
Information entropy can be calculated by the following
Brone (512 × 512); the variance of the plain image is about
equation:
2.8 × 107, whereas that of the cipher image decreases to
around 8.8 × 102, there has a large decrease, and these indicate 2n −1 1
H ðmÞ ¼ ∑ pðmi Þlog ð23Þ
that the histogram distributions of the cipher images are uni- i¼0 pðmi Þ
formly distributed, and our algorithm is highly secure.
where p(mi) denotes the probability of symbol mi. For a ran-
dom image with 256-Gy levels, the entropy should ideally be
8 [46]. If the entropy of the cipher image is less than 8, there is
Table 3 Quantitative results of histograms of the plain and cipher a possibility of predictability, and this is a threat to the algo-
images
rithm security.
Images χ2 Variance We test the information entropy of seven different
images, and the results are listed in Table 4. Note that
Lena (512 × 512) Plain image 158,020 632,100
Cipher image 262.83 1051.4
Satellite (1024 × 1024) Plain image 1,993,300 31,893,000 Table 5 Local entropies for different images
Cipher image 250.50 4008.1
Baboon (512 × 512) Plain image 187,600 750,400 Images Local entropies
Cipher image 234.07 936.28
Plain image Cipher image
Cameraman (256 × 256) Plain image 110,970 110,970
Cipher image 276.78 276.78 Lena (512 × 512) 5.9610 7.9007
Barbara (512 × 512) Plain image 144,100 576,400 Satellite (1024 × 1024) 5.8728 7.9013
Cipher image 281.64 1126.6 Baboon (512 × 512) 6.9749 7.9015
City (512 × 512) Plain image 814,340 3,257,400 Black (512 × 512) 0 7.9005
Cipher image 260.94 1043.8 White (512 × 512) 0 7.9021
Brone (512 × 512) Plain image 7,164,500 28,658,000 City (512 × 512) 6.9810 7.9042
Cipher image 221.07 884.29 Brone (512 × 512) 3.9364 7.9015
Neural Comput & Applic
the results are very close to the theoretical value 8, 6.2.2 Local Shannon entropy
which demonstrates that the cipher images are almost
close to random sources and the information leakage Local Shannon entropy [50] is also used to test the local random-
in the encryption process is negligible. Compared with ness of the plain image and the cipher image. The (k, TB)-local
three encryption algorithms, it can be found that the Shannon entropy may be defined using the following method:
results gotten from our proposed algorithm are the same
with those in ref. [47, 48] and closer to the theoretical Step 1: Randomly choose non-overlapping image blocks S1,
value of 8 than the algorithm in ref. [49], so our algo- S2,…, Sk with TB pixels for a test image S with L
rithm has a better property of information entropy. intensity scales.
0 0
0 100 200 0 100 200
pixel gray value on location(x,y) pixel gray value on location(x,y)
(a) Horizontal direction in plain image (b) Horizontal direction in cipher image
pixel gray value on location(x,y+1)
200 200
150 150
100 100
50 50
0 0
0 100 200 0 100 200
pixel gray value on location(x,y) pixel gray value on location(x,y)
(c) Vertical direction in plain image (d) Vertical direction in cipher image
pixel gray value on location(x+1,y+1)
pixel gray value on location(x+1,y+1)
250 250
200 200
150 150
100 100
50 50
0 0
0 100 200 0 100 200
pixel gray value on location(x,y) pixel gray value on location(x,y)
(e) Diagonal direction in plain image (f) Diagonal direction in cipher image
Neural Comput & Applic
Step 2: For all image blocks, calculate Shannon entropy image, and E(x) and D(x) are the expectation and variance of
H(Si) via Eq. (23). variable x, respectively.
Step 3: Compute the mean of Shannon entropy over these k For the plain image Lena (512 × 512), we draw the distri-
image blocks S1, S2,…, Sk as local Shannon entropy bution diagram of two horizontally, vertically, and diagonally
according to the following equation: adjacent pixels of the plain image and the cipher image in
Fig. 8. From the figure, we can see that there is a strong
k H ðS i Þ correlation among adjacent pixels in the plain image,
H k;T B ðmÞ ¼ ∑ ð24Þ
i¼1 k the correlation coefficients are close to 1, whereas the
pixels of the cipher image are scattered over the com-
In the experiment, we choose k = 32 and TB = 1936 for the test plete plane and the strong correlations of adjacent pixels
images with L = 256, and the test results are shown in Table 5. in the original image have been reduced by the pro-
The results indicate that the local Shannon entropies of the cipher posed encryption scheme.
images are greater than 7.90, and the cipher images generated by Next, the correlation coefficients of two horizontally adja-
our encryption scheme have good local randomness. cent pixels, vertically adjacent pixels, and diagonally adjacent
pixels for seven different plain and cipher images have been
6.3 Correlation analysis given in Table 6. In Table 6, the correlation coefficients of
the cipher images are less than 0.03 and much smaller
We randomly choose 5000 pairs of pixels in horizontal, verti- than that of the original images, so the proposed algo-
cal, and diagonal directions from the plain image and cipher rithm successfully eliminates the correlation between ad-
image and calculate the correlation coefficients according to jacent pixels in the plain image, and it can withstand
the following equations: the statistical attack.
Size 512 × 512 256 × 256 512 × 512 512 × 512 512 × 512 512 × 512 1024 × 1024
NPCR 99.58% 99.61% 99.63% 99.61% 99.60% 99.62% 99.63%
UACI 33.43% 33.46% 33.41% 33.43% 33.42% 33.43% 33.48%
Neural Comput & Applic
0
0 50 100 150 200 250
(a) All white (b) The cipher image of all white (c) Histogram of the cipher image
2500
2000
1500
1000
500
0
0 50 100 150 200 250
(d) All black (e) The cipher image of all black (f) Histogram of the cipher image
For two gray cipher images, the NPCR and UACI can be 6.5 Known-plaintext and chosen-plaintext attack analyses
obtained by the following:
There are four classical types of attacks, ciphertext-only attack,
∑ Dði; jÞ
i; j known-plaintext attack, chosen-plaintext attack, and chosen-
NPCR ¼ 100% ð28Þ ciphertext attack. Among them, known-plaintext and chosen-
W H
2 3 plaintext attacks are the more powerful attacks, and if a crypto-
1 C 1 ði; jÞ−C 2 i; j system can resist these two attacks, it can withstand other attacks.
UACI ¼ 4∑ 5 100% ð29Þ
W H i; j 255 In the paper, we employ 2D-LASM and a new 1D chaotic
system, and their initial values and system parameters are
computed by the SHA 256 hash value of the plain image.
where D(i, j) is defined as
2D-LASM is used in the DNA encoding steps and permuta-
1; C 1 ði; jÞ≠C 2 ði; jÞ tion process of the plain image, and 1D chaotic system is
Dði; jÞ ¼ ð30Þ
0; otherwise employed in the confusion process; thus, our encryption algo-
rithm depends on the plain image, and it can resist known-
where W and H denote the width and height of the plaintext and chosen-plaintext attacks.
image and C1 and C2 are, respectively, the cipher im- In real attack atmosphere, the opponent usually utilizes all
ages before and after one pixel of the original image is black or white images as special original images to attack the
changed. The expected NPCR and UACI values for a encryption algorithms, for the special images can make the
256-Gy scale image are 99.6094 and 33.4635% [51],
respectively. The closer the NPCR and UACI are, the
Table 8 The entropies and correlation coefficients of the plain and
more effective the cryptosystem in resisting differential cipher images of all white and all black
attack is.
Seven different images are used as the test images, Images Entropies Correlation coefficients
we get the other images by randomly changing one
Horizontal Vertical Diagonal
pixel, and the results are shown in Table 7. From
Table 7, it is obvious that high efficiency may be ob- All white 0 – – –
tained by having NPCR >99.5% and UACI >33.4% Cipher of white 7.9993 0.0795 0.0025 0.0032
through changing one pixel value in the plain images, All black 0 – – –
and the proposed scheme is secure enough to effectively Cipher of black 7.9992 −0.0106 −0.0037 −0.0132
resist against differential attack.
Neural Comput & Applic
(m) (n)
Neural Comput & Applic
Table 9 NPCR and UACI of the proposed algorithm when encryption key (EK) is changed
EK μ0 + 10−14 0 0 0 0 1 0 2 0
x0 þ 10−14 y0 þ 10−14 r1 þ 10−14 r2 þ 10−14 z0 þ 10−14 z0 þ 10−14
permutation process invalid, and they may get the secret keys proposed method has a sufficiently large key space to resist
and make the algorithm invalid. We have made simulation the brute-force attacks.
experiments on all white and black, and the results are shown
in Fig. 9 and Table 8. As can be seen from the figure and table, 6.7 Key sensitivity
the cipher images are something like noise, no useful infor-
mation can be found from them, the histogram distributions Key sensitivity includes encryption key (EK) sensitivity and
are fairly uniform, the entropy values of the cipher images are decryption key (DK) sensitivity. For a good encryption
closer to 8, correlation coefficients of the cipher images are scheme, in the encryption process, when the EK has a trivial
less than 0.08, and all these results mean that the proposed change, the corresponding encrypted image should have a
algorithm can effectively encrypt all white and black images complete difference, and the recovered image is different from
and withstand known-plaintext and chosen-plaintext attacks the plain image with slightly changed DK.
0 0 0 0
effectively. In the paper, the secret keys consist of μ0, x0 , y0 , r1 , r2 , z10
0 0
, and z20 . The 512 × 512 Lena image (shown in Fig. 6a) is
6.6 Key space used as the test image, the cipher image is Fig. 6b with the
right EK, and the recovered image is Fig. 6c with the right
A good image encryption algorithm has a large key space to DK. Next, we test the key sensitivity in the encryption and
make brute-force attack ineffective. In the proposed scheme, decryption process.
the keys are the initial given parameters and values of the 2D-
0 0
LASM and the 1D chaotic system, and they are μ0, x0 , and y0 6.7.1 Encryption process
0 0 1 0 2 0
and r1 , r2 , z0 , and z0 . If the computational precision of
0 0 0 0 0 0
the computer is about 10−14, the key space of the initial given First, we modify one of μ0, x0 , y0 , r1 , r2 , z10 , and z20 with
parameters is 1098, which is larger than 2100 [52], so the 10−14 and others are the same, and the corresponding cipher
(d) (e)
Neural Comput & Applic
Table 10 Difference between decrypted images and plain image with changed decryption key (DK)
DK μ0 + 10−14 0 0 0 0
x0 þ 10−14 y0 þ 10−14 r1 þ 10−14 r2 þ 10−14
images and their differences with the Fig. 6b are illustrated in from the table that our algorithm is best than those in refs. [53]
Fig. 10 and Table 9. From the figure and the table, it is clear and [54] as for histogram and information entropy and has the
that when the EK has a trivial change, the encrypted images competitive performance compared with the encryption
have a complete change, and more than 99% pixels are mod- schemes in refs. [47–49, 55, 56].
ified compared with Fig. 6b, which means that the encryption Next, we compare the security performance of the pro-
process is quite sensitive to the EK. posed algorithm with two encryption schemes based on
DNA computing and chaotic systems. Liu et al. [31] presented
an image encryption algorithm, and DNA algebraic opera-
6.7.2 Decryption process
tions, DNA binary encoding rules, and chaotic sequences
0 0 0 0 from one-dimensional Logistic map are utilized in
In this section, we use one of μ0, x0 , y0 , r1 , and r2 with 10−14
permutation-diffusion encryption architecture. Wang et al.
change and others are the same to decrypt the cipher image
[30] introduced a novel image encryption scheme based on
shown in Fig. 6b, the recovered images are illustrated in
DNA sequence operations and CML, and diffusion-
Fig. 11, the images are something like noise, we cannot find
permutation-diffusion encryption process was adopted; firstly,
any useful information from them, and the differences with the
bitwise exclusive OR operation was performed on the plain
plain image(Fig. 6a) are more than 99% listed in Table 10.
image and chaotic sequences generated from the CML, then
From the previous key sensitivity results, we can watch that
the diffused images are transformed to a DNA matrix by a
the decryption process is also highly sensitive to the DK.
kind of DNA encoding rule, next the DNA matrix was
Based on the key sensitivity analyses in the encryption
permutated and diffused, and finally, the cipher image was
process and decryption process, we can conclude that the pro-
obtained using a kind of DNA decoding rule.
posed encryption algorithm is quite sensitive to the secret key
We compare our algorithm with them from the view of
and may resist the differential attack.
security, and the results are listed in Table 12. From the table,
it is clear that the proposed algorithm has the largest key space,
6.8 Comparison with existing schemes high sensitivity to the secret key and plain image, dependence
on the plain image, uniform histogram, near-zero correlation,
In this section, we firstly compare the proposed algorithm with and close to 8 information entropy, and the DNA encoding
several existing chaos-based encryption scheme and give and decoding rules are dependent on the original image.
some quantitative results. Lena (512 × 512) is used as the test However, the algorithm in ref. [31] is not sensitive to the secret
image; we encrypt it using different algorithms and compute key and plain image, the encryption process has no relation-
the histograms and the information entropies and the correla- ship with the original image, DNA encoding/decoding rules
tion coefficients of two adjacent pixels in the cipher images. have no dependence on the plain image, and it has been bro-
The comparison results are listed in Table 11. It can be seen ken with only one known plaintext [33]. As for the encryption
Table 11 Quantitative
comparison results with other Algorithms Histogram Entropy Local entropy Correlation coefficients
algorithms
χ2 Variance Horizontal Vertical Diagonal
Compliance with ethical standards 20. Ozkaynak F, Ozer AB (2016) Cryptanalysis of a new image en-
cryption algorithm based on chaos. Optik 127:5190–5192
Conflict of interest The authors declare that they have no conflict of 21. Li CQ (2016) Cracking a hierarchical chaotic image encryption
interest. algorithm based on permutation. Signal Process 118:203–210
22. Eric Xie Y, Li CQ, Yu SM, Lü JH (2017) On the cryptanalysis of
Fridrich’s chaotic image encryption scheme. Signal Process 132:
150–154
References 23. Bechikh R, Hermassi H, Abd EI-Latif AA, Rhouma R, Belghith S
(2015) Breaking an image encryption scheme based on spatiotem-
1. Zhou YC, Hua ZY, Pun CM, Philip Chen CL (2015) Cascade cha- poral chaotic system. Signal Process: Image 39:151–158
otic system with applications. IEEE T Cybernetics 45(9):2001– 24. Li CQ, Liu YS, Xie T, Michael Chen ZQ (2013) Breaking a novel
2012 image encryption scheme based on improved hyperchaotic se-
2. Chen JX, Zhu ZL, Fu C, Zhang LB, Zhang YS (2015) An efficient quences. Nonlinear Dyn 73:2083–2089
image encryption scheme using lookup table-based confusion and 25. Celland CT, Risca V, Bancroft C (1999) Hiding messages in DNA
diffusion. Nonlinear Dyn 81:1151–1166 microdots. Nature 399:533–534
3. Wen W Y, Zhang Y S, Fang Y M, Fang Z J 2016. Image salient 26. Enayatifar R, Sadaei HJ, Abdullah AH, Lee M, Isnin IF (2015) A
regions encryption for generating visually meaningful ciphertext novel chaotic based image encryption using a hybrid model of
image. Neural Comput & Applic; Doi: 10.1007/s00521–016– deoxyribonucleic acid and cellular automata. Opt Laser Eng 71:
2490-6 33–41
4. Wu XJ, Wang DW, Kurths J, Kan HB (2016) A novel lossless color 27. Babaei M (2013) A novel text and image encryption method based
image encryption scheme using 2D DWT and 6D hyperchaotic on chaos theory and DNA computing. Nat Comput 12:101–107
system. Inf Sci 349-350:137–153 28. Zhang Q, Guo L, Wei X (2013) A novel image fusion encryption
algorithm based on DNA sequence operation and hyper-chaotic
5. Tong XJ, Wang Z, Zhang M, Liu Y, Xu H, Ma J (2015) An image
system. Optik 124:3596–3600
encryption algorithm based on the perturbed high-dimensional cha-
otic map. Nonlinear Dyn 80:1493–1508 29. Guesmi R, Farah MAB, Kachouri A, Samet M (2016) A novel
chaos-based image encryption using DNA sequence operation
6. Assad SEI, Farajallah M (2016) A new chaos-based image encryp-
and secure hash algorithm SHA-2. Nonlinear Dyn 83:1123–1136
tion system. Signal Process: Image 41:144–157
30. Wang XY, Zhang YQ, Bao XM (2015) A novel chaotic image
7. Zhang YQ, Wang XY (2015) A new image encryption algorithm
encryption scheme using DNA sequence operations. Opt Lasers
based on non-adjacent coupled map lattices. Appl Soft Comput 26:
Eng 73:53–61
10–20
31. Liu L, Zhang Q, Wei X (2012) A RGB image encryption algorithm
8. Diaconu A-V (2015) Circular inter-intra pixels bit-level permuta-
based on DNA encoding and chaos map. Comput Electr Eng 38:
tion and chaos-based image encryption. Inf Sci 3:1–14
1240–1248
9. Hsiao H-I, Lee J (2015) Color image encryption using chaotic non- 32. Ozkaynak F, Ozer A, Yavuz S 2013. Security analysis of an image
linear adaptive filter. Signal Process 117:281–309 encryption algorithm based on chaos and DNA encoding. In: Signal
10. Xu L, Li Z, Li J, Hua W (2016) A novel bit-level image encryption processing and communications applications conference (SIU),
algorithm based on chaotic maps. Opt Laser Eng 78:17–25 pp.1–4
11. Zhou NR, Pan SM, Chen S, Zhou ZH (2016) Image compression- 33. Liu Y, Tang J, Xie T (2014) Cryptanalyzing a RGB image encryp-
encryption based on hyper-chaotic system and 2D compressive tion algorithm based on DNA encoding and chaos map. Opt Lasers
sensing. Opt Laser Technol 82:121–133 Eng 60:111–115
12. Ye GD, Huang XL (2016) A secure image encryption algorithm 34. Hermassi H, Belazi A, Rhouma R, Belghith SM (2014) Security
based on chaotic maps and SHA-3. Secur Commun Netw 9:2015– analysis of an image encryption algorithm based on a DNA addition
2023 combining with chaotic maps. Multimed Tools Appl 72:2211–2224
13. Chai XL, Gan ZH, Chen YR, Zhang YS (2017) A visually secure 35. Zhang Q, Guo L, Wei X 2010. Image encryption using DNA addi-
image encryption scheme based on compressive sensing. Signal tion combining with chaotic maps. Math Comput Model. (11–12):
Process 134:35–51 2028–2035
14. Chai XL, Gan ZH, Yang K, Chen YR, Liu XX (2017) An image 36. Huang X, Ye G (2014) An image encryption algorithm based on
encryption algorithm based on the memristive hyperchaotic system, hyper-chaos and DNA sequence. Multimed Tools Appl 72:57–70
cellular automata and DNA sequence operations. Signal Process: 37. Zhang Q, Guo L, Wei XP (2010) Image encryption using DNA
Image 52:6–19 addition combining with chaotic maps. Math Comput Model 52:
15. Özkaynak F, Yavuz S (2014) Analysis and improvement of a novel 2028–2035
image fusion encryption algorithm based on DNA sequence oper- 38. Zhang YQ, Wang XY, Liu J, Chi ZL (2016) An image encryption
ation and hyper-chaotic system. Nonlinear Dyn 78(2):1311–1320 scheme based on the MLNCML system using DNA sequences. Opt
16. Li CQ, Lo KT (2011) Optimal quantitative cryptanalysis of Lasers Eng 82:95–103
permutation-only multimedia ciphers against plaintext attacks. 39. Zhang Q, Liu L, Wei X (2014) Improved algorithm for image en-
Signal Process 91(4):949–954 cryption based on DNA encoding and multi-chaotic maps. AEU-Int
17. Solak E, Cokal C, Yildiz OT, Biyikiglu T (2010) Cryptanalysis of J Electron C 68:186–192
Fridrich’s chaotic image encryption. Int J Bifurc Chaos 20:1405– 40. Liu H, Wang X, Abdurahman K (2012) Image encryption using
1413 DNA complementary rule and chaotic maps. Appl Soft Comput
18. Zhang Y, Li C, Li Q, Zhang D, Shu S (2012) Breaking a chaotic 12:1457–1466
image encryption algorithm based on perceptron model. Nonlinear 41. Hua ZY, Zhou YC (2016) Image encryption using 2D Logistic-
Dyn 69:1091–1096 adjusted-Sine map. Inf Sci 339:237–253
19. Li C, Zhang Y, Ou R, Wong KW (2012) Breaking a novel colour 42. Dascalescu A-C, Boriga RE, Diaconu A-V (2013) Study of a new
image encryption algorithm based on chaos. Nonlinear Dyn 70: chaotic dynamical system and its usage in a novel pseudorandom
2383–2388 bit generator. Math Probl Eng 2013:769108
Neural Comput & Applic
43. Watson JD, Crick FHC (1953) A structure for deoxyribose nucleic 50. Wu Y, Zhou YC, George S, Sos A, Noonan Joseph P, Premkumar N
acid. Nature 171(4356):737–738 (2013) Local Shannon entropy measure with statistical tests for
44. Zhang XP, Zhao ZM, Wang JY (2014) Chaotic image encryption image randomness. Inf Sci 222:323–342
based on circular substitution box and key stream buffer. Signal 51. Zhu C (2012) A novel image encryption scheme based on improved
Process: Image 29:902–913 hyper-chaotic sequences. Opt Commun 285(1):29–37
45. Zhang YQ, Wang XY (2014) A symmetric image encryption algo- 52. Àlvarez G, Li S (2006) Some basic cryptographic requirements for
rithm based on mixed linear- nonlinear coupled map lattice. Inf Sci chaos-based cryptosystems. Int J Bifur Chaos 16(8):2129–2151
273:329–351 53. Fouda JAE, Effa JY, Sabat M (2014) Ali. A fast chaotic block
46. Mirzaei O, Yaghoobi M, Irani H (2012) A new image encryption cipher for image encryption. Commun Nonlinear Sci Numer
method: parallel sub-image encryption with hyper chaos. Nonlinear Simul 19(3):578–588
Dyn 67:557–566 54. Zhang X, Zhao Z (2014) Chaos-based image encryption with total
47. Ye GD (2014) A block image encryption algorithm based on wave shuffling and bidirectional diffusion. Nonlinear Dyn 75(1–2):319–330
transmission and chaotic systems. Nonlinear Dyn 75:417–427 55. Chai X L, Yang K, Gan Z H 2016. A new chaos-based image
48. Wang XY, Xu DH (2014) A novel image encryption scheme based encryption algorithm with dynamic key selection mechanisms.
on Brownian motion and PWLCM chaotic system. Nonlinear Dyn Multimed Tools Appl doi: 10.1007/s11042–016-3585-x
75(1–2):345–353 56. Chai XL (2017) An image encryption algorithm based on bit level
49. Zhou YC, Cao WJ, Philip CCL (2014) Image encryption using Brownian motion and new chaotic systems. Multimed Tools Appl
binary bitplane. Signal Process 100:197–207 76:1159–1175