Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Research Article

Journal of Algorithms &


Computational Technology
A digital image encryption algorithm Volume 13: 1–11
! The Author(s) 2019
based on chaotic mapping Article reuse guidelines:
sagepub.com/journals-permissions
DOI: 10.1177/1748302619853470
journals.sagepub.com/home/act

Zhijuan Deng1,2 and Shaojun Zhong1,2

Abstract
In this article, we introduced a digital image encryption algorithm based on the chaotic mapping designed by Xiong et al.
In their paper, the authors theoretically analyzed the algorithm and pointed out that the algorithm did not need to have
the prior knowledge of the orbital distribution and one can select any chaotic model. In this way, the algorithm greatly
expanded the cryptographic space and greatly reduced the number of iterations of the mapping. Since the algorithm has
many characteristics, for instance, it is sensitive to the secret key, its key space is big, the pixel is well distributed after
being encrypted, etc., the security of the encrypted images can be assured effectively. However, since the algorithm
applied the image scrambling for encryption, and did not take the chosen-plaintext attacks into consideration, the
algorithm is relatively weak in resisting the chosen-plaintext attacks. Therefore, we put forward a kind of image
replacement method based on chaos, which can resist the chosen-plaintext attacks. And the experimental simulation
proves that this algorithm not only has many characteristics, for instance, it is sensitive to the secret key, its key space is
big, the pixel is well distributed after being encrypted, etc., but also can resist the chosen-plaintext attacks effectively. In
the meanwhile, the algorithm is very sensitive to the small changes of the plaintexts, and its encrypted images will
completely lose the features of the original ones.

Keywords
Information security, digital image, chaos sequence, algorithm, encryption, decryption
Received 24 February 2018; Revised received 21 February 2019; accepted 3 April 2019

Introduction
algorithm based on an improper fractional-order cha-
In recent years, digital data traffic was growing rapidly in otic system suggested in literature.6 Analogously, in
unsafe transmission channels. The protection of digital literature,7 the authors scrutinized and indicated the
data, especially the protection of digital image protection, security properties of the algorithm and evaluated the
is becoming more and more important for many reasons, validity of the used quantifiable security metrics. In
such as confidentiality and integrity. Therefore, the most addition, they claimed that some common insecurity
common way to solve the security problems is encryp- problems in the field of chaotic image encryption are
tion. According to Shannon, the basic techniques1 for an found in a chaotic image encryptionalgorithm based on
encryption system can be classified into two main cate- information entropy (IEAIE),8 e.g. the short orbits of
gories: diffusion and confusion. And the combination the digital chaotic system and the invalid sensitivity
between the two classes is also possible. In the past few mechanism built on information entropy of the plain
years, due to the close relationship between cryptography
and chaos,2–4 some studies based on chaotic systems have 1
School of Information Management & Engineering, Shanghai University of
been realized. The scheme based on chaotic system has Finance and Economics, Shanghai, China
the characteristics of pseudo-randomness, ergodicity and 2
Faculty of Science, Jiangxi University of Science and Technology,
sensitivity to initial conditions, which ensures the security Ganzhou, China
and efficiency of the system.
Corresponding author:
On the other hand, some cryptosystems are incom- Zhijuan Deng, Shanghai University of Finance and Economics, Shanghai
plete. The authors of literature5 asserted that they ana- 200433, China.
lyzed the security of a recent image encryption Email: zhijuandeng@126.com
Creative Commons Non Commercial CC BY-NC: This article is distributed under the terms of the Creative Commons Attribution-
NonCommercial 4.0 License (http://www.creativecommons.org/licenses/by-nc/4.0/) which permits non-commercial use, reproduction and
distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.
sagepub.com/en-us/nam/open-access-at-sage).
2 Journal of Algorithms & Computational Technology 13(0)

image. Even worse, each security metric is question- ft1 ; t2 ; . . . ; tn g, where ti is one of the numbers in
able, which undermines the security credibility of f1; 2; . . . ; ng; permute the pixels in first row accord-
IEAIE. Therefore, it is not easy to design a good digital ing to permutation address set ft1 ; t2 ; . . . ; tn g,
image encryption algorithm. How to design a method namely permuting the pixels in column i to column
that balances efficiency and security has always been a ti , i ¼ 1; 2; . . . ; n.
hot topic in chaotic encryption discussion. • Step 3. Set x1 ¼ xnþni , and repeat procedures in Step
In this work, we first introduce a new digital image 2 in the remaining rows; xnþni is the iteration starting
encryption algorithm based on chaotic mapping.9 point of Row i þ 1; in case of ni ¼ nk , recurrently use
Then, we improve the algorithm. On the basis of main- d from n1 renewed d.
taining the original security and not increasing the • Step 4. Make similar changes in the rows of image to
number of keys, plaintext information is added to the complete image encryption.
encryption process to make it resist the selective plain-
text attack. We also analyze the improved algorithm in Decryption algorithm and encryption algorithm are
the aspects of the influence of floating-point operation, similar basically, but their difference is in Step 2. In
key space, key sensitivity, information entropy, histo- decryption algorithm, the image decryption can be real-
gram, correlation and plaintext sensitivity through ized by permuting the pixels in first row according to
experiments. The analysis results show that our encryp- permutation address set ft1 ; t2 ; . . . ; tn g, namely permut-
tion/decryption algorithm can effectively realize the ing the pixels in column ti to column i, i ¼ 1; 2; . . . ; n.
encryption/decryption of digital image data. For attackers, the randomness, uncertainty and time
The rest of the paper is organized as follows. In the dependence of encryption sequence will bring a lot of
next section, a digital image encryption algorithm is trouble to decryption; for decipherers, who have
introduced and improved. The analyses of the known correct cipher, it is not difficult to decrypt the
improved algorithm are described in the ‘Algorithm disordered but definite sequences.
performance analysis’ section. The comparisons with XZQ algorithm puts forwards a new kind of encryp-
several similar algorithms are presented in section 4. tion algorithm based on chaotic mapping, namely sorting
Finally, conclusions are given. chaotic sequences of real numbers in descending order to
permute image location. This method does not require
prior knowledge of orbit distribution where any chaotic
Improvement for XZQ image model can be used to greatly expand cipher space of
encryption algorithm algorithm; iterations of chaotic mapping in the algorithm
are greatly reduced and the characteristics (such as key
Digital image encryption algorithm based on chaotic sensitivity, large key space and uniform distribution of
mapping – XZQ encrypted pixel) of chaos can be better utilized to effec-
A new algorithm of digital image encryption based on tively guarantee the safety of encrypted image.
chaotic map is proposed by Xiong et al.9 We take the From the basic theories applied in the processes of
initials of the author’s surname, for short, marked encryption algorithm, we can know that XZQ image
as XZQ. encryption algorithm is mainly scrambling images, which
The encryption steps of XZQ algorithm are does not change the pixel size of image, and the scrambling
as follows. is based on one row or one column. To some extent, this
algorithm cannot resist chosen-plaintext attack.
• Step 1. Choose a chaotic mapping to generate a Considering the discussion above, we propose the
chaotic sequence with initial parameters l; x0 , at following improved algorithm which is called Add-
image-feature image encryption algorithm based on
the same time choose an integer Xksequence chaos (abbreviated as Chaos-AIF image encryption
d ¼ ðn1 ; n2 ; . . . ; nk Þ, 0 < ni < n and n ¼ n,
i¼1 i algorithm). The new algorithm uses chaotic system to
where n is row size of image; these parameters can
enhance the complexity and confidentiality of scram-
be seen as secret keys.
bling rules (elementary matrix). In scrambling process,
• Step 2. Generate a double-precision chaotic
we add the characteristic information of plaintext10 to
sequence fx1 ; x2 ; . . . ; xn g with chaotic mapping
make the system sensitive to plaintext information
fðxÞ ¼ lxð1  xÞ; sort n values in real-valued
(namely resistant to chosen-plaintext attack).
sequence set fx1 ; x2 ; . . . ; xn g in ascending order to
form ordered sequence fx0 1 ; x0 2 ; . . . ; x0 n g; determine
the location number of each xi from real-valued Principles of Chaos-AIF image encryption algorithm
chaotic fx1 ; x2 ; . . . ; xn g in ordered sequence Before scrambling, we first extract the characteristic
fx0 1 ; x0 2 ; . . . ; x0 n g to form permutation address set information representing to-be-encrypted image which
Deng and Zhong 3

is set as H. We use the randomness of the chaotic phe- Encryption algorithm is as follows:
nomena to generate chaotic sequence; sort this
sequence in ascending (or descending) order (this can 1. Extract characteristic value of to-be-encrypted
be regarded as scrambling targeting original chaotic image and work out H value.
sequence). We apply the scrambling rules to image to 2. Use initial chaotic value x0 (secret key) selected
scramble images. by the user and H value (representing image’s
In addition, in order to resist chosen-plaintext characteristic value) to carry out operation,
attack, we carry out certain operation on image’s char- generating initial value x0 0 used in scrambling cha-
acteristic information H and given initial value for otic sequence and chaotic sequence
chaos (namely secret key), which will generate the fCi ; i ¼ 0; 1; . . . ; M  N  1g.
final initial value for chaos. Then, we use the final ini- 3. Sort this chaotic sequence Ci in descending order,
tial value for chaos to generate chaotic sequence. and when sorting is finished, the obtained sequence
Suppose the to-be-encrypted image as is C0 i ; find out mapping matrix A converting Ci to
G ¼ fgði; jÞg; i ¼ 0; 1; . . . ; M; j ¼ 0; 1; . . . ; N, gði; jÞ is C0 i . That is, say C0 i ¼ A  Ci .
gray value of Pixel(i,j), the image size is M  N. We 4. Use matrix A to scramble image G0 based on pixel
generate image’s characteristic value H by position and get final encrypted image
G0 0 . G0 0 ¼ A  G0 .
X0 ¼ ðImparam þ xÞ=2
Decryption algorithm:
This is an XOR operation on all pixel values of
images, and then we can generate the initial value 1. Extract characteristic value of to-be-
of final chaotic sequence, where X0 is initial chaotic decrypted image.
value to generate chaotic sequences finally. Imparam is 2. Use initial chaotic value x0 (secret key) selected by
the characteristic value of the image which is the defor- the user and image’s characteristic value to carry out
mation of the image feature information. In order to operation, generating initial value x0 0 used in scram-
guarantee X0 falls in (0, 1), we should transform bling chaotic sequence and chaotic
the image’s characteristic information into (0, 1) by sequence fCi ; i ¼ 0; 1; . . . ; M  N  1g.
divided 256. 3. Sort this chaotic sequence C0 i in descending order;
At this time, chaotic sequence is related to and when sorting is finished, the obtained sequence
given initial chaotic value (secret key) and to-be- is C0 i ; find out mapping matrix A0 converting Ci to
encrypted image. C0 i . Ci ¼ A0  C0 i .
The value of the image’s characteristic information 4. Use matrix A0 to carry out scrambling on to-be-
is related to the image’s pixel value and the encryption decrypted image G0 0 based on pixel position and
operation is the scrambling image instead of modifying get original image G0 .G0 ¼ A0  G0 0 .
the pixel value; so, the characteristic value of the
encrypted image is consistent with the characteristic Chaos-AIF image encryption and
information of the original image. That is, no addition-
al key parameters are needed to store image’s charac-
decryption algorithm
teristic value, as shown in Figure 1. Suppose the image size is M  N; the sequence of pixels
Suppose image is G0 ði; jÞ; i ¼ 0; 1; . . . ; M  1; j ¼ in Row i from left to right before and after scrambling
0; 1; . . . ; N  1. is Mi or M0 i .

Encryption Decryption
Communication
path

Original Image Encrytion Image Original Image

Extract characteristic Reverse


Characteristic information
Scrambling rule scrambling rule
information of plaintext

Chaotic Chaotic
Chaotic parameter Chaotic Chaotic system sequence
input by user system sequence

Scrambling parameter

Figure 1. Schematic diagram of chaotic scrambling algorithm.


4 Journal of Algorithms & Computational Technology 13(0)

Below, we illustrate chaotic encryption and decryp- Similarly, repeat Steps 3, 4, 5 successively to process
tion steps by scrambling one row in image. every row in image to complete the whole image scram-
bling process. The initial chaotic value and system
• Step 1. Use X’ ¼ ðImparam þ xÞ=2 to calculate char- parameter selected in encryption process are encryption
acteristic information value of to-be-encrypted key. It can be seen that this image encryption is image
image and work out T. T is double-type. scrambling process.
• Step 2. Select the initial value x0 and system param- Decryption process is the inverse process of encryp-
eter a for logistic chaotic system. Work out tion process.
x0 0 ¼ ðx0 þ TÞ=2. x0 0 should be seen as the initial Figure 2 is original Lena image plus original image,
value of logistic chaotic system. scrambling image and restored image of tested image.
• Step 3. Generate a chaotic sequence x1 ; x2 ; . . . ; xN It can be seen from the figure that the image has lost
whose size is N. original appearance.
• Step 4. Sort this sequence x1 ; x2 ; . . . ; xN in ascending
(or descending) order and obtain x0 1 ; x0 2 ; . . . ; x0 N .
Find out transformational matrix converting Performance analysis of the algorithm
x1 ; x2 ; . . . ; xN to x0 1 ; x0 2 ; . . . ; x0 N , which enables
Influence caused by floating-point arithmetic
x0 1 ; x0 2 ; . . . ; x0 N ¼ A1  ðx1 ; x2 ; . . . ; xN Þ, and then
work out matrix A1 . According to the floating point standard, a sequence of
n1
• Step 5. Carry out scrambling on pixels in Row One n bits fbðiÞgi¼0 is divided into three parts: a sign, a
of image, and we have M0 ¼ A  M. signed exponent and a significand. The represented
number is interpreted as the signed product of the sig-
At this moment, the scrambling process in row of nificand and the number 2 to the power of its expo-
image is completed. nent by

Figure 2. Lena image plus encrypted and decrypted images of tested image. (a) Original Lena image. (b) Encrypted image of original
image. (c) Restored image from (b). (d) To-be-decrypted image. (e) Encrypted image of to-be-decrypted image. (f) Restored image
from (e).
Deng and Zhong 5

8
>
> 0 ! if e ¼ 0; os ¼ 0; In Figure 3, (a) is original Lena image; (b) to (d) are
>
>
>
> Xm
encrypted image obtained by using secret keys corre-
>
> ð1Þ s
 b  2 i
 222
l1
if e ¼ 0; os 6¼ 0;
>
> lþi
>
< i¼1 spondingly (0.563251458, 3.7512634), (0.563251468,
v ¼ ð1Þs  1 if e ¼ 2l 1; os ¼ 0; 3.7512634) and (0.563252458, 3.7512634) with small
>
>
>
> “not a number” ! if e ¼ 2l  1; os 6¼ 0; differences; (e) is original image obtained through
>
> X
>
>
m
>
> ð1Þ s
 1 þ b  2i
 2eos otherwise; decrypting (b) with (0.563251458, 3.7512634); (f) is
>
:
lþi
i¼1 original image obtained through decrypting (b) using
secret key (0.5632514581, 3.7512634), which has a small
Xl1 difference with (0.563251458, 3.7512634).
where s ¼ b0 , e ¼ b  2i , os ¼ 2l1  1.11
i¼0 1þi We analyze the results and find that small change in
As to the single-precision floating-point format keys will produce different encrypted images; only use
(binary32), e.g. “float” in C-language and “single” in of original encrypted key as decrypted key can restore
Matlab, (l;m) ¼ (8; 23), whereas (l;m) ¼ (11; 52) in the original image exactly, showing that encryption
double-precision floating-point format (binary64). In algorithm is sensitive to secret key.
IEEE 754-2008, half precision floating-point format
(binary16) is designed for storaging with a higher pre-
Information entropy analysis
cision, not for performing arithmetic computations,
where (l;m) ¼ (5; 10). Meanwhile, due to the intermedi- In this part, we test the randomness of our algorithm,
ate scale of the data generated by binary16, its simula- where the true random variable should generate 28
tion is widely adopted for experiments.12 symbols with equal probability and the entropy value
According to the research in literature,11 the state equal to 8. To check, the entropy value of the cipher
mapping network of digital map can be used as an images by
effective tool to classify its structure and roughly
verify its randomness in small precision digital X 1
HðSÞ ¼ PðSi Þlog
domain. That analysis can be further extended to S
PðSi Þ
high-dimensional chaotic systems. In this work,
floating-point operations have little influence on the
where PðSi Þ represents the probability of symbol Si ; in
selection of chaotic sequences, which can be neglected.
our tests, the average entropy of the original image is
7.9967 and for the encrypted image it is equal to
Key space analysis 7.9931, which are very close to the optimal value,
XZQ algorithm and Chaos-AIF algorithm have the then the entropy attack is not possible.
same key space because both of them have the same
key characteristics. Histogram analysis
Key ¼ fx0 ; ag has two parameters. From the exper-
The cryptanalyst can get very useful information from
iment above, we can know that the encryption system is
the image histogram by analyzing it, where the good
very sensitive to secret key, and the small differences in
encryption algorithm should generate uniform distribu-
keys will produce totally different encryption or
tion of the histogram. In our tests, we selected three
decryption effects. Suppose all the initial values X0 of
gray-scale images and encrypted them using Chaos-
the chaotic system are positive numbers less than 1,
AIF algorithm separately. Figure 4 shows the histo-
whose eight digits after the decimal point should be
gram analysis of the original image and the cipher
kept, and the range of parameter a is [3.7512634,4],
image using Chaos-AIF algorithm, respectively. As
whose eight digits after the decimal point should also
can be seen from the results, it is very difficult to get
be kept, then the key space is sufficient, about (1015)4
any information from the histogram.
which is very significant to resist exhaustive attack.

Sensitivity to secret key Correlation analysis


It is known that some algorithm was broken by using
Both XZQ algorithm and Chaos-AIF algorithm utilize
correlation analysis between the adjacent pixels. So, we
the sensitivity of initial chaotic value to achieve sensi-
try to study the relations between the adjacent pixels by
tivity of key, so they have same effect on sensitivity of
calculating the correlation coefficient for all possible
key. Here, we do experiment only on Chaos-AIF.
cases. The correlation coefficient is calculated by
Set Key ¼ fx0 ; ag ¼ ð0:563251458; 3:7512634Þ to
carry out experiment on gray image of Lena.bmp
Covðx; yÞ
whose size is 256  256, and the result is shown in r ¼ pffiffiffiffiffiffiffiffiffiffiffipffiffiffiffiffiffiffiffiffiffi
Figure 3. DðxÞ DðyÞ
6 Journal of Algorithms & Computational Technology 13(0)

Figure 3. Sketch of decryption and encryption results of Lena image. (a) Original Lena image. (b) Encrypted image 1 of (a). (c)
Encrypted image 2 of (a). (d) Encrypted image 3 of (a). (e) Decrypted image of (b). (f) Decrypted image of (b).

2
1 XM UCID image database13 (totally 1338 images) and
DðxÞ ¼ ðx  xÞ JAFFE facial expression database14 (totally 213
M i¼1
images). Here, we choose five gray images from the
USC-SIPI “Miscellaneous” dataset, shown in
1 XM
Figure 5; they are processed into 64  64, 128  128,
Covðx; yÞ ¼ ðx  xÞðy  yÞ
M i¼1 256  256, 512  512 and 1024  1024 pixel gray
images, respectively. Then, the experimental compari-
son is made under the MATLAB implementation with
where M is the total number of randomized pairs, x
four similar algorithms in recent years. They are
and y are the two vectors that contain x values and y
Dagadu’s,15 Slimane et al.’s,16 Khan et al.’s,17 and
values of the pair in the tested image, respectively. Essaid et al.’s.18
Table 1 shows the correlation coefficients between Chaos-AIF algorithm has a high encryption speed.
two adjacent pixels in all possible cases (vertically, hor- The encryption/decryption time for an image with a
izontally and diagonally) of the original image and the size of 256  256 is 0.0637  0.01432 s. Table 2 com-
cipher image. The results revealed that the correlation pares the encryption speeds of several image encryption
between adjacent pixels in the cipher text image of the algorithms for different sizes of images. Chaos-AIF has
improved algorithm is very small, which shows that the the fastest encryption/decryption speed. Thus, it has
improved algorithm can achieve the requirement of the lowest time complexity.
reducing the correlation of adjacent pixels.
Plaintext sensitivity
Time complexity analysis Plaintext sensitivity is very important for high-intensity
Three popular image databases are used for testing: image encryption schemes. Its slightly modified ver-
USC-SIPI image database (totally 306 images, avail- sions (embedding watermarks or some hidden mes-
able on the website “http://sipi.usc.edu/database”), sages) are often encrypted at the same time. If the
Deng and Zhong 7

Figure 4. (a) Original images, (b) histogram of the original images and (c) histogram of the cipher images using Chaos-AIF algorithm.

We compare the two files using Hex Comparison


Table 1. Correlation coefficients of adjacent pixels.
software, and the result is shown in Table 3.
Coefficients Original image Cipher image The results show that the encrypted images are total-
ly different when small differences exist in original
Vertical –0.003638 –0.002827
Horizontal –0.097239 –0.020982 images using same keys in Chaos-AIF algorithm,
Diagonal 0.002666 –0.003052 which shows that algorithm is sensitive to plaintext.

encryption scheme used does not meet the sensitivity Chosen-plaintext attack
requirement, the leakage of one cryptographic image
corresponding to two similar ordinary images may The chosen-plaintext attack is a well-known and effec-
leak the other’s visual information. In order to test tive method to break an encrypted result. An encryp-
sensitivity dependence of encryption algorithm on tion algorithm with a good diffusion property can resist
plaintext, we randomly choose and modify one point the differential attack. The number of pixel change rate
in Lena image, then encrypt Lena image and modified (NPCR) and unified averaged changed intensity
Lena_1 image with the same key, obtaining two (UACI) can be used to evaluate the diffusion property
encrypted images. It is shown in Figure 6. of an image encryption algorithm. Mathematically, the
8 Journal of Algorithms & Computational Technology 13(0)

Figure 5. Images selected in the experiment.

Table 2. Encryption speeds (second) of several image encryption algorithms for different sizes of images.

Image size 64  64 128  128 256  256 512  512 1024  1024

Dagadu’s15 0.2382 0.0902 0.3457 1.4016 5.3793


Slimane et al.’s16 0.0267 0.1128 0.4139 1.6877 6.8321
Khan et al.’s17 0.1953 0.0735 0.2854 1.1612 4.3270
Essaid et al.’s18 0.0569 0.0218 0.0933 0.3901 1.4803
Chaos-AIF 0.0045 0.0163 0.0629 0.2673 1.2157

Figure 6. Encrypted results of Lena image and modified Lena image using XZQ algorithm. (a) Original Lena image. (b) Encrypted
Lena image. (c) Modified Lena image. (d) Encrypted image of (c).

Table 3. Binary contrasts between two encrypted images.

Memory address Encrypted image of original image Encrypted image of modified image

0x00420 FA00 FDFD FD00 FCFC FC00 FA00 FDFD FD00 FCFC FC00
0x00430 FE00 FFFF FF00 36AF 403E FE00 FFFF FF00 486A 79AC
0x00440 2CB2 7C9C 8493 C1B1 659E 9E84 7C38 ACD8 8F2C 2C88
0x00450 904F 587C 2A73 8687 7A2F B9B2 B342 9068 702E 6658
0x00460 776D 2506 A677 4A46 670C 6D2B 294D 8630 3261 6B91
0x00470 962B B633 7A4D D048 B5B4 26C8 B57A 523E 787C 7754
0x00480 9A5A 61664 6886 3885 2D92 9B95 857F 2F7E 8562 2F59
0x00490 6ABF 7841 8B2C 9E83 2E95 BB64 D049 B078 7D7B 95C1
0x004A0 29B0 B24D 7D7D 429D 7A48 A35A 402A B099 9188 837C
0x004B0 81C3 950D 5C26 A054 89CA BC00 5992 DFCE 7E43 B3A5
0x004C0 505 8E7E 537E 294A 787E 59C3 675A 8489 B281 47DF
0x004D0 8550 4879 3532 CCAC 8595 3381 A1B4 7793 25BF 7ACE
0x004E0 BBC4 6695 B2B3 6137 5C71 9653 5E50 335A 867E 3B73
0x004F0 76D3 7ED6 CB3E 327B 3A47 4055 A622 7777 AF31 337A
0x00500 563E BF30 4088 A377 7643 D0A5 9169 8E71 2C2F 762B
Deng and Zhong 9

Table 4. The NPCR results of different image encryption algo- NPCR and UACI between two images C1 and C2 are
rithms (a ¼ 0:05). defined as
256  256 512  512 1024  1024 Pass
Image size 99.5994 99.5994 99.5994 rate (%) X
M X
N
Dði; jÞ
NPCRðC1 ; C2 Þ ¼  100%
L
Dagadu’s15 4/4 4/4 3/4 93.75 i¼1 j¼1
Slimane et al.’s16 4/4 3/4 3/4 93.75
Khan et al.’s17 4/4 4/4 3/4 87.5 X
M X
N
jC1 ði; jÞ  C2 ði; jÞj
Essaid et al.’s18 4/4 4/4 4/4 100 UACIðC1 ; C2 Þ ¼  100%
Chaos-AIF 4/4 4/4 4/4 100 i¼1 j¼1
TL

(
0; C1 ði; jÞ ¼ C2 ði; jÞ
Dði; jÞ ¼
Table 5. The UACI results of different image encryption algo- 1; C1 ði; jÞ 6¼ C2 ði; jÞ
rithms (a ¼ 0:05).

256  256 512  512 1024  1024 where L is the number of pixels and T is the largest
33.4183/ 33.4183/ 33.4183/ Pass
allowed pixel value in the images.19
Image size 33.5088 33.5088 33.5088 rate (%)
We selected 12 test images from the USC-SIPI
Dagadu’s15 4/4 2/4 2/4 75 “Miscellaneous” image dataset; there are four images
Slimane et al.’s16 4/4 2/4 1/4 68.75 with the size of 256  256, four images with the size of
Khan et al’s17 4/4 2/4 3/4 81.25 512  512, and four images with the size of
Essaid et al.’s18 4/4 4/4 3/4 93.75
1024  1024. For each test image, we change one bit
Chaos-AIF 4/4 4/4 3/4 93.75
of a randomly selected pixel to generate a new plaintext
image, and then encrypt both plaintext images using

Figure 7. Robustness analysis results of noise and the data loss. (a) Encrypted image with 20% Gauss noise. (b) Decrypted image
with 20% Gauss noise. (c) Encrypted image lost in the upper left corner. (d) Decrypted image lost in the upper left corner.
10 Journal of Algorithms & Computational Technology 13(0)

five encryption algorithms with the same security key. References


Tables 4 and 5 show the NPCR and UACI results of 1. Shannon CE. Communication theory of secrecy systems.
five algorithms under the significance level. a ¼ 0:05 1945. Bell Syst Tech J 1949; 28: 656–715.
We can see that most images encrypted using Chaos- 2. Kadir A, Aili M and Sattar M. Color image
AIF can pass the NPCR and UACI tests. These prove encryption scheme using coupled hyper chaotic
that the encrypted images using Chaos-AIF have a system with multiple impulse injections. Optik 2017;
good diffusion property and can withstand the differ- 129: 231–238.
3. Wu X, Zhu B, Hu Y, et al. A novel colour image
ential attack.
encryption scheme using rectangular transform-
enhanced chaotic tent maps. IEEE Access 2017;
Robustness to noise and data loss 5: 6429–6436.
Image encryption algorithm should be robust against 4. Murugan CA and Karthigaikumar P. Survey on image
noise and data loss. The encryption and decryption encryption schemes, bio cryptography and efficient
encryption algorithms. Mobile Networks Appl 2018;
process of Chaos-AIF is asymmetric. Therefore, it
24: 1–6.
can decrypt cipher text images with noise or data 5. Norouzi B and Mirzakuchaki S. Breaking a novel
loss. Figure 7 shows the case when 20% Gauss noise image encryption scheme based on an improper fraction-
is added and upper left corner data is lost. It can be al order chaotic system. Multimed Tools Appl 2017;
seen that when the cipher text image has noise or data 76: 1817–1826.
loss, Chaos-AIF can still restore the original image. 6. Zhao J, Wang S, Chang Y, et al. A novel image encryp-
Although the restored image has some noise, we can tion scheme based on an improper fractional-order cha-
still recognize most of the image information. otic system. Nonlinear Dyn 2015; 80: 1721–1729.
7. Chengqing LI, Lin D, Feng B, et al. Cryptanalysis of a
chaotic image encryption algorithm based on informa-
Conclusions tion entropy. IEEE Access 2018; 6: 75834–75842.
In this paper, a digital image encryption algorithm 8. Ye G, Pan C, Huang X, et al. A chaotic image encryption
algorithm based on information entropy. Int J
based on chaotic map is introduced, and the algorithm
Bifurcation and Chaos 2018; 28: 9.
is analyzed theoretically. The algorithm has the char- 9. Xiong C, Zou J and Qi D. A new image encryption algo-
acteristics of sensitive key, large key space and uniform rithm based on chaotic map. J Zhongshan Univ (Nat Sci
distribution of pixels after encryption, which can effec- Ed) 2004; 43: 29–33.
tively protect the security of encrypted images. But 10. Xu G, Cao X and Xu S. Several classes of polynomials
because the algorithm uses image scrambling to achieve with low differential uniformity over finite fields of odd
encryption, and does not consider the choice of plain- characteristic. Appl Algebra Eng Commun Comput 2016;
text attack, the algorithm is weak in resisting the selec- 27: 91–103.
tion of plaintext attack. Based on the above 11. Li C, Feng B, Li S, et al. Dynamic analysis of digital
considerations, we propose a chaotic-based image chaotic maps via state-mapping networks. IEEE
Transactions on Circuits and Systems I: Regular Papers
replacement method which can resist chosen plaintext
2019; 66: 2322–2335.
attacks. The experimental simulation results are also 12. Rau C. Half-precision floating point library, http://half.
given. The results show that the algorithm can effec- sourceforge.net/index.html, 2017 (accessed 16 May 2019).
tively resist the selection of plaintext attacks, and is 13. Schaefer G. UCID: An uncompressed color image
very sensitive to the small changes in the plaintext, database. In: Proceedings of the SPIE on storage and
and the encrypted image completely loses the image retrieval methods and applications for multimedia 2004,
of the original image. Vol.5307, San Jose, California, United States, 18
December 2003, pp.472–481. International Society for
Declaration of conflicting interests Optics and Photonics.
14. Lyons MJ, Akamatsu S, Kamachi MG, et al.
The author(s) declared no potential conflicts of interest with Coding facial expressions with Gabor wavelets. In:
respect to the research, authorship, and/or publication of Proceedings of the third IEEE international conference
this article. on automatic face and gesture recognition, 1998, pp.200-
205. USA: IEEE.
Funding 15. Joshua CD, Jian L, Kamachi MG, et al. DWT based
encryption technique for medical images. In: 2016 13th
The author(s) received no financial support for the research,
International computer conference on wavelet active media
authorship, and/or publication of this article.
technology and information processing (ICCWAMTIP),
2016, pp.252–255. USA: IEEE.
ORCID iD 16. Slimane NB, Bouallegue K and Machhout M. Nested
Zhijuan Deng https://orcid.org/0000-0002-2971-650X chaotic image encryption scheme using two-diffusion
Deng and Zhong 11

process and the Secure Hash Algorithm SHA-1. In: 18. Essaid M, Akharraz I, Saaidi A, et al. A new image encryp-
International conference on control engineering & informa- tion scheme based on confusion-diffusion using an enhanced
tion technology, 2016, pp.1–5. USA: IEEE. skew tent map. Procedia Comput Sci 2018; 127: 539–548.
17. Khan JS, Ahmad J and Hwang SO. An efficient image- 19. Chen G, Mao Y and Chui CK. A symmetric image
encryption scheme based on: Henon map, skew tent encryption scheme based on 3D chaotic cat maps.
mapand s-box. In: 2015 6th International conference on Chaos Solitons Fractals 2004; 21: 749–761.
modeling,simulation and applied optimization (ICMSAO),
2015, pp.1–6. USA: IEEE.

You might also like