# Image Encryption Algorithm Based on Dynamic DNA Coding and Chen’s Hyperchaotic System

Authors: Jian Zhang; Dezhi Hou; Honge Ren
Journal: Mathematical Problems in Engineering
 (2016)

---

## Abstract

With the development of national information processes, specific image information from secret departments or individuals is often required to be confidentially transmitted. Numerous image encryption methods exist, especially since the initial value sensitivity and other characteristics of chaos theory and chaos theory-based encryption have become increasingly important in recent years. At present, DNA coding constitutes a new research direction of image encryption that uses the four base pairs of DNA code and image pixel values to establish a special correspondence, in order to achieve pixel diffusion. There are eight DNA encoding rules, and current methods of selecting the DNA encoding rules are largely fixed. Thus, the security of encoded data is not high. In this paper, we use the Lorenz chaotic system, Chen’s hyperchaotic system, and the DNA encoding combination and present a new image encryption algorithm that can dynamically select eight types of DNA encoding rules and eight types of DNA addition and subtraction rules, with significant improvements in security. Through simulation experiments and histograms, correlations, and NPCR analyses, we have determined that the algorithm possesses numerous desirable features, including good encryption effects and antishear and antinoise performances.


---

## Body

## 1. Introduction

With the development of national information processes, people have paid increasing attention to secure transmission of image information. The traditional classical encryption algorithms primarily include the DES, IDEA, and RSA algorithms [1–3]. However, compared to text files, image files contain a larger amount of data, so the traditional encryption algorithms are not suitable for image encryption. While some image encryption techniques have emerged, based on mathematical transformations, nevertheless, their security is inadequate.Chaotic encryption technology has been used as the mainstream of encryption technology in recent years [4], but the use of chaotic technology only is not safe enough [5–7]. In recent years, image encryption technology based on DNA computing has been extensively used by scholars, but work is still at the initial stages of research. At present, most of the image encryption algorithms that are based on DNA coding adopt relatively fixed coding methods, and security is not high. In this paper, DNA coding and chaotic encryption technology are combined, and a dynamic DNA coding image encryption algorithm is proposed that can improve the security of the encryption process. Based on simulation experiments, the algorithm has been shown to exhibit good encryption effects and can effectively resist statistical, shear, and other attacks.


## 2. Dynamic DNA Coding and Chaotic Mapping

### 2.1. DNA Coding

A DNA sequence consists of four different basic nucleotides, namely, A, T, C, and G [8], whereby pairing is allowed only between A and T and C and G. Additionally, each pixel point in a grayscale image can be represented by an 8-bit binary number, taking the values of 0 and 1. The binary value pair also constitutes a complementary relationship pair. Since 00 and 11 and 01 and 10 are also complementary, the DNA bases A, C, G, and T can be encoded using the digit pairs 00, 01, 10, and 11. Thus, 24 types of this coding scheme can be obtained, but the program must satisfy the pairing rules, in that A bases must be paired with T and C must be paired with G, so only eight types of programs are effective. These are shown in Table 1. For example, if the grayscale value of a pixel in an image is equal to 147, it can be converted to the binary value “10010011.” If the first rule in Table 1 is selected, the 8-bit binary number can be expressed as “GCAT.” Furthermore, if the fourth rule is chosen, then the 8-bit of the binary number can be expressed as “ATCG.”Table 1
DNA coding rules.
1
2
3
4
5
6
7
8
00-A
00-A
00-C
00-C
00-G
00-G
00-T
00-T
01-C
01-G
01-A
01-T
01-A
01-T
01-C
01-G
10-G
10-C
10-T
10-A
10-T
10-A
10-G
10-C
11-T
11-T
11-G
11-G
11-C
11-C
11-A
11-AWith the development of DNA computing, some researchers have proposed algorithms based on DNA sequences for the operations of addition and subtraction, based on the basic principles of binary addition and subtraction [9, 10]. Thus, this corresponds to eight different types of DNA encoding schemes, whereby there are eight types of DNA addition operations and eight types of DNA subtraction. In this paper, we use the coding rules 1 and 4, for example, to obtain the addition operation rules and the subtraction operation rules, as shown in Tables 2–5.Table 2
The addition operation of DNA sequence based on rule 1.
A
C
G
T
A
A
C
G
T
C
C
G
T
A
G
G
T
A
C
T
T
A
C
GTable 3
The subtraction operation of DNA sequence based on rule 1.
A
C
G
T
A
A
T
G
C
C
C
A
T
G
G
G
C
A
T
T
T
G
C
ATable 4
The addition operation of DNA sequence based on rule 4.
A
C
G
T
A
C
A
T
G
C
A
C
G
T
G
T
G
A
C
T
G
T
C
ATable 5
The subtraction operation of DNA sequence based on rule 4.
A
C
G
T
A
C
A
G
T
C
A
C
T
G
G
T
G
C
A
T
G
T
A
C


### 2.2. Dynamic DNA Coding

Most algorithms only choose fixed DNA encoding rules to encode, and only a maximum of eight experiments can break it. In this paper, the DNA encoding rules are dynamically selected according to generated chaotic sequences. For example, a pixel value can correspond to any of the four digital values and can be converted to a binary value. Every two binary bits of this value can then use a random encoding mode, which makes the key space larger, more difficult to decipher, and with a higher image encryption security. For example, if the value of the pixel point is still 147, the value of its corresponding chaotic sequence is [1, 3, 5, 7], and then the result of the DNA encoding is “GCGG.”Based on the principle of base complementation, the nucleotidex
i in the nucleotide sequence of DNA encoding is as follows [11]:(1)
x
i
≠
L
x
i
≠
L
L
x
i
≠
L
L
L
x
i
,
x
i
=
L
L
L
L
x
i
.In (1), x
i and L
x
i are complementary. According to (1), there are six types of base pairs that meet the requirements of the combination, as shown below:(AT)(TC)(CG)(GA).
(AT)(TG)(GC)(CA).
(AC)(CT)(TG)(GA).
(AC)(CG)(GT)(TA).
(AG)(GT)(TC)(CA).
(AG)(GC)(CT)(TA).During pixel diffusion, one of the six complementary rules will be selected, the complementary DNA sequences will replace operations, and the number of complementary alternative steps will be dynamically selected based on the value of the chaotic sequence, in order to achieve pixel proliferation.


### 2.3. Lorenz Chaotic System

