# Color Image Encryption Algorithm Based on TD-ERCS System and Wavelet Neural Network

Authors: Kun Zhang; Jian-bo Fang
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

In order to solve the security problem of transmission image across public networks, a new image encryption algorithm based on TD-ERCS system and wavelet neural network is proposed in this paper. According to the permutation process and the binary XOR operation from the chaotic series by producing TD-ERCS system and wavelet neural network, it can achieve image encryption. This encryption algorithm is a reversible algorithm, and it can achieve original image in the rule inverse process of encryption algorithm. Finally, through computer simulation, the experiment results show that the new chaotic encryption algorithm based on TD-ERCS system and wavelet neural network is valid and has higher security.


---

## Body

## 1. Introduction

With the rapid growth and application of multimedia based on the Internet system, image security becomes an important issue. Since the size of digital image is always much greater than text file and the digital images contents are strongly correlated, the traditional encryption algorithms such as Data Encryption Standard (DES), International Data Encryption Algorithm (IDEA), and Advanced Encryption Standard (AES) have the weakness of low-level efficiency [1, 2].Chaos is a ubiquitous phenomenon in nature and chaotic system is also a complex nonlinear, nonequilibrium dynamic process. Chaos theory is established since 1970s from many different research areas, such as physics, mathematics, biology, and chemistry [3]. The chaotic systems are characterized by sensitive dependence on initial conditions and system parameters, similarity to random behavior, no periodicity, and continuous broadband power spectrum [4]. Most properties can meet some requirements of encryption. Therefore, image encryption technique based on chaotic system has more useful and practical applications in the recent years [5, 6]. However, many of the proposed schemes show some deficiencies, such as small key space and weak security [7]. TD-ERCS system is a new class of discrete chaotic map systems based on the physical model of ellipse reflecting activity. Many researchers have proposed that TD-ERCS system is a discrete chaotic system with the steady complexity, and the pseudorandom sequences generated by TD-ERCS are suitable for use in information encryption [8, 9].In computer science field, an artificial neural network (ANN) is massively parallel distributed processor made up of simple processing units that has a natural propensity for storing experiential knowledge and making it available for use. As ANNs have many important properties, such as massively parallel, highly connected structures consisting of a number of simple and nonlinear processing elements [10], artificial neural networks (ANNs) have already been applied to solve the image encryption. Many encryption methods based on ANNs have been suggested in research literature and can deal with the intractable problem of fast and highly secure encryption [11, 12].A new color image encryption algorithm is designed in the paper. In Section2, the mapping equation of TD-ERCS system is given. In Section 3, wavelet neural networks algorithm is presented in detail. In Section 4, the image encryption algorithm based on TD-ERCS system and wavelet neural network is proposed. Finally, experimental results and some conclusions are given in Section 5.


## 2. Tangent-Delay Ellipse Reflecting Cavity-Map System

In 2004, Li-Yuan et al. found a new chaotic system bearing the name of Tangent-Delay Ellipse Reflecting Cavity-Map System (TD-ERCS) [13]. TD-ERCS system is a discrete chaotic system and has many properties such as the maximum Lyapunov exponent which is over zero, unchangeable equiprobability distribution, and zero correlation in total field [14]. TD-ERCS is described by(1)
x
n
=
-
2
k
n
-
1
y
n
-
1
+
x
n
-
1
u
2
-
k
n
-
1
2
u
2
+
k
n
-
1
2
,
k
n
=
2
k
n
-
m
′
-
k
n
-
1
+
k
n
-
1
k
n
-
m
′
2
1
+
2
k
n
-
1
k
n
-
m
′
-
k
n
-
m
′
2
,
k
n
-
m
′
=
-
x
n
-
1
y
n
-
1
μ
2
n
<
m
-
x
n
-
m
y
n
-
m
μ
2
n
≥
m
,
y
n
=
k
n
-
1
x
n
-
x
n
-
1
+
y
n
-
1
,
k
0
′
=
-
x
0
y
0
μ
2
,
k
0
=
-
t
a
n
α
+
k
0
′
1
-
k
0
′
t
a
n
α
,where μ,x0,α,m are called TD-ERCS seed parameters. In TD-ERCS seed parameters, μ∈(0,1], initial x0∈-1,1, α∈0,π, and tangent-delay parameters m=2,3,4,5,…. Figure 1 shows the time responses of TD-ERCS chaotic systems, for TD-ERCS seed parameters (μ=0.3324, x0=0.2456, α=2.143, m=2), iterations n=2500 in (1).Figure 1
Time responses of TD-ERCS for seed parameters (μ=0.3324, x0=0.2456, α=2.143, and m=2).


