A_Lightweight_Image_Encryption_Algorithm_Based_on_Secure_Key_Generation
A_Lightweight_Image_Encryption_Algorithm_Based_on_Secure_Key_Generation
ABSTRACT Data confidentiality and security are important issues due to the sensitivity of the data
and its relationship with users’ privacy. Sensitive data includes images and texts that can be transmitted
over the Internet, Internet of Things devices and edge-fog-cloud system. These devices require speed and
accuracy responses, and they are vulnerable to hacking. To solve these problems, encryption algorithms
provide necessary solution to meet these requirements. Advanced Encryption Standard represents the best
development in data encryption; however, it is computational expensive. In this research, an improved
advanced encryption standard algorithm is proposed with advanced security and lightweight computation
utilized for encrypting of images and texts. The algorithm is improved using various steps including key
generation which is performed in two steps. First, using an innovative, proven chaotic function distinguished
by its sensitivity to any change in its variables. Second, using three-dimensional Lorenzo function. In our
research, a unique key was used for all rounds, and round key then used like advanced encryption standard.
Two new dynamic substitution boxes are used one for odd rounds and the other for even rounds in which the
speed does not exceeding a millisecond. The mix column function was replaced by a circular permutation
function at the bit level, which improved the speed and performance of the algorithm, Our extensive
simulation results indicated enhanced speed, randomness, and high efficiency in encrypting Internet of
Things data. The algorithm was evaluated using the National Institute of Standards and Technology tests.
INDEX TERMS AES, chaotic map, circular permutation, cryptography, dynamic S-box, IoT, lightweight
algorithm.
produce the same encryption effect as a random key in a modified S-box is 51% on average showing an improvement
one-time pad [10], [11]. Because of the differences in the of 3% on average when benchmarked with the original AES
computational costs, encrypting image formats presents secu- method.
rity risks, especially when delivering images via wireless In [15], the authors introduce a novel AES encryption
networks [12]. This research aims to create an effective, S-box with superior distance to Strict Avalanche Criterion
lightweight, fast, and safe encryption framework for images (SAC), Bit Independence Criterion (BIC), and algebraic
(gray and color) and text byg safeguarding important data complexity, enhancing security measures by evaluating key
within these resource-limited devices’ networks. Our goal is cryptographic parameters. The authors claimed that their
to create a more reliable and secure IoT utilizing the com- proposed S-box performs at least as well as the standard
bined capabilities of AES improvement and chaos-based key S-boxes.
generation in the Fog computing architecture. In [16], an enhanced AES algorithm incorporates dynamic
In particular, the novelty of the proposed works includes S-box creation and key generation was proposed. The authors
the following: indicated that their algorithm enhances security against
• Chaos-based key generation: as far as the authors are attacks in online transactions, banking, and e-commerce by
concerned, this is the first-time chaotic maps are uti- adding complexity to the cipher text.
lized to generate pseudo-random key streams for image A keystream generation method utilizing the Chebyshev
and text encryption, taking advantage of their inherent map was proposed in [17], the algorithm offers real-time
resistance to statistical analysis and sensitivity to initial image encryption with strong cryptographic strength,
conditions. meeting NIST requirements. Only a small portion of a
• AES enhancement for IoT: improving AES algorithm’s minute is needed for the application, which is considered
performance for image encryption on IoT devices with a long time.
limited resources while preserving a high level of secu- The enhanced AES technique proposed in [18], uses a
rity. 256-bit random number generator to generate a randomized
S-box, enhances security in military applications and IoT
Simulation results indicated that the proposed approach security with low overheads.
is faster at encrypting data when benchmarked with state- In [19], Small Lightweight Cryptographic Algorithm
of-the-art algorithms. Furthermore, it is demonstrated that (SLA), a lightweight encryption technique based on the sub-
the throughput of the proposed method is 32,803.69 for stitution permutation network (SPN), offers faster security
encryption and 92,619.39 for decryption. While the algorithm than the Feistel-based ciphers, making it suitable for embed-
nonlinear characteristic is maintained, the recommended ded settings like Radio-Frequency Identification (RFID) tags
modifications did not weaken the security of the conventional and wireless sensor nodes.
AES. Cipher attacks require extensive amount of time to Based on chaotic theory, a first phase of permutation has
break the proposed algorithm. been added to the AES algorithm to improve confusion rates
The reminder of this paper is organized as follows. was proposed in [20]. Two DNA sequences are used to create
Section II provided extensive information about the literature the mixing matrix from the logistic map 3D; the first sequence
review. The suggested work and associated approach are cov- serves as a key in the add round key. The decryption output
ered in Section III. The results and analysis of the proposed is a DNA sequence sent to the recipient. Completing the
method are shown in Section IV, along with benchmark with encryption and decryption procedures after five statistical and
state-of-the-art techniques. Sections V and 6 show the results NIST checks took a few seconds.
and the conclusion, respectively. The research proposed in [21] creates S-box using shifting,
a circle map, and a password key, highlighting its dynamic
II. RELATED WORK nature, input-output interaction, and intricate production pro-
This section discusses the development of secure keys and cess.
lightweight image encryption technique. Table 1 shows various techniques for data encryptions
The authors in [13] combined Henon map with AES with their advantages and disadvantages. As it can be
algorithm in which AES algorithm encrypts plain image, noted, majority of these techniques suffer from low speed,
while the Henon map generates a random key for the encryp- complexity, and low security. The aim of this work is to
tion stage, enhancing security and withstanding more attacks. overcome these issues by using lightweight algorithm with
The results showed that their approach performs satisfactorily improved process complexity while preserving the security
when encrypting images [13]. of the data.
The authors in [14] introduced a technique based on AES
to enhance the S-box generation, in which they claim that
their algorithm demonstrates its effectiveness in generating III. BACKGROUND AND METHODOLOGY
encrypted messages with a larger average avalanche impact In this section, basic background about the well-known
when benchmarked with the original AES method. Avalanche Advanced Encryption standard as well as our proposed
effect shows that the outcomes of encrypted texts by the methodology will be provided.
A. ADVANCED ENCRYPTION STANDARD ALGORITHM of transformations, including Add Round Key, Sub Bytes,
(AES) Shift Rows, and Mix Columns, with round 10 having all
The AES algorithm, a symmetric key algorithm, established transformations except for Mix Column, and the decryption
by the US National Institute for Standard and Technol- process is the exact inverse.
ogy (NIST) as the standard for digital data encryption
method [22]. AES comprises three types, which are: AES- B. PROPOSED METHOD OF LIGHTWEIGHT AES
128, AES-192, and AES-256, each with varying key sizes that This work proposes a lightweight, fast, and secure improved
determine the allocation of rounds [23], [24]. AES’s functions AES encryption method for IoT sensor data security called
are Add-Round-Key, Shift-Rows, Mix-Columns, and Sub- simple swift IoT guard (ss IoT g). It creates secret keys using
Bytes [25], [26]. The 128-bit AES algorithm uses 08 rounds an innovative map and Lorenzo 3Dimension. The algorithm
Algorithm 1 Key Generation by the Proposed Map Algorithm 2 Generating Key Using the Lorenzo Map
Inputs: p, x, n: The parameter ‘p,’ the most important variable Inputs: p, r, t (parameters for the Lorenzo model), xold , yold ,
in deciding how the logistic map behaves; x: The initial value, zold (initial random values within the range [0, 1].), n: The
n: The number of iterations to generate the key number of iterations to generate the key
Output: key: A byte array containing the generated key Output: key: A byte array containing the generated key
- Loop ‘n’ times: Loop ‘n’ times
Step1: Run the new chaotic equation for n steps and define Begin
(x × r) + (1 − x)
Run Lorenzo Model for n Steps:
f (x) = %1 xnew = p. (x − y),
0.9 × r
ynew = (x. z) + (r. x) − y,
Step 2: If ‘x’ is larger than 0.5, put ’1’ to ’binary string’; znew = (x. y) + (t. z)
Else, append ’0’. Return the Key
Step 3: If the length of the ‘binary string’ reaches 8: End
a. Convert ‘binary string’ to an integer value.
b. Add the integer value (byte) to the ‘key’ byte array.
c. Reset ‘binary string’ to an empty string for the next accurate output data as follows.
set of bits.
Step 4: Return the generated ‘key’ byte array. x = p · (x − y), (2)
y = (x.z) + (r.x) − y, (3)
generates two S-boxes and uses circular permutations instead z = (x.y) + (t.z). (4)
of mixed columns. Figure 1 shows our proposed algorithm.
As illustrated in Figure 1, our proposed algorithm has the where x, y and z represent the input values p, r, t are parame-
following improvements. ters with p = 10, r = 28, t = 8/3 while x1 , x2 and x3 are the
input values.
1) KEY GENERATION OF SYSTEM Algorithm 2 shows the process of generating security keys
key generation is performed using two proposed methods. using the proposed 3D-Lorenz map.
The Second Step: Another 2 × 16 bytes (32) are obtained The Third Step: The first and second phases are combined
by shifting to the right. The shifting is made by the values to create a matrix (16 × 4) of 64 bytes. A mask is generated
of the second digit after the decimal point of the value f(x) on this matrix, where its value helps make equal or nearly
defined in Equation (1); to avoid revealing the main values equal numbers of ones and zeros if the matrix is converted to
that were used to generate keys using 16 values, where each binary representation. This step creates a matrix of (16 × 8),
row is shifted with the corresponding value of these digits as or 64 bytes.
illustrated in Figure 3. This step obtained a new (16 × 2) byte The Fourth Step: The matrices that have been obtained
matrix (32 bytes). from the first, second, and third steps will be merged, and a
FIGURE 3. The process of shifting the values using the second step of the
proposed algorithm.
TABLE 3. NIST test outcome. The process involves performing XOR for each two-bit adja-
cent bit, as explained in the first step.
[1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0]
[1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1]
[1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0]
[0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]
[1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1]
[0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1]
[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1]
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1]
[0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1]
[0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1]
[0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1]
[1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0]
[1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1]
[1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0]
[1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1]
[0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1]
It is important to note that the two bytes used for the
beginning are not inserted into the S-box values; only the new
rounds. With high dynamism, its generation time does not values are obtained from them. In this step we get 16∗ 2(32
take more than 1.2 milliseconds. Changing one of the two byte).
bytes that have been used in generating the s-box or one of Second Step: The shift to the right is adjusted by the
the parameters of the chaotic map will lead to changing the number of values produced by the new chaotic function used
output of the s-box. The mix column function was replaced by to create the key, with values coming in second after the
an inventive function that involves cyclic permutations at the comma.
bit level. The updated approach offers flexibility and speed in Shift values: [1,8,7,2,8,3,2,6,5,3,7,3,4,6,6,2]
image retrieval, enhancing performance and efficiency in IoT The shift list represents the shift amount for each row in
data encryption, particularly for color and grayscale images, the matrix, resulting from the first step.
with an identical level of precision.
Moreover, NIST testing of our method revealed that it [0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1]
complies with the accepted encryption requirements. The [1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1]
updated AES algorithm, which complies with encryption [0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1]
requirements, has the potential to ensure safe encryption of
IoT data. The key generation approach, particularly in IoT [0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1]
applications, offers security and efficiency and meets encryp- [0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0]
tion criteria, demonstrating how cryptographic algorithms [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1]
can be improved to meet evolving cybersecurity needs. [0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0]
Future works will involve the use of the proposed tech-
niques for the encryption and decryption of video data. [0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
Another direction for research will involve proposing new [1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1]
lightweight appropriate for IoT devices have the same prop- [1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1]
erties as this method. [1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1]
[0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]
APPENDIX A
Example of 1st S-Box Generation for Odd Rounds: [0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0]
First Step: choose two bytes = ‘rz’ and convert them to it [1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0]
is binary representation: [1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1]
[1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0]
[0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0] In this step, we get 16∗ 2 bytes (32 bytes).
Third Step: The two matrices that come from the first and
second steps should be combined to create a matrix that is
16 ∗ 4 bytes. Apply a mask to the new matrix.
Mask matrix = [[3, 10, 9, 7], [4, 6, 5, 4], [2, 8, 14, 1], [13,
15, 11, 12]]
The resulting array will be new 16 ∗ 4 bytes
[28] L. M. Jawad, ‘‘A new scan pattern method for color image encryption based HAYA ALASKAR received the M.Sc. degree in applied artificial intelligence
on 3D-lorenzo chaotic map method,’’ Multimedia Tools Appl., vol. 80, from the University of Exeter, in 2009, and the Ph.D. degree in computer
no. 24, pp. 33297–33312, Oct. 2021. science from Liverpool John Moores University, in 2014. She is currently an
[29] G. Manjula and H. S. Mohan, ‘‘Improved dynamic S-box generation using Assistant Professor with the College of Computer Science and Engineering,
hash function for AES and its performance analysis,’’ in Proc. 2nd Int. Prince Sattam Bin Abdulaziz University, Saudi Arabia. She has several
Conf. Green Comput. Internet Things (ICGCIoT), Aug. 2018, pp. 109–115. publications concentrated on using machine learning in various medical
[30] L. Sleem and R. Couturier, ‘‘Speck-R: An ultra light-weight cryptographic data, such as signals and images. Her research interests include artificial
scheme for Internet of Things,’’ Multimedia Tools Appl., vol. 80, no. 11, intelligence applications and data science.
pp. 17067–17102, May 2021, doi: 10.1007/s11042-020-09625-8.
[31] S. Niveda, A. S. Sakthi, S. Srinitha, V. Kiruthika, and R. Shanmugapriya,
‘‘A novel Simon light weight block cipher implementation in FPGA,’’
in Pervasive Computing and Social Networking. Cham, Switzerland:
Springer, 2022, pp. 159–170.
[32] R. S. Mohammed, ‘‘Design a lightweight authentication encryption based
on stream cipher and chaotic maps with sponge structure for Internet of
Things applications,’’ Int. J. Intell. Eng. Syst., vol. 16, no. 1, pp. 1–16, 2023.
[33] J. Daemen, S. Hoffert, M. Peeters, G. Van Assche, and R. Van Keer,
‘‘Xoodyak, a lightweight cryptographic scheme,’’ IACR Trans. Symmetric
Cryptol., vol. 1, pp. 60–87, Jun. 2020.