The mathematical expression of the Lorenz chaotic system is [12](2)
x
′
=
a
y
-
x
,
y
′
=
c
x
-
x
z
-
y
,
z
′
=
x
y
-
b
z
.When a
=
10, b
=
8
/
3, and c
=
28, the Lorenz system is in a chaotic state. In this paper, the Lorenz chaotic system is used to scramble the pixel position, as well as achieve the dynamic selection of the DNA addition and subtraction rules. Correspondingly, the main operation is as follows:(
1
) The use of the Lorenz chaotic system generates three pseudo-random sequences whose lengths are M
×
2
,
N
,
M
×
N
×
4
:
a
=
a
1
,
a
2
,
…
,
a
M
×
2, b
=
b
1
,
b
2
,
…
,
b
N, and c
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4. Herein, M is the number of lines of the original image matrix, and N is the number of the original image matrix columns.(
2
) The random sequences a
=
a
1
,
a
2
,
…
,
a
M
×
2, b
=
b
1
,
b
2
,
…
,
b
N, and c
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4 are used in accordance with the following operation:(3)
a
i
=
mod
⁡
f
i
x
a
i
×
1
0
3
,
256
+
1
,
i
=
1,2
,
…
,
M
×
2
,
b
i
=
mod
⁡
f
i
x
b
i
×
1
0
3
,
256
+
1
,
i
=
1,2
,
…
,
N
,
c
i
=
mod
⁡
f
i
x
c
i
×
1
0
3
,
8
+
1
,
i
=
1,2
,
…
,
M
×
N
×
4
.In these expressions, fix is the rounding operation. The sequences a
=
a
1
,
a
2
,
…
,
a
M
×
2 and b
=
b
1
,
b
2
,
…
,
b
N are multiplied by 1000 and the results are rounded. After calculation of the remainder, following a division with respect to 256, it is added to unity. The random number in the random sequence can then be changed to any number within the range of [1–256]. The sequence c
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4 is multiplied by 1000 and the results are rounded. After the remainder is calculated, following division by 256, it is then added to unity. The random number in the random sequence can then be changed to any number within the range of [1–8].(
3
) By using the first M numbers in the sequence a
=
a
1
,
a
2
,
…
,
a
M
×
2, each line of the image is transformed in accordance with(4)
A
1,1
A
1,2
⋯
A
1
,
j
⋯
A
1
,
n
A
2,1
A
2,2
⋯
A
2
,
j
⋯
A
2
,
n
⋮
A
i
,
j
⋮
A
m
,
1
A
m
,
2
⋯
A
m
,
j
⋯
A
m
,
n
⟹
A
1
,
n
-
a
1
A
1
,
n
-
a
1
+
1
⋯
A
1
,
n
A
1,1
⋯
A
1
,
n
-
a
1
-
1
A
2
,
n
-
a
2
A
2
,
n
-
a
2
+
1
⋯
A
2
,
n
A
1,1
⋯
A
2
,
n
-
a
2
-
1
⋮
A
i
,
j
⋮
A
m
,
n
-
a
M
A
m
,
n
-
a
M
+
1
⋯
A
m
,
n
A
m
,
1
⋯
A
m
,
n
-
a
M
-
1
.Among the matrix entries, A
i
,
j, represents the i
t
h row and j
t
h column in image A. For example, if a
1
=
50, then the elements of the first row in the image have to be right-shifted by 50.(
4
) By using each number in the sequence b
=
b
1
,
b
2
,
…
,
b
N, each column of the image is transformed in accordance with(5)
A
1
,
n
-
a
1
A
1
,
n
-
a
1
+
1
⋯
A
1
,
n
A
1,1
⋯
A
1
,
n
-
a
1
-
1
A
2
,
n
-
a
2
A
2
,
n
-
a
2
+
1
⋯
A
2
,
n
A
1,1
⋯
A
2
,
n
-
a
2
-
1
⋮
A
i
,
j
⋮
A
m
,
n
-
a
M
A
m
,
n
-
a
M
+
1
⋯
A
m
,
n
A
m
,
1
⋯
A
m
,
n
-
a
M
-
1
⟹
A
m
-
b
1
,
n
-
a
1
A
m
-
b
2
,
n
-
a
1
+
1
⋯
A
m
-
b
a
1
,
n
A
m
-
b
a
1
+
1,1
⋯
A
m
-
b
N
,
n
-
a
1
-
1
⋮
A
m
,
n
-
a
2
A
m
,
n
-
a
2
+
1
⋯
A
m
,
n
A
m
,
1
⋯
A
m
,
n
-
a
2
-
1
⋮
A
i
,
j
⋮
A
m
-
b
1
-
1
,
n
-
a
M
A
m
-
b
2
-
1
,
n
-
a
M
+
1
⋯
A
m
-
b
a
1
-
1
,
n
A
m
-
b
a
1
,
1
⋯
A
m
-
b
N
-
1
,
n
-
a
M
-
1
.For example, if b
1
=
90, then each of the elements of the first column in the image is downward shifted by 90.(
5
) By using the last M numbers in the sequence a
=
a
1
,
a
2
,
…
,
a
M
×
2, each line of the image is transformed. The methodology and step (
3
) remain the same and can be used to complete (4).The scrambling idea introduced in this article is advanced and includes a line shift conversion, a column shift conversion, and a line shift transformation. If only two ranks of shifting are applied, this may cause some adjacent pixels in a line or column of the original image to remain adjacent in the encrypted image. Transformation can ensure full dispersion of the scrambled image.The sequencec
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4 that will be generated by the Lorenz chaotic system that will be used to dynamically select the DNA addition and subtraction rules in the encryption step will be described in detail.When decrypting, only the rows and columns corresponding to the left- and upward-shift operations will be used.


### 2.4. Chen’s Hyperchaotic System

Chen’s hyperchaotic system [13] is defined as follows:(6)
x
′
=
a
y
-
x
,
y
′
=
-
x
z
+
d
x
+
c
y
-
q
,
z
′
=
x
y
-
b
z
,
q
′
=
x
+
k
.In these equations, a, b, c, d, and k are the system parameters. When a
=
36, b
=
3, c
=
28, d
=
16, and -
0.7
≤
k
≤
0.7, Chen’s hyperchaotic system is in a chaotic state and can generate four chaotic sequences; namely, A
=
a
1
,
a
2
,
…
,
a
M
×
N
×
8, B
=
b
1
,
b
2
,
…
,
b
M
×
N
×
8, C
=
c
1
,
c
2
,
…
,
c
M
×
N
×
8, and D
=
d
1
,
d
2
,
…
,
d
M
×
N
×
8. In this paper, we mainly use the chaotic system to spread the image pixel value.Four pseudo-random sequences generated by Chen’s super chaotic system are performed as follows:(7)
A
=
mod
⁡
f
i
x
a
b
s
A
-
f
i
x
a
b
s
A
×
1
0
10
,
8
+
1
,
B
=
mod
⁡
f
i
x
a
b
s
B
-
f
i
x
a
b
s
B
×
1
0
10
,
8
+
1
,
C
=
mod
⁡
f
i
x
a
b
s
C
-
f
i
x
a
b
s
C
×
1
0
10
,
10
+
1
,
C
=
0
C
<
5
,
1
C
>
5
,
D
=
mod
⁡
f
i
x
a
b
s
D
-
f
i
x
a
b
s
D
×
1
0
10
,
4
,where the operation abs is used to obtain the absolute value, fix is used to obtain an integer outcome, and the expressions C
=
0
,
C
<
5
;
C
=
1
,
C
>
5 mean that if the value of the sequence C is less than 5, it will be changed to 0; otherwise it will become 1. The absolute value of each sequence is applied, and the fractional part is taken and then multiplied by 1010 times, and the remainder is then estimated. Based on these operations, the contents of the sequences A
=
a
1
,
a
2
,
…
,
a
M
×
N
×
8 and B
=
b
1
,
b
2
,
…
,
b
M
×
N
×
8 are transformed into random numbers within the range [1–8]. According to the value of the sequence, the corresponding DNA encoding rules are dynamically selected. The contents of the sequence C
=
c
1
,
c
2
,
…
,
c
M
×
N
×
8 are transformed into random values that are equal to either 0 or 1 and are used to generate the natural DNA matrix. The contents of the sequence D
=
d
1
,
d
2
,
…
,
d
M
×
N
×
8 are transformed into random numbers within the range of [0–3] and are used to dynamically select DNA complementary steps.


## 2.1. DNA Coding

A DNA sequence consists of four different basic nucleotides, namely, A, T, C, and G [8], whereby pairing is allowed only between A and T and C and G. Additionally, each pixel point in a grayscale image can be represented by an 8-bit binary number, taking the values of 0 and 1. The binary value pair also constitutes a complementary relationship pair. Since 00 and 11 and 01 and 10 are also complementary, the DNA bases A, C, G, and T can be encoded using the digit pairs 00, 01, 10, and 11. Thus, 24 types of this coding scheme can be obtained, but the program must satisfy the pairing rules, in that A bases must be paired with T and C must be paired with G, so only eight types of programs are effective. These are shown in Table 1. For example, if the grayscale value of a pixel in an image is equal to 147, it can be converted to the binary value “10010011.” If the first rule in Table 1 is selected, the 8-bit binary number can be expressed as “GCAT.” Furthermore, if the fourth rule is chosen, then the 8-bit of the binary number can be expressed as “ATCG.”Table 1
DNA coding rules.
1
2
3
4
5
6
7
8
00-A
00-A
00-C
00-C
00-G
00-G
00-T
00-T
01-C
01-G
01-A
01-T
01-A
01-T
01-C
01-G
10-G
10-C
10-T
10-A
10-T
10-A
10-G
10-C
11-T
11-T
11-G
11-G
11-C
11-C
11-A
11-AWith the development of DNA computing, some researchers have proposed algorithms based on DNA sequences for the operations of addition and subtraction, based on the basic principles of binary addition and subtraction [9, 10]. Thus, this corresponds to eight different types of DNA encoding schemes, whereby there are eight types of DNA addition operations and eight types of DNA subtraction. In this paper, we use the coding rules 1 and 4, for example, to obtain the addition operation rules and the subtraction operation rules, as shown in Tables 2–5.Table 2
The addition operation of DNA sequence based on rule 1.
A
C
G
T
A
A
C
G
T
C
C
G
T
A
G
G
T
A
C
T
T
A
C
GTable 3
The subtraction operation of DNA sequence based on rule 1.
A
C
G
T
A
A
T
G
C
C
C
A
T
G
G
G
C
A
T
T
T
G
C
ATable 4
The addition operation of DNA sequence based on rule 4.
A
C
G
T
A
C
A
T
G
C
A
C
G
T
G
T
G
A
C
T
G
T
C
ATable 5
The subtraction operation of DNA sequence based on rule 4.
A
C
G
T
A
C
A
G
T
C
A
C
T
G
G
T
G
C
A
T
G
T
A
C


## 2.2. Dynamic DNA Coding

Most algorithms only choose fixed DNA encoding rules to encode, and only a maximum of eight experiments can break it. In this paper, the DNA encoding rules are dynamically selected according to generated chaotic sequences. For example, a pixel value can correspond to any of the four digital values and can be converted to a binary value. Every two binary bits of this value can then use a random encoding mode, which makes the key space larger, more difficult to decipher, and with a higher image encryption security. For example, if the value of the pixel point is still 147, the value of its corresponding chaotic sequence is [1, 3, 5, 7], and then the result of the DNA encoding is “GCGG.”Based on the principle of base complementation, the nucleotidex
i in the nucleotide sequence of DNA encoding is as follows [11]:(1)
x
i
≠
L
x
i
≠
L
L
x
i
≠
L
L
L
x
i
,
x
i
=
L
L
L
L
x
i
.In (1), x
i and L
x
i are complementary. According to (1), there are six types of base pairs that meet the requirements of the combination, as shown below:(AT)(TC)(CG)(GA).
(AT)(TG)(GC)(CA).
(AC)(CT)(TG)(GA).
(AC)(CG)(GT)(TA).
(AG)(GT)(TC)(CA).
(AG)(GC)(CT)(TA).During pixel diffusion, one of the six complementary rules will be selected, the complementary DNA sequences will replace operations, and the number of complementary alternative steps will be dynamically selected based on the value of the chaotic sequence, in order to achieve pixel proliferation.


## 2.3. Lorenz Chaotic System

The mathematical expression of the Lorenz chaotic system is [12](2)
x
′
=
a
y
-
x
,
y
′
=
c
x
-
x
z
-
y
,
z
′
=
x
y
-
b
z
.When a
=
10, b
=
8
/
3, and c
=
28, the Lorenz system is in a chaotic state. In this paper, the Lorenz chaotic system is used to scramble the pixel position, as well as achieve the dynamic selection of the DNA addition and subtraction rules. Correspondingly, the main operation is as follows:(
1
) The use of the Lorenz chaotic system generates three pseudo-random sequences whose lengths are M
×
2
,
N
,
M
×
N
×
4
:
a
=
a
1
,
a
2
,
…
,
a
M
×
2, b
=
b
1
,
b
2
,
…
,
b
N, and c
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4. Herein, M is the number of lines of the original image matrix, and N is the number of the original image matrix columns.(
2
) The random sequences a
=
a
1
,
a
2
,
…
,
a
M
×
2, b
=
b
1
,
b
2
,
…
,
b
N, and c
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4 are used in accordance with the following operation:(3)
a
i
=
mod
⁡
f
i
x
a
i
×
1
0
3
,
256
+
1
,
i
=
1,2
,
…
,
M
×
2
,
b
i
=
mod
⁡
f
i
x
b
i
×
1
0
3
,
256
+
1
,
i
=
1,2
,
…
,
N
,
c
i
=
mod
⁡
f
i
x
c
i
×
1
0
3
,
8
+
1
,
i
=
1,2
,
…
,
M
×
N
×
4
.In these expressions, fix is the rounding operation. The sequences a
=
a
1
,
a
2
,
…
,
a
M
×
2 and b
=
b
1
,
b
2
,
…
,
b
N are multiplied by 1000 and the results are rounded. After calculation of the remainder, following a division with respect to 256, it is added to unity. The random number in the random sequence can then be changed to any number within the range of [1–256]. The sequence c
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4 is multiplied by 1000 and the results are rounded. After the remainder is calculated, following division by 256, it is then added to unity. The random number in the random sequence can then be changed to any number within the range of [1–8].(
3
) By using the first M numbers in the sequence a
=
a
1
,
a
2
,
…
,
a
M
×
2, each line of the image is transformed in accordance with(4)
A
1,1
A
1,2
⋯
A
1
,
j
⋯
A
1
,
n
A
2,1
A
2,2
⋯
A
2
,
j
⋯
A
2
,
n
⋮
A
i
,
j
⋮
A
m
,
1
A
m
,
2
⋯
A
m
,
j
⋯
A
m
,
n
⟹
A
1
,
n
-
a
1
A
1
,
n
-
a
1
+
1
⋯
A
1
,
n
A
1,1
⋯
A
1
,
n
-
a
1
-
1
A
2
,
n
-
a
2
A
2
,
n
-
a
2
+
1
⋯
A
2
,
n
A
1,1
⋯
A
2
,
n
-
a
2
-
1
⋮
A
i
,
j
⋮
A
m
,
n
-
a
M
A
m
,
n
-
a
M
+
1
⋯
A
m
,
n
A
m
,
1
⋯
A
m
,
n
-
a
M
-
1
.Among the matrix entries, A
i
,
j, represents the i
t
h row and j
t
h column in image A. For example, if a
1
=
50, then the elements of the first row in the image have to be right-shifted by 50.(
4
) By using each number in the sequence b
=
b
1
,
b
2
,
…
,
b
N, each column of the image is transformed in accordance with(5)
A
1
,
n
-
a
1
A
1
,
n
-
a
1
+
1
⋯
A
1
,
n
A
1,1
⋯
A
1
,
n
-
a
1
-
1
A
2
,
n
-
a
2
A
2
,
n
-
a
2
+
1
⋯
A
2
,
n
A
1,1
⋯
A
2
,
n
-
a
2
-
1
⋮
A
i
,
j
⋮
A
m
,
n
-
a
M
A
m
,
n
-
a
M
+
1
⋯
A
m
,
n
A
m
,
1
⋯
A
m
,
n
-
a
M
-
1
⟹
A
m
-
b
1
,
n
-
a
1
A
m
-
b
2
,
n
-
a
1
+
1
⋯
A
m
-
b
a
1
,
n
A
m
-
b
a
1
+
1,1
⋯
A
m
-
b
N
,
n
-
a
1
-
1
⋮
A
m
,
n
-
a
2
A
m
,
n
-
a
2
+
1
⋯
A
m
,
n
A
m
,
1
⋯
A
m
,
n
-
a
2
-
1
⋮
A
i
,
j
⋮
A
m
-
b
1
-
1
,
n
-
a
M
A
m
-
b
2
-
1
,
n
-
a
M
+
1
⋯
A
m
-
b
a
1
-
1
,
n
A
m
-
b
a
1
,
1
⋯
A
m
-
b
N
-
1
,
n
-
a
M
-
1
.For example, if b
1
=
90, then each of the elements of the first column in the image is downward shifted by 90.(
5
) By using the last M numbers in the sequence a
=
a
1
,
a
2
,
…
,
a
M
×
2, each line of the image is transformed. The methodology and step (
3
) remain the same and can be used to complete (4).The scrambling idea introduced in this article is advanced and includes a line shift conversion, a column shift conversion, and a line shift transformation. If only two ranks of shifting are applied, this may cause some adjacent pixels in a line or column of the original image to remain adjacent in the encrypted image. Transformation can ensure full dispersion of the scrambled image.The sequencec
=
c
1
,
c
2
,
…
,
c
M
×
N
×
4 that will be generated by the Lorenz chaotic system that will be used to dynamically select the DNA addition and subtraction rules in the encryption step will be described in detail.When decrypting, only the rows and columns corresponding to the left- and upward-shift operations will be used.


## 2.4. Chen’s Hyperchaotic System