## 3. Wavelet Neural Networks

### 3.1. The Wavelet Base Function

A cluster of functions which are got by time shift and scale stretch-out and drawback of mother wavelet functionu(t) are called the wavelet base functions. The wavelet base function is shown as follows [15]:(2)ua,bt=1aut-ba,where a,b are the scale and translation parameters, respectively. The mother wavelet function u(t) is satisfied using the following equation:(3)Cu=∫-∞+∞Uffdf<∞,where U(f) is Fourier transform of u(t).


### 3.2. The Model of Wavelet Neural Networks

Wavelet neural networks (WNNs) have emerged as new feed forward neural network based on wavelet transform, in which discrete wavelet function is used as the node activation function [16]. Since wavelet neural networks combine self-studying of neural network and the function of time-frequency localization of wavelet transform, they have strong ability to approximate and robust [17].The architecture of the WNNs is presented in Figure2. Wavelet neural networks commonly consist of three layers: input layer, hidden layer, and output layer. All the neurons in the layer are connected to the neurons in the next layer [18].Figure 2
The architecture of wavelet neural networks.The output of three-layer WNNs is calculated in the form(4)yk≈∑j=1nωjkψ∑i=1ruijxi-bjaj,k=1,2,…,m,where r is the neurons number in the input layer, m is the neurons number in the output layer, n is the neurons number in the hidden layer, and ωjk is the connection weight between the jth neuron of hidden layer and the kth neuron of output layer. uij is the connection weight between the ith neuron of input layer and the jth neuron of hidden layer. bj is the translation factor of the jth neuron in hidden layer. aj is the expansion and contraction factor of the jth neuron in hidden layer. xi is the ith neuron of input layer; yk is the kth neuron of output layer. In the hidden layer, the activation function of neuron is Morlet wavelet function in [19](5)ψt=cos1.75te-t2/2.Let us define error functione(t) as(6)et=yet-yt,where ye(t) is the model actual output and y(t) is the desired output at time t. Then the cost function E can be defined as (7)E=12∑i=1Nyet-yt2=12∑i=1Net2.Using the gradient descent algorithms, the weight vector for every neuron in wavelet neural networks is updated as follows [20]:(8)Δωjkl+1=-η∂E∂ωjkl+αΔωjkl,Δuijl+1=-η∂E∂uijl+αΔuijl,Δajl+1=-η∂E∂ajl+αΔajl,Δbjl+1=-η∂E∂bjl+αΔbjl,ωjkl+1=ωjkl+Δωjkl+1,uijl+1=uijl+Δuijl+1,ajl+1=ajl+Δajl+1,bjl+1=bjl+Δbjl+1,where l represents the backward step number and η and α are the learning and the momentum constants, differing in the ranges 0.01 to 0.1 and 0.1 to 0.9, respectively.


## 3.1. The Wavelet Base Function

A cluster of functions which are got by time shift and scale stretch-out and drawback of mother wavelet functionu(t) are called the wavelet base functions. The wavelet base function is shown as follows [15]:(2)ua,bt=1aut-ba,where a,b are the scale and translation parameters, respectively. The mother wavelet function u(t) is satisfied using the following equation:(3)Cu=∫-∞+∞Uffdf<∞,where U(f) is Fourier transform of u(t).


## 3.2. The Model of Wavelet Neural Networks

Wavelet neural networks (WNNs) have emerged as new feed forward neural network based on wavelet transform, in which discrete wavelet function is used as the node activation function [16]. Since wavelet neural networks combine self-studying of neural network and the function of time-frequency localization of wavelet transform, they have strong ability to approximate and robust [17].The architecture of the WNNs is presented in Figure2. Wavelet neural networks commonly consist of three layers: input layer, hidden layer, and output layer. All the neurons in the layer are connected to the neurons in the next layer [18].Figure 2
The architecture of wavelet neural networks.The output of three-layer WNNs is calculated in the form(4)yk≈∑j=1nωjkψ∑i=1ruijxi-bjaj,k=1,2,…,m,where r is the neurons number in the input layer, m is the neurons number in the output layer, n is the neurons number in the hidden layer, and ωjk is the connection weight between the jth neuron of hidden layer and the kth neuron of output layer. uij is the connection weight between the ith neuron of input layer and the jth neuron of hidden layer. bj is the translation factor of the jth neuron in hidden layer. aj is the expansion and contraction factor of the jth neuron in hidden layer. xi is the ith neuron of input layer; yk is the kth neuron of output layer. In the hidden layer, the activation function of neuron is Morlet wavelet function in [19](5)ψt=cos1.75te-t2/2.Let us define error functione(t) as(6)et=yet-yt,where ye(t) is the model actual output and y(t) is the desired output at time t. Then the cost function E can be defined as (7)E=12∑i=1Nyet-yt2=12∑i=1Net2.Using the gradient descent algorithms, the weight vector for every neuron in wavelet neural networks is updated as follows [20]:(8)Δωjkl+1=-η∂E∂ωjkl+αΔωjkl,Δuijl+1=-η∂E∂uijl+αΔuijl,Δajl+1=-η∂E∂ajl+αΔajl,Δbjl+1=-η∂E∂bjl+αΔbjl,ωjkl+1=ωjkl+Δωjkl+1,uijl+1=uijl+Δuijl+1,ajl+1=ajl+Δajl+1,bjl+1=bjl+Δbjl+1,where l represents the backward step number and η and α are the learning and the momentum constants, differing in the ranges 0.01 to 0.1 and 0.1 to 0.9, respectively.


## 4. Image Encryption Based on TD-ERCS and Wavelet Neural Networks

### 4.1. Process of Permutation Cryptography

LetS be a real set: S={s1,s2,…,sn}. A permutation process of order n refers to the operation of replacing an arrangement {pi∣pi=i,i=1,2,…,n} by a second arrangement {qi∣qi=πsi},πsi denoted by the si numerical order in the S set in ascending or descending order, and πsi∈N. Permutations group is represented as(9)ϕ=12⋯nπs1πs2⋯πsn.The reverse of this permutation process is specified as(10)ϕ-1=πs1πs2⋯πsn12⋯nwhich retrieves the original arrangement.Definition 1.
A permutationπ of X is a bijective function from X to X.
Based on Definition1, the permutation cryptography process can be defined as follows.Definition 2 (see [21]).
If any data matrixX is transformed to a cipher-matrix φz=∅zX where ∅z is any permutation operation, then the original matrix X can be obtained again from φz with the inverse operation of ∅z on it; that is, ∅Z-1φz=∅Z-1∅zX=X, as ∅Z-1∅z forms an identity operator.For example, suppose that plaintextG is(11)G=0.2341.2220.0070.1450.2010.341.TheG permutations group in ascending order is(12)ϕG=123456345162.Permutation cipherH is (13)H=0.0040.4210.1070.4230.0070.221.TheH permutations group in ascending order is(14)ϕH=123456153624.Then(15)ϕM=ϕGϕH=123456345162123456153624=123456362145.The ciphertextM is(16)M=0.2340.2010.0070.3411.2220.145.The decryption process is(17)ϕG=ϕMϕH=123456362145123456153624=123456345162.


### 4.2. Encryption Process

In the paper, the image encryption based TD-ERCS and WNNs mainly consist of two stages. The first stage of whole encryption system is chaotic sequence generation. In the chaotic sequence generation, a new chaotic sequence is generated by wavelet neural networks and TD-ERCS. The second stage of whole encryption system is the confusion stage. Since images are digital, a map is defined to transform the chaotic sequence to another sequence which consists of integers. Then the image can be encrypted by use of permutation operation and XOR with the integer sequence [22].


### 4.3. The Chaotic Sequence Generator

In this paper, we used chaotic sequences generated by TD-ERCS system and wavelet neural networks. Since wavelet neural networks have good capacity to approach arbitrary nonlinear mapping, they can possess chaotic state through studying of TD-ERCS chaotic sequence and modeling. The model system structure of chaotic sequences generator based on wavelet neural networks is shown in Figure3. The feedback from the WNNs output end to input end shaped closed-loop structure and makes the output chaotic sequence feedback to input end as the initial value for next output sequence, so as to output the chaotic sequences continuously. The training data of WNNs are given by the TD-ERCS sequence. After the weights of WNNs are determined by learning algorithm, chaotic sequence x(n) has been produced.Figure 3
The model system structure of chaotic sequences generator based on WNNs.


### 4.4. Encryption Algorithm

Assume a square imageH consists of M×N pixels as(18)H=hij∣1≤i≤M,1≤j≤N,where hij denotes pixel (i,j) of H image. The steps involved in the implementation of our encryption algorithm based on TD-ERCS and WNNs can be summarized as shown below.Step 1.
Set TD-ERCS seed parametersμ,x0,α,m and generate TD-ERCS chaotic sequences xn, yn, zn.Step 2.
Utilize WNNs to practice the chaotic sequencesxn, yn, zn and determine the weights of WNNs. The weights of WNNs and TD-ERCS seed parameters μ,x0,α,m are the key and are transmitted to the receiver by secure channel.Step 3.
Calculate the size of the imagem×n, and image is changed to one-dimensional vector in the order of rank hk [23]:(19)k=i-1·n+j1≤k≤m·n.Step 4.
Use the chaotic sequence generator to produce chaotic sequencex′n.Step 5.
Selectx′n as permutation ciphers and calculate image vector Cn by the permutation cryptography process.Step 6.
Generate a new chaotic sequenceβn:(20)βn=arccosxn′π,0≤βn≤1,where βn binary forms are βn=0.bn1bn2⋯bnp, bij=0,1, and use βk sequence to produce Bk:(21)Bk=bk1bk2⋯bkp.Step 7.
Calculate encrypted image vectorHk:(22)Hk=Ck⊕Bk,where the ⊕ means XOR. The encryption process is finished.The encryption algorithm is a reversible algorithm and the original image can be obtained by applying the inverse process of the encryption algorithm. The secret communication model based on TD-ERCS system and wavelet neural network is shown in Figure4.Figure 4
The secret communication model of image based on TD-ERCS system and wavelet neural network.


## 4.1. Process of Permutation Cryptography

LetS be a real set: S={s1,s2,…,sn}. A permutation process of order n refers to the operation of replacing an arrangement {pi∣pi=i,i=1,2,…,n} by a second arrangement {qi∣qi=πsi},πsi denoted by the si numerical order in the S set in ascending or descending order, and πsi∈N. Permutations group is represented as(9)ϕ=12⋯nπs1πs2⋯πsn.The reverse of this permutation process is specified as(10)ϕ-1=πs1πs2⋯πsn12⋯nwhich retrieves the original arrangement.Definition 1.
A permutationπ of X is a bijective function from X to X.
Based on Definition1, the permutation cryptography process can be defined as follows.Definition 2 (see [21]).
If any data matrixX is transformed to a cipher-matrix φz=∅zX where ∅z is any permutation operation, then the original matrix X can be obtained again from φz with the inverse operation of ∅z on it; that is, ∅Z-1φz=∅Z-1∅zX=X, as ∅Z-1∅z forms an identity operator.For example, suppose that plaintextG is(11)G=0.2341.2220.0070.1450.2010.341.TheG permutations group in ascending order is(12)ϕG=123456345162.Permutation cipherH is (13)H=0.0040.4210.1070.4230.0070.221.TheH permutations group in ascending order is(14)ϕH=123456153624.Then(15)ϕM=ϕGϕH=123456345162123456153624=123456362145.The ciphertextM is(16)M=0.2340.2010.0070.3411.2220.145.The decryption process is(17)ϕG=ϕMϕH=123456362145123456153624=123456345162.


## 4.2. Encryption Process

In the paper, the image encryption based TD-ERCS and WNNs mainly consist of two stages. The first stage of whole encryption system is chaotic sequence generation. In the chaotic sequence generation, a new chaotic sequence is generated by wavelet neural networks and TD-ERCS. The second stage of whole encryption system is the confusion stage. Since images are digital, a map is defined to transform the chaotic sequence to another sequence which consists of integers. Then the image can be encrypted by use of permutation operation and XOR with the integer sequence [22].


## 4.3. The Chaotic Sequence Generator

