# Image Encryption Algorithm Based on a Novel Improper Fractional-Order Attractor and a Wavelet Function Map

Authors: Jian-feng Zhao; Shu-ying Wang; Li-tao Zhang; Xiao-yan Wang
Journal: Journal of Electrical and Computer Engineering
 (2017)

---

## Abstract

This paper presents a three-dimensional autonomous chaotic system with high fraction dimension. It is noted that the nonlinear characteristic of the improper fractional-order chaos is interesting. Based on the continuous chaos and the discrete wavelet function map, an image encryption algorithm is put forward. The key space is formed by the initial state variables, parameters, and orders of the system. Every pixel value is included in secret key, so as to improve antiattack capability of the algorithm. The obtained simulation results and extensive security analyses demonstrate the high level of security of the algorithm and show its robustness against various types of attacks.


---

## Body

## 1. Introduction

With rapid development of communications, network security of information has become increasingly important for many applications. While high redundancy for image and multimedia information is challenging traditional cryptography algorithms [1, 2], chaotic attractors have orbital pseudorandom properties, good unpredictability, highly sensitivity for initial conditions, topological transitivity features, and so on. These characters indicate that chaos-based cryptosystem is a research hotspot in multimedia security area [3]. In 1949, Shannon created confusion and diffusion in the world of cryptography [4]. To overcome high redundancies and strong correlations of digital images, chaos has been widely applied in traditional encryption algorithm [5–13]. Research proposed that one-dimensional chaotic system has low security [14, 15]. With higher dimension, chaotic attractor occupies more space and winding complexly. The most complex attractor has much more complex output signals so that encryption effect would be better, whereas three-dimensional autonomous chaotic systems with higher fractal dimension are rare [16].Comparing with integer-order chaotic system, the fractional-order chaotic system is not only related to parameters of the system, but also closely linked with fractional orders of system. Improper fractional-order chaotic system, therefore, has strong nonlinear characters and complexity. In secret communication, it can enhance the density and security so as to enormously increase the difficulty of unmasking signals. The algorithm shows greater application value in communication field [17, 18].The rest of this paper is organized as follows: Section2 describes a novel complex attractor. In Section 3, the chaos-based encryption algorithm is proposed. The numerical experimental results of performance analysis are given in Section 4. Finally, Section 5 contains conclusion and perspectives.


## 2. Improper Fractional-Order Chaotic Flow

A new three-dimensional autonomous chaotic system with high fraction dimension is constructed, of which the governing fractional-order equation is(1)dq1xdtq1=xz+bsin⁡x+y+z,dq2ydtq2=az-by,dq3zdtq3=1-cx2,where X=(x,y,z)T are state variables and a,b,c are parameters. Three fractional orders are q1,q2,q3; if max(q1,q2,q3)<1, system (1) is a true fractional-order system, if q1=q2=q3=1, system (1) is an integer-order system, and if max(q1,q2,q3)>1, system (1) is an improper fractional-order system. Based on stability theory and numerical analysis of fractional-order system, when (a,b,c)=(6,5,0.12) and (q1,q2,q3)=(1,1,1), the Lyapunov dimension DKY is shown in Figure 1(a) with varying parameter a in interval [1,11]. Almost all DKY of chaotic attractors are larger than 2.5. With increasing control parameters, DKY reaches as high as 2.9336 at some special parameters. As shown in Figure 1(b), the Poincaré section of the maximally complex attractor has hierarchical structure composed of dense points. When (q1,q2,q3)=(1.01,1.1,1.11), the improper fractional-order chaos presents interesting and complex dynamic behavior represented in Figure 2.Figure 1
Chaotic characters of the novel attractor withq1=q2=q3=1.
(a)
Lyapunov dimensions
(b)
Poincaré sections of the maximally complex attractorFigure 2
The fractional-order chaos withq1=1.01, q2=1.1, and q3=1.11.
(a)
x-y phase plane
(b)
x-z phase plane


## 3. Image Encryption Algorithm