Chen’s hyperchaotic system [13] is defined as follows:(6)
x
′
=
a
y
-
x
,
y
′
=
-
x
z
+
d
x
+
c
y
-
q
,
z
′
=
x
y
-
b
z
,
q
′
=
x
+
k
.In these equations, a, b, c, d, and k are the system parameters. When a
=
36, b
=
3, c
=
28, d
=
16, and -
0.7
≤
k
≤
0.7, Chen’s hyperchaotic system is in a chaotic state and can generate four chaotic sequences; namely, A
=
a
1
,
a
2
,
…
,
a
M
×
N
×
8, B
=
b
1
,
b
2
,
…
,
b
M
×
N
×
8, C
=
c
1
,
c
2
,
…
,
c
M
×
N
×
8, and D
=
d
1
,
d
2
,
…
,
d
M
×
N
×
8. In this paper, we mainly use the chaotic system to spread the image pixel value.Four pseudo-random sequences generated by Chen’s super chaotic system are performed as follows:(7)
A
=
mod
⁡
f
i
x
a
b
s
A
-
f
i
x
a
b
s
A
×
1
0
10
,
8
+
1
,
B
=
mod
⁡
f
i
x
a
b
s
B
-
f
i
x
a
b
s
B
×
1
0
10
,
8
+
1
,
C
=
mod
⁡
f
i
x
a
b
s
C
-
f
i
x
a
b
s
C
×
1
0
10
,
10
+
1
,
C
=
0
C
<
5
,
1
C
>
5
,
D
=
mod
⁡
f
i
x
a
b
s
D
-
f
i
x
a
b
s
D
×
1
0
10
,
4
,where the operation abs is used to obtain the absolute value, fix is used to obtain an integer outcome, and the expressions C
=
0
,
C
<
5
;
C
=
1
,
C
>
5 mean that if the value of the sequence C is less than 5, it will be changed to 0; otherwise it will become 1. The absolute value of each sequence is applied, and the fractional part is taken and then multiplied by 1010 times, and the remainder is then estimated. Based on these operations, the contents of the sequences A
=
a
1
,
a
2
,
…
,
a
M
×
N
×
8 and B
=
b
1
,
b
2
,
…
,
b
M
×
N
×
8 are transformed into random numbers within the range [1–8]. According to the value of the sequence, the corresponding DNA encoding rules are dynamically selected. The contents of the sequence C
=
c
1
,
c
2
,
…
,
c
M
×
N
×
8 are transformed into random values that are equal to either 0 or 1 and are used to generate the natural DNA matrix. The contents of the sequence D
=
d
1
,
d
2
,
…
,
d
M
×
N
×
8 are transformed into random numbers within the range of [0–3] and are used to dynamically select DNA complementary steps.


## 3. Image Encryption and Decryption Technology

### 3.1. Image Encryption Technology

In this paper, the image encryption technology is divided into two main parts, the scrambling and pixel diffusion, as shown in the flow chart of Figure1.Figure 1
Flow chart of the encryption program.Assuming that the initial size of the grayscale imageI is M
×
N, the specific encryption steps are as follows.Input. Grayscale image I, initial value of the Lorenz chaotic system x
1, y
1, z
1, initial value of Chen’s hyperchaotic system x
0, y
0, z
0, q
0, and parameter k are the input.Output. Encrypted image I
′ is the output.(1)
The grayscale imageI is converted into a two-dimensional matrix I
1 of size M
×
N.
(2)
Use (2) of the Lorenz system to generate three pseudo-random sequences with three different lengths of M
×
2
,
N
,
M
×
N
×
4.
(3)
Use (3) to extract the sequence generated in the arithmetic conversion.
(4)
Use (4) and (5) to scramble the original image and obtain a new matrix I
2.
(5)
Convert the matrixI
2 into the binary matrix I
3.
(6)
Use (6) of Chen’s hyperchaotic system and generate four pseudo-random sequences, each with a length of M
×
N
×
8.
(7)
Use (7) to arithmetically convert the four sequences.
(8)
Using the value in the sequenceA, the DNA encoding rules in Table 1 are dynamically selected, and the DNA code is used for each two-bit binary number in a two-dimensional matrix to generate the DNA matrix I
4.
(9)
According to the value of the sequenceB, the DNA encoding rules in Table 1 are dynamically selected, sequence C is encoded by DNA, and the DNA matrix I
5 is generated.
(10)
According to (2), generate the sequence of c, and apply a dynamic selection of the eight types of DNA addition rules. Then apply the addition operation on matrix I
4 and matrix I
5 to obtain matrix I
6.
(11)
Generate a random numberr
1 within the range of 1–6, in order to select a rule of six base-pair complementary rules. Based on (3) generate the values of sequence D and the complementary base rules selected, and apply the DNA replacement operation on the two-dimensional matrix I
6. The replacement method is in accordance with the following rule: if the value is 0, the DNA code on the bit is not replaced. If it is 1, x
i
=
L
x
i; if it is 2, x
i
=
L
L
x
i; if it is 3, x
i
=
L
L
L
x
i. A two-dimensional matrix I
7 of M rows and N columns is obtained after the complementary substitution.
(12)
Generate a random numberr
2 within the range of 1-2, according to the sequence of A or B (of which 1 represents A, and 2 represents B). According to each number in the sequence, choose the corresponding rules in Table 1 dynamically for the DNA decoding operation, in order to obtain matrix I
8.
(13)
Convert the matrixI
8 to a decimal matrix I
9. At the end, the two-dimensional matrix I
9 is converted into an encrypted image I
′ and stored as the output, and the filename is saved by the user.The encryption process is fully combined with chaos theory and DNA coding theory, by using the chaotic sequence of values, to encode by DNA, and the DNA addition rule of choice. The encoding rules are changeable, random, and not easy to crack and achieve the dynamic DNA encryption.


### 3.2. Image Decryption Technology

The decryption process is the inverse operation of the encryption process.Input. The encrypted image I
′, the initial value of the Lorenz chaotic system x
1, y
1, z
1, the initial value of Chen’s hyperchaotic system x
0, y
0, z
0, q
0, parameter k, and the random numbers r
1 and r
2 are the input.Output. The original grayscale image I is the output.(1)
The encrypted imageI
′ is converted into a two-dimensional binary matrix I
1.
(2)
Use (2) of the Lorenz system to generate three pseudo-random sequences of lengths M
×
2
,
N
,
M
×
N
×
4, and use (3) to define the sequence generated in the arithmetic conversion.
(3)
Use (6) of Chen’s hyperchaotic system to generate four pseudo-random sequences of lengths equal to M
×
N
×
8, and use (7) to estimate the four sequences in the arithmetic conversion.
(4)
According to the random number generator, select the sequenceA or B (of which 1 represents A and 2 represents B). According to every value of the selected sequence, dynamically select the appropriate rules in Table 1; decode the matrix I
1 by DNA into the matrix I
2.
(5)
According to random numberr
1, select a rule of six base-pair complementary rules, and according to the value of each entry of the sequence D and the selected base-pair complementary rules, apply the DNA replacement operation on the two-dimensional matrix I
2, and generate matrix I
3.
(6)
According to each value in the sequenceB, select the encoding rules from Table 1 dynamically, encode the sequence C based on the DNA encoding operation, and generate matrix I
4.
(7)
According to each value in the sequencec, select the DNA subtraction rules dynamically, taking the DNA subtraction operation of the matrices I
3 and I
4, and generate matrix I
5.
(8)
According to each value in the sequenceA, select the encoding rules from Table 1 dynamically to decode matrix I
5, and generate matrix I
6.
(9)
Convert the matrixI
6 to a decimal matrix I
7.
(10)
According to (4) and (5), apply the row shift and column shift operations on the two-dimensional matrix I
7, and generate matrix I
8.
(11)
MatrixI
8 is converted into an image I, the output is saved, and the filename is then saved by the user.


## 3.1. Image Encryption Technology

In this paper, the image encryption technology is divided into two main parts, the scrambling and pixel diffusion, as shown in the flow chart of Figure1.Figure 1
Flow chart of the encryption program.Assuming that the initial size of the grayscale imageI is M
×
N, the specific encryption steps are as follows.Input. Grayscale image I, initial value of the Lorenz chaotic system x
1, y
1, z
1, initial value of Chen’s hyperchaotic system x
0, y
0, z
0, q
0, and parameter k are the input.Output. Encrypted image I
′ is the output.(1)
The grayscale imageI is converted into a two-dimensional matrix I
1 of size M
×
N.
(2)
Use (2) of the Lorenz system to generate three pseudo-random sequences with three different lengths of M
×
2
,
N
,
M
×
N
×
4.
(3)
Use (3) to extract the sequence generated in the arithmetic conversion.
(4)
Use (4) and (5) to scramble the original image and obtain a new matrix I
2.
(5)
Convert the matrixI
2 into the binary matrix I
3.
(6)
Use (6) of Chen’s hyperchaotic system and generate four pseudo-random sequences, each with a length of M
×
N
×
8.
(7)
Use (7) to arithmetically convert the four sequences.
(8)
Using the value in the sequenceA, the DNA encoding rules in Table 1 are dynamically selected, and the DNA code is used for each two-bit binary number in a two-dimensional matrix to generate the DNA matrix I
4.
(9)
According to the value of the sequenceB, the DNA encoding rules in Table 1 are dynamically selected, sequence C is encoded by DNA, and the DNA matrix I
5 is generated.
(10)
According to (2), generate the sequence of c, and apply a dynamic selection of the eight types of DNA addition rules. Then apply the addition operation on matrix I
4 and matrix I
5 to obtain matrix I
6.
(11)
Generate a random numberr
1 within the range of 1–6, in order to select a rule of six base-pair complementary rules. Based on (3) generate the values of sequence D and the complementary base rules selected, and apply the DNA replacement operation on the two-dimensional matrix I
6. The replacement method is in accordance with the following rule: if the value is 0, the DNA code on the bit is not replaced. If it is 1, x
i
=
L
x
i; if it is 2, x
i
=
L
L
x
i; if it is 3, x
i
=
L
L
L
x
i. A two-dimensional matrix I
7 of M rows and N columns is obtained after the complementary substitution.
(12)
Generate a random numberr
2 within the range of 1-2, according to the sequence of A or B (of which 1 represents A, and 2 represents B). According to each number in the sequence, choose the corresponding rules in Table 1 dynamically for the DNA decoding operation, in order to obtain matrix I
8.
(13)
Convert the matrixI
8 to a decimal matrix I
9. At the end, the two-dimensional matrix I
9 is converted into an encrypted image I
′ and stored as the output, and the filename is saved by the user.The encryption process is fully combined with chaos theory and DNA coding theory, by using the chaotic sequence of values, to encode by DNA, and the DNA addition rule of choice. The encoding rules are changeable, random, and not easy to crack and achieve the dynamic DNA encryption.


## 3.2. Image Decryption Technology

The decryption process is the inverse operation of the encryption process.Input. The encrypted image I
′, the initial value of the Lorenz chaotic system x
1, y
1, z
1, the initial value of Chen’s hyperchaotic system x
0, y
0, z
0, q
0, parameter k, and the random numbers r
1 and r
2 are the input.Output. The original grayscale image I is the output.(1)
The encrypted imageI
′ is converted into a two-dimensional binary matrix I
1.
(2)
Use (2) of the Lorenz system to generate three pseudo-random sequences of lengths M
×
2
,
N
,
M
×
N
×
4, and use (3) to define the sequence generated in the arithmetic conversion.
(3)
Use (6) of Chen’s hyperchaotic system to generate four pseudo-random sequences of lengths equal to M
×
N
×
8, and use (7) to estimate the four sequences in the arithmetic conversion.
(4)
According to the random number generator, select the sequenceA or B (of which 1 represents A and 2 represents B). According to every value of the selected sequence, dynamically select the appropriate rules in Table 1; decode the matrix I
1 by DNA into the matrix I
2.
(5)
According to random numberr
1, select a rule of six base-pair complementary rules, and according to the value of each entry of the sequence D and the selected base-pair complementary rules, apply the DNA replacement operation on the two-dimensional matrix I
2, and generate matrix I
3.
(6)
According to each value in the sequenceB, select the encoding rules from Table 1 dynamically, encode the sequence C based on the DNA encoding operation, and generate matrix I
4.
(7)
According to each value in the sequencec, select the DNA subtraction rules dynamically, taking the DNA subtraction operation of the matrices I
3 and I
4, and generate matrix I
5.
(8)
According to each value in the sequenceA, select the encoding rules from Table 1 dynamically to decode matrix I
5, and generate matrix I
6.
(9)
Convert the matrixI
6 to a decimal matrix I
7.
(10)
According to (4) and (5), apply the row shift and column shift operations on the two-dimensional matrix I
7, and generate matrix I
8.
(11)
MatrixI
8 is converted into an image I, the output is saved, and the filename is then saved by the user.


## 4. Results

In this paper, we use the grayscale images of Lena and the Cameraman, with image sizes of256
×
256. The initial values of the Lorenz chaotic system are x
1
=
0.526, y
1
=
0.346, and z
1
=
0.782. The initial values and parameters of Chen’s hyperchaotic system are x
0
=
0.364, y
0
=
0.123, z
0
=
0.159, q
0
=
0.753, and k
=
0.3. The original and encrypted images are shown in Figure 2.Figure 2
Original and encrypted images.
(a)
Lena
(b)
Encrypted image
(c)
Cameraman
(d)
Encrypted image


## 5. Technical Performance and Security Analyses

### 5.1. Secret Key’s Space and Security Analyses

All the chaotic systems are sensitive to initial conditions. In order to encrypt images with additional security, the secret key’s space must be tremendously high so that it can resist high-intensity, exhaustive types of attacks [14]. In this paper, the encryption technology is used as follows:(1)
Initialize the value of the Lorenz chaotic systemx
1, y
1, z
1.
(2)
Initialize the value of Chen’s hyperchaotic systemx
0, y
0, z
0, q
0 and parameter k.
(3)
Apply DNA coding and complementary rules so that the value of the chaotic sequence can be used to determine the type of DNA encoding rules. Correspondingly, the random numberr
1 can be used for selecting the type of complementary rules, and the random number r
2 can be used for selecting the types of DNA encoding and decoding rules and the values of the chaotic sequence.The sensitivity of the Lorenz chaotic system to the initial value is1
0
-
16. When the initial value of the x
1 sensitivity is between 1
0
-
1 and 1
0
-
16, the ratio of the values of the different elements in the matrix of the digital images attained at two different sensitivities is greater than 0.85. However, when the sensitivity of the key is 1
0
-
17, the proportion of the different elements is equal to 0. Thus, the key space of the initial value of the Lorenz chaotic system is determined in accordance with S
x
1
=
S
y
1
=
S
z
1
=
1
0
16.For Chen’s hyperchaotic system, when the initial value of the decryption is slightly changed with respect to the initial value of the encryption, such that∇
z
0
=
1
0
-
17, the decrypted image and the original image are still difficult to distinguish. However, when ∇
z
0
=
1
0
-
16, the result of the decryption is not accurate. For example, when the image is encrypted with an initial value x
0
=
0.364, it can be successfully decrypted using x
0
=
0.36400000000000001 but cannot be successfully decrypted using x
0
=
0.3640000000000001. A large number of experimental data prove that the initial value key space of Chen’s hyperchaotic system is S
x
0
=
S
y
0
=
S
z
0
=
S
q
0
=
1
0
16. Similarly, the variation of the parameter k in the chaotic region ranges from -
0.7
×
1
0
-
16 to 0.7
×
1
0
-
16, so Chen’s hyperchaotic system parameter key space is S
k
≈
0.7
×
1
0
16.There are eight types of DNA encoding rules and six types of DNA complementary rules, which carry the two DNA codes and the single DNA complementary substitution, so the key space of the random number isS
r
1
=
6, and S
r
2
=
2. Therefore, the total memory space of the encryption key is(8)
S
=
2
×
6
×
S
x
1
×
S
y
1
×
S
z
1
×
S
x
0
×
S
y
0
×
S
z
0
×
S
q
0
×
S
k
≈
8.4
×
1
0
128which is much larger than 2100. Therefore, the secret key’s space is large enough to resist an exhaustive attack.


### 5.2. Sensitivity Analysis of the Secret Key

Using the initial valuex
1
=
0.526 for the encryption of the Lena image, the encrypted image shown in Figure 3(b) is obtained. If x
1
=
0.526 is used, the decrypted image is shown in Figure 3(c). Using x
1
=
0.5260000000000001 the decrypted image is shown in Figure 3(d). For a very small and visible change, keys will not correctly decrypt the encrypted image. The sensitivity of this test can be seen from the key as long as there is a small change that will make the decrypted result distinctly different. Ultimately, this indicates that the key encryption algorithm is highly sensitive.Figure 3
Key sensitivity tests.
(a)
Original image
(b)
Encrypted image withx
1
=
0.526
(c)
Decrypted image withx
1
=
0.526
(d)
Decrypted image withx
1
=
0.5260000000000001


### 5.3. Resistance to Statistical Attack

#### 5.3.1. The Grayscale Histogram Analysis

The grayscale histograms of the original and encrypted images of Lena and the Cameraman are shown in Figure4. Through the comparison of their gray level histograms, it can be seen that the histogram of the original image pixel values are concentrated at specific values, but the encryption image gray level histogram of the pixel distribution is relatively balanced. Thus, the results obtained by the encryption technology used to encrypt images are difficult to be exposed to a statistical attack crack.Figure 4
The histograms of Lena’s and Cameraman’s images.
(a)
The grayscale histogram of Lena’s image
(b)
The grayscale histogram of Lena’s encrypted image
(c)
The grayscale histogram of Cameraman’s image
(d)
The grayscale histogram of Cameraman’s encrypted image


#### 5.3.2. Correlation Coefficient Analysis

The correlation coefficient,r, [16] is a measure of the degree of linear correlation between two random variables. Its value is in the range of -
1,1, and r expresses the degree of correlation between the variables. Usually when r is in the range of 0.7,1, the two variables are highly correlated. We randomly selected 3,000 pairs of adjacent pixels (along the vertical, horizontal, and diagonal directions) from both the original and encrypted images of Lena and calculated the correlation coefficient for each pair of adjacent pixels according to (9). Table 6 shows the results of the correlation coefficients of two adjacent pixels, which are compared with the results in [15]. Experimental results show that the correlation of the image is significantly reduced. It also shows that this technique can be very good in comparison to the relevant statistics of sexual assaults. Furthermore, calculation of the correlation coefficient of the two images after encryption of the Lena and Cameraman’s images yields the respective results of 0.0053741 and 0.0035124, which are much less than 0.7. This shows that the correlation between the encrypted image after the adoption of this encryption algorithm and the original image is very low. Reference [15] also uses DNA coding for image encryption and has been implemented in a standard image (Cameraman image), the encrypted image, and horizontal, vertical, and diagonal direction correlation, as shown in Table 6. A comparison shows that the encryption image generated by this algorithm and the horizontal, vertical, and diagonal directions of the correlation can be lower than the results elicited from the encrypted image generated by the use of the encryption algorithm proposed in [15]. Thus, we can prove that the algorithm in this paper is more secure,(9)
r
x
y
=
cov
⁡
x
,
y
D
x
D
y
,where c
o
v
x
,
y
=
1
/
N
∑
i
=
1
N
x
i
-
E
x
y
i
-
E
y, E
x
=
1
/
N
∑
i
=
1
N
x
i, and D
x
=
1
/
N
∑
i
=
1
N
x
i
-
E
x
2
.Table 6
The comparison of the correlation coefficients of Lena’s images.
Correlation
Horizontal
Vertical
Diagonal
Original image
0.93063
0.95945
0.90711
Encrypted image
0.00773
−0.01103
0.00153
Reference [15]
−0.09535
0.01454
0.00592


#### 5.3.3. Number of Pixels’ Change Rate Analysis

Number of pixels’ change rate (NPCR) indicates the percentage number of pixel values that change in the encrypted image when one pixel is changed in the original image, in accordance with the NPCR equation (10) [17]:(10)
N
P
C
R
=
∑
i
,
j
D
i
,
j
W
×
H
×
100
%
.Herein, W and H represent the length and width of the image, and C
(
i
,
j
) represents the pixel value of the original image. C
′
(
i
,
j
) represents the pixel value of the encrypted image. i and j represent rows and columns of image. If C
i
,
j
≠
C
′
i
,
j then D
i
,
j
=
1; otherwise D
i
,
j
=
0.Using (10), the NPCR was calculated for the Lena and Cameraman images before and after encryption. The results are shown in Table 7. We can see that this encryption technology can manifest minor changes on the original image, yet leading to major differences on the encrypted image, which also shows the effectiveness of the algorithm. DNA coding has also been used for image encryption in [18], and the comparison data is shown in Table 7. Reference [18] is also based on the Cameraman image, but the value of NPCR is only 50.11%. According to the definition of NPCR, we know that the greater the value, the higher the security of the algorithm. Correspondingly, the elicited value of 99.6% indicates that the algorithm security is outstanding.Table 7
NPCR values for the Lena and Cameraman images before and after the encryption.
Figure
NPCR (%)
Figures2(a) and 2(b)
99.65
Figures2(c) and 2(d)
99.60
Reference [18]
50.11Some studies in the literature also use the unified average changing intensity (UACI). However, UACI cannot accurately explain the merits of the algorithm, so this article does not use UACI analysis.


#### 5.3.4. Antishearing Attack Analysis

After the use of the encryption algorithm applied to encrypt Lena’s image, a certain percentage of the encrypted image is cropped. The remaining sheared image was then decrypted, and the results are shown in Figure5. Figure 5 shows that, even when the encrypted image is sheared by 25%, the algorithm can still restore the original image, indicating that the algorithm can effectively withstand the cropping, which also illustrates that the correlation of the image encrypted by this algorithm is larger [19].Figure 5
Antishearing response.
(a)
Shearing of the encrypted
(b)
Restored image


#### 5.3.5. Resistance Noise Analysis

Image noise is one the various factors that hinders image acceptance. Furthermore, the degree of reliability of the encryption algorithm also depends on the robustness of noise resistance [20]. When the picture is in the uptake or in the process of transmission, there is some image noise interference, and these disturbances may result in unpredictable error occurrences that lead to the inability to decrypt the original image.Typically, the impact of noise on the encryption system is very obvious, and application of minor transformations on the encrypted image will likely lead to decryption failure and inability to restore the original image. An effective encryption algorithm must have a very good resistance to noise interference, so that when decrypting, the distortion of the image is as low as possible, and the impact is as little as possible. This algorithm exhibits good robustness against noise, because image encryption encompasses scrambling of the location of the original pixels in the image, followed by dynamic encoding by DNA, and DNA addition. DNA complementation means that the value of the original image pixel is changed to achieve pixel diffusion. This prevents spreading of those pixels changed by noise in the decryption process, thereby avoiding a subsequent cascading effect. In justification of this argument, numerous experiments have been conducted that have proven the robustness of the performance to noise [20].In this paper, the different means and variances of Gaussian white noise are selected to apply noise interference in image encryption, in order to simulate the impact of some real physical signals in the encrypted image. The results are shown in Figure6.Figure 6
The encrypted and decryption images after Gaussian, white noise interference.
(a)
Mean = 0 and variance = 0.001
(b)
Mean = 0 and variance = 0.001
(c)
Mean = 0 and variance = 0.003
(d)
Mean = 0 and variance = 0.003
(e)
Mean = 0 and variance = 0.005
(f)
Mean = 0 and variance = 0.005Modifications of the means and variances of the Gaussian white noise interference lead to the encrypted and decrypted images shown in Figure6. Based on the elicited results, the decrypted image visually still contains all the information of the original image, and the correlation with the original image is still high.


## 5.1. Secret Key’s Space and Security Analyses

All the chaotic systems are sensitive to initial conditions. In order to encrypt images with additional security, the secret key’s space must be tremendously high so that it can resist high-intensity, exhaustive types of attacks [14]. In this paper, the encryption technology is used as follows:(1)
Initialize the value of the Lorenz chaotic systemx
1, y
1, z
1.
(2)
Initialize the value of Chen’s hyperchaotic systemx
0, y
0, z
0, q
0 and parameter k.
(3)
Apply DNA coding and complementary rules so that the value of the chaotic sequence can be used to determine the type of DNA encoding rules. Correspondingly, the random numberr
1 can be used for selecting the type of complementary rules, and the random number r
2 can be used for selecting the types of DNA encoding and decoding rules and the values of the chaotic sequence.The sensitivity of the Lorenz chaotic system to the initial value is1
0
-
16. When the initial value of the x
1 sensitivity is between 1
0
-
1 and 1
0
-
16, the ratio of the values of the different elements in the matrix of the digital images attained at two different sensitivities is greater than 0.85. However, when the sensitivity of the key is 1
0
-
17, the proportion of the different elements is equal to 0. Thus, the key space of the initial value of the Lorenz chaotic system is determined in accordance with S
x
1
=
S
y
1
=
S
z
1
=
1
0
16.For Chen’s hyperchaotic system, when the initial value of the decryption is slightly changed with respect to the initial value of the encryption, such that∇
z
0
=
1
0
-
17, the decrypted image and the original image are still difficult to distinguish. However, when ∇
z
0
=
1
0
-
16, the result of the decryption is not accurate. For example, when the image is encrypted with an initial value x
0
=
0.364, it can be successfully decrypted using x
0
=
0.36400000000000001 but cannot be successfully decrypted using x
0
=
0.3640000000000001. A large number of experimental data prove that the initial value key space of Chen’s hyperchaotic system is S
x
0
=
S
y
0
=
S
z
0
=
S
q
0
=
1
0
16. Similarly, the variation of the parameter k in the chaotic region ranges from -
0.7
×
1
0
-
16 to 0.7
×
1
0
-
16, so Chen’s hyperchaotic system parameter key space is S
k
≈
0.7
×
1
0
16.There are eight types of DNA encoding rules and six types of DNA complementary rules, which carry the two DNA codes and the single DNA complementary substitution, so the key space of the random number isS
r
1
=
6, and S
r
2
=
2. Therefore, the total memory space of the encryption key is(8)
S
=
2
×
6
×
S
x
1
×
S
y
1
×
S
z
1
×
S
x
0
×
S
y
0
×
S
z
0
×
S
q
0
×
S
k
≈
8.4
×
1
0
128which is much larger than 2100. Therefore, the secret key’s space is large enough to resist an exhaustive attack.


## 5.2. Sensitivity Analysis of the Secret Key

Using the initial valuex
1
=
0.526 for the encryption of the Lena image, the encrypted image shown in Figure 3(b) is obtained. If x
1
=
0.526 is used, the decrypted image is shown in Figure 3(c). Using x
1
=
0.5260000000000001 the decrypted image is shown in Figure 3(d). For a very small and visible change, keys will not correctly decrypt the encrypted image. The sensitivity of this test can be seen from the key as long as there is a small change that will make the decrypted result distinctly different. Ultimately, this indicates that the key encryption algorithm is highly sensitive.Figure 3
Key sensitivity tests.
(a)
Original image
(b)
Encrypted image withx
1
=
0.526
(c)
Decrypted image withx
1
=
0.526
(d)
Decrypted image withx
1
=
0.5260000000000001


## 5.3. Resistance to Statistical Attack

### 5.3.1. The Grayscale Histogram Analysis

The grayscale histograms of the original and encrypted images of Lena and the Cameraman are shown in Figure4. Through the comparison of their gray level histograms, it can be seen that the histogram of the original image pixel values are concentrated at specific values, but the encryption image gray level histogram of the pixel distribution is relatively balanced. Thus, the results obtained by the encryption technology used to encrypt images are difficult to be exposed to a statistical attack crack.Figure 4
The histograms of Lena’s and Cameraman’s images.
(a)
The grayscale histogram of Lena’s image
(b)
The grayscale histogram of Lena’s encrypted image
(c)
The grayscale histogram of Cameraman’s image
(d)
The grayscale histogram of Cameraman’s encrypted image


### 5.3.2. Correlation Coefficient Analysis

The correlation coefficient,r, [16] is a measure of the degree of linear correlation between two random variables. Its value is in the range of -
1,1, and r expresses the degree of correlation between the variables. Usually when r is in the range of 0.7,1, the two variables are highly correlated. We randomly selected 3,000 pairs of adjacent pixels (along the vertical, horizontal, and diagonal directions) from both the original and encrypted images of Lena and calculated the correlation coefficient for each pair of adjacent pixels according to (9). Table 6 shows the results of the correlation coefficients of two adjacent pixels, which are compared with the results in [15]. Experimental results show that the correlation of the image is significantly reduced. It also shows that this technique can be very good in comparison to the relevant statistics of sexual assaults. Furthermore, calculation of the correlation coefficient of the two images after encryption of the Lena and Cameraman’s images yields the respective results of 0.0053741 and 0.0035124, which are much less than 0.7. This shows that the correlation between the encrypted image after the adoption of this encryption algorithm and the original image is very low. Reference [15] also uses DNA coding for image encryption and has been implemented in a standard image (Cameraman image), the encrypted image, and horizontal, vertical, and diagonal direction correlation, as shown in Table 6. A comparison shows that the encryption image generated by this algorithm and the horizontal, vertical, and diagonal directions of the correlation can be lower than the results elicited from the encrypted image generated by the use of the encryption algorithm proposed in [15]. Thus, we can prove that the algorithm in this paper is more secure,(9)
r
x
y
=
cov
⁡
x
,
y
D
x
D
y
,where c
o
v
x
,
y
=
1
/
N
∑
i
=
1
N
x
i
-
E
x
y
i
-
E
y, E
x
=
1
/
N
∑
i
=
1
N
x
i, and D
x
=
1
/
N
∑
i
=
1
N
x
i
-
E
x
2
.Table 6
The comparison of the correlation coefficients of Lena’s images.
Correlation
Horizontal
Vertical
Diagonal
Original image
0.93063
0.95945
0.90711
Encrypted image
0.00773
−0.01103
0.00153
Reference [15]
−0.09535
0.01454
0.00592


### 5.3.3. Number of Pixels’ Change Rate Analysis

Number of pixels’ change rate (NPCR) indicates the percentage number of pixel values that change in the encrypted image when one pixel is changed in the original image, in accordance with the NPCR equation (10) [17]:(10)
N
P
C
R
=
∑
i
,
j
D
i
,
j
W
×
H
×
100
%
.Herein, W and H represent the length and width of the image, and C
(
i
,
j
) represents the pixel value of the original image. C
′
(
i
,
j
) represents the pixel value of the encrypted image. i and j represent rows and columns of image. If C
i
,
j
≠
C
′
i
,
j then D
i
,
j
=
1; otherwise D
i
,
j
=
0.Using (10), the NPCR was calculated for the Lena and Cameraman images before and after encryption. The results are shown in Table 7. We can see that this encryption technology can manifest minor changes on the original image, yet leading to major differences on the encrypted image, which also shows the effectiveness of the algorithm. DNA coding has also been used for image encryption in [18], and the comparison data is shown in Table 7. Reference [18] is also based on the Cameraman image, but the value of NPCR is only 50.11%. According to the definition of NPCR, we know that the greater the value, the higher the security of the algorithm. Correspondingly, the elicited value of 99.6% indicates that the algorithm security is outstanding.Table 7
NPCR values for the Lena and Cameraman images before and after the encryption.
Figure
NPCR (%)
Figures2(a) and 2(b)
99.65
Figures2(c) and 2(d)
99.60
Reference [18]
50.11Some studies in the literature also use the unified average changing intensity (UACI). However, UACI cannot accurately explain the merits of the algorithm, so this article does not use UACI analysis.


### 5.3.4. Antishearing Attack Analysis

After the use of the encryption algorithm applied to encrypt Lena’s image, a certain percentage of the encrypted image is cropped. The remaining sheared image was then decrypted, and the results are shown in Figure5. Figure 5 shows that, even when the encrypted image is sheared by 25%, the algorithm can still restore the original image, indicating that the algorithm can effectively withstand the cropping, which also illustrates that the correlation of the image encrypted by this algorithm is larger [19].Figure 5
Antishearing response.
(a)
Shearing of the encrypted
(b)
Restored image


### 5.3.5. Resistance Noise Analysis

Image noise is one the various factors that hinders image acceptance. Furthermore, the degree of reliability of the encryption algorithm also depends on the robustness of noise resistance [20]. When the picture is in the uptake or in the process of transmission, there is some image noise interference, and these disturbances may result in unpredictable error occurrences that lead to the inability to decrypt the original image.Typically, the impact of noise on the encryption system is very obvious, and application of minor transformations on the encrypted image will likely lead to decryption failure and inability to restore the original image. An effective encryption algorithm must have a very good resistance to noise interference, so that when decrypting, the distortion of the image is as low as possible, and the impact is as little as possible. This algorithm exhibits good robustness against noise, because image encryption encompasses scrambling of the location of the original pixels in the image, followed by dynamic encoding by DNA, and DNA addition. DNA complementation means that the value of the original image pixel is changed to achieve pixel diffusion. This prevents spreading of those pixels changed by noise in the decryption process, thereby avoiding a subsequent cascading effect. In justification of this argument, numerous experiments have been conducted that have proven the robustness of the performance to noise [20].In this paper, the different means and variances of Gaussian white noise are selected to apply noise interference in image encryption, in order to simulate the impact of some real physical signals in the encrypted image. The results are shown in Figure6.Figure 6
The encrypted and decryption images after Gaussian, white noise interference.
(a)
Mean = 0 and variance = 0.001
(b)
Mean = 0 and variance = 0.001
(c)
Mean = 0 and variance = 0.003
(d)
Mean = 0 and variance = 0.003
(e)
Mean = 0 and variance = 0.005
(f)
Mean = 0 and variance = 0.005Modifications of the means and variances of the Gaussian white noise interference lead to the encrypted and decrypted images shown in Figure6. Based on the elicited results, the decrypted image visually still contains all the information of the original image, and the correlation with the original image is still high.


## 5.3.1. The Grayscale Histogram Analysis

The grayscale histograms of the original and encrypted images of Lena and the Cameraman are shown in Figure4. Through the comparison of their gray level histograms, it can be seen that the histogram of the original image pixel values are concentrated at specific values, but the encryption image gray level histogram of the pixel distribution is relatively balanced. Thus, the results obtained by the encryption technology used to encrypt images are difficult to be exposed to a statistical attack crack.Figure 4
The histograms of Lena’s and Cameraman’s images.
(a)
The grayscale histogram of Lena’s image
(b)
The grayscale histogram of Lena’s encrypted image
(c)
The grayscale histogram of Cameraman’s image
(d)
The grayscale histogram of Cameraman’s encrypted image


## 5.3.2. Correlation Coefficient Analysis

The correlation coefficient,r, [16] is a measure of the degree of linear correlation between two random variables. Its value is in the range of -
1,1, and r expresses the degree of correlation between the variables. Usually when r is in the range of 0.7,1, the two variables are highly correlated. We randomly selected 3,000 pairs of adjacent pixels (along the vertical, horizontal, and diagonal directions) from both the original and encrypted images of Lena and calculated the correlation coefficient for each pair of adjacent pixels according to (9). Table 6 shows the results of the correlation coefficients of two adjacent pixels, which are compared with the results in [15]. Experimental results show that the correlation of the image is significantly reduced. It also shows that this technique can be very good in comparison to the relevant statistics of sexual assaults. Furthermore, calculation of the correlation coefficient of the two images after encryption of the Lena and Cameraman’s images yields the respective results of 0.0053741 and 0.0035124, which are much less than 0.7. This shows that the correlation between the encrypted image after the adoption of this encryption algorithm and the original image is very low. Reference [15] also uses DNA coding for image encryption and has been implemented in a standard image (Cameraman image), the encrypted image, and horizontal, vertical, and diagonal direction correlation, as shown in Table 6. A comparison shows that the encryption image generated by this algorithm and the horizontal, vertical, and diagonal directions of the correlation can be lower than the results elicited from the encrypted image generated by the use of the encryption algorithm proposed in [15]. Thus, we can prove that the algorithm in this paper is more secure,(9)
r
x
y
=
cov
⁡
x
,
y
D
x
D
y
,where c
o
v
x
,
y
=
1
/
N
∑
i
=
1
N
x
i
-
E
x
y
i
-
E
y, E
x
=
1
/
N
∑
i
=
1
N
x
i, and D
x
=
1
/
N
∑
i
=
1
N
x
i
-
E
x
2
.Table 6
The comparison of the correlation coefficients of Lena’s images.
Correlation
Horizontal
Vertical
Diagonal
Original image
0.93063
0.95945
0.90711
Encrypted image
0.00773
−0.01103
0.00153
Reference [15]
−0.09535
0.01454
0.00592


## 5.3.3. Number of Pixels’ Change Rate Analysis

Number of pixels’ change rate (NPCR) indicates the percentage number of pixel values that change in the encrypted image when one pixel is changed in the original image, in accordance with the NPCR equation (10) [17]:(10)
N
P
C
R
=
∑
i
,
j
D
i
,
j
W
×
H
×
100
%
.Herein, W and H represent the length and width of the image, and C
(
i
,
j
) represents the pixel value of the original image. C
′
(
i
,
j
) represents the pixel value of the encrypted image. i and j represent rows and columns of image. If C
i
,
j
≠
C
′
i
,
j then D
i
,
j
=
1; otherwise D
i
,
j
=
0.Using (10), the NPCR was calculated for the Lena and Cameraman images before and after encryption. The results are shown in Table 7. We can see that this encryption technology can manifest minor changes on the original image, yet leading to major differences on the encrypted image, which also shows the effectiveness of the algorithm. DNA coding has also been used for image encryption in [18], and the comparison data is shown in Table 7. Reference [18] is also based on the Cameraman image, but the value of NPCR is only 50.11%. According to the definition of NPCR, we know that the greater the value, the higher the security of the algorithm. Correspondingly, the elicited value of 99.6% indicates that the algorithm security is outstanding.Table 7
NPCR values for the Lena and Cameraman images before and after the encryption.
Figure
NPCR (%)
Figures2(a) and 2(b)
99.65
Figures2(c) and 2(d)
99.60
Reference [18]
50.11Some studies in the literature also use the unified average changing intensity (UACI). However, UACI cannot accurately explain the merits of the algorithm, so this article does not use UACI analysis.


## 5.3.4. Antishearing Attack Analysis

After the use of the encryption algorithm applied to encrypt Lena’s image, a certain percentage of the encrypted image is cropped. The remaining sheared image was then decrypted, and the results are shown in Figure5. Figure 5 shows that, even when the encrypted image is sheared by 25%, the algorithm can still restore the original image, indicating that the algorithm can effectively withstand the cropping, which also illustrates that the correlation of the image encrypted by this algorithm is larger [19].Figure 5
Antishearing response.
(a)
Shearing of the encrypted
(b)
Restored image


## 5.3.5. Resistance Noise Analysis

Image noise is one the various factors that hinders image acceptance. Furthermore, the degree of reliability of the encryption algorithm also depends on the robustness of noise resistance [20]. When the picture is in the uptake or in the process of transmission, there is some image noise interference, and these disturbances may result in unpredictable error occurrences that lead to the inability to decrypt the original image.Typically, the impact of noise on the encryption system is very obvious, and application of minor transformations on the encrypted image will likely lead to decryption failure and inability to restore the original image. An effective encryption algorithm must have a very good resistance to noise interference, so that when decrypting, the distortion of the image is as low as possible, and the impact is as little as possible. This algorithm exhibits good robustness against noise, because image encryption encompasses scrambling of the location of the original pixels in the image, followed by dynamic encoding by DNA, and DNA addition. DNA complementation means that the value of the original image pixel is changed to achieve pixel diffusion. This prevents spreading of those pixels changed by noise in the decryption process, thereby avoiding a subsequent cascading effect. In justification of this argument, numerous experiments have been conducted that have proven the robustness of the performance to noise [20].In this paper, the different means and variances of Gaussian white noise are selected to apply noise interference in image encryption, in order to simulate the impact of some real physical signals in the encrypted image. The results are shown in Figure6.Figure 6
The encrypted and decryption images after Gaussian, white noise interference.
(a)
Mean = 0 and variance = 0.001
(b)
Mean = 0 and variance = 0.001
(c)
Mean = 0 and variance = 0.003
(d)
Mean = 0 and variance = 0.003
(e)
Mean = 0 and variance = 0.005
(f)
Mean = 0 and variance = 0.005Modifications of the means and variances of the Gaussian white noise interference lead to the encrypted and decrypted images shown in Figure6. Based on the elicited results, the decrypted image visually still contains all the information of the original image, and the correlation with the original image is still high.


## 6. Conclusions

According to the requirement of high efficiency, safety, and reliability of the encrypted image, this paper proposes an image encryption technology based on the combination of chaotic map and DNA coding technology. Firstly, the chaotic sequences generated by the Lorenz chaotic system are used to scramble the pixels in the image. Using Chen’s hyperchaotic system and DNA encoding, the pixels in the image are diffused in order to obtain the image encryption technology. The experimental results show that the key of the technique is 8.4 × 10128, which meets the big key’s space, and is able to withstand statistical analyses, offensive operations, and other requirements of the image encryption technology.



---

*Source: 6408741-2016-09-27.xml*