In this paper, we used chaotic sequences generated by TD-ERCS system and wavelet neural networks. Since wavelet neural networks have good capacity to approach arbitrary nonlinear mapping, they can possess chaotic state through studying of TD-ERCS chaotic sequence and modeling. The model system structure of chaotic sequences generator based on wavelet neural networks is shown in Figure3. The feedback from the WNNs output end to input end shaped closed-loop structure and makes the output chaotic sequence feedback to input end as the initial value for next output sequence, so as to output the chaotic sequences continuously. The training data of WNNs are given by the TD-ERCS sequence. After the weights of WNNs are determined by learning algorithm, chaotic sequence x(n) has been produced.Figure 3
The model system structure of chaotic sequences generator based on WNNs.


## 4.4. Encryption Algorithm

Assume a square imageH consists of M×N pixels as(18)H=hij∣1≤i≤M,1≤j≤N,where hij denotes pixel (i,j) of H image. The steps involved in the implementation of our encryption algorithm based on TD-ERCS and WNNs can be summarized as shown below.Step 1.
Set TD-ERCS seed parametersμ,x0,α,m and generate TD-ERCS chaotic sequences xn, yn, zn.Step 2.
Utilize WNNs to practice the chaotic sequencesxn, yn, zn and determine the weights of WNNs. The weights of WNNs and TD-ERCS seed parameters μ,x0,α,m are the key and are transmitted to the receiver by secure channel.Step 3.
Calculate the size of the imagem×n, and image is changed to one-dimensional vector in the order of rank hk [23]:(19)k=i-1·n+j1≤k≤m·n.Step 4.
Use the chaotic sequence generator to produce chaotic sequencex′n.Step 5.
Selectx′n as permutation ciphers and calculate image vector Cn by the permutation cryptography process.Step 6.
Generate a new chaotic sequenceβn:(20)βn=arccosxn′π,0≤βn≤1,where βn binary forms are βn=0.bn1bn2⋯bnp, bij=0,1, and use βk sequence to produce Bk:(21)Bk=bk1bk2⋯bkp.Step 7.
Calculate encrypted image vectorHk:(22)Hk=Ck⊕Bk,where the ⊕ means XOR. The encryption process is finished.The encryption algorithm is a reversible algorithm and the original image can be obtained by applying the inverse process of the encryption algorithm. The secret communication model based on TD-ERCS system and wavelet neural network is shown in Figure4.Figure 4
The secret communication model of image based on TD-ERCS system and wavelet neural network.


## 5. Experimental Results and Analysis

In the paper, experimental analysis of the proposed image encryption algorithm has been done. The experiment has been implemented in the Matlab 2009a in Figure5(a). The original image is 256 level grayscale and 225×336 size. The structure of WNNs was a three-layer wavelet neural network, in which the number of input layer neurons is three, the number of output layer neurons is one, and the number of hidden layer neurons is six. TD-ERCS system seed parameters are 0.1256, 0.8130, 0.5325, and 2. After 100 times iterations, the cost function E of wavelet neural network was 0.1696. The connection weights of wavelet neural network between input layer and hidden layer are given by(23)W1=0.57680.8776-0.3325-1.07210.9519-0.7115-0.9919-0.52540.43820.7774-0.06990.66090.5320-1.33290.0147-0.08760.4870-1.106.Figure 5
The results of color image encryption algorithm.
(a)
The original image
(b)
The encrypted image
(c)
The correct decryption image
(d)
The wrong decryption imageThe connection weights between hidden layer and output layer are given by(24)W2=-0.08130.72120.43810.28800.2938-0.2485.The translation factors vector is given by(25)B=-0.06790.1035-0.4452-1.6843-0.0160-0.3100.The expansion and contraction factors vector is given by(26)A=0.8826-0.27030.46480.08971.5915-0.8423.Lyapunov exponent is a useful way to characterize and quantify chaotic phenomena arising in dynamical systems, which describe the temporal evolution of small perturbations of the initial conditions [24]. The maximum Lyapunov exponent of chaotic sequence is 0.6312 by Wolf’s algorithm, and the result shows that the system is chaotic system [25]. The encrypted image is shown in Figure 5(b), which is rough-and-tumble and unrecognizable. As Figure 5(c) shows the decrypted image using the same encryption key is an exact version of the original image. Figure 5(d) shows the error between the original image and decrypted image, which is zero.


### 5.1. Key Space Analysis

For a secure image encryption algorithm, the key space should be large enough to make brute-force attacks infeasible [26]. In our algorithm, the TD-ERCS seed parameters and the connection weights of wavelet neural network can be used as keys. If the precision is 10−4 in the above test, the key space size is at least 10195. The key space is large enough so that it can resist the exhaustive attack effectively.


### 5.2. Histograms Analysis

The image histogram is an important statistical characteristic of digital image and can illustrate how pixels in an image are distributed by graphing the number of pixels at each color intensity level [27]. The histograms of the original image and the encrypted image are shown in Figure 6. It is shown that the histogram of the encrypted image is fairly uniform and the encryption algorithm has covered up all the characters of the original image.Figure 6
The histogram of the original and encrypted image.


### 5.3. Correlation Coefficient Analysis

In the image data, each pixel is in neighborhood with eight adjacent pixels and is highly correlated with its adjacent pixels [28]. To test the correlation between two vertically adjacent pixels, two horizontally adjacent pixels, and two diagonally adjacent pixels in the encryption image, we randomly select 3015 pairs of two adjacent (in horizontal, vertical, and diagonal direction) pixels from the original and encryption image. Then, calculate their correlation coefficient using the following four formulas [29, 30]:(27)Ex=1N∑i=1Nx,Dx=1N∑i=1Nx-Ex2,COVx,y=1N∑i=1Nxi-Exyi-Ey,rxy=COVx,yDxDy,where E(x) is the expected value and N is the number of pixels. D(x) is the estimation of variance of x, and COV(x,y) is the estimation of covariance between x and y, where x and y are grayscale values of two adjacent pixels in the image. The correlation of two adjacent (in horizontal, vertical, and diagonal direction) pixels from the original and encryption image is shown in Figures 7, 8, and 9. Table 1 gives the correlation coefficients of the original image and the encrypted image. The experiment data show that there is a high correlation between the adjacent pixels of the original image. The correlation coefficients of the encrypted image are almost zero, and the adjacent pixels of the encrypted image are almost irrelevant.Table 1
The correlation coefficients of the original image and the encrypted image.
Horizontal
Vertical
Diagonal
Original image
0.9998
0.9506
0.9469
Encrypted image
0.0015
0.0096
−0.0140Figure 7
The correlation analysis of original and encryption image in horizontal.
(a)
Original image
(b)
Encryption imageFigure 8
The correlation analysis of original and encryption image in vertical.
(a)
Original image
(b)
Encryption imageFigure 9
The correlation analysis of original and encryption image in diagonal.
(a)
Original image
(b)
Encryption image


### 5.4. Differential Analysis

In image encryption, the cipher resistance to differential attacks is commonly analyzed via the Number of Pixels Change Rate (NPCR) and the Unified Average Changing Intensity (UACI) tests [31]. NPCR and UACI can be mathematically defined by(28)Di,j=0,ifC1i,j=C2i,j1,ifC1i,j≠C2i,jNPCR=∑i=1M∑j=1NDi,jM×N×100%UACI=∑i=1M∑j=1NC1i,j-C2i,j/255M×N×100%,where C1, C2 are ciphertext images before and after one pixel change in a plaintext image, respectively. C1(i,j) are the pixel value at grid (i,j) in C1. C2(i,j) are the pixel value at grid (i,j) in C2. It is clear that NPCR concentrates on the absolute number of pixels which changes value in differential attacks, while the UACI focuses on the averaged difference between two paired ciphertext images [32]. In this paper, the NPCR between the original image and the encryption image is 0.00132%, and the UACI is 0.0000005%. The results demonstrate that the proposed scheme can survive differential attack.


### 5.5. Key Sensitivity Test

An ideal image encryption scheme has to be key-sensitive, meaning that a tiny change in the key will produce completely different encrypted image. For testing the key sensitivity of encryption algorithm, this paper has performed sensitivity analysis according to the following steps [33].(1) An original image in Figure5(a) is encrypted by using TD-ERCS system seed parameters (0.1256, 0.8130, 0.5325, and 2) and the resultant image is referred to as encrypted image A as shown in Figure 5(b).(2) The same original image is encrypted by making the slight modification in the seed parameters (0.12559, 0.8130, 0.5325, and 2). The encrypted image is shown in Figure10(a) and the decrypted image of image A using seed parameters (0.12559, 0.8130, 0.5325, and 2) is shown in Figure 9(b).Figure 10
Key sensitive test.
(a)
The encrypted image using seed parameters (0.1256, 0.8130, 0.5325, and 2)
(b)
The decrypted image of Figure5(b) using seed parameters (0.12559, 0.8130, 0.5325, and 2)
(c)
The encrypted image using seed parameters (0.1256, 0.81299, 0.5325, and 2)
(d)
The decrypted image of Figure5(b) using seed parameters (0.1256, 0.81299, 0.5325, and 2)
(e)
The encrypted image using seed parameters (0.1256, 0.8130, 0.53249, and 2)
(f)
The decrypted image of Figure5(b) using seed parameters (0.1256, 0.8130, 0.53249, and 2)(3) The same original image is encrypted by making slight modification in the seed parameters (0.1256, 0.81299, 0.5325, and 2) and the encrypted image is shown in Figure10(c). Figure 10(d) has shown the decrypted image of image A using seed parameters (0.1256, 0.81299, 0.5325, and 2).(4) The same original image is encrypted by making the slight modification in the seed parameters (0.1256, 0.8130, 0.53249, and 2) and the encrypted image is shown in Figure10(e). Figure 10(f) has shown the decrypted image of image A using seed parameters (0.1256, 0.8130, 0.53249, and 2).Figure10 clearly shows that the image A is not correctly decrypted by using TD-ERCS system seed parameters (0.12559, 0.8130, 0.5325, and 2), (0.1256, 0.81299, 0.5325, and 2), and (0.1256, 0.8130, 0.53249, and 2), which has also only one bit difference between the correct key and the wrong key.


## 5.1. Key Space Analysis

For a secure image encryption algorithm, the key space should be large enough to make brute-force attacks infeasible [26]. In our algorithm, the TD-ERCS seed parameters and the connection weights of wavelet neural network can be used as keys. If the precision is 10−4 in the above test, the key space size is at least 10195. The key space is large enough so that it can resist the exhaustive attack effectively.


## 5.2. Histograms Analysis

The image histogram is an important statistical characteristic of digital image and can illustrate how pixels in an image are distributed by graphing the number of pixels at each color intensity level [27]. The histograms of the original image and the encrypted image are shown in Figure 6. It is shown that the histogram of the encrypted image is fairly uniform and the encryption algorithm has covered up all the characters of the original image.Figure 6
The histogram of the original and encrypted image.


## 5.3. Correlation Coefficient Analysis

In the image data, each pixel is in neighborhood with eight adjacent pixels and is highly correlated with its adjacent pixels [28]. To test the correlation between two vertically adjacent pixels, two horizontally adjacent pixels, and two diagonally adjacent pixels in the encryption image, we randomly select 3015 pairs of two adjacent (in horizontal, vertical, and diagonal direction) pixels from the original and encryption image. Then, calculate their correlation coefficient using the following four formulas [29, 30]:(27)Ex=1N∑i=1Nx,Dx=1N∑i=1Nx-Ex2,COVx,y=1N∑i=1Nxi-Exyi-Ey,rxy=COVx,yDxDy,where E(x) is the expected value and N is the number of pixels. D(x) is the estimation of variance of x, and COV(x,y) is the estimation of covariance between x and y, where x and y are grayscale values of two adjacent pixels in the image. The correlation of two adjacent (in horizontal, vertical, and diagonal direction) pixels from the original and encryption image is shown in Figures 7, 8, and 9. Table 1 gives the correlation coefficients of the original image and the encrypted image. The experiment data show that there is a high correlation between the adjacent pixels of the original image. The correlation coefficients of the encrypted image are almost zero, and the adjacent pixels of the encrypted image are almost irrelevant.Table 1
The correlation coefficients of the original image and the encrypted image.
Horizontal
Vertical
Diagonal
Original image
0.9998
0.9506
0.9469
Encrypted image
0.0015
0.0096
−0.0140Figure 7
The correlation analysis of original and encryption image in horizontal.
(a)
Original image
(b)
Encryption imageFigure 8
The correlation analysis of original and encryption image in vertical.
(a)
Original image
(b)
Encryption imageFigure 9
The correlation analysis of original and encryption image in diagonal.
(a)
Original image
(b)
Encryption image


## 5.4. Differential Analysis

In image encryption, the cipher resistance to differential attacks is commonly analyzed via the Number of Pixels Change Rate (NPCR) and the Unified Average Changing Intensity (UACI) tests [31]. NPCR and UACI can be mathematically defined by(28)Di,j=0,ifC1i,j=C2i,j1,ifC1i,j≠C2i,jNPCR=∑i=1M∑j=1NDi,jM×N×100%UACI=∑i=1M∑j=1NC1i,j-C2i,j/255M×N×100%,where C1, C2 are ciphertext images before and after one pixel change in a plaintext image, respectively. C1(i,j) are the pixel value at grid (i,j) in C1. C2(i,j) are the pixel value at grid (i,j) in C2. It is clear that NPCR concentrates on the absolute number of pixels which changes value in differential attacks, while the UACI focuses on the averaged difference between two paired ciphertext images [32]. In this paper, the NPCR between the original image and the encryption image is 0.00132%, and the UACI is 0.0000005%. The results demonstrate that the proposed scheme can survive differential attack.


## 5.5. Key Sensitivity Test

An ideal image encryption scheme has to be key-sensitive, meaning that a tiny change in the key will produce completely different encrypted image. For testing the key sensitivity of encryption algorithm, this paper has performed sensitivity analysis according to the following steps [33].(1) An original image in Figure5(a) is encrypted by using TD-ERCS system seed parameters (0.1256, 0.8130, 0.5325, and 2) and the resultant image is referred to as encrypted image A as shown in Figure 5(b).(2) The same original image is encrypted by making the slight modification in the seed parameters (0.12559, 0.8130, 0.5325, and 2). The encrypted image is shown in Figure10(a) and the decrypted image of image A using seed parameters (0.12559, 0.8130, 0.5325, and 2) is shown in Figure 9(b).Figure 10
Key sensitive test.
(a)
The encrypted image using seed parameters (0.1256, 0.8130, 0.5325, and 2)
(b)
The decrypted image of Figure5(b) using seed parameters (0.12559, 0.8130, 0.5325, and 2)
(c)
The encrypted image using seed parameters (0.1256, 0.81299, 0.5325, and 2)
(d)
The decrypted image of Figure5(b) using seed parameters (0.1256, 0.81299, 0.5325, and 2)
(e)
The encrypted image using seed parameters (0.1256, 0.8130, 0.53249, and 2)
(f)
The decrypted image of Figure5(b) using seed parameters (0.1256, 0.8130, 0.53249, and 2)(3) The same original image is encrypted by making slight modification in the seed parameters (0.1256, 0.81299, 0.5325, and 2) and the encrypted image is shown in Figure10(c). Figure 10(d) has shown the decrypted image of image A using seed parameters (0.1256, 0.81299, 0.5325, and 2).(4) The same original image is encrypted by making the slight modification in the seed parameters (0.1256, 0.8130, 0.53249, and 2) and the encrypted image is shown in Figure10(e). Figure 10(f) has shown the decrypted image of image A using seed parameters (0.1256, 0.8130, 0.53249, and 2).Figure10 clearly shows that the image A is not correctly decrypted by using TD-ERCS system seed parameters (0.12559, 0.8130, 0.5325, and 2), (0.1256, 0.81299, 0.5325, and 2), and (0.1256, 0.8130, 0.53249, and 2), which has also only one bit difference between the correct key and the wrong key.


## 6. Conclusion

The TD-ERCS system is a highly complex nonlinear dynamic system based on the physical model of ellipse reflecting cavity. In this paper, an image encryption scheme based on TD-ERCS system and wavelet neural networks is presented. All parts of the proposed encryption algorithm were simulated using computer code. Theoretical and experimental results indicate that the image encryption algorithm based on TD-ERCS system and wavelet neural networks has advantages of large key space and high-level security, while maintaining acceptable efficiency. Finally, the proposed image encryption is suitable for any size digital image and can be widely applied in other information security fields.



---

*Source: 501054-2015-10-04.xml*