0% found this document useful (0 votes)
25 views19 pages

A Secure Efficient and Super-Fast Chaos-Based Imag

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views19 pages

A Secure Efficient and Super-Fast Chaos-Based Imag

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Journal of Real-Time Image Processing (2023) 20:30

https://doi.org/10.1007/s11554-023-01289-5

ORIGINAL RESEARCH PAPER

A secure, efficient and super‑fast chaos‑based image encryption


algorithm for real‑time applications
Babak Rezaei1 · Mahvash Mobasseri2 · Rasul Enayatifar3

Received: 7 August 2022 / Accepted: 16 February 2023 / Published online: 8 March 2023
© The Author(s), under exclusive licence to Springer-Verlag GmbH Germany, part of Springer Nature 2023

Abstract
The remarkable and ever-increasing use of digital images has turned the necessity of image encryption into an important
issue, which has attracted many researchers. Unfortunately, fast encryption schemes for large color images are not well
developed and studied. In this study, a secure, efficient and super-fast algorithm is proposed which is compatible with
real-time applications. In this algorithm, three Logistic maps are utilized to generate initial values for the Chen system. To
initialize three Logistic maps and Chen system parameters, a SHA-512 secret key is provided. Efficient use with fewer runs
of chaotic maps has resulted in faster encryption/decryption process as well as less required memory. Moreover, a SHA-512
secret key, which can provide a wide key space, beside using multiple and high-dimensional chaotic maps will bring more
security for the proposed algorithm. The simulation results confirm the efficiency and security of the proposed algorithm,
while the average speed for tested images is more than 245 Mbps and all the security tests are passed successfully. For Man-
drill color image 512 × 512 , the proposed algorithm results in an entropy of 7.999428, a NPCR value of 99.6241, UACI
value of 33.4741 and encryption time of 0.0343 s. To compare the obtained results with recently published works from the
literature, a comparative study is provided to confirm the significant performance of the proposed method in comparison
with the other studied schemes.

Keywords Image encryption · Chaotic maps · Logistic map · Chen system · Real time

1 Introduction across the Internet. The number of images which are being
shared through cell phones and social media is increasing
With rapid development of digital technologies, digital rapidly, while they need to be protected against any privacy
images are capturing our daily life. They have penetrated violation. Military images must be secured and protected
in most of the fields and services: from military and medi- from any unauthorized access. Medical images should be
cal services to social media and communication applica- encrypted to protect patient’s privacy. These examples are a
tions. Every day, millions of images with different types few of the real-life samples dealing with encryption require-
and sizes are transmitted through networks and typically, ments. Thus, secure transmission of images via different
unsecure networks is one of the significant topics that has
* Rasul Enayatifar attracted researchers around the world. Image encryption is
r.enayatifar@gmail.com one of the solutions aiming to secure transmitting images
Babak Rezaei and keeping them safe from unauthorized access. To achieve
bbkrze@gmail.com this goal, lots of algorithms and methods are proposed by
Mahvash Mobasseri researchers. Some of the more recent studies are discussed
mah.mobasseri@gmil.com here.
Enayatifar et al. [1] proposed an index-based encryp-
1
Department of Electrical Engineering, Universidade Federal tion algorithm using DNA sequence to encrypt multiple
de Minas Gerais (UFMG), Belo Horizonte, Brazil
images. This method combines DNA and cellular automata
2
Department of Applied IT and Pedagogy, University to improve the security and needs half of the image size for
of Gothenburg, Gothenburg, Sweden
the permutation process, while permutation and diffusion are
3
Department of Computer Engineering, Firoozkooh Branch, performed simultaneously. Li et al. [2] proposed an image
Islamic Azad University, Firoozkooh, Iran

13
Vol.:(0123456789)

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 2 of 18 Journal of Real-Time Image Processing (2023) 20:30

encryption scheme which is based on chaos and employs based on bit replacing. The proposed method merges DNA
bit level permutation and diffusion. In this method, a skew encoding and high-dimensional chaotic maps. At first, the
tent map is utilized to generate two sequences for plain- image is converted to binary and by bit replacing, two dif-
related substitution. Rucklidge system is applied to control ferent images are generated. Then, a 3-dimensional Chen
position and bit cycle shift sequences as well as generating system is responsible for permuting both generated images,
security keys for encryption and decryption. Wei et al. [3] while Lorenz system is applied for diffusion. Afterwards,
proposed a fast encryption method for gray-scaled images the diffused images are converted to DNA encoding and a
which is based on parallel compressive sensing (PCS) and single encrypted image is finally produced by applying DNA
DNA sequence. In this method, first, the image is com- operations and decoding rules.
pressed and encrypted by PCS and Arnold map, then two While recent studies on image encryption have pro-
DNA matrices are utilized for encoding and diffusing the posed different schemes to improve the security and effi-
image. The initial values and DNA matrices are generated ciency of encryption algorithms, the literature does not
by SHA-256 secret key and Logistic Sine system. Iqbal et al. show sufficient studies in neither the large size images nor
[4] proposed an image encryption scheme for color images the encryption speed. These days, more powerful personal
using hyper-chaotic system and DNA encoding. The method computers and laptops are available worldwide but still
is developed by a 3D scrambled image, while two levels most of the algorithms are proposed for small size images
of confusion and diffusion are provided, namely decimal with big encryption time. To tackle these issues, a secure,
level and DNA level. The initial values are generated by 5D efficient and real-time image encryption algorithm is pro-
multi-wing hyper-chaotic system. Ul Haq et al. [5] proposed posed. Some of the advantages are listed as following:
an image encryption algorithm for RGB images by apply-
ing substitution and diffusion mechanisms. They used a 4D (1) Using a SHA-512 secret key to protect the algorithm
Mixed chaotic system which is a combination of nonlinear against any brute-force attacks.
sine chaotic map and the two-dimensional nonlinear Tink- (2) Needs only two pseudo-random values to encrypt or
erbell. Elkandoz et al. [6] proposed a confusion-diffusion decrypt each channel; six values for RGB image and
image encryption algorithm by combining different chaotic two values for a given gray level image.
maps. This algorithm performs Arnold Cat map to shuffle (3) Using Chen system efficiently during the encryption
the image, then 4 different chaotic maps are used for diffu- and decryption process.
sion: 2D Logistic Sine map, Linear Congruential Generator, (4) Reducing the number of XOR operations.
Bernoulli Map, and Tent Map. Duan et al. [7] proposed an (5) Performing encryption/decryption process in only one
image encryption scheme for color images which benefits round and M + N iterations for each channel of a given
from nonlinear fractals in its permutation part. Moreover, M × N image.
to resist brute-force attacks, a multi-parameter fractal is (6) Suitable for any real-time encryption/decryption appli-
included. Alexan et al. [8] proposed an algorithm which cation.
included three stages: using Rule 30 of cellular automata,
applying a robust S-box and, employing Lorenz system. Gao To evaluate the performance, both standard test images
et al. [9] proposed a multiple image encryption scheme for and large size images from different datasets are studied
gray level images which includes a single-channel encryp- and results are compared with recently provided algo-
tion combined with a chaotic system. In this algorithm, three rithms from the literature. From the aspect of speed, the
images can be processed at the same time to generate an proposed algorithm provides significant results and in
RGB image. Therefore, the generated image transfers to terms of security, all the criteria have passed successfully.
HSV color image to encrypt each channel. Demirtaş et al. The rest of the paper is organized as follows. Section 2
[10] proposed a RGB color encryption algorithm which provides a short background. In Sect. 3, the proposed
uses hyper-chaotic 2D map in its stages. It includes 2 main method is discussed. Sections 4 and 5 present the simula-
steps: scrambling and diffusion. Scrambling contains cross- tion and discussion on experimental results and, finally,
channel pixel scrambling and cross-channel bit scrambling. Sect. 6 provides conclusions.
Moreover, the initial values for chaotic map is generated
using a SHA-512 secret key. Zhang et al. [11] proposed a
color image encryption that utilized a 3D zigzag transforma-
tion and view plan. The proposed algorithm is inspired by 2 Background
the three-view drawing in engineering and is constructed
as a diffusion–permutation–diffusion structure. To generate In the following subsections, concepts of the Logistic map
the initial values, a SHA-256 secret key is proposed. Yousif and Chen system are discussed.
et al. [12] proposed an image encryption technique which is

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 3 of 18 30

Fig. 1  a Logistic map for 200 iterations, X0 = 0.1 and 𝜇 = 4, b chaotic behavior for different 𝜇 values

2.1 Logistic chaotic map

Chaotic maps are special functions to generate pseudo-ran-


dom numbers. The main feature of chaotic maps is their sen-
sitivity to initial values, while a small change in their inputs
will cause a large change in output. This feature makes these
functions unpredictable and applicable in different areas that
need pseudo-random numbers. Logistic chaotic map is one
of the most popular and practical chaos functions among
researchers, which has been used in many applications and
researches in various fields [13–19]. Logistic map is repre-
sented by Eq. (1):
( )
Xn+1 = 𝜇Xn 1 − Xn (1)

where 𝜇 is a constant and Xn ∈ [0, 1]. Logistic map shows


the chaotic behavior when 𝜇 ∈ [3.561478, 4]. Figure 1a
Fig. 2  Chen chaotic map. a = 35, b = 3, c = 28, x0 = −10, y0 = 0 and
depicts Logistic map for 200 iterations when X0 = 0.1 and z0 = 37
𝜇 = 4 and Fig. 1b shows the chaotic behavior for different
values of 𝜇.
p r e s e n t s a n exa m p l e o f C h e n s yst e m w h e n
a = 35, b = 3, c = 28, x0 = −10, y0 = 0 and z0 = 37.
2.2 Chen system

Chen chaotic attractor or Chen system is another popular


3 Proposed method
chaotic function which is proposed by Chen et al. [20]. Chen
system is defined as a multi-dimensional attractor by Eq. (2).
The proposed method is designed to be super-fast and secure
Its multi-dimensional feature has made Chen system more
while maintaining its simplicity in implementation. Algo-
attractive for researchers, while it can bring more complexity
rithm 1 represents the general skeleton of the proposed
and randomness for different applications and areas using
method which is described in the following subsections.
pseudo-random generators [21–26]:

⎧x � � 3.1 Secret key construction


= a yn − xn
⎪ n+1
⎨ yn+1 = (c − a)xn − xn zn + cyn (2) In this study, a 512-bit secret key is considered. As visible in
⎪ zn+1 = xn yn − bzn
⎩ Fig. 3, the secret key is divided into 64 × 8 − bit sub-keys;
K = {K1 , K2 , K3 … , K64 }. To construct Chen system and
w h e r e a = 35, b = 3 a n d c ∈ [20, 28.4] a r e c o n - Logistic map, five initial values and parameters are derived
stants to make the system chaotic. Figure 2 from the secret key; init_x, init_y and init_z to generate initial

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 4 of 18 Journal of Real-Time Image Processing (2023) 20:30

( X0 , Y0 and Z0 ) using init_x, init_y, init_z and 𝜇 extracted


from the secret key. For each step of algorithm, one set
of initial values is required; 2 of X0 , 2 of Y0 and 2 of Z0
for each run of the algorithm. Number of image channels
defines the number of algorithm runs. Thus, the algo-
rithm is run once and three times for a given gray image
( D = 1) and a color image ( D = 3), respectively. As such,
the algorithm needs 2 of X0 , 2 of Y0 and 2 of Z0 and
6 of X0 , 6 of Y0 and 6 of Z0 for a gray and color image,
respectively. It can be concluded that the maximum num-
ber of values to be generated by chaotic functions is only
Fig. 3  Deriving initial values and parameters from secret key
6 values from each Logistic map, and a total of 18 values.
Fewer number of chaotic runs is another strength point of the
algorithm which speeds up the total process of encryption
and decryption. Algorithm 2 provides the pseudo-code of
the process of generating initial values ( X0 , Y0 and Z0 ) for
Chen system. This process is applicable for both encryption
and decryption processes.

Algorithm 1: The proposed method

Inputs: image M × N × D; 512-bit secret key


1: Start
Fig. 4  Encryption part for proposed algorithm 2: Derive initial values and required parameters from
secret key (see Sect. 3.1)
3: Generate initial values for Chen system using Logistic map
values for Chen system by Logistic map, 𝜇 as Logistic map (Algorithm 2)
parameter and c as the third constant for Chen system. The 4: For each channel of image
process of generating these values is shown in Fig. 3. As 5: Re-arrange and encrypt columns (Step 1 of encryption
depicted in the Fig. 3, each of initial values (init_x, init_y process—Algorithm 3)
and init_z) is constructed by performing XOR between 16 6: Re-arrange and encrypt rows (Step 2 of encryption pro-
cess—Algorithm 4)
sub-keys and transforming to [0, 1] interval through divi-
7: End For
sion by 256. Moreover, to generate 𝜇 for Logistic map and c
8: Output Encrypted image
for Chen system, 8 sub-keys are utilized by applying XOR.
9: End
Logistic map and Chen system show chaotic behavior when
𝜇 ∈ [3.5699456, 4] and c ∈ [20, 28.4], respectively. There-
fore, derived values from the secret key must be transformed
to certain mentioned intervals using Eqs. (3) and (4): 3.3 Encryption process
4 − 3.5699456 The proposed algorithm performs permutation and diffusion
𝜇 = 𝜇dec × + 3.5699456 (3)
255 at the same time at the bit level. To encrypt an M × N × D
image, the proposed algorithm runs the encryption process
c = cdec ×
28.4 − 20
+ 20 (4) D times. It means that the algorithm needs only one run per
255 each channel of a given image. Thus, the maximum number
of runs for a given color image is 3. To achieve this goal,
each run of the algorithm is constructed by two main steps:
3.2 Generating initial values for Chen system (1) re-arranging and encrypting columns and, (2) re-arrang-
ing and encrypting rows. Both steps for an M × N × D image
As it is visible in Fig. 4, at the first place, the required ini- are described in detail as follows:
tial values and parameters are extracted from the secret Step 1: Re-arranging and encrypting columns
key initially. The total process of generating initial values (Algorithm 3):
and parameters is described in Sect. 3.1. Therefore, three
Logistic maps generate initial values for Chen system (1) x0 ← X0 (1), y0 ← Y0 (1), z0 ← Z0 (1) from Algorithm 2.

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 5 of 18 30

(2) Chen system generates new values for X, Y and Z using


the initial values x0 , y0 and z0.
(3) Make a circular column shift to bottom with step size
Shifts = mod(floor(X × 108 ), M − 1) + 1
(4) Perform XOR operation ( between
( all column
) pixels
) and
ToXOR = uint8(mod floor (X + Z) × 108 , 255 + 1) in
bit level.
(5) Calculate the mean value of column as ColMean
(6) Generate new initial values for Chen system by

⎧ x = X + ColMean − floor(X + ColMean)


⎪ 0
⎨ y0 = Y + ColMean − floor(Y + ColMean)
⎪ z0 ← Z + ColMean − floor(Z + ColMean)

(7) Repeat steps 2–6 for all columns of image.

Algorithm 2: Generating initial values for Chen system using


Logistic map

Inputs: init_x, init_y, init_z, 𝜇andD


1: Start
2: fori = 1 ∶ 2 × D
3: forj = 1 ∶ 100
4: X ← 𝜇 × init_x × (1 − init_x)
5: init_x ← X
6: Y ← 𝜇 × init_y × (1 − init_y)
Fig. 5  Flowchart of total encryption process for a given image
7: init_y ← Y
8: Z ← 𝜇 × init_z × (1 − init_z)
9: init_z ← Z
10: endfor ⎧ x = X + RowMean − floor(X + RowMean)
11: X0 (i) ← X
⎪ 0
⎨ y0 = Y + RowMean − floor(Y + RowMean)
12: Y0 (i) ← Y ⎪ z0 ← Z + RowMean − floor(Z + RowMean)
13: Z0 (i) ← Z

14: endfor
(7) Repeat steps 2–6 for all rows of image.
15: End

Figure 5 depicts the flowchart of total encryption process


St e p 2 : Re - a r ra n g i n g a n d e n c r y p t i n g rows
for a given M × N × D image, while the details are provided
(Algorithm 4):
in Algorithms 3 and 4.
(1) x0 ← X0 (2), y0 ← Y0 (2), z0 ← Z0 (2) from Algorithm 2.
3.4 Decryption process
(2) Chen system generates new values for X, Y and Z using
the initial values x0 , y0 and z0.
The decryption process is almost similar to the encryp-
(3) Make a circular row shift to right with step
tion process but in a reverse order. Therefore, unlike the
sizeShifts = mod(floor(Y × 108 ), N − 1) + 1
encryption process, the first step is decrypting rows and then
(4) Perform XOR operation ( between
( all row
) pixels
) and columns. Two main steps of the decryption process will be
ToXOR = uint8(mod floor (Y + Z) × 108 , 255 + 1)
(1) decrypting and arranging rows and (2) decrypting and
in bit level.
arranging columns. It is worth noting that the direction of
(5) Calculate the mean value of column as RowMean
circular shifts must be reversed to left and top for row and
(6) Generate new initial values for Chen system by
column decryption, respectively. Both steps are described
as follows:

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 6 of 18 Journal of Real-Time Image Processing (2023) 20:30

Step 1: Decrypting and arranging rows: Algorithm 3: First step of encryption process
7: % calculate number of shifts and shift ith column
(1) x0 ← X0 (1), y0 ← Y0 (1), z0 ← Z0 (1) from Algorithm 2. to bottom
(2) Chen system generates new values for X, Y and Z using 8: Shifts ← mod(floor(X × 108 ), M − 1) + 1
the initial values x0 , y0 and z0. 9: Circular shift img(∶, i) to bottom by Shifts
(3) Calculate the mean value of row as RowMean 10: % calculate the value for XOR and perform XOR
(4) Perform XOR operation ( between
( all row
) pixels
) and operation with all the column values
ToXOR = uint8(mod floor (Y + Z) × 108 , 255 + 1) ( ( ) )
11: ToXOR ← uint8(mod floor (X + Z) × 108 , 255 + 1)
in bit level. 12: XOR(img(∶, i), ToXOR)
(5) Make a circular row shift to left with step size 13: % calculate the average value of ith column
14: ColMean ← mean(img(∶, i))
Shifts = −mod(floor(Y × 108 ), N − 1) + 1
15: x0 ← X + ColMean − floor(X + ColMean)
(6) Generate new initial values for Chen system by 16: y0 ← Y + ColMean − floor(Y + ColMean)
17: z0 ← Z + ColMean − floor(Z + ColMean)
⎧ x = X + RowMean − floor(X + RowMean) 18: endfor
⎪ 0 19: Output img
⎨ y0 = Y + RowMean − floor(Y + RowMean)
⎪ z0 ← Z + RowMean − floor(Z + RowMean) 20: End

(7) Repeat steps 2–6 for all rows of image. Algorithm 4: Second step of encryption process

Step 2: Decrypting and arranging columns: Inputs: img = M × N from first encryption step, X0 , Y0 andZ0 as
initial values for Chen system
(1) x0 ← X0 (2), y0 ← Y0 (2), z0 ← Z0 (2) from Algorithm 2. 1: Start
(2) Chen system generates new values for X, Y and Z using 2: fori = 1 ∶ M
the initial values x0 , y0 andz0. 3: % Chen system
(3) Calculate the mean value of column as ColMean 4: X ← mod(a × (Y0 − X0 ), 1)
5:
(4) Perform XOR operation ( between
( all row
) pixels
) and
Y ← mod(X0 × (c − a) − (X0 × Z0 ) + (c × Y0 ), 1)
6: Z ← mod(X0 × Y0 ) − (b × Z0 ), 1)
ToXOR = uint8(mod floor (X + Z) × 108 , 255 + 1)
7: % calculate number of shifts and shift ith row to
in bit level.
right
(5) Make a circular column shift to top with step size
8: Shifts ← mod(floor(Y × 108 ), N − 1) + 1
Shifts = −mod(floor(X × 108 ), N − 1) + 1 9: Circular shift img(i, ∶) to right by Shifts
10: % calculate the value for XOR and perform XOR
(6) Generate new initial values for Chen system by operation with all the row values
( ( ) )
11: ToXOR ← uint8(mod floor (Y + Z) × 108 , 255 + 1)
⎧ x = X + ColMean − floor(X + ColMean) 12: XOR(img(i, ∶), ToXOR)
⎪ 0
⎨ y0 = Y + ColMean − floor(Y + ColMean) 13: % calculate the average value of ith row
⎪ z0 ← Z + ColMean − floor(Z + ColMean) 14: RowMean ← mean(img(i, ∶))

15: X0 ← X + RowMean − floor(X + RowMean)
(7) Repeat steps 2–6 for all columns of image. 16: Y0 ← Y + RowMean − floor(Y + RowMean)
17: Z0 ← Z + RowMean − floor(Z + RowMean)
18: endfor
19: Output Encrypted image
Algorithm 3: First step of encryption process 20: End

Inputs: img = M × N image; X0 , Y0 andZ0 as initial values for Chen


system
1: Start
2: fori = 1 ∶ N
4 Simulation results
3: % Chen system
The results of the performed simulations are provided
4: X ← mod(a × (y0 − x0 ), 1)
5: Y ← mod(x0 × (c − a) − (x0 × z0 ) + (c × y0 ), 1)
in this section. As aforementioned, the main goal of this
6: Z ← mod(x0 × y0 ) − (b × z0 ), 1)
study is to propose a secure, super-fast and efficient

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 7 of 18 30

Fig. 7  a Original image of Lena, b the encrypted image of Lena, and
c the decrypted image

5 Security performance analysis

In this section, the security performance of the proposed


algorithm will be discussed. To evaluate the security per-
formance, the following analyses are considered: key space,
encryption/decryption speed, statistical analysis including
Histogram and correlation, Entropy analysis and sensitivity
in different stages of encryption/decryption process. Fig-
ure 7 shows an example of the encryption and decryption
for Lena, while (a) is the original image, (b) is the encrypted
image and (c) is the decrypted image.

Fig. 6  Original images utilized in this study


5.1 Key space

The key space defines the total number of the possible com-
binations of the strings that can be produced by a secret key.
To make the proposed encryption scheme more secure and
encryption algorithm. The applications of such algo-
safe, the secret key should be long enough. The proposed
rithms include a vast range of software, web sites,
algorithm benefits from a 512-bit secret key which can gen-
mobile applications and more. Since color images are
erate 2512 > 1.3 × 10154 different combinations of the secret
the most common images used in the popular and spe-
key. Therefore, the key space is large enough to resist com-
cialized applications, the simulations are applied to this
mon brute-force attacks [31].
group of images. The size of the images varies greatly
depending on the device that took them. Therefore, the
5.2 Encryption and decryption speed
color images with different sizes and aspect ratios have
been considered in this research. As depicted in Figs. 6
In most of the applications and in addition to the need for
and 12, images are selected for this study from different
high security in the encryption process, a lot of attention is
sources: Fruits, Yacht, Sun, Mars and Sunrise from [27],
paid to speed of the operations and the proposed algorithm
Airplane and Mandrill from [28], Lena, Frymire and
is not an exception. The initial values for the encryption
Peppers from [29], Girl1 and Girl2 from (009641 and
and decryption process are generated by Logistic map (see
035946, respectively, from [30]). All the experiments
Sect. 3.2). The average time to extract required param-
are executed on MATLAB 2022a via a laptop equipped
eters and generate initial values from Logistic maps is
with Intel Core i7-8550U 1.8 GHz processor, 8 GB of
0.00045087 s. Table 1 shows the encryption and decryp-
RAM and Windows 10 Enterprise. All the encryptions
tion time required by the algorithm for different images. It
are performed using the string “THIS IS A SECRET
is evident in Table 1 that the average speed for encryption/
KEY FOR IMAGE ENCRYPTION!” as a secret key and
decryption process is much more than requirements for
considering a = 35 and b = 3 as two fixed parameters for
real-time applications; 135.82 Mbps for one image and
Chen system.
245.37 Mbps for 1000 images with the same secret key.
The strength of the proposed algorithm from aspect of the
speed is to encrypt/decrypt large size images. As depicted

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 8 of 18 Journal of Real-Time Image Processing (2023) 20:30

Table 1  Encryption and decryption speed


Image size Size on disk (bytes) Time of encrypting/decrypt- Speed (Mbps) Average time of encrypting/ Speed (Mbps)
ing for one image (s) decrypting for 1000 images (s)

480 × 512 741,376 0.0369 152.58 0.0326 172.68


512 × 512 790,528 0.0343 174.71 0.0318 188.75
1105 × 1118 3,706,880 0.2554 110.73 0.1090 259.34
1024 × 1280 3,936,256 0.5321 56.38 0.1473 203.70
1964 × 1280 7,565,312 0.4209 136.70 0.1845 311.90
2034 × 2100 12,816,384 0.9476 103.18 0.3357 291.25
1920 × 2560 14,770,176 0.6811 165.18 0.3939 285.57
2908 × 6000 52,346,880 2.1343 187.11 1.5989 249.77
Average 135.82 245.37

Fig. 8  a Airplane image, b histogram of airplane, and d histogram of the encrypted image (c)

in Table 1, the average speed of encrypting/decrypting more efficient. Figures 8 and 9 present samples of histo-
1000 images for large size images (last 6 images in the gram analysis of different images. The uniform distribution
table) is 266.92 Mbps which makes the algorithm more of the histogram for encrypted images is clearly visible in
efficient in encrypting/decrypting large batch sizes of the image (d) from Figs. 8 and 9. To verify the uniform dis-
images. tribution of histogram, Chi-squared test (𝜒 2 ) is performed
for all the original and encrypted images using Eq. (5). The
5.3 Statistical analysis obtained 𝜒 2 values are provided in Table 2. The critical value
of 𝜒 2 for an image with d = 255 as degree of freedom and
5.3.1 Histogram significant level 𝛼 = 0.05 is 𝜒0.05
2
(255) = 293.2478. Thus, if
a calculated 𝜒 value is less than 293.2478, then the histo-
2

Histogram of an image shows the frequency of intensity gram of the image is considered as a uniformly distributed
values of its pixels. Thus, more uniform distribution of the one. Apparently, the 𝜒 2 values for encrypted images (listed
intensity values indicates that an encryption algorithm is in Table 2) are smaller than mentioned criteria, while the 𝜒 2

Fig. 9  a Lena image, b histogram of Lena, and d histogram of the encrypted image (c)

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 9 of 18 30

Table 2  Chi-square test results where x and y are the intensity values (gray levels) of two
Image Plain image Encrypted image adjacent pixels in different channels (R, G and B) of an
image. Equation (6) calculates the covariance of x and y .
Average (R, G, B) Red Green Blue
Equations (7) and (8) are utilized to calculate variance and
Fruits 273,740.44 248.28 261.83 249.95 expectation of a given x . To perform this test, 2000 pairs of
Yacht 113,555.44 249.06 246.31 268.38 adjacent pixels are selected randomly and their correlations
Airplane 822,925.96 252.97 269.01 263.71 are calculated in three directions: horizontal, vertical and
Lena 237,534.11 256.04 239.98 258.52 diagonal. Table 3 presents the calculated correlation coef-
Mandrill 101,863.46 246.87 248.04 260.46 ficient values for both original and encrypted images. As
Peppers 340,999.44 257.14 257.31 258.62 shown in Table 3, the correlation between adjacent pixels of
Frymire 60,955,593.92 269.02 260.73 253.09 the original image is high (close to 1). In contrast, the cor-
Mars 49,727,039.03 256.78 251.20 253.14 relation between adjacent pixels of encrypted images is low
Girl1 3,606,709.74 247.98 259.09 234.16 (close to 0) which confirms the robustness of the proposed
Sun 235,077,664.04 247.95 254.52 287.09 algorithm against statistical attacks. Moreover, Figs. 10
Girl2 3,300,452.10 265.64 242.32 256.71 and 11 present correlation graphs of different images. First
Sunrise 35,557,049.93 248.00 269.97 255.35 rows of these figures demonstrate the original images and
their corresponding correlation graphs and, the second rows
present the encrypted images and their related correlation
values for original images are far greater than the criteria graphs. Each graph shows the correlations between pixels
(293.2478): of three channels of an image (R, G and B) in one of the
directions: horizontal, vertical and diagonal.

255
(Ok − U)2
χ2 = (5)
k=0
U
5.4 Information entropy
where Ok is the obtained frequency and U = M×N
256
is expected
value for frequency to be uniformity distributed, while M Information entropy is a common metric to measure the
and N are the number of rows and columns of an image. randomness of information in a given image. To perform
this test, two types of entropies are considered: global
5.3.2 Correlation of adjacent pixels Shannon entropy and local Shannon entropy.

High correlation between adjacent pixels shows the mean-


ingful relations between them. Therefore, an encryption 5.4.1 Global Shannon entropy (GSE)
algorithm should break the relations and reduce the correla-
tion between adjacent pixels. Correlation coefficient analysis Global Shannon entropy or Shannon entropy is a common
is another statistical parameter to indicate the correlation metric to evaluate the randomness and uncertainty in an
between adjacent pixels which is calculated by Eqs. (6)–(9): image which is calculated based on Eq. (10). While 8 bits
�cov(x, y)� are required to present intensity values (gray levels) of an
rxy = √ √ (6) image, the maximum value of entropy will be 8. Thus, the
D(x) × D(y) image with the closest entropy value to 8 has better ran-
domness of information and indicates the performance of
1 ∑(
N
)( ) encryption algorithm:
cov(x, y) = xi − E(x) yi − E(y) (7)
N i=1 ∑
2n −1
1
GSE(k) = P(ki )log2 (10)
i=0
P(ki )
1∑
N
E(x) = x (8) where P(ki ) represents the probability of occurrence ki and
N i=1 i
n is number of the bits required to present intensity val-
ues of an image ( n = 8). Table 4 provides the entropies for
1∑
N
original images and their corresponding encrypted images.
D(x) = (x − E(x))2 (9) As clearly visible, all the calculated entropies are close to
N i=1 i
8 which shows the performance of the proposed algorithm.

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 10 of 18 Journal of Real-Time Image Processing (2023) 20:30

Table 3  Correlation coefficients Image Size Plain image Encrypted image


for different directions
Horizontal Vertical Diagonal Horizontal Vertical Diagonal

Fruits 480 × 512 R 0.993844 0.994010 0.985837 −0.003972 −0.000861 −0.000754


G 0.985004 0.983707 0.968277 0.003529 −0.001329 0.003140
B 0.927533 0.903895 0.852690 −0.001519 0.001956 −0.000036
Yacht 480 × 512 R 0.974560 0.970248 0.939318 0.002862 −0.002718 −0.001513
G 0.975895 0.964950 0.919139 −0.001708 0.002679 0.004052
B 0.975588 0.969221 0.935764 0.002585 −0.004244 −0.000354
Airplane 512 × 512 R 0.973773 0.948679 0.947201 0.001931 0.003100 0.001199
G 0.949961 0.971395 0.938873 −0.001642 −0.002579 −0.000702
B 0.967119 0.934175 0.897691 0.005418 −0.002069 0.002998
Lena 512 × 512 R 0.979845 0.988736 0.964700 0.003151 0.007958 0.004319
G 0.969324 0.982749 0.957499 −0.002862 −0.000028 −0.001437
B 0.933737 0.959082 0.924673 0.003540 −0.005687 0.000398
Mandrill 512 × 512 R 0.928693 0.858894 0.860253 −0.000939 −0.000098 0.003646
G 0.880890 0.769741 0.766035 −0.005893 0.000703 −0.001383
B 0.905218 0.886778 0.842409 −0.000942 −0.002432 0.000017
Peppers 512 × 512 R 0.971325 0.962722 0.948129 −0.004644 0.002482 −0.001154
G 0.983129 0.979284 0.969073 0.001182 0.003206 −0.003321
B 0.958985 0.973267 0.946489 −0.001217 −0.001234 0.003113
Frymire 1105 × 1118 R 0.988232 0.989383 0.974658 0.001087 −0.000478 0.001048
G 0.970452 0.983340 0.963503 0.000136 −0.002111 −0.000849
B 0.942869 0.949851 0.897660 −0.002595 0.002681 −0.003271
Mars 1024 × 1280 R 0.882690 0.882811 0.806103 0.003058 −0.003677 0.002263
G 0.888747 0.846664 0.809079 0.001621 −0.001497 −0.003239
B 0.890846 0.871462 0.834150 −0.002462 0.000794 −0.003775
Girl1 1964 × 1280 R 0.987624 0.990143 0.980850 0.000100 −0.003526 0.000371
G 0.993589 0.995985 0.990351 −0.002362 −0.002590 0.002331
B 0.991956 0.994456 0.986703 0.000200 −0.000958 −0.000034
Sun 2034 × 2100 R 0.996492 0.996446 0.994966 0.000725 0.000660 −0.002671
G 0.994195 0.994635 0.987927 0.001532 0.000006 0.002932
B 0.970201 0.981587 0.948713 −0.003232 −0.001321 0.000075
Girl2 1920 × 2560 R 0.998184 0.998092 0.996516 −0.000799 −0.000941 −0.004086
G 0.998524 0.998472 0.997597 −0.002000 0.002344 −0.000097
B 0.997659 0.997654 0.996388 0.003303 0.001702 −0.000013
Sunrise 2908 × 6000 R 0.997542 0.997617 0.997003 −0.000350 0.000647 −0.000918
G 0.997938 0.997749 0.997386 −0.002709 0.001300 −0.001226
B 0.997441 0.996868 0.996239 −0.001427 −0.001571 −0.002938

5.4.2 Local Shannon entropy (LSE) global Shannon entropy of block Si . Considering k = 30


and TB = 44 × 44 = 1936 , the valid range for local Shan-
Another parameter to measure the randomness is local Shan- non entropy in case of an image with 8-bit intensity level
non entropy. It calculates the average entropy of k non-overlap- is [7.901901305, 7.903037329]. From Table 5, it can be
ping pixel blocks from an image, while the blocks are selected observed that all the reported results are within the valid
randomly. The LSE is calculated based on Eq. (11): range [32].


k
GSE(Si ) 5.5 Sensitivity analysis
LSE(k,TB ) (S) = (11)
i=1
k
In this section, two different aspects of system sensitivities
where S = {S1 , S2 , … Sk } are blocks of pixels without are studied: key sensitivity and plain image sensitivity which
overlapping with size of TB and, GSE(Si ) represents the are described in the following subsections. To measure

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 11 of 18 30

Fig. 10  Correlation of adjacent pixels in different directions of Frymire image

Fig. 11  Correlation of adjacent pixels in different directions of Sun image

the sensitivity of the proposed algorithm, two metrics are ( ) ∑ ∑ |img1 i,j − img2 i,j |
considered from the literature: NPCR (Number of Pixels U img1 , img2 = × 100 (13)
255 × M × N
Change Rate) and UACI (Unified Average Changing Inten- i j

sity) which are calculated based on Eqs. (12), (13) and (14).
{
These analyses are performed to measure the resistance of ( ) 0 if img1 i,j = img2 i,j
the proposed algorithm against differential and linear crypta- D img1 i,j , img2 i,j = (14)
1 if img1 i,j ≠ img2 i,j
nalysis [33]:
where M and N are the number of rows and columns, respec-
( ) ∑ ∑ D(img1 i,j , img2 i,j ) tively. As a reference, the expected values of NPCR and
N img1 , img2 = × 100 (12)
i j
M×N UACI for different test images are calculated according to
Eqs. (15), (16) and (17) [33]. The results are provided for
different significant levels of 𝛼 = 0.05, 0.01 and 0.001 for a
given M × N image in Table 6:

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 12 of 18 Journal of Real-Time Image Processing (2023) 20:30

Table 4  Global Shannon Image Plain image Encrypted image


entropy
Red Green Blue Red Green Blue

Fruits 7.517194 7.322994 6.778513 7.999330 7.999397 7.999406


Yacht 7.607096 7.538636 7.612158 7.999429 7.999371 7.999319
Airplane 6.717765 6.798979 6.213774 7.999430 7.999400 7.999362
Lena 7.253102 7.594038 6.968427 7.999413 7.999430 7.999408
Mandrill 7.706672 7.474432 7.752217 7.999424 7.999413 7.999448
Peppers 7.338827 7.496253 7.058306 7.999401 7.999388 7.999396
Frymire 4.455610 4.656575 4.595426 7.999884 7.999886 7.999882
Mars 5.026088 4.787217 4.427620 7.999877 7.999881 7.999881
Girl1 7.108940 7.226613 7.034791 7.999939 7.999938 7.999939
Sun 7.351520 4.694991 1.574248 7.999963 7.999964 7.999967
Girl2 7.578144 7.539494 7.405851 7.999969 7.999969 7.999968
Sunrise 6.934464 7.308297 7.464022 7.999991 7.999992 7.999991
Average 6.882952 6.703210 6.240446 7.999671 7.999669 7.999664

Table 5  Local Shannon entropy Image Plain image Encrypted image


test
Red Green Blue Red Green Blue

Fruits 5.630831 5.532147 6.101471 7.902275 7.902915 7.902173


Yacht 6.255804 5.941609 5.890456 7.901926 7.902845 7.902131
Airplane 5.374323 5.550170 4.968282 7.902239 7.902913 7.902111
Lena 6.014707 6.284368 5.949817 7.902117 7.902949 7.902129
Mandrill 6.658346 6.563838 6.849036 7.902157 7.902305 7.902055
Peppers 6.023262 6.024126 5.840468 7.902438 7.902647 7.902573
Frymire 1.769812 2.936732 2.566886 7.901985 7.902387 7.902289
Mars 2.603081 2.254470 2.962245 7.901943 7.902058 7.902813
Girl1 5.440887 5.090037 5.290856 7.902514 7.902970 7.902165
Sun 4.850557 3.178536 1.429016 7.902952 7.901941 7.902078
Girl2 4.266871 4.428399 4.370688 7.902802 7.902615 7.902392
Sunrise 3.996140 3.973251 4.069271 7.902538 7.902319 7.903003
Average 4.907052 4.813140 4.690708 7.902324 7.902572 7.902326

( √ )
5.5.1 Key sensitivity
F
N∗𝛼 (15)
−1
= F − Φ (𝛼) ∕(F + 1)
MN
This test is performed to evaluate the rate of changes in
an encrypted image when a slight change is made in the
√ ( )
( ) (F + 2) F 2 + 2F + 3 secret key. To perform this test, two different analyses are
F+2 𝛼
U∗− = − Φ−1 (16) considered: key sensitivity in encryption step and sensitiv-
18(F + 1)2 MNF
𝛼 3F + 3 2 ity of illegal key in decryption step.
Key sensitivity in encryption step
√ ( )
( ) (F + 2) F 2 + 2F + 3 To evaluate this test, following steps are performed:
F+2 𝛼
U∗+ = + Φ−1 (17)
18(F + 1)2 MNF
𝛼 3F + 3 2
(1) A random 512-bit key Key1 is generated.
where F = 255 is the largest value for gray level and Φ−1 is (2) One bit from Key1 is modified randomly and a new key
inverse cumulative density function of the standard normal Key2 is generated.
distribution. (3) The encryption process is applied on an image using
Key1 and Key2 to obtain two encrypted images E1 and
E2, respectively.
(4) NPCR and UACI are calculated between E1 and E2.

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 13 of 18 30

Table 6  The expected values of Image size NPCR (%) UACI (%)
NPCR and UACI for different
significant levels 𝜇N N∗0.05 N∗0.01 N∗0.001 U∗−
0.05 U∗−
0.01 U∗−
0.001

U∗+
0.05 U∗+
0.01 U∗+
0.001

480 × 512 99.6094 99.5887 99.5801 99.5705 33.3700 33.3406 33.3065


33.5571 33.5865 33.6206
512 × 512 99.6094 99.5893 99.5810 99.5717 33.3730 33.3445 33.3115
33.5541 33.5826 33.6156
1105 × 1118 99.6094 99.6001 99.5963 99.5920 33.4218 33.4087 33.3935
33.5053 33.5184 33.5336
1024 × 1280 99.6094 99.6004 99.5967 99.5925 33.4230 33.4103 33.3955
33.5041 33.5168 33.5316
1964 × 1280 99.6094 99.6029 99.6002 99.5972 33.4343 33.4251 33.4144
33.4928 33.5020 33.5127
2034 × 2100 99.6094 99.6044 99.6024 99.6000 33.4411 33.4341 33.4259
33.4860 33.4930 33.5012
1920 × 2560 99.6094 99.6047 99.6028 99.6007 33.4426 33.4360 33.4284
33.4845 33.4910 33.4987
2908 × 6000 99.6094 99.6069 99.6059 99.6048 33.4524 33.4490 33.4449
33.4746 33.4781 33.4822

Table 7  Key sensitivity in Image NPCR (%) UACI (%)


encryption step
Red Green Blue Red Green Blue

Fruits 99.6252 99.6330 99.6195 33.4473 33.4487 33.4914


Yacht 99.6326 99.6354 99.6273 33.4685 33.4238 33.4681
Airplane 99.6300 99.6170 99.6258 33.4565 33.4833 33.4063
Lena 99.6250 99.6376 99.6231 33.4774 33.4114 33.4489
Mandrill 99.6204 99.6181 99.6338 33.4544 33.4991 33.4688
Peppers 99.6410 99.6300 99.6178 33.4476 33.4823 33.4636
Frymire 99.6164 99.6223 99.6132 33.4713 33.4589 33.4640
Mars 99.6191 99.6170 99.6126 33.4708 33.4723 33.4623
Girl1 99.6141 99.6155 99.6142 33.4697 33.4675 33.4560
Sun 99.6144 99.6136 99.6165 33.4712 33.4524 33.4655
Girl2 99.6145 99.6146 99.6152 33.4609 33.4664 33.4648
Sunrise 99.6113 99.6114 99.6102 33.4645 33.4648 33.4595
Average 99.6220 99.6221 99.6191 33.4634 33.4609 33.4599

Fig. 12  Key sensitivity analysis of Girl2. a Original image. b, c Encrypted images using Key1 and Key2, respectively, d differences between (b,
c)

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 14 of 18 Journal of Real-Time Image Processing (2023) 20:30

Table 8  Sensitivity of illegal Image NPCR (%) UACI (%)


key in decryption step
Red Green Blue Red Green Blue

Fruits 99.6163 99.6273 99.6342 33.4688 33.4553 33.4637


Yacht 99.6236 99.6293 99.6362 33.4706 33.4695 33.4748
Airplane 99.6258 99.6304 99.6239 33.4510 33.4849 33.4555
Lena 99.6361 99.6346 99.6254 33.4645 33.4558 33.4601
Mandrill 99.6246 99.6372 99.6216 33.4281 33.4792 33.4684
Peppers 99.6357 99.6349 99.6140 33.4761 33.4653 33.4783
Frymire 99.6225 99.6174 99.6151 33.4658 33.4668 33.4663
Mars 99.6224 99.6199 99.6153 33.4673 33.4518 33.4630
Girl1 99.6134 99.6122 99.6138 33.4700 33.4623 33.4617
Sun 99.6188 99.6114 99.6109 33.4676 33.4687 33.4652
Girl2 99.6162 99.6137 99.6124 33.4674 33.4570 33.4548
Sunrise 99.6104 99.6117 99.6116 33.4644 33.4605 33.4632
Average 99.6222 99.6233 99.6195 33.4635 33.4647 33.4646

(5) Steps 1 to 4 are repeated 100 times for all the images (4) One bit from Key2 is modified randomly and a new key
listed in Fig. 6. The average of the calculated met- Key3 is generated.
rics for different channels of images (R, G and B) is (5) The decryption process is applied on E1 using Key2
reported in Table 7. and Key3 to generate two decrypted images D1 and
D2, respectively.
(6) NPCR and UACI are calculated between D1 and D2.
The provided results show that the proposed algorithm (7) Steps 1 to 6 are repeated 100 times for all the images
has a notable sensitivity to a slight change in the secret listed in Fig. 6. The average of the calculated met-
key and confirm the security of the algorithm against the rics for different channels of images (R, G and B) is
common attacks. Figure 12 is a sample of the results for reported in Table 8. Figure 13 shows a sample of sen-
key sensitivity test, while it shows the original image (a), sitivity test for an illegal key in decryption step, while
encryption of original image using Key1 (b), encryption of (b) is image E1 encrypted by Key1, (c) is image D1
original image using Key2 (c) and the difference between decrypted by a random key; Key2, (d) is image D2
two encrypted images (d). decrypted by Key3 (with only one bit difference with
Sensitivity of illegal key in decryption step Key2) and (e) is the difference between D1 and D2. As
To apply this test, following steps are performed: visible in this figure and reported results in Table 8,
the proposed algorithm shows a notable sensitivity
(1) A random 512-bit key Key1 is generated. to a small change in secret key and a broad resistance
(2) The encryption process is applied on an image using against common differential attacks.
Key1 to generate an encrypted image E1.
(3) A random 512-bit key Key2 is generated.

Fig. 13  Sensitivity of illegal key in decryption step for Frymire image. a Original image. b encrypted images E1, c decrypted image D1, d
decrypted image D2, e differences between (c, d)

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 15 of 18 30

Table 9  Plain image sensitivity Image NPCR (%) UACI (%)


Red Green Blue Red Green Blue

Fruits 99.6106 99.6204 99.6122 33.4828 33.3925 33.5569


Yacht 99.6110 99.6151 99.6126 33.4211 33.4028 33.4178
Airplane 99.6120 99.6124 99.6201 33.4386 33.4370 33.4090
Lena 99.6357 99.6105 99.6159 33.4526 33.4038 33.4384
Mandrill 99.6094 99.6101 99.6296 33.5518 33.4036 33.3619
Peppers 99.6269 99.6201 99.6189 33.4293 33.4513 33.4319
Frymire 99.6144 99.6211 99.6096 33.5001 33.5171 33.5218
Mars 99.6120 99.6121 99.6125 33.4519 33.4594 33.4486
Girl1 99.6107 99.6141 99.6149 33.4627 33.4533 33.4487
Sun 99.6085 99.6147 99.6136 33.4559 33.4480 33.4557
Girl2 99.6103 99.6128 99.6174 33.4575 33.4528 33.4564
Sunrise 99.6023 99.6029 99.6018 33.4584 33.4598 33.4567
Average 99.6137 99.6139 99.6149 33.4636 33.4401 33.4503

5.5.2 Plain image sensitivity are the average of three channels (R, G and B) of image.
Moreover, provided NPCRs and UACIs are the results from
Plain image sensitivity is another test to evaluate security key sensitivity analysis in the encryption process. As it is
of the proposed algorithm when a slight change is made in evident in Table 10, the proposed algorithm has provided
the original image. To perform this test, following steps are the best Encryption time and speed among all the provided
applied: algorithms. This feature is another green light to confirm
the capabilities of the proposed algorithm to apply to real-
(1) A random 512-bit key Key1 is generated. time applications. From aspect of the information entropy,
(2) One pixel from image Img1 is modified randomly and the proposed algorithm has shown a good performance by
a new image Img2 is generated. providing entropies > 7.9994 for Lena color images. Since
(3) The encryption process is applied on both images all the provided key spaces are much greater that 2100, all the
Img1 and Img2 using the same key Key1 to obtain two algorithms can be considered as secure against brute-force
encrypted images E1 and E2, respectively. attacks [31]. All the reported Chi-square values are below
(4) NPCR and UACI are calculated between E1 and E2. the critical value 293.2478. Based on required critical values
(5) Steps 1 to 4 are repeated 100 times for all the images and ranges for Local Shannon Entropy, NPCR and UACI,
listed in Fig. 6 and the average of the calculated met- some of the results from Refs [12, 35] are out of the range
rics for different channels of images (R, G and B) is (highlighted cells), while all the results for the proposed
reported in Table 9. algorithm are within the critical ranges. All the reported
metrics in Table 10 confirm the resistance of the proposed
The provided results in Table 9 assert the performance of algorithm against different types of statistical and differential
the proposed algorithm against common differential attacks. attacks. Without loss of generality, the proposed algorithm
has shown better performance in comparison with the other
algorithms in most of the listed aspects.
5.6 Comparison analysis
5.7 Discussion
In this section, a comparison between the proposed algo-
rithm and several different algorithms from the literature Based on the simulation results and comparative studies,
is provided. In this comparison, obtained results for color the proposed algorithm has shown an excellent performance
and gray formats of Lena image (512 × 512) are compared in comparison with recent studies from the literature. The
with different algorithms and reported in Table 10. To major improvements and their reasons are highlighted as
have a fair comparison, all the encryption times are scaled follows:
based on CPU clocks reported in their experiments and
relevant “CPU Single Thread Rating” from [34]. All the (1) High-speed encryption/decryption process that comes
other reported metrics (correlations, information entropy, from:
local Shannon entropy, NPCR and UACI) for color Lena

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 16 of 18 Journal of Real-Time Image Processing (2023) 20:30

• Fewer runs of Logistic maps: the proposed algorithm

Key space
needs only 6 pseudo-random values for each image

> ­10154
> ­10150

> ­10202
> ­10154
> ­10128
> ­10213

> ­10168
> ­10165
> ­2345
> ­2281
10225
channel; 18 values for a color image (see Sect. 3.2)
• Efficient use of Chen system: Chen system is not uti-
lized to generate any chaotic sequence. For each col-
UACI (%)

33.4620
33.4415

33.4570
33.3359
33.4033
33.4669

33.0305
33.1300
33.4950

33.4608
umn/row of image, Chen system generates 3 values


(X, Y and Z) only once. These values are applied to
calculate Shifts and ToXOR (see Sects. 3.3 and 3.4).
NPCR (%)

• One value to encrypt/decrypt each column/row: Unlike


99.6286
99.6056
99.6300
99.2400
99.6061
99.6235
99.6081
99.6124
99.6419
99.8241
99.6200
most of the algorithms that use a sequence of pseudo-
random values to encrypt/decrypt each column/row of
image, the proposed algorithm uses only one pseudo-
non Entropy
Local Shan-

random value (ToXOR) to encrypt/decrypt each col-


7.906200
7.902400

7.902029
7.902398
7.902803

umn/row of image (see Sects. 3.3 and 3.4).


• Number of loop steps: Each run of algorithm includes





2 loops (steps) and total number of loop executions
Information Entropy

is M + N for each image channel; 3 × (M + N) for a


given color image (see Sects. 3.3 and 3.4).
7.999417
7.999267
7.999400
7.999246
7.999362
7.991300
7.999400
7.999300
7.999200
7.999233
7.999300

(2) High level of security and resistance against common


different attacks that comes from:

• Using a SHA-512 secret key: which can provide a


lation (H, V, D)
Average corre-

large enough key space (see Sect. 3.1)


−0.005333
0.001039
0.006117
0.004604
0.002690
0.000956
0.000521
0.002233
0.000466
0.000700
0.000400

• Using multiple and high-dimensional chaotic maps:


3 Logistic maps and one 3D Chen system. It is worth
noting that the proposed algorithm generates M + N
initial values for Chen system for each channel of
Chi-square value

image which can make the algorithm more secure.


• Applying mean value of column/row: To enhance the
resistance of the proposed algorithm against differ-
262.74

246.90
251.51

235.49

251.92

ential attacks, the mean value of each column/row is




used to calculate the initial values of Chen System


Speed (Mbps)

for the next column/row (see Sects. 3.3 and 3.4).


187.50
1.81
5.89
62.84
6.95
3.05
7.08
93.39
122.99
2.19
30.52

(3) Much less required memory that comes from:


• Number of required initial values: The proposed
Table 10  Comparison analysis between different algorithm

algorithm requires only 6 pseudo-random values to


encrypt/decrypt each channel of image; 18 values for
encryption

a color image. In addition, two more values will be


time (s)

1.0182
0.0955
0.8632

0.0642

2.7413
0.1966
0.0320

1.9665
0.8469

0.0488
Encryption Scaled

stored as 𝜇 for logistic maps and c for Chen system. If


a floating number needs 64 bits of memory, then the


proposed algorithm requires only 20 × 64 = 1280 bits
time (s)

1.7697
0.9347

0.2880
0.0320

2.0179
0.1950
1.2114

0.0630
0.0468
3.7681

to store the initial values and parameters, in addition


to required memory for the image (see Sects. 3.1 and

3.2).
Algorithm

Proposed
Ref [36]
Ref [12]
Ref [35]
Ref [10]
Ref [37]
Ref [38]
Ref [39]
Ref [40]
Ref [41]
Ref [42]

6 Conclusion
Lena (color)

There are thousands of studies in the field of image encryp-


tion proposing different algorithms, but large size images
Image

and encryption speed are not studied sufficiently. Most of

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Journal of Real-Time Image Processing (2023) 20:30 Page 17 of 18 30

the proposed “fast” algorithms are not suitable for real-time 7. Duan, C.-F., Zhou, J., Gong, L.-H., Wu, J.-Y., Zhou, N.-R.: New
applications, while real-time encryption/decryption for large color image encryption scheme based on multi-parameter frac-
tional discrete Tchebyshev moments and nonlinear fractal permu-
size images is a need. To address these issues, a secure, effi- tation method. Opt. Lasers Eng. 150, 106881 (2022). https://​doi.​
cient and super-fast image encryption algorithm is proposed org/​10.​1016/j.​optla​seng.​2021.​106881
in this study which is compatible with both real-time appli- 8. Alexan, W., ElBeltagy, M., Aboshousha, A.: RGB Image Encryp-
cations and the large size images. The proposed algorithm tion through Cellular Automata, S-Box and the Lorenz System.
Symmetry (2022). https://​doi.​org/​10.​3390/​sym14​030443
is chaos based and benefits from two chaotic maps: Logistic 9. Gao, X., Mou, J., Xiong, L., Sha, Y., Yan, H., Cao, Y.: A fast
map and Chen system. A SHA-512 secret key is utilized and efficient multiple images encryption based on single-channel
to make the algorithm more secure by increasing the key encryption and chaotic system. Nonlinear Dyn. 108(1), 613–636
space. Initial values and 𝜇 for Logistic maps are derived (2022). https://​doi.​org/​10.​1007/​s11071-​021-​07192-7
10. Demirtaş, M.: A new RGB color image encryption scheme based
from secret key as well as parameter c for Chen system. on cross-channel pixel and bit scrambling using chaos. Optik 265,
Three Logistic maps generate initial values for 3 dimen- 169430 (2022). https://​doi.​org/​10.​1016/j.​ijleo.​2022.​169430
sions of Chen system. The proposed algorithm runs once for 11. Zhang, X., Gong, Z.: Color image encryption algorithm based
each channel of image: one run for a gray image and three on 3D Zigzag transformation and view planes. Multimedia Tools
Appl. (2022). https://​doi.​org/​10.​1007/​s11042-​022-​13003-x
runs for a color image. Each run includes two steps: (1) re- 12. Yousif, S.F., Abboud, A.J., Alhumaima, R.S.: A new image
arranging and encrypting image columns, (2) re-arranging encryption based on bit replacing, chaos and DNA coding tech-
and encrypting image rows. Circular shift and XOR operator niques. Multimedia Tools Appl. 81(19), 27453–27493 (2022).
are applied for permutation and encryption, respectively. For https://​doi.​org/​10.​1007/​s11042-​022-​12762-x
13. Singh, N., Sinha, A.: Chaos-based secure communication sys-
each column/row, Chen system generates the number of shift tem using logistic map. Opt. Lasers Eng. 48(3), 398–404 (2010).
steps and one value for XOR (see Sects. 3.3 and 3.4). The https://​doi.​org/​10.​1016/j.​optla​seng.​2009.​10.​001
simulation results and comparative studies assert the supe- 14. Lloyd, A.L.: The coupled logistic map: a simple model for the
rior performance of the proposed algorithm in comparison effects of spatial heterogeneity on population dynamics. J. Theor.
Biol. 173(3), 217–230 (1995). https://​doi.​org/​10.​1006/​jtbi.​1995.​
with the studied ones. The most significant advantages of 0058
the proposed algorithm are: high-speed encryption/decryp- 15. Rani, M., Agarwal, R.: A new experimental approach to study the
tion process, high level of security and resistance against stability of logistic map. Chaos, Solitons Fractals 41(4), 2062–
different common attacks and, much less required memory. 2066 (2009). https://​doi.​org/​10.​1016/j.​chaos.​2008.​08.​022
16. Suneel, M.: Electronic circuit realization of the logistic map. Sad-
hana 31(1), 69–78 (2006). https://​doi.​org/​10.​1007/​BF027​03801
17. Arroyo, D., Alvarez, G., Fernandez, V.: On the inadequacy of
Data availability Authors confirm that this manuscript has no associ- the logistic map for cryptographic applications. Preprint at arXiv:​
ated data. 0805.​4355 (2008).
18. Tarasova, V.V., Tarasov, V.E.: Logistic map with memory from
economic model. Chaos Solitons Fractals 95, 84–91 (2017).
https://​doi.​org/​10.​1016/j.​chaos.​2016.​12.​012
References 19. Pareek, N.K., Patidar, V., Sud, K.K.: Image encryption using cha-
otic logistic map. Image Vis. Comput. 24(9), 926–934 (2006).
1. Enayatifar, R., Guimarães, F.G., Siarry, P.: Index-based permuta- https://​doi.​org/​10.​1016/j.​imavis.​2006.​02.​021
tion-diffusion in multiple-image encryption using DNA sequence. 20. Chen, G., Ueta, T.: Yet another chaotic attractor. Int. J. Bifurc.
Opt. Lasers Eng. 115, 131–140 (2019). https://​doi.​org/​10.​1016/j.​ Chaos 9(07), 1465–1466 (1999). https://​doi.​org/​10.​1142/​S0218​
optla​seng.​2018.​11.​017 12749​90010​24
2. Li, Z., Peng, C., Tan, W., Li, L.: A novel chaos-based color image 21. Zhang, Z., Chen, G., Yu, S.: Hyperchaotic signal generation via
encryption scheme using bit-level permutation. Symmetry (2020). DSP for efficient perturbations to liquid mixing. Int. J. Circuit
https://​doi.​org/​10.​3390/​sym12​091497 Theory Appl. 37(1), 31–41 (2009). https://​doi.​org/​10.​1002/​cta.​
3. Wei, D., Jiang, M.: A fast image encryption algorithm based on 470
parallel compressive sensing and DNA sequence. Optik 238, 22. Kayalvizhi, S., Malarvizhi, S.: A novel encrypted compressive
166748 (2021). https://​doi.​org/​10.​1016/j.​ijleo.​2021.​166748 sensing of images based on fractional order hyper chaotic Chen
4. Iqbal, N., Hanif, M., Abbas, S., Khan, M.A., Ul Rehman, Z.: system and DNA operations. Multimedia Tools Appl. 79(5),
Dynamic 3D scrambled image based RGB image encryption 3957–3974 (2020). https://​doi.​org/​10.​1007/​s11042-​019-​7642-0
scheme using hyperchaotic system and DNA encoding. J. Inf. 23. Ren, H.-P., Bai, C., Huang, Z.-Z., Grebogi, C.: Secure communi-
Secur Appl 58, 102809 (2021). https://d​ oi.o​ rg/1​ 0.1​ 016/j.j​ isa.2​ 021.​ cation based on hyperchaotic Chen system with time-delay. Int.
102809 J. Bifurc. Chaos 27(05), 1750076 (2017). https://​doi.​org/​10.​1142/​
5. Ul Haq, T., Shah, T.: 4D mixed chaotic system and its applica- S0218​12741​75007​66
tion to RGB image encryption using substitution-diffusion. J. Inf. 24. Effati, S., Saberi Nik, H., Jajarmi, A.: Hyperchaos control of
Secur. Appl. 61, 102931 (2021). https://​doi.​org/​10.​1016/j.​jisa.​ the hyperchaotic Chen system by optimal control design. Non-
2021.​102931 linear Dyn. 73(1), 499–508 (2013). https://​doi.​org/​10.​1007/​
6. Elkandoz, M.T., Alexan, W.: Image encryption based on a s11071-​013-​0804-0
combination of multiple chaotic maps. Multimedia Tools 25. Park, J.H.: Adaptive synchronization of hyperchaotic Chen sys-
Appl. 81(18), 25497–25518 (2022). https://​doi.​org/​10.​1007/​ tem with uncertain parameters. Chaos Solitons Fractals 26(3),
s11042-​022-​12595-8 959–964 (2005). https://​doi.​org/​10.​1016/j.​chaos.​2005.​02.​002

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


30 Page 18 of 18 Journal of Real-Time Image Processing (2023) 20:30

26. Yan, Z.: Controlling hyperchaos in the new hyperchaotic Chen Springer Nature or its licensor (e.g. a society or other partner) holds
system. Appl. Math. Comput. 168(2), 1239–1250 (2005). https://​ exclusive rights to this article under a publishing agreement with the
doi.​org/​10.​1016/j.​amc.​2004.​10.​016 author(s) or other rightsholder(s); author self-archiving of the accepted
27. Hlevkin: https://​www.​hlevk​in.​com/​hlevk​in/​06tes​timag​es.​htm manuscript version of this article is solely governed by the terms of
28. SIPI: https://​sipi.​usc.​edu/​datab​ase/​datab​ase.​php?​volume=​misc such publishing agreement and applicable law.
29. University of Waterloo: https://l​ inks.u​ water​ loo.c​ a/R
​ eposi​ tory.h​ tml
30. CelebA dataset: http://​mmlab.​ie.​cuhk.​edu.​hk/​proje​cts/​CelebA.​
html Babak Rezaei received the B.S.
31. Alvarez, G., Li, S.: Some basic cryptographic requirements for degree in Computer Engineer-
chaos-based cryptosystems. Int. J. Bifurc. Chaos 16(08), 2129– ing-Hardware from Shiraz uni-
2151 (2006). https://​doi.​org/​10.​1142/​S0218​12740​60159​70 versity, Iran, in 2002 and, the
32. Wu, Y., Zhou, Y., Saveriades, G., Agaian, S., Noonan, J.P., Nata- M.S. degree in Software engi-
rajan, P.: Local Shannon entropy measure with statistical tests for neering from Islamic Azad Uni-
image randomness. Inf. Sci. 222, 323–342 (2013). https://​doi.​org/​ versity, Firoozkooh Branch, Iran,
10.​1016/j.​ins.​2012.​07.​049 in 2017. He is currently pursuing
33. Wu, Y., Noonan, J.P., Agaian, S.: NPCR and UACI randomness PhD degree with Electrical Engi-
tests for image encryption. Cyber J. 1(2), 31–38 (2011) neering Dept. in Universidade
34. CPU Benchmark: https://w ​ ww.c​ puben​ chmar​ k.n​ et/s​ ingle​ Compa​ re.​ Federal de Minas Gerais
php (UFMG), Belo Horizonte, Bra-
35. Boriga, R.E., Dăscălescu, A.C., Diaconu, A.V.: A new fast image zil. His research interests include
encryption scheme based on 2D chaotic maps. IAENG Int. J. Image Encryption, Evolutionary
Comput. Sci. 41(4), 249–258 (2014) Algorithms, Machine Learning
36. Zhang, X., Ye, R.: A novel RGB image encryption algorithm based and Operational Research.
on DNA sequences and chaos. Multimedia Tools Appl. 80(6),
8809–8833 (2021). https://​doi.​org/​10.​1007/​s11042-​020-​09465-6 Mahvash Mobasseri received the
37. Teng, L., Wang, X., Yang, F., Xian, Y.: Color image encryption B.S. degree in English transla-
based on cross 2D hyperchaotic map using combined cycle shift tion studies from Zand Univer-
scrambling and selecting diffusion. Nonlinear Dyn. 105(2), 1859– sity, Shiraz, Iran, in 2019 and,
1876 (2021). https://​doi.​org/​10.​1007/​s11071-​021-​06663-1 the M.A. degree in English
38. Hanif, M., Abbas, S., Khan, M.A., Iqbal, N., Rehman, Z.U., Translation Studies from Khatam
Saeed, M.A., Mohamed, E.M.: A novel and efficient multiple University, Tehran, Iran, in 2021.
RGB images cipher based on chaotic system and circular shift She is currently pursuing M.A.
operations. IEEE Access 8, 146408–146427 (2020). https://​doi.​ degree with Applied IT Dept.
org/​10.​1109/​ACCESS.​2020.​30150​85 and pedagogy in University of
39. Ge, B., Chen, X., Chen, G., Shen, Z.: Secure and fast image Gothenburg, Sweden. Her
encryption algorithm using hyper-chaos-based key generator and research interests include Auto-
vector operation. IEEE Access 9, 137635–137654 (2021). https://​ matic Translators, Machine
doi.​org/​10.​1109/​ACCESS.​2021.​31183​77 Learning and Deep Learning.
40. Kang, S.W., Choi, U.S., Cho, S.J.: Fast image encryption
algorithm based on (n, m, k)-PCMLCA. Multimedia Tools
Appl. 81(1), 1209–1235 (2022). https:// ​ d oi. ​ o rg/ ​ 1 0. ​ 1 007/​ Rasul Enayatifar received the
s11042-​021-​11424-8 post-doctoral and Ph.D from
41. Valandar, M.Y., Barani, M.J., Ayubi, P.: A fast color image UFMG (Brazil) and UTM
encryption technique based on three dimensional chaotic map. (Malaysia), respectively. He is
Optik 193, 162921 (2019). https://​doi.​org/​10.​1016/j.​ijleo.​2019.​ currently Assistant Prof. and
06.​021 PhD supervisor with Computer
42. Heucheun Yepdia, L.M., Tiedeu, A., Kom, G.: A robust and fast Engineering Dept., Islamic Azad
image encryption scheme based on a mixing technique. Secur. University, Firoozkooh Branch,
Commun. Networks 2021, 6615708 (2021). https://​doi.​org/​10.​ Iran. His research interests
1155/​2021/​66157​08 include Image Encryption, Oper-
ational Research, Machine
Publisher's Note Springer Nature remains neutral with regard to Learning and Deep Neural
jurisdictional claims in published maps and institutional affiliations. Networks.

13

Content courtesy of Springer Nature, terms of use apply. Rights reserved.


Terms and Conditions
Springer Nature journal content, brought to you courtesy of Springer Nature Customer Service Center GmbH (“Springer Nature”).
Springer Nature supports a reasonable amount of sharing of research papers by authors, subscribers and authorised users (“Users”), for small-
scale personal, non-commercial use provided that all copyright, trade and service marks and other proprietary notices are maintained. By
accessing, sharing, receiving or otherwise using the Springer Nature journal content you agree to these terms of use (“Terms”). For these
purposes, Springer Nature considers academic use (by researchers and students) to be non-commercial.
These Terms are supplementary and will apply in addition to any applicable website terms and conditions, a relevant site licence or a personal
subscription. These Terms will prevail over any conflict or ambiguity with regards to the relevant terms, a site licence or a personal subscription
(to the extent of the conflict or ambiguity only). For Creative Commons-licensed articles, the terms of the Creative Commons license used will
apply.
We collect and use personal data to provide access to the Springer Nature journal content. We may also use these personal data internally within
ResearchGate and Springer Nature and as agreed share it, in an anonymised way, for purposes of tracking, analysis and reporting. We will not
otherwise disclose your personal data outside the ResearchGate or the Springer Nature group of companies unless we have your permission as
detailed in the Privacy Policy.
While Users may use the Springer Nature journal content for small scale, personal non-commercial use, it is important to note that Users may
not:

1. use such content for the purpose of providing other users with access on a regular or large scale basis or as a means to circumvent access
control;
2. use such content where to do so would be considered a criminal or statutory offence in any jurisdiction, or gives rise to civil liability, or is
otherwise unlawful;
3. falsely or misleadingly imply or suggest endorsement, approval , sponsorship, or association unless explicitly agreed to by Springer Nature in
writing;
4. use bots or other automated methods to access the content or redirect messages
5. override any security feature or exclusionary protocol; or
6. share the content in order to create substitute for Springer Nature products or services or a systematic database of Springer Nature journal
content.
In line with the restriction against commercial use, Springer Nature does not permit the creation of a product or service that creates revenue,
royalties, rent or income from our content or its inclusion as part of a paid for service or for other commercial gain. Springer Nature journal
content cannot be used for inter-library loans and librarians may not upload Springer Nature journal content on a large scale into their, or any
other, institutional repository.
These terms of use are reviewed regularly and may be amended at any time. Springer Nature is not obligated to publish any information or
content on this website and may remove it or features or functionality at our sole discretion, at any time with or without notice. Springer Nature
may revoke this licence to you at any time and remove access to any copies of the Springer Nature journal content which have been saved.
To the fullest extent permitted by law, Springer Nature makes no warranties, representations or guarantees to Users, either express or implied
with respect to the Springer nature journal content and all parties disclaim and waive any implied warranties or warranties imposed by law,
including merchantability or fitness for any particular purpose.
Please note that these rights do not automatically extend to content, data or other material published by Springer Nature that may be licensed
from third parties.
If you would like to use or distribute our Springer Nature journal content to a wider audience or on a regular basis or in any other manner not
expressly permitted by these Terms, please contact Springer Nature at

onlineservice@springernature.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy