Development of A Novel Hyperchaos-Based Image Encr
Development of A Novel Hyperchaos-Based Image Encr
Complexity
Volume 2022, Article ID 8765268, 15 pages
https://doi.org/10.1155/2022/8765268
Research Article
Development of a Novel Hyperchaos-Based Image Encryption
Algorithm Consisting of Two Scrambling-Diffusion Operations
Received 22 June 2022; Revised 24 July 2022; Accepted 12 August 2022; Published 4 October 2022
Copyright © 2022 Yongzhong Huang et al. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is
properly cited.
This paper proposes a hyperchaos-based image encryption algorithm, which consists of two scrambling-diffusion operations and
one scrambling operation. In the proposed algorithm, the initial conditions of a hyperchaotic Chen system are first generated
using the Message Digest 5 (MD5) value of digital images and given initial values, and then the images will be encrypted using the
keystream created by the system. Since the initial values of hyperchaotic Chen systems are related to plaintext and the encryption
process is related to the images, this algorithm is able to effectively protect images against selective plaintext attacks. Simulation
results demonstrate that the present algorithm offers enhanced encryption performance, high security, and strong resistance to
known attacks. Therefore, it may find wide application in image encryption transmission. Compared to other image encryption
algorithms, the proposed algorithm uses different keystreams when encrypting different images and is capable of effectively
resisting various plain image and differential attacks faster.
were also employed to confuse the correlation between the security defects made the aforementioned algorithms
original and the encrypted images. The authors of [5] put [16, 17]; and [18] as well as other encryption algorithms
forward an image encryption scheme based on a quantum designed in similar manners [22, 23] vulnerable to plaintext
chaotic map and diffusion-permutation architecture. In attacks.
their approach, the quantum chaotic map and the 2D logistic To overcome the abovementioned shortcomings, this
map were separately coupled with nearest-neighboring paper presents a hyperchaos-based image encryption
coupled-map lattices to achieve high complexity and ran- scheme that has a scrambling-diffusion structure. In the
domness in the generated keystreams. The authors of [6] present algorithm, the generated secret key is related to the
developed a lossless encryption method for color images by original plain image and the encryption process is related to
means of a 6D hyperchaotic system and the 2D discrete the image. Simulation results have verified that the presented
wavelet transform (DWT). Their scheme was established scheme possesses a high degree of resistance against various
based on the 2D DWT and 6D hyperchaotic systems in both plaintext attacks. The remainder of this paper is structured as
the spatial and frequency domains, where the key streams follows. Section 2 reviews the hyperchaotic Chen system
hinge on both the hyperchaotic system and the plain image. adopted in this study. Section 3 illustrates the proposed
The authors of [7] presented an encryption scheme of algorithm, its structure, and presents the simulation results
linear-nonlinear-linear structure that employed total shuf- to verify its encryption performance. Section 4 discusses the
fling. Their system was able to generate a 1D chaotic system characteristics of the algorithm by means of key space, key
with enhanced chaotic performances and broader chaotic sensitivity, histograms, correlation coefficient, information
ranges by comparison with previous chaotic maps. The entropy, and resistance to differential attacks. Section 5
authors of [8] presented an image encryption method that concludes the paper.
enhanced the link between value changing for grayness and
position shuffling for pixels. The authors of [9] developed a
new image encryption algorithm, SPRING, applying light-
2. Hyperchaotic Chen System
weight chaotic maps and simple arithmetic and logical The hyperchaotic Chen system was presented by [24] from
operations. The authors of [10] put forward a digital image the Chen system via a dynamical controller. This system was
encryption scheme via dynamic deoxyribonucleic acid chosen for designing the image encryption algorithm be-
coding and chaotic operations, making use of hyper-digital cause it has notable dynamical properties and can generate
chaos in the frequency domain. In that algorithm, both the pseudo-random sequences with excellent statistical prop-
phase and amplitude components in the frequency domain erties. The equations describing the dynamics of the
were scrambled and diffused. The authors of [11] presented a hyperchaotic Chen system can be written as follows [25]:
2D logistic-modulated-sine-coupling-logistic chaotic map
(LSMCL) and used that map to design an image encryption ⎪
⎧
⎪ x_ � a(y − x),
⎪
⎪
scheme consisting of two rounds of permutation and dif- ⎪
⎨ y_ � −xz + dx + cy − w,
fusion operation. The authors of [12] put forward a com- ⎪ (1)
⎪
⎪ z_ � xy − bz,
posite chaotic map and a way of utilizing optimization ⎪
⎪
⎩
approach to enhance the performance of encryption w_ � x + k.
schemes. The authors of [13] applied three chaotic sequences
to acquire a high level of encryption in their scheme to When the control parameters a � 36, b � 3, c � 28, d � 16,
conduct both permutation and substitution processes of and −0.7 ≤ k ≤ 0.7, the system is in hyperchaotic status. In
image encryption. The authors of [14] first obtained a this study, k is set as 0.2. Figure 1 shows the attractor of this
memristive neuron model by coupling a memristor into an hyperchaotic system.
advanced neuron model with key chaotic characteristics.
After that, they proposed a new encryption algorithm to 3. Image Encryption Algorithm
apply the memristive neuron for image encryption. Lai,
Zhang, and other coworkers [15] also designed a novel The image encryption process is illustrated in Figure 2. At
Hopfield neural network (HNN) that can yield multiscroll first, the Message Digest 5 (MD5) hash value of the plain
attractors by using a new memristor as a synapse in the image is acquired, based on which the initial conditions of
HNN. They finally developed a 3D image encryption scheme the hyperchaotic Chen system are determined. Next, the
based on the proposed memristive and confirmed its out- system generates chaotic sequences in an image encryption
standing encryption performance. process. The generated sequences are then used for
However, lots of chaos-based image encryption schemes scrambling and diffusing the pixels or bits of the original
are in fact not as secure as their developers claimed and image, and the entire encryption process is completed after
cannot resist selective and known plaintext attacks. For two rounds of high-speed scrambling and pixel adaptive
example, the images encrypted using the schemes developed diffusion and a bit-plane scrambling step.
by [16, 17], and [18] were decoded by [19, 20], and [21]
through plaintext attacks, respectively. Those encrypted
images were deciphered because the secret keys were not 3.1. Generation and Testing of Key Stream. We assume that
related to the original plain images and the generated chaotic the size of a plain image P is M × N, the steps to generate a
sequences to encrypt image data were constant. Those key stream are as follows:
Complexity 3
40 100 100
20 80 80
y 0 z 60 z 60
–20 40 40
–40 20 20
–40 –20 0 20 40 –40 –20 0 20 40 –40 –20 0 20 40
x y x
(a) (b) (c)
10 10 10
0 0 0
w w w
–10 –10 –10
Figure 1: Attractor of the hyperchaotic chen system: (a) x-y plane; (b) y-z plane; (c) x-z plane; (d) y-w plane; (e) x-w plane; (f ) z-w plane.
X1 Y1 Z1 W1 R1 S1
Scrambling
X2 Y2 Z2 II
Encrypted
Generate initial values of image
the hyperchaotic Chen
system
Step 1: Generate a 128 bit secret key I from the plain Step 3: Determine the initial conditions of the hyper-
image P using the MD5 algorithm. chaotic Chen system x1 , y1 , z1 , w1 based on given
Step 2: Divide I into 32 4-bit-long groups, which is initial values x0 , y0 , z0 , w0 using equation (2). This set
I � i1, i2, i3, . . ., i32. of initial conditions will be used for scrambling and
diffusion operation I.
4 Complexity
⎪
⎧ i ⊕i ⊕i ⊕i Step 7: Repeat step 4 to obtain another set of M × N
⎪
⎪
⎪ x1 � x0 + 1 2 3 4 , matrices X2, Y2, Z2, W2, R2, and S2 using equation (5).
⎪
⎪ 16
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪ i ⊕i ⊕i ⊕i
⎪
⎪
⎪ y1 � y0 + 5 6 7 8 , X1 (i) � floormod200 + x2i × 1014 , M,
⎪
⎨ 16
⎪ (2) Y1 (i) � floormod200 + y2i × 1014 , N,
⎪
⎪
⎪
⎪ i9 ⊕ i10 ⊕ i11 ⊕ i12
⎪
⎪ z1 � z 0 + , Z1 (i) � floormod200 + z2i × 1014 , 256,
⎪
⎪ 16
⎪
⎪ (5)
⎪
⎪
⎪
⎪ W1 (i) � floormod200 + x2i + z2i × 1014 , 256,
⎪
⎪ i ⊕i ⊕i ⊕i
⎪
⎩ ω1 � ω0 + 13 14 15 16 .
16 R1 (i) � floormod200 + x2i + y2i × 1014 , 256,
S1 (i) � floormod200 + w2i × 1014 , M + N.
Step 3: Substitute x1 , y1 , z1 , w1 into the hyperchaotic
Chen system (equation (1)), iterate 500 times, and then Next, a statistical test suite put forward by [26] was
continue to iterate other M × N times to obtain a se- applied to test a key stream generated by the hyperchaotic
quence x1(i), y1(i), z1(i), and w1 (i), where i � 1, 2, 3, . . ., Chen system following the above steps to determine its
M × N. randomness. The plain image chosen for this experiment is
Step 4: Processe the generated sequence using equation “Lena”, whose size is 512 × 512. The initial values of this
(3) to obtain M × N matrices X1, Y1, Z1, W1, R1, and S1. hyperchaotic Chen system are: x0 � 0.3838, y0 � 0.9876,
z0 � 32.1234, and w0 � 0.6565. Test results are displayed in
⎪
⎧
⎪
⎪ X1 (i) � floormod200 + x1i × 1014 , M, Table 1, from which it can be determined that the key stream
⎪
⎪ generated by this system possesses excellent randomness.
⎪
⎪
⎪
⎪ Y1 (i) � floormod200 + y1i × 1014 , N,
⎪
⎪
⎪
⎪ 14
⎪
⎨ Z1 (i) � floormod200 + z1i × 10 , 256,
3.2. Scrambling Operation I. The scrambling operation I is
⎪
⎪
⎪
⎪ W1 (i) � floormod200 + x1i + z1i × 1014 , 256, pixel-related, which scrambles the pixels in the original
⎪
⎪
⎪
⎪ image through two scrambling processes. M + N pixels are
⎪
⎪
⎪ R1 (i) � floormod200 + x1i + y1i × 1014 , 256, selected from the image and the remaining pixels are
⎪
⎪
⎪
⎩ S (i) � floormod200 + w × 1014 , M + N. scrambled in the first process, while the M + N selected pixels
1 1i
will be scrambled in the second process.
(3) The steps of the first scrambling process are:
In equation (3), floor(x) returns the largest integer that Step 1: We randomly select M + N pixels from the
is smaller than or equal to x, while mod(x, y) returns the image P, which will not be scrambled in this process;
remainder of x divided by y. then use matrices X1 and Y1 to determine the locations
of the selected pixels P(b(i), c(i)), i � 1, 2, 3, . . ., M + N.
Step 5: Determine another set of initial conditions The values of b and c are calculated using equations (6)
x2 , y2 , z2 , w2 for the Chen system based on and (7), respectively.
x0 , y0 , z0 , w0 using equation (4). This set of initial
conditions will be used for scrambling and diffusion b(i) � X1 (i, 1), i � 1, 2, 3, . . . , M,
(6)
operation II. b(j + M) � X1 (1, j), j � 1, 2, 3, . . . , N,
⎪
⎧ i ⊕i ⊕i ⊕i c(i) � Y1 (i, 1), i � 1, 2, 3, . . . , M,
⎪
⎪
⎪ x2 � x0 + 17 18 19 20 , (7)
⎪
⎪ 16
⎪
⎪ c(j + M) � Y1 (1, j), j � 1, 2, 3, . . . , N.
⎪
⎪
⎪
⎪
⎪
⎪ i ⊕i ⊕i ⊕i
⎪
⎪
⎪ y2 � y0 + 21 22 23 24 , Step 2: Solve the information entropy (H1) of the
⎪
⎨ 16 remaining pixels of the image (excluding the selected
⎪ (4) M + N pixels P(b(i), c(i)) using equation (8); then find
⎪
⎪
⎪
⎪ i ⊕i ⊕i ⊕i h1 from H1 based on equation (9).
⎪
⎪
⎪ z2 � z0 + 25 26 27 28 ,
⎪
⎪ 16 2N −1
⎪
⎪ 1
⎪
⎪ H1 (m) � p mi log . (8)
⎪
⎪ p mi
⎪
⎪ i ⊕i ⊕i ⊕i i�0
⎩ ω2 � ω0 + 29 30 31 32 .
16
In (8), mi represents the grayscale value of each pixel of
Step 6: Repeat step 3 to generate another sequence the image; p(mi) represents the probability of the oc-
obtain a sequence x2(i), y2(i), z2(i), and w2 (i), where currence of the value mi in the image; and N denotes the
i � 1, 2, 3, . . ., M×N. value’s number of bits.
Complexity 5
h1 � floorH1 × 105 . (9) Step 3: Shift the location of pixels P(i, j) and P(u, v),
determine the location u and v using equations (10) and
(11).
If u is solved as 0 based on (10), then we set u � X1 (i, j); Step 4: Complete the location change if both P(i, j) and
likewise, if v is solved as 0 from (11), it will be set as P(u, v) do not belong to the randomly selected M + N
v � Y1 (i, j). pixels P(b, c). In another word, if i � b(k), j � c(k) or
6 Complexity
u � b(k), v � c(k), k � 1, 2, 3, . . ., M + N, then the 3.4. Bit-Plane Scrambling Operation. The image’s pixel values
positions of P(i, j) and P(u, v) will not be changed. are represented in an 8 bit binary format. We first obtain the
8 bit binary value of each pixel in K and rearrange those binary
The image obtained after the first scrambling process is
values to obtain the position-scrambled image data (Figure 3).
denoted as E.
The method of acquiring the 8-bit binary value of the ith
The second scrambling process is to change the lo-
pixel involves the following steps: K(i) � bi8 , bi7 , bi6 , bi5 ,
cations of the M + N pixels E(b(i), c(i)) that have not been
bi4 , bi3 , bi2 , bi1 }, i � 1, 2, 3, . . ., MN. Next, a new set of image
scrambled in the first process, which includes the fol-
data L1(i) can be obtained by scrambling K(i) via the process
lowing steps:
illustrated in Figure 2 as L1 (i) � bi4 , bi3 , bi2 , bi1 , bi7 ,
Step 1: Form a vector F with the M + N pixels F(i) � bi6 , bi5 , bi8 }, i � 1, 2, 3, . . ., MN. Decimal values of L1(i) can
{E(b(i), c(i))}, i � 1, 2, 3, . . ., M + N. then be easily obtained as
Step 2: Find the information entropy of {F}, H2, using
equation (8), and obtain h2 from H2 following the same L(i) � bi4 × 27 + bi3 × 26 + bi2 × 25 + bi1 × 24 + bi7 × 23
(16)
approach described in equation (9): + bi6 × 22 + bi5 × 21 + bi8 × 20 i � 1, 2, 3, . . . , MN.
h2 � floor(H2 × 102 ).
Step 3: Chang the location of F(i) to F(t) by means of The L(i) is a M × N matrix and the image K is converted
matrix S1 (established in equation (3)). t can be de- to image A after this operation.
termined using equation (12)
t � S1 (i) + h2 mod(M + N), i � 1, 2, 3, . . . , M + N. 3.5. Scrambling Operation II. The scrambling operation II is
(12) related to the plaintext. All the pixels in the image A will be
scrambled in this operation through two processes. Similar
If t is found to be 0 from (12), then let t � S1(i). to the scrambling operation I, in the first scrambling process,
Step 4: Plac the scrambled F(i) back into the image E M + N pixels are selected from A and the remaining pixels
and update the M + N pixels in E as E(b(i), c(i)) � F(i), will be scrambled. In the second process, the M + N selected
i � 1, 2, 3, . . ., M + N. pixels will be scrambled.
The first scrambling process consists of following steps:
Step 1: Randomly select M + N pixels from A and the
3.3. Diffusion Operation I. The diffusion operation I mixes selected pixels will not be scrambled in this process. The
modulo addition and bitwise exclusive or (XOR) operations locations of those pixels (d(i), f(i)) are determined by
as suggested by [2]. Its main steps are: means of matrices X2 and Y2 (equation (5)) using the
Step 1: Obtain an image matrix G by conducting an following equations:
XOR diffusion operation with the help of matrix Z1 d(i) � X2 (i, 1), i � 1, 2, 3, . . . , M,
(equation (3))
d(j + M) � X2 (1, j), j � 1, 2, 3, . . . , N,
G(i, j) � Z1 (i, j) ⊕ E(i, j), (17)
(13) f(i) � Y2 (i, 1), i � 1, 2, 3, . . . , M,
i � 1, 2, 3, . . . , M, j � 1, 2, 3, . . . , N.
f(j + M) � Y2 (1, j), j � 1, 2, 3, . . . , N.
Step 2: Represent G as a row vector GV, and matrix R1
(established in equation (3)) as another row vector RV, The selected pixels A(d(i), f(i)), i � 1, 2, 3, . . ., M + N will
then conduct a modulo operation to obtain J (equation not be scrambled in the first scrambling process.
(14)). Step 2: Find the mean value and mix for image A and
obtain mixA using equation (19).
J(1) � (RV(1) + GV(1))mod256, J(i) � (J(i − 1)
1 MN
+ RV(i) + GV(i))mod256, i � 2, 3, . . . , MN. mix � A(i), mixA � mix × 105 . (18)
MN i�0
(14)
Step 3: Shift the locations of the pixel A(i, j) and
Step 3: Represent matrix W1 (equation (3) as a row A(g, h), where g and h are determined by the following
vector WV and use it for another modulo operation to equations:
obtain diffused image data K, as illustrated in equation
(15): g � X2 (i, j) + A(d(i), f(i))
+ mixAmodM, i � 1, 2, 3, . . . M; j � 1, 2, 3, . . . N,
K(MN) � (WV(MN) + J(MN))mod256, h � Y2 (i, j) + A(d(j), f(j))
K(i) � (K(i + 1) + WV(i) + J(i))mod256, (15) + mixAmodN, i � 1, 2, 3, . . . M; j � 1, 2, 3, . . . N.
i � MN − 1, MN − 2, MN − 3, . . . , 2, 1. (19)
Complexity 7
Original 8-bit
b8 b7 b6 b5 b4 b3 b2 b1
binary value
New 8-bit
b4 b3 b2 b1 b7 b6 b5 b8
binary value
Figure 3: The process diagram of the bit-plain scrambling operation.
If g is found to be zero, then let g � X2 (i, j); likewise, if If q is found to be 0 from (21), then let q � S2(i).
h is found to be zero then h � Y2(i, j). Step 4: Place the scrambled C(i) back into the image and
Step 4: Complete the location change if both A(i, j) and update the M + N pixels in B as B(d(i), f(i)) � C(i), i � 1,
A(g, h) do not belong to the randomly selected M + N 2, 3, . . ., M + N.
pixels A(d, f ). In another word, if i � d(k), j � f(k) or
u � d(k), v � f(k), k � 1, 2, 3, . . ., M + N, then the
positions of A(i, j) and A(g, h) will not be shifted. 3.6. Diffusion Operation II. The diffusion operation II is
similar to operation I (Section 3.3) and consists of the
The image obtained after the first scrambling process is
following steps:
denoted as B.
The second scrambling process is to scramble the M + N Step 1: Obtain an image matrix D through a modulo
pixels B(d(i), f(i)) that have not been scrambled in the first operation using matrix Z2 (equation (5)):
process. The steps of this process are listed below:
D(i,j) � Z2 (i, j) + B(i, j)mod256,
Step 1: Form a vector C with the M + N pixels C(i) � (22)
i � 1, 2, 3, . . . M, j � 1, 2, 3, . . . N.
{B(d(i), f(i))}, i � 1, 2, 3, . . ., M + N.
Step 2: Find the mean value and mix of C, and obtain Step 2: Represent D as a row vector DK, matrix R2
mixC following the same approach depicted in (established in equation (5)) as another row vector RK
and perform an XOR diffusion operation to obtain Q.
1 MN
mix � C(i), mixC � mix × 105 . (20) Q(1) � RK(1) ⊕ DK(1),
MN i�0
(23)
Q(i) � Q(i − 1) ⊕ RK(i) ⊕ DK(i), i � 2, 3, . . . , MN.
Step 3: Shift the locations of C(i) and C(q) by means of
matrix S2 (established in equation (5)). q can be de- Step 3: Represent matrix W2 (equation (5) as a row
termined based on vector WK and use it for another XOR operation to
obtain T:
q � S2 (i) + mixCmod(M + N), i � 1, 2, 3, . . . M + N.
(21)
The result T is then converted to a M × N matrix TL. results and the original plain images are displayed in
Figure 4. From that figure, we can find that the encrypted
images are noise-like images, which are completely different
3.7. Simulation Results. The proposed image encryption from the original images. However, the decrypted images are
algorithm was then applied to encrypt and decrypt four identical to the original images.
grayscale images (baboon, Lena, airplane, and pepper) to
assess its encryption performance. The size of the selected 4. Performance Analysis
images is 512 × 512. The secret key of each image consists of
initial values x0 , y0 , z0 , w0 , as well as the 128 bit MD5 hash A good encryption algorithm should guarantee security and
value of the image. The encryption and decryption processes exhibit an excellent encryption performance. An assessment
were simulated on professional graphic workstations of the developed image encryption algorithm is presented in
(graphics card: NVDIA Tesla K80, processor: Intel Core i7- this section. As mentioned in 3.7, Matlab was used for this
6700K, and the maximum RAM capacity was 8 GB) using computational analysis. The running platform was an Intel
Matlab. Matlab is a powerful software package which has Core i7-6700K processor (8M Cache, 4 GHz) with a max-
been widely used for solving engineering problems and imum RAM capacity of 8 GB and the operating system was
developing graphical illustrations [27, 28]. Simulation Windows 7.
8 Complexity
(d) (e) (f )
Figure 4: Simulation results: (a, b, c, d) plain images; (e, f, g, h) encrypted images; (i, j, k, l) decrypted images.
Complexity 9
2500
3000
2000
2000 1500
1000
1000
500
0 0
0 50 100 150 200 250 0 50 100 150 200 250
(d) (e) (f )
8000 4000 1200
1000
6000 3000
800
400
2000 1000
200
0 0 0
0 50 100 150 200 250 0 50 100 150 200 250 0 50 100 150 200 250
(g) (h) (i)
1200 1200 1200
0 0 0
0 50 100 150 200 250 0 50 100 150 200 250 0 50 100 150 200 250
(j) (k) (l)
Figure 5: Histograms of original plain images (e)-(h) and encrypted images (i)-(l); (a)-(d) the original images.
4.1. Key Space. An encryption system needs to have a large x0 , y0 , z0 , w0 , and a 128 bit MD5 value. The initial values are
key space to resist exhaustive attacks. The key space size has double precision values. The space of the key consists of
to be larger than 2128 to effectively protect the images from those first four values is about 2192, which is far greater than
exhaustive attacks. The secret key generated from the pro- 2128. Therefore, the present encryption algorithm can ef-
posed encryption algorithm includes four initial values fectively resist the exhaustive attacks.
10 Complexity
4.2. Histograms. The histogram of an image reflects the im- 4.4. Key Sensitivity Analysis. Next, we use two similar key
age’s statistical properties. Figure 4 displays histograms of the codes (with slight differences) to encrypt the same image to
original plain images and the encrypted images. A secure obtain two encrypted images. If these two images differ
encryption system can make an encrypted image with a uni- markedly from each other, then it means the present al-
form histogram to resist any statistical attacks [29]. As shown in gorithm is very sensitive to small changes in key because
Figure 5, the histograms of the encrypted images are evidently such small changes would produce great differences between
different from those of the plain images, which reveals that the cipher images. Otherwise, the key sensitivity of the algo-
pixel values of the encrypted images are evenly distributed. rithm is low. The initial values of the first key code are
Therefore, the displayed histograms proved that the present x0 � 0.4, y0 � 0.9, z0 � 30, and ω0 � 0.6; and those of the
scheme is well able to withstand the statistical attacks. second key code are set to be x0 � 0.4 + 10−15, y0 � 0.9, z0 � 30,
and ω0 � 0.6. These two keys were used to encrypt the image
for the airplane, and the two cipher images are displayed in
4.3. Correlation Coefficient Analysis. Neighboring pixels of Figure 7. From that figure, it can be found that the two
plain images have strong correlations. An effective image encrypted images show obvious differences. The key sen-
encryption scheme should be able to reduce these correla- sitivity of the proposed encryption algorithm is therefore
tions to almost zero. The correlation coefficient (ruv , u and v confirmed.
are two adjacent pixels) is calculated as
cov(u, v)
ruv � ����������, (25) 4.5. Information Entropy. Information entropy is a measure
D(u) D(v)
of the randomness or uncertainty of image information.
where Under ideal conditions, the information entropy of a
grayscale image should be 8 if the image consists of ran-
1 N domly distributed pixels. Therefore, the information entropy
cov(u, v) � u − E(u) vi − E(v),
N i�1 i of a cipher image should be close to eight if the cipher image
is encrypted using an effective image encryption algorithm.
1 N The information entropies of the four plain images and the
2
D(u) � u − E(u) , (26) corresponding encrypted images were calculated, and Ta-
N i�1 i
ble 3 lists the calculation results.
From Table 3 it can be found that the information en-
1 N tropies of the encrypted images are close to the optimal value
E(u) � u .
N i�1 i 8, which verifies that the presented scheme is secure enough
to be used for image transmission. Furthermore, the in-
In this study, we selected 5,000 pairs of adjacent pixels formation entropy of the image of Lena processed using
from both the plain and encrypted images and calculated the other encryption schemes was calculated as 7.9972 [33],
correlation coefficients along vertical, horizontal, and di- 7.9992 [34], 7.9993 [31], and 7.9991 [35]. Compared to those
agonal directions. Calculation results are listed in Table 2 values, the information entropy of the cipher image
and Figure 6 compares the correlation coefficients calculated encrypted utilizing the present algorithm is closer to 8.
from the original and encrypted image of pepper. It can be
seen from Table 2 that the horizontal, vertical, and diagonal
correlation coefficients of the original plain images are close 4.6. Resistance to Differential Attacks. An effective image
to 1 and the corresponding correlation coefficients of the encryption scheme should have excellent plain-image
encrypted images are nearly zero. This means that the sensitivity and be capable of defending against differ-
present algorithm can significantly reduce the correlation ential attacks. It signifies that any slight change in the
coefficients and show desirable encryption performance. original plain image will cause its cipher image to change
Complexity 11
300
250
200
150
100
50
0
0 50 100 150 200 250 300
(a) (b)
300 300
250 250
200 200
150 150
100 100
50 50
0 0
0 50 100 150 200 250 300 0 50 100 150 200 250 300
(c) (d)
300
250
200
150
100
50
0
0 50 100 150 200 250 300
(e) (f )
300 300
250 250
200 200
150 150
100 100
50 50
0 0
0 50 100 150 200 250 300 0 50 100 150 200 250 300
(g) (h)
Figure 6: Correlation coefficients of the image of pepper (a) plain image; (b)-(d) horizontal, vertical, and diagonal correlation coefficients of
the plain image; (e) encrypted image; (f )-(h) horizontal, vertical, and diagonal correlation coefficients of the encrypted image.
12 Complexity
(a) (b)
(c) (d)
Figure 7: Key sensitivity analysis results: (a) a plain image for airplane; (b) a cipher image encrypted using the first key code; (c) a cipher
image encrypted using the second key code; and (d) the difference between (b) and (c).
significantly. The plain image sensitivity of the present P2 are encrypted, applying the present encryption algo-
image encryption algorithm is determined through the rithm to acquire two cipher images, C1 and C2. Finally,
following steps: Assuming a plain image P1, we first the plain-image sensitivity of the proposed algorithm is
change the value of a randomly selected pixel of that determined by comparing C1 with C2. The difference
image to obtain another plain image P2. Next, both P1 and between C1 and C2 is indicated using net pixel change rate
Complexity 13
1200
1000
800
600
400
200
0
0 50 100 150 200 250
1000
800
600
400
200
0
0 50 100 150 200 250
(d) (e) (f )
Figure 8: Plain and cipher histograms and images: (a) plain black image; (b) plain white image; (c) histogram of the cipher image of the
black image; (d) cipher image of the black image; (e) cipher image of the white image; and (f ) histogram of the cipher image of the white
image.
(NPCR) (27) and unified average changing intensity Table 6: Speed analysis results.
(UACI) (28) [36]. Encryption algorithm Image (size) Time (s)
M N Present in this study Lena (256 × 256) 0.547
1
NPCR � |D(i, j)| × 1, (27) [39] Lena (256 × 256) 1.532
M × N i�1 j�1 [40] Lena (256 × 256) 0.580
[12] Lena (256 × 256) 2.443
M N
1 C1 (i, j) − C2 (i, j)
UACI � , (28)
M × N i�1 j�1 255 images of baboon, Lena, airplane, and pepper are displayed
in Table 4. For comparison, that table also contains the
where NPCR and UACI of the cipher images of Lena encrypted
using existing image encryption algorithms.
1, C1 (i, j) ≠ C2 (i, j), From Table 4, it is found that compared with other
D(i, j) � (29) schemes, the UACI and NPCR values yielded from the
0, C1 (i), j � C2 (i, j).
proposed algorithm are closer to their theoretical values of
In equation (29), (C1) (i, j) and C2(i, j) denote pixel 99.61% and 33.46%, respectively. In other words, if we use
values of C1 and C2. The NPCR and UACI of the encrypted the same key code generated from our algorithm to encrypt
14 Complexity
two very similar plain images, the obtained cipher images The present algorithm was employed to encrypt several plain
will differ markedly. Hence, it is verified that the developed images. Important parameters such as the key space, histo-
algorithm is very sensitive to plain images and possesses a grams, correlation coefficients, key and plain-image sensitivity,
strong capacity to resist the differential attacks. and information entropy of the cipher images were calculated
to validate the encryption performance of the designed algo-
rithm. Simulation results indicate that the proposed algorithm
4.7. Resistance to Chosen Plain Image Attacks. Our algorithm has high security and can effectively defend against the chosen
can effectively defend against chosen plain image attacks. This is plain image attacks and differential attacks. Therefore, the
because the generated key code is related to the plain image, so algorithm possesses high potential for practical applications.
different key codes will be acquired for different images. With a The present encryption algorithm will be further improved to
chosen plain image attack, the attacker can encrypt a plain enhance its security and encryption speed through the intro-
image of his or her choice and has access to the resulting cipher duction of an image compression algorithm and machine
image. This information is used to derive the encryption key and learning techniques. [41, 42].
break the encryption algorithm. To assess the resistance of the
designed algorithm to the chosen plain image attacks, the al-
gorithm was applied to encrypt a 512 × 512 black image and a Data Availability
white image of the same size. The obtained cipher images were The data that support the findings of this study are available
analyzed, and the results are displayed in Figure 8 and Table 5. upon request.
As shown in Table 5, the information entropies of the
cipher images are very close to 8 and the correlation coef-
ficients are close to 0. Therefore, almost no useful infor-
Conflicts of Interest
mation can be extracted from the cipher images encrypted All authors declare that they have no conflicts of interest.
using the developed algorithm.
Acknowledgments
4.8. Speed Analysis. A good image encryption scheme should
possess not only high security but also fast encryption speed. This work was supported by the High-Level Talent Research
Using the image of Lena as an example, the speed analysis data Start-Up Fund of Yulin Normal University under grant no.
(Table 6) show that compared with other image encryption G2019ZK24. An earlier version of this paper has been
algorithms, our algorithm is faster in encrypting images. presented as a preprint available at SSRN [42].
[8] G. Ye, C. Pan, X. Huang, and Q. Mei, “An efficient pixel-level Generators for Cryptographic Applications, p. 800, NIST
chaotic image encryption algorithm,” Nonlinear Dynamics, Special Publication, Gaithersburg, MD, USA, 2002.
vol. 94, no. 1, pp. 745–756, 2018. [27] Y C. Liu, “A programming course including C# and MATLAB
[9] W. K. Lee, R. C. W. Phan, W. S. Yap, and B. M. Goi, “SPRING: for mechanical engineering students,” ASEE Computers in
a novel parallel chaos-based image encryption scheme,” Education Journal, vol. 2, no. 3, pp. 106–112, 2011.
Nonlinear Dynamics, vol. 92, no. 2, pp. 575–593, 2018. [28] Y C. Liu, “Implementation of MATLAB/Simulink into a
[10] M. Guan, X. Yang, and W. Hu, “Chaotic image encryption Vibration and Control Course for Mechanical Engineering
algorithm using frequency-domain DNA encoding,” IET Students,” in Proceedings of the ASEE SE Section Annual
Image Processing, vol. 13, no. 9, pp. 1535–1539, 2019. Conference, Auburn University, Alabama, AL, USA, March,
[11] H. Zhu, Y. Zhao, and Y. Song, “2D logistic-modulated-sine- 2020.
coupling-logistic chaotic map for image encryption,” IEEE [29] Y. Li, C. Wang, and H. Chen, “A hyper-chaos-based image
Access, vol. 7, Article ID 14081, 2019. encryption algorithm using pixel-level permutation and bit-
[12] M. A. B. Farah, A. Farah, and T. Farah, “An image encryption level permutation,” Optics and Lasers in Engineering, vol. 90,
scheme based on a new hybrid chaotic map and optimized pp. 238–246, 2017.
substitution box,” Nonlinear Dynamics, vol. 99, no. 4, [30] E. Yavuz, R. Yazici, M. C. Kasapbaşı, and E. Yamac, “A chaos-
pp. 3041–3064, 2020. based image encryption algorithm with simple logical func-
[13] A. Girdhar, H. Kapur, and V. Kumar, “A novel grayscale tions,” Computers & Electrical Engineering, vol. 54,
image encryption approach based on chaotic maps and image pp. 471–483, 2016.
blocks,” Applied Physics B, vol. 127, no. 3, pp. 39–12, 2021. [31] X. Chai, “An image encryption algorithm based on bit level
[14] Q. Lai, C. Lai, H. Zhang, and C. Li, “Hidden coexisting Brownian motion and new chaotic systems,” Multimedia
hyperchaos of new memristive neuron model and its appli- Tools and Applications, vol. 76, no. 1, pp. 1159–1175, 2017.
cation in image encryption,” Chaos, Solitons & Fractals, [32] X. Zhang, Z. Zhou, and Y. Niu, “An image encryption method
vol. 158, Article ID 112017, 2022. based on the Feistel network and dynamic DNA encoding,”
[15] Q. Lai, Z.-Q. Wan, H. Zhang, and G.-R. Chen, “Design and IEEE Photonics Journal, vol. 10, no. 4, pp. 1–14, 2018.
analysis of multiscroll memristive Hopfield neural network [33] A. Kulsoom, D. Xiao, A. Rehman, and S. A. Abbas, “An ef-
with adjustable memductance and application to image en- ficient and noise resistive selective image encryption scheme
cryption,” IEEE Transactions on Neural Networks and for gray images based on chaotic maps and DNA comple-
Learning Systems, 2022. mentary rules,” Multimedia Tools and Applications, vol. 75,
[16] Z. Hua and Y. Zhou, “Image encryption using 2D logistic- pp. 1–23, 2016.
adjusted-sine map,” Information Sciences, vol. 339, pp. 237– [34] X. Wang and D. Xu, “A novel image encryption scheme based
253, 2016. on Brownian motion and PWLCM chaotic system,” Non-
[17] P. Zhen, G. Zhao, L. Min, and X. Jin, “Chaos-based image linear Dynamics, vol. 75, no. 1-2, pp. 345–353, 2014.
encryption scheme combining DNA coding and entropy,” [35] Y. Mao, G. Chen, and S. Lian, “A novel fast image encryption
Multimedia Tools and Applications, vol. 75, no. 11, scheme based on 3D chaotic baker maps,” International
pp. 6303–6319, 2016. Journal of Bifurcation and Chaos, vol. 14, no. 10, pp. 3613–
[18] A. Jain and N. Rajpal, “A robust image encryption algorithm 3624, 2004.
resistant to attacks using DNA and chaotic logistic maps,” [36] M. A. Murillo-Escobar, C. Cruz-Hernandez, F. Abundiz-
Multimedia Tools and Applications, vol. 75, no. 10, Perez, R. M. Lopez-Gutierrez, and O. R. Acosta Del Campo,
pp. 5455–5472, 2016. “A RGB image encryption algorithm based on total plain
[19] W. Feng, Y. He, H. Li, and C. Li, “Cryptanalysis and im- image characteristics and chaos,” Signal Processing, vol. 109,
provement of the image encryption scheme based on 2D pp. 119–131, 2015.
logistic-adjusted-sine map,” IEEE Access, vol. 7, Article ID [37] X. Wang and D. Xu, “A novel image encryption scheme using
12584, 2019. chaos and Langton’s Ant cellular automaton,” Nonlinear
[20] X. Su, W. Li, and H. Hu, “Cryptanalysis of a chaos-based Dynamics, vol. 79, no. 4, pp. 2449–2456, 2015.
image encryption scheme combining DNA coding and en- [38] S. F. Raza and V. Satpute, “A novel bit permutation-based
tropy,” Multimedia Tools and Applications, vol. 76, no. 12, image encryption algorithm,” Nonlinear Dynamics, vol. 95,
Article ID 14021, 2017. no. 2, pp. 859–873, 2019.
[21] Y. Dou, X. Liu, H. Fan, and M. Li, “Cryptanalysis of a DNA [39] H. Zhu, X. Zhang, H. Yu, C. Zhao, and Z. Zhu, “An image
encryption algorithm based on compound homogeneous
and chaos based image encryption algorithm,” Optik, vol. 145,
hyper-chaotic system,” Nonlinear Dynamics, vol. 89, no. 1,
pp. 456–464, 2017.
pp. 61–79, 2017.
[22] A. Kadir, A. Hamdulla, and W. Q. Guo, “Color image en-
[40] X. Chai, X. Zheng, Z. Gan, D. Han, and Y. Chen, “An image
cryption using skew tent map and hyper chaotic system of 6th-
encryption algorithm based on chaotic system and com-
order CNN,” Optik, vol. 125, no. 5, pp. 1671–1675, 2014.
pressive sensing,” Signal Processing, vol. 148, pp. 124–144,
[23] H. Zhu, C. Zhao, X. Zhang, and L. Yang, “An image en-
2018.
cryption scheme using generalized Arnold map and affine
[41] G. Chen and T. Ueta, “Yet another chaotic attractor,” In-
cipher,” Optik, vol. 125, no. 22, pp. 6672–6677, 2014.
ternational Journal of Bifurcation and Chaos, vol. 09, no. 07,
[24] Y. Li, W. K. S. Tang, and G. Chen, “Generating hyperchaos via
pp. 1465-1466, 1999.
state feedback control,” International Journal of Bifurcation
[42] Y.-Z. Huang, X.-G. Bi, Y.-X. Li, Y.-C. Liu, and [, “A novel
and Chaos, vol. 15, no. 10, pp. 3367–3375, 2005.
hyperchaos-based image encryption algorithm with two
[25] T. Gao, Z. Chen, Z. Yuan, and G. Chen, “A hyperchaos
scrambling-diffusion operations,” 2022, https://ssrn.com/
generated from Chen’s system,” International Journal of
abstract=3994132.
Modern Physics C, vol. 17, no. 04, pp. 471–478, 2006.
[26] A. Rukhin, J. Soto, J. Nechvatal, M. Smid, and E. Barker, A
Statistical Test Suite for Random and Pseudorandom Number