Algorithm process is shown in Figure3.Figure 3
Encryption process.Encryption Procedure. Image encryption algorithm mainly consists of two processes: confusion and diffusion.Step 1 (pixel confusion).
Suppose that the size of plaintext image isL=M×N. Scanning the plaintext image line by line in order to obtain pixel matrix P is as follows:(2)P=P1P2⋯PNPN+1PN+2⋯P2N⋮⋮⋮⋮PM-1N+1PM-1N+2⋯PL.
In confusion procedure, the wavelet function map is taken as follows [21]:(3)xn+1=k·1-xn2·e-xn+μ2/2,where n∈N is the number of iterations. For numerical simulations, we take the initial value of the discrete system (3) as x0=0.3, parameter k=1.33, and μ=-0.6. The chaotic characteristics of wavelet function map are shown in Figure 4(a), and its interesting bifurcation diagram varying with μ∈[-0.77,-0.29] is displayed in Figure 4(b).
To improve the sensitivity of original image to encryption image, secret keys are distracted by plain image. In confusion procedure,T=mod∑i=1LPi,L/(L-1) is initial vector of wavelet function map. Sequence x(n) is rearranged by wavelet function map so as to engender position matrix lx(n). Then lx(n) is used to confuse position of image pixels and get matrix C(i)∣i=1,2,…,L. Finally matrix C(i)∣i=1,2,…,L is transformed into permutation image C of size M×N.Figure 4
Wavelet function map.
(a)
Wavelet function map
(b)
Bifurcation of wavelet function mapStep 2 (pixel diffusion).
Confusion only changes the position of pixel point while the pixel value is fixed, so the attacker may break down the algorithm though the statistics.In diffusion,T is used to disturb parameter a=a+T of system (1). Then the chaos generates chaotic sequences and makes N0 times preiteration to eliminate some harmful effect of chaos transient process. Matrix B is created and initialized as an empty sequence. State vector x(1),x(2),x(3) is generated in every iteration and a parameter m=modabsx1+x2+x3,3 is derived. Then, matrix B is assigned according to parameter m. When m=0,B={B,x1,x2}, when m=1,B={B,x1,x3}, and when m=2,B={B,x3,x1}.In every interaction, sequenceB has strong randomness after 2L+N0 times iteration. Then B is preprocessed in the following form:(4)Ki=modtemp,256,i=1,2,…,L,where Temp=floorBi-floorBi×10m, x is absolution of x, and floor(x) expresses downrounding. The positive integer m=12. The autocorrelation of sequence B focuses on the interval [-0.1,0.1] and is shown in Figure 5(a), whereas the autocorrelation of sequence K after the pretreatment focuses on a smaller interval [-0.003,0.003] processed in Figure 5(b).Figure 5
Autocorrelation of sequences.
(a)
Autocorrelation of sequenceB
(b)
Autocorrelation of improved sequenceKDuring diffusion, first pixel of permutation imageC is encrypted as follows:(5a)C1=C1+K1mod256⊕CL+K1+L+Tmod256.However, for pixel at position i>1, pixel substitution is made according to(5b)Ci=Ci+Kimod256⊕Ci-1+Ki+L+Tmod256,i=1,2,…,L.Then sequence C(i),i=1,2,…,L is conversed into matrix with size of M×N.Decryption is inverse operation of encryption process. Decryption imageD is scanned line by line to get sequence D(i)∣i=1,2,…,L(L=M×N).(6a)temp=Ci⊕Ci-1+Ki+L+Tmod256,Di=temp-Kimod256,i=L,L-1,…,2,(6b)temp=C1⊕CL+K1+L+Tmod256,D1=temp-K1mod256.Then, inverse scrambling operation for matrixD(i)∣i=1,2,…,L is made. Firstly, sequence x(n) is generated by wavelet function map to produce position matrix lx(n). Then lx(n) is arranged by the same law so as to get position matrix llx(n). At last we use llx(n) to confuse pixel position of image D to get matrix E(i)∣i=1,2,…,L and change matrix E into M×N two-dimension matrix to observe final decrypted image.


## 4. Numerical Simulation and Performance Analysis

The proposed encryption technique is implemented in MATLAB 7.1. In the experiment, different types of digital images are tested, such as gray image, binary image, and color image.


### 4.1. 3D Histogram Analysis

Histogram is a graphical representation of the pixels intensity distribution of an image, and it can measure the capacity of resisting attack. The gray Lena image of size 256 × 256 is encrypted as shown in Figure6(c) and the 3D histogram of the encrypted Lena image is shown in Figure 6(d). The binary image has only two colors and is sensitive to the change of pixel. 3D histograms of a binary image are encrypted and encrypted binary images are demonstrated in Figures 7(b) and 7(d), respectively. Figure 8(a) shows the color image and its RGB histograms; Figure 8(b) shows the encrypted color image of Figure 8(a) and its RGB histograms. The histogram of the encrypted image is fairly uniform and significantly different from that of the original image, so the information is unpredictable and histogram attack can be avoided.Figure 6
The gray Lena image.
(a)
Plain image
(b)
Histogram of (a)
(c)
Encrypted image
(d)
Histogram of (c)Figure 7
The binary image.
(a)
Plain image
(b)
Histogram of (a)
(c)
Encrypted image
(d)
Histogram of (c)Figure 8
The color parrot image: (a) the plain image and its RGB histograms; (b) the encrypted image and its RGB histograms.
(a)
(b)


### 4.2. Information Entropy

Information entropy, firstly proposed by Shannon in 1949, is a significant property that reflects the randomness and the unpredictability of an information source [4]. With bigger entropy image has more uniform gray distribution. The entropy H(x) is defined by the following formula: H(x)=-∑i=1np(xi)log2p(xi), where p(xi) denotes the probability of symbol xi. When p(xi)=1/256, the 256 × 256 gray image has maximum entropy of 8. Entropy of gray Lena image and binary image is 7.447144 and 0.593165, respectively, while its encryption is 7.988847 and 7.972069, respectively. Considering RGB components of color image Lena, average information entropy of the color Lena and encrypted color Lena is 7.198813 and 7.997281, respectively. It is obvious that the entropies of the cipher images are very close to the theoretical value of 8, which means that the encryption algorithm has ability of resisting statistical attack.


### 4.3. Correlation Coefficients of Adjacent Pixels

In the section, we aim at checking up the correlation of two adjacent pixels between the original image and encrypted image. In this simulation, randomly selected 1000 pairs of adjacent pixels (horizontally, vertically, and diagonally) are determined. The correlation coefficient between two adjacent pixels in an image is determined according to the following formula:(7)Rxy=Convx,yDxDy,where (8)Ex=1N∑i=1Nxi,Dx=1N∑i=1Nxi-Ex2,Convx,y=1N∑i=1Nxi-Exyi-Ey.Figure9 displays correlation coefficients of adjacent pixels in four directions of Lena plain image and cipher image. The result emphasizes that there is hardly any correlation of adjacent pixels in encryption images. Correlation coefficients of the encrypted Lena image are smaller than other methods shown in Table 1. The statistical properties of original image have randomly spread to encryption image.Table 1
Correlation coefficient of different plain image and cipher image.
Plain image
Horizontal
Vertical
Diagonal
Counterdiagonal
Gray Lena
Plain image
0.972953
0.970462
0.916925
0.938441
Encrypted image
−4.097226 × 10−5
1.158832 × 10−4
4.620716 × 10−5
4.539076 × 10−4
Encrypted image [19]
0.000417
−0.002048
−0.001554
Encrypted image [20]
0.023
0.028
0.023
Binary image
Plain image
0.915352
0.922622291
0.868221
0.857255
Encrypted image
−3.811868 × 10−6
−7.131676 × 10−4
−9.372164 × 10−4
−3.496642 × 10−4
Color parrot
R
Plain image
0.945140
0.950725
0.919702
0.937272
Encrypted image
−0.001678
3.514572 × 10−4
−9.329940 × 10−4
−4.626904 × 10−5
G
Plain image
0.948746
0.941403
0.910118
0.929873
Encrypted image
−8.326210 × 10−4
−4.626904 × 10−5
1.484844 × 10−5
6.479456 × 10−4
B
Plain image
0.956960
0.924891
0.924891
0.941023
Encrypted image
−7.902728 × 10−6
1.1520873 × 10−4
9.66501 × 10−4
−1.766560 × 10−4Figure 9
Correlation coefficients of original and encryption image: horizontal; vertical; diagonal; counterdiagonal.


### 4.4. Resistance to Differential Attack

The attacker may observe the change of decryption by the tiny change of plaintext to find the correlation between plain image and cipher image. Based on principles of cryptology, a good encryption algorithm should be sensitive to plaintext sufficiently. In general, attacker makes a slight change (e.g., modify only one pixel) for plaintext to find out some relationships between plain image and encrypted image. If tiny change of original image can bring great changes to cipher image, the effect of differential attack will be reduced. Sensitivity of the plaintext encryption algorithm can be quantified by NPCR (number of pixels changing rate) and UACI (unified average changing intensity). They are defined as follows:(9)Di,j=0,C1i,j=C2i,j,1,C1i,j≠C2i,j,NPCR=1M×N∑i=1M∑j=1NDi,j×100%,UACI=1255×M×N∑i=1M∑j=1NC1i,j-C2i,j×100%,where C1(i,j) and C2(i,j) indicate pixel value of two encryption images at location (i,j). M and N present number of rows and columns of the original image.The ideal expectations of NPCR and UACI can be calculated by the following simplified formulas:(10)NPCRE=1-2-n×100%,UACIE=122n∑i=12n-1ii+12n-1×100%=131+2-n×100%,where n is the number of bits used to represent the different bit planes of an image. For gray scale image parameter n=8 (8 bits per pixel). Hence expected NPCR and expected UACI are NPCRE=99.6094% (horizontal solid line in Figure 10(a)) and UACIE=33.4635% (horizontal solid line in Figure 10(b)), respectively. From the above formula we can see that relation NPCRE+3UACIE=2, so any value of the ideal expectations can illustrate the capability of algorithm to attack resisting plaintext.Figure 10
Measured sensitivity of cipher image to plain image.
(a)
Number of pixels changing rate
(b)
Unified average changing intensityIn this experiment, one hundred groups of Lena images are encrypted. In every group image, one is original image and the other is original image with only one changed pixel value (including border points and intermediate points, each time the changed amount is only 1). Then the test results are shown in Figure10; every value fluctuates up and down near ideal value. The average values are NPCR¯=99.6091% (horizontal dotted line in Figure 10(a)) and UACI¯=33.5038% (horizontal dotted line in Figure 10(b)), respectively. Obviously the given encryption algorithm greatly improves the sensitivity of plaintext, thereby enhancing capacity of resistance to differential attacks.


### 4.5. Key Sensitivity Test

Lena gray image is used to make experimental analysis. With right key, the decrypted image is clear and correct without any distortion in Figure11(a). Decryption using keys with slight mismatch is performed so as to evaluate the key sensitivity. With a subtle change, the new key q1=1.01000000001, and the decrypted image is incorrect, proposed in Figure 11(b). Subtle change of key yields greatly different decrypted images. It is fully convincing that the algorithm has steady and superior secure performance in the first encryption round and will well resist differential attack.Figure 11
The decrypted Lena image.
(a)
Decrypted image
(b)
Error decrypted image


### 4.6. Algorithmic Complexity Analyses

The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the size of the input to the problem. The time complexity is commonly described using the big-O notation, which suppresses multiplicative constants and lower order terms. Time complexity of generating key is O(M·N). The maximum complexity chaos and wavelet function map generate chaos sequences with time complexities O(T12) and O(T22), respectively. Pixel diffusion and substitution have the same time complexity O(M·N). At each step, the worst total time complexity is (11)OM×N+OT12+OT22+OM×N=OT,where T=maxM·N,T12,T22. T1 and T2 represent iterate numbers of maximum complexity chaos and wavelet function map, respectively.


## 4.1. 3D Histogram Analysis

Histogram is a graphical representation of the pixels intensity distribution of an image, and it can measure the capacity of resisting attack. The gray Lena image of size 256 × 256 is encrypted as shown in Figure6(c) and the 3D histogram of the encrypted Lena image is shown in Figure 6(d). The binary image has only two colors and is sensitive to the change of pixel. 3D histograms of a binary image are encrypted and encrypted binary images are demonstrated in Figures 7(b) and 7(d), respectively. Figure 8(a) shows the color image and its RGB histograms; Figure 8(b) shows the encrypted color image of Figure 8(a) and its RGB histograms. The histogram of the encrypted image is fairly uniform and significantly different from that of the original image, so the information is unpredictable and histogram attack can be avoided.Figure 6
The gray Lena image.
(a)
Plain image
(b)
Histogram of (a)
(c)
Encrypted image
(d)
Histogram of (c)Figure 7
The binary image.
(a)
Plain image
(b)
Histogram of (a)
(c)
Encrypted image
(d)
Histogram of (c)Figure 8
The color parrot image: (a) the plain image and its RGB histograms; (b) the encrypted image and its RGB histograms.
(a)
(b)


## 4.2. Information Entropy

Information entropy, firstly proposed by Shannon in 1949, is a significant property that reflects the randomness and the unpredictability of an information source [4]. With bigger entropy image has more uniform gray distribution. The entropy H(x) is defined by the following formula: H(x)=-∑i=1np(xi)log2p(xi), where p(xi) denotes the probability of symbol xi. When p(xi)=1/256, the 256 × 256 gray image has maximum entropy of 8. Entropy of gray Lena image and binary image is 7.447144 and 0.593165, respectively, while its encryption is 7.988847 and 7.972069, respectively. Considering RGB components of color image Lena, average information entropy of the color Lena and encrypted color Lena is 7.198813 and 7.997281, respectively. It is obvious that the entropies of the cipher images are very close to the theoretical value of 8, which means that the encryption algorithm has ability of resisting statistical attack.


## 4.3. Correlation Coefficients of Adjacent Pixels

In the section, we aim at checking up the correlation of two adjacent pixels between the original image and encrypted image. In this simulation, randomly selected 1000 pairs of adjacent pixels (horizontally, vertically, and diagonally) are determined. The correlation coefficient between two adjacent pixels in an image is determined according to the following formula:(7)Rxy=Convx,yDxDy,where (8)Ex=1N∑i=1Nxi,Dx=1N∑i=1Nxi-Ex2,Convx,y=1N∑i=1Nxi-Exyi-Ey.Figure9 displays correlation coefficients of adjacent pixels in four directions of Lena plain image and cipher image. The result emphasizes that there is hardly any correlation of adjacent pixels in encryption images. Correlation coefficients of the encrypted Lena image are smaller than other methods shown in Table 1. The statistical properties of original image have randomly spread to encryption image.Table 1
Correlation coefficient of different plain image and cipher image.
Plain image
Horizontal
Vertical
Diagonal
Counterdiagonal
Gray Lena
Plain image
0.972953
0.970462
0.916925
0.938441
Encrypted image
−4.097226 × 10−5
1.158832 × 10−4
4.620716 × 10−5
4.539076 × 10−4
Encrypted image [19]
0.000417
−0.002048
−0.001554
Encrypted image [20]
0.023
0.028
0.023
Binary image
Plain image
0.915352
0.922622291
0.868221
0.857255
Encrypted image
−3.811868 × 10−6
−7.131676 × 10−4
−9.372164 × 10−4
−3.496642 × 10−4
Color parrot
R
Plain image
0.945140
0.950725
0.919702
0.937272
Encrypted image
−0.001678
3.514572 × 10−4
−9.329940 × 10−4
−4.626904 × 10−5
G
Plain image
0.948746
0.941403
0.910118
0.929873
Encrypted image
−8.326210 × 10−4
−4.626904 × 10−5
1.484844 × 10−5
6.479456 × 10−4
B
Plain image
0.956960
0.924891
0.924891
0.941023
Encrypted image
−7.902728 × 10−6
1.1520873 × 10−4
9.66501 × 10−4
−1.766560 × 10−4Figure 9
Correlation coefficients of original and encryption image: horizontal; vertical; diagonal; counterdiagonal.


## 4.4. Resistance to Differential Attack

The attacker may observe the change of decryption by the tiny change of plaintext to find the correlation between plain image and cipher image. Based on principles of cryptology, a good encryption algorithm should be sensitive to plaintext sufficiently. In general, attacker makes a slight change (e.g., modify only one pixel) for plaintext to find out some relationships between plain image and encrypted image. If tiny change of original image can bring great changes to cipher image, the effect of differential attack will be reduced. Sensitivity of the plaintext encryption algorithm can be quantified by NPCR (number of pixels changing rate) and UACI (unified average changing intensity). They are defined as follows:(9)Di,j=0,C1i,j=C2i,j,1,C1i,j≠C2i,j,NPCR=1M×N∑i=1M∑j=1NDi,j×100%,UACI=1255×M×N∑i=1M∑j=1NC1i,j-C2i,j×100%,where C1(i,j) and C2(i,j) indicate pixel value of two encryption images at location (i,j). M and N present number of rows and columns of the original image.The ideal expectations of NPCR and UACI can be calculated by the following simplified formulas:(10)NPCRE=1-2-n×100%,UACIE=122n∑i=12n-1ii+12n-1×100%=131+2-n×100%,where n is the number of bits used to represent the different bit planes of an image. For gray scale image parameter n=8 (8 bits per pixel). Hence expected NPCR and expected UACI are NPCRE=99.6094% (horizontal solid line in Figure 10(a)) and UACIE=33.4635% (horizontal solid line in Figure 10(b)), respectively. From the above formula we can see that relation NPCRE+3UACIE=2, so any value of the ideal expectations can illustrate the capability of algorithm to attack resisting plaintext.Figure 10
Measured sensitivity of cipher image to plain image.
(a)
Number of pixels changing rate
(b)
Unified average changing intensityIn this experiment, one hundred groups of Lena images are encrypted. In every group image, one is original image and the other is original image with only one changed pixel value (including border points and intermediate points, each time the changed amount is only 1). Then the test results are shown in Figure10; every value fluctuates up and down near ideal value. The average values are NPCR¯=99.6091% (horizontal dotted line in Figure 10(a)) and UACI¯=33.5038% (horizontal dotted line in Figure 10(b)), respectively. Obviously the given encryption algorithm greatly improves the sensitivity of plaintext, thereby enhancing capacity of resistance to differential attacks.


## 4.5. Key Sensitivity Test

Lena gray image is used to make experimental analysis. With right key, the decrypted image is clear and correct without any distortion in Figure11(a). Decryption using keys with slight mismatch is performed so as to evaluate the key sensitivity. With a subtle change, the new key q1=1.01000000001, and the decrypted image is incorrect, proposed in Figure 11(b). Subtle change of key yields greatly different decrypted images. It is fully convincing that the algorithm has steady and superior secure performance in the first encryption round and will well resist differential attack.Figure 11
The decrypted Lena image.
(a)
Decrypted image
(b)
Error decrypted image


## 4.6. Algorithmic Complexity Analyses

The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the size of the input to the problem. The time complexity is commonly described using the big-O notation, which suppresses multiplicative constants and lower order terms. Time complexity of generating key is O(M·N). The maximum complexity chaos and wavelet function map generate chaos sequences with time complexities O(T12) and O(T22), respectively. Pixel diffusion and substitution have the same time complexity O(M·N). At each step, the worst total time complexity is (11)OM×N+OT12+OT22+OM×N=OT,where T=maxM·N,T12,T22. T1 and T2 represent iterate numbers of maximum complexity chaos and wavelet function map, respectively.


## 5. Conclusion

This paper presents a novel fractional-order complex attractor with high fraction dimension, and the preprocessed chaotic sequence has good random character. Secret key is disturbed by every order and pixel value of plaintext; thus slight change of plaintext can bring vast differentness in encrypted image. Theoretical analysis and experimental results indicate that the encryption algorithm has some good characters, such as resistance for different attack, better information entropy, and low coefficient correlation. Comparing with some chaos-based algorithms, the estimated results demonstrate the strong capabilities and the effectiveness of the proposed algorithm. The time complexity of the algorithm is proposed and an example is investigated to verify its validity and practicability. Our future works will focus on video encryption using fractional-order chaotic system.



---

*Source: 8672716-2017-03-22.xml*