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

1 s2.0 S111001682500417X Main

The article presents a novel construction method for secure S-boxes using 1D chaotic maps and finite field theory, aimed at enhancing block cipher encryption. It addresses existing flaws in S-box designs, such as fixed points and low nonlinearity, by introducing a unique hybrid chaotic map that generates a significant number of strong S-boxes with high nonlinearity. The proposed method not only improves cryptographic security but also includes an image encryption approach, contributing to future research in secure S-box solutions.

Uploaded by

fluttermathpix
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)
72 views19 pages

1 s2.0 S111001682500417X Main

The article presents a novel construction method for secure S-boxes using 1D chaotic maps and finite field theory, aimed at enhancing block cipher encryption. It addresses existing flaws in S-box designs, such as fixed points and low nonlinearity, by introducing a unique hybrid chaotic map that generates a significant number of strong S-boxes with high nonlinearity. The proposed method not only improves cryptographic security but also includes an image encryption approach, contributing to future research in secure S-box solutions.

Uploaded by

fluttermathpix
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

Alexandria Engineering Journal 125 (2025) 278–296

Contents lists available at ScienceDirect

Alexandria Engineering Journal


journal homepage: www.elsevier.com/locate/aej

Original Article

Secure S-box construction with 1D chaotic maps and finite field theory for
block cipher encryption
Sajjad Shaukat Jamal a , Rashad Ali b , Muhammad Kamran Jamil c ,∗, Sameer Abdullah Nooh d ,
Fahad Alblehai e , Gulraiz c
a
Department of Mathematics, College of Science, King Khalid University, Abha 61413, Saudi Arabia
b Department of Mathematics, University of Trento, 38122 Trento, Italy
c Department of Mathematics, Riphah International University, 54660 Lahore, Pakistan
d Faculty of Computing and Information Technology, King AbdulAziz University, Jeddah 80200, Saudi Arabia
e
Computer Science Department, Community College, King Saud University, Riyadh 11437, Saudi Arabia

ARTICLE INFO ABSTRACT

Keywords: Information security studies are crucial for the digital era since technology advances quickly. Cryptography
Chaos is essential for maintaining data secrecy, integrity, and authentication. The substitution box (S-box) is a
Cryptanalysis key consideration when designing block ciphers. The S-box improves cryptographic security by introducing
Galois field
nonlinearity and confusion into the encryption process. This approach defends against cryptanalytic attacks
Lyapunov exponent
such as differential and linear cryptanalysis by altering input data in an unexpected and complex way. Existing
S-box
S-box systems feature flaws such as fixed and reverse fixed points and short-period rings. This work provides a
rigorous design technique that meets S-box performance and security requirements. The paper offers a unique
1D hybrid chaotic map, which is then used to build an S-box design with finite fields of degree 4 and 8. A simple
algorithm is created to eliminate potential flaws in the proposed method. The suggested approach generates
6.6446×1040 strong S-boxes with an average nonlinearity of more than 111.5. The numerical findings show that
the recommended S-boxes surpass earlier designs in the literature. The article also includes an image encryption
approach utilizing S-boxes. Finally, we believe that the strategy for developing long-lasting and reliable s-box
solutions for block cipher systems contributes significantly to subsequent studies on architectural principles.

1. Introduction together may break the connection among the plain image’s pixels,
providing a secure encryption technique. These concepts are used to
The rapid advancement of internet communication and data trans- ensure that, even if an unauthorized individual obtains the encryption
mission necessitates expanded security measures. Sensitive data must key, the encrypted data is secure and difficult to decipher. Encryption
be protected during network transmission. Cryptographic techniques transforms plain text into unreadable ciphertext, ensuring safe and
provide safe communication across unsecured networks. Cryptography secret communication. The primary goal of encryption is to guaran-
encrypts and decodes information to prevent unwanted access and tee that the ciphertext is only understandable to authorized persons
interception. Maintaining the security and integrity of sensitive data who have the required decryption key. Encryption methods make it
during transmission is crucial. A key component of cryptography for harder for attackers to steal important information. Diffusion is an
a long time, symmetric cryptosystems offer a substantial means of additional method that is frequently employed to lessen the impact
putting security measures into place. Shannon pioneered contempo-
of a single plaintext on encrypted text. This is used to disguise the
rary cryptography in 1949, leading to the creation of several block
plaintext’s statistical redundancy, making it more difficult to decrypt.
cryptosystems. Cryptosystems like DES, AES, and BLOWFISH depend
Block ciphers provide both confusion and dispersion. A block cipher
on confusion and diffusion, principles proposed by Shannon [1] in his
repeatedly undertakes a procedure to produce many effects of these
work. Diffusion is the process of altering pixel values to distribute
features, resulting in an encrypted text that is exceedingly difficult to
their effect throughout the image, whereas confusion is the process
of rearranging pixels in rows or columns. Confusion and diffusion decipher without the appropriate key. Block ciphers encrypt plaintext

∗ Corresponding author.
E-mail addresses: shussain@kku.edu.sa (S.S. Jamal), rashad.ali@unitn.it (R. Ali), kamran.jamil@riphah.edu.pk (M.K. Jamil), SNooh@kau.edu.sa
(S.A. Nooh), falblehi@ksu.edu.sa (F. Alblehai), gulraizafzal.95@gmail.com (Gulraiz).

https://doi.org/10.1016/j.aej.2025.03.109
Received 11 December 2024; Received in revised form 3 March 2025; Accepted 27 March 2025
Available online 16 April 2025
1110-0168/© 2025 The Authors. Published by Elsevier B.V. on behalf of Faculty of Engineering, Alexandria University. This is an open access article under the CC
BY license (http://creativecommons.org/licenses/by/4.0/).
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

by splitting it into fixed-size blocks and applying predetermined algo- of the group Z16 × Z16 and inverse mapping of 𝐺𝐹 (28 ) to design a
rithms to each one. Many well-known block ciphers, including those large number of robust S-boxes with a minimal computation time.
mentioned above, adopt this method. Block ciphers are susceptible This scheme can have S-boxes with nonlinearity less than 112. The
to many assaults, including entropy, energy, and differential attacks. work Jassim and Farhan [10] used hybrid chaos to build pseudo-
A confusion component makes it difficult for attackers to identify random number generators using metaheuristic approaches based on
patterns or relationships within encrypted data, thereby strengthening the flower pollination algorithm (FPA) to create an appropriate S-box.
encryption algorithms against cyberattacks. The FPA’s initial population was improved by chaotic maps, making it a
A substitution box (S-box) is a crucial component of block ciphers suitable place to start. The S-box nonlinearity score served as the FPA’s
used to scramble the connection between the pixels of an image. The goal function. The FPA aims to balance exploration and exploitation
S-box encryption method improves security by making it difficult for activities. Ali et al. [11] used the combination of power functions
unauthorized parties to decrypt the original input from the output and linear fractional transformation (LFT) to develop a new function
using a nonlinear replacement. It takes a specific number of input called extended fractional transformation (EFT). It contains a thorough
bits and transforms them into a corresponding amount of output bits evaluation of the assigned S-box’s fundamental performance based on
using a nonlinear process. S-boxes enhance the safety of cryptographic benchmarking standards.
systems by introducing nonlinearity. For S-boxes to be effective, they A new S-box structure was designed by Dougherty et al. [12] using
need to be meticulously designed to withstand various types of attacks the exponentiation in the Galois field of order 256. The proposed S-
and generate strong, decryption-resistant output. The success of the box reaches a maximum nonlinearity of 110. Liu et al. [13] designed
AES block cipher can be credited to its exceptional substitution box, batched S-boxes with high nonlinearity using random affine matrices
known as the S-box. This S-box was developed and improved using and a 2𝐷 hyperchaotic map. The authors also introduced the idea of
various methods, including algebraic techniques, optimization, chaos removing the fixed points, reverse fixed points, and short-period rings
theory, and structures. Creating efficient S-boxes of various sizes might in S-boxes. The scheme generated highly nonlinear S-boxes with an
be challenging owing to the vast search space. During encryption, average nonlinearity of 110.60. Tong et al. [14] proposed an S-box
S-boxes in symmetric block ciphers convert information in plaintext by designing a multi-objective optimization method using a combined
into ciphertext. S-boxes are used in several rounds by symmetric ci- chaotic system. Based on a fractional index, the authors designed an
phers, including the Advanced Encryption Standard (AES), to increase integrated chaotic system that demonstrates high-performance stabil-
the cipher’s complexity and, thus, its resistance to assaults. A similar ity and chaotic parameter range coverage over the whole parameter
function of S-boxes can be found in symmetric stream ciphers, where space. Waheed and Subhan [15] designed a new S-box structure by
pixel values are substituted with integer values spanning 0 to 255. using a skewed logistic map and modified Rabin-Karp rolling hash
Keystreams of S-boxes are often unexpected and difficult to reverse function. A skewed logistic map is iterated with a seed value and the
engineer because of their nonlinear structure. Hash functions, which parameters to create a chaotic result. Its sensitivity to initial condi-
generate a fixed-size output from any input data, can also benefit
tions leads to chaotic results that appear random. To generate integer
from S-boxes. Secure Hash Algorithms (SHA) use S-boxes to create the
sequences inside a certain range, the authors hash the chaotic values
avalanche effect. The output hash changes significantly when a small
with Rabin-Karp. The S-box was obtained using the hash values and
adjustment to input data is made. The hash prevents attackers from
it was utilized to encrypt digital images. Jamal et al. [16] designed
inferring information about the input data.
a new S-box using a variety of chaotic mappings. The authors also
used a fractional transformation of the Galois field. The S-box has a
1.1. Related work
nonlinearity of 112 but a very low differential uniformity of 30. A new S-
box was developed by Yuyue et al. [17] which combines a chaotic map
Encryption systems require S-boxes for high security. In an S-box,
and a three-step optimization algorithm. A 2𝐷 discrete hyperchaotic
a certain number of input bits are converted into different output bits.
map is presented by Wu and Kong [18] which was chosen for its overall
An 𝑚 × 𝑛 S-boxes nonlinearly converts input bits, producing a unique
advantages over traditional 2𝐷 hyperchaotic maps. A chaotic map is
output for each value. This process involves mapping 2𝑚 input values
applied to the process of generating the basic S-box, resulting in 8
to 2𝑛 output values. An S-box is considered bijective if 𝑚 = 𝑛 and
dynamic S-boxes. Ustun et al. [19] designed a novel image encryption
no values is repeated from the set {0, 1, 2, … 2𝑛−1 } . An S-box is just
scheme using an S-box which was generated by using mutation and
a permutation of a symmetric group of degree 2𝑛 so there are total
crossover. The S-box has a nonlinearity of 111.25 with a sound score
(2𝑛 )! bijective S-boxes, which is a quite large number. The study of S-
of other features and an absence of fixed and reverse fixed points. An
boxes mainly developed after the construction of AES S-box by Daemen
optimization model using a genetic algorithm was used by Wang et al.
and Rijmen [2]. This S-box was constructed by using the composition
[20]. The model used chaotic sequences to generate initial S-boxes and
of affine map and inverse mapping of 𝐺𝐹 (28 ). After this design, there
then nonlinearity was optimized by considering the nonlinearity as an
has been a lot of research on the construction of S-boxes using finite
fields. A famous technique of linear fractional transformation is used objective function. The average nonlinearity of S-boxes was 110.25. A
by Ali et al. [3],Arshad et al. [4],Alali et al. [5],Razaq et al. [6]. batch generating keyed S-boxes was designed by Zhao et al. [21] using
These S-boxes are highly nonlinear and almost of optimal strength. The a 2D hyper chaotic map and affine inversion map of an irreducible
issues with the Galois field-based scheme are the non-investigation of polynomial of degree 8. The authors also discussed on elimination of
new fractional transformations and the existence of fixed and reverse possible weaknesses in S-boxes. This scheme can design 4.0913 × 1022
fixed points. Ali et al. [7] defined a new fractional transformation by S-boxes of a sound nonlinearity.
composing the linear fractional transformation with square mapping.
This composition results in two new nonlinear fractional mappings and 1.2. Motivations and contribution
can generate up to 1.0066 × 109 bijective S-boxes of nonlinearity 112.
The chaotic logistic map was used for the selection of parameters of It is evident from the literature that the existing S-box algorithms
mapping and irreducible polynomials. Luo et al. [8] designed a new have a lot of flaws. The algebraic transformations using the Galois
kind of fractional transformation using the 2𝐷 Arnold map. The authors field have high nonlinearity but they have low key space, the existence
defined the mapping by dividing both coordinates in the formula of of fixed and reverse fixed points, and have short period cycles. The
Arnold’s map. The resulting function was found to be non-bijective with chaos-based S-boxes have low nonlinearity but a large key space. These
a robust S-box design algorithm. The scheme’s average nonlinearity designs also have issues of computational complexity due to dimen-
was 111.35. Ali et al. [9] used the composition of a homomorphism sions of chaotic mappings. The researchers used different techniques

279
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

to enhance the nonlinearity of existing S-boxes. These techniques in- 2.3. Lyapunov exponent (LE)
volved cellular automata, genetic algorithms, and optimization models.
Moreover, the techniques using chaos and algebraic transformations The LE is used to determine how sensitive a chaotic system is to its
are gaining repute due to large key space, high nonlinearity, and low initial conditions. This indicates that the chaotic system has at least
differential uniformity. Our motivation for working on this study stems one positive measurement result. The Lyapunov Exponent (LE) be-
from our interest in applying chaos theory to algebraic mappings to comes negative or zero when the system becomes periodic, interrupting
design pseudo-random number generators in cryptography. Combining chaotic behavior and resulting instability. The higher the LE, the more
chaotic systems with algebraic mapping may produce S-boxes with sensitive the chaotic system is to the starting value when LE is positive.
desirable cryptographic features, including strong nonlinearity, low The LE diagram is displayed in Fig. 2.2, which shows that LE is always
differential uniformity, and wide key space. The motivations are; positive for our system.

1. Designing new chaotic mappings for pseudo-random number 2.4. Sensitivity analysis
generation.
2. Examining the impact of chaotic mappings on algebraic struc- The sensitivity study of the newly suggested chaotic map investi-
tures/ transformations. gates its response to initial conditions and control settings, which is a
3. Designing the novel strategy that can eliminate the weaknesses key feature of chaotic systems. Small alterations in beginning values
of S-boxes with minimum impact on nonlinearity, linear, and can result in significantly different outputs, demonstrating the map’s
differential cryptanalysis. high sensitivity, which is critical for cryptographic applications. A high
4. Generation of a large number of S-boxes with strong crypto- sensitivity ensures that the system generates unpredictable, complex
graphic properties. outputs, making it ideal for safe encryption techniques. This analysis
reveals that the suggested chaotic map has the required sensitivity
Our contributions are; to beginning conditions, increasing its suitability for application in
secure communication and data security. The newly developed chaotic
1. A new hybrid chaotic map is designed. map with these two keys 𝑥0 = 0.854645458623604 and 𝑥0 + 𝛿 =
2. A dynamic S-box generation scheme is presented with a key 0.854645458623614 were iterated (Fig. 2.3).
space of size ≈ 3.3178 × 1040 .
3. Detection and elimination of fixed points, reverse fixed points, 2.5. Theoretical justification
and short-period rings.
4. Candidate S-boxes are obtained without any weakness and strong The proposed chaotic map consists of three different nonlinear
cryptographic properties. terms. The exponential function 𝑒𝑥 grows rapidly which introduces
nonlinearity. It ensures that small differences in initial values lead
1.3. Structure of article to significant variations in output values, which is one of the key
properties of a chaotic map. The second term is the hyperbolic cosine
The article is organized into eight sections. The Section 2 discusses function which also introduces nonlinearity and symmetry. It helps
the modeling of a new hybrid chaotic map and its analysis. The pro- create a balance between stretching and folding, which is necessary
posed algorithm for S-boxes is described in Section 3. The algorithm for chaotic behavior. The hyperbolic sine function introduces an ad-
for weakness detection and removal is designed in Section 4. Section 5 ditional complexity layer. Meanwhile, period-doubling leads to chaotic
discusses evaluation criteria for newly designed S-boxes. A cryptanaly- behavior for certain values of the parameter. The positive Lyapunov
sis of the scheme was performed in Section 6. A recommended image Exponent(LE) also confirms the sensitivity of initial conditions. The
encryption scheme is discussed in Section 7. A discussion on results is proposed map outperforms the traditional chaotic map such as logistics
made in Section 8. Finally Section 9 concludes the study. and tent as observed in Fig. 2.4.

2. Construction of a new 1D Chaotic map and its analysis 3. Dynamic s box generation scheme

2.1. 1D hybrid chaotic map Consider two finite field F1 and F2 with 16 elements then the
mapping
Chaos-based techniques of encryption have been developed using 𝜁 ∶ F1 × F2 → F1 × F2 by 𝜁(𝑥, 𝑦) = ((𝑎𝑥 + 𝑏)−1 , (𝑐𝑦 + 𝑑)−1 ) ∀(𝑥, 𝑦) ∈
several chaotic systems, including fractional, hyper, and time delay. F1 × F2 is a bijection, whereas 𝑎, 𝑏 ∈ F1 and 𝑐, 𝑑 ∈ F2 . Since there are
The study of new chaotic systems is a fascinating aspect of chaos theory. three irreducible polynomials of degree 4, so we have 3! choices for
Scientists and engineers have encountered several chaotic systems in selection of finite fields. The proposed algorithm can be described in
the following steps;
their search for effective mathematical models. Recent research sug-
gests that mixing chaotic systems may result in new chaotic systems.
• Iterate the chaotic map of Eq. (2.1) for 1005 iteration using
The proposed model is
a random initial value 𝑥0 ∈ (0, 1) and the parameter 𝛾 =
3.999999999999999.
𝑥𝑛+1 = 𝑒𝑥𝑝(𝑥𝑛 ) + 𝛾𝑐𝑜𝑠ℎ𝜋𝑥𝑛 (1 − 𝑥𝑛 ) + (8 − 𝛾)𝑠𝑖𝑛ℎ(𝜋𝑥𝑛 ) (mod 1) (2.1) • Define three index variables 𝐼1 , 𝐼2 , 𝐼3 by the following formula
𝐼1 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1001) ∗ 255)⌋, 3) + 1
whereas 𝑥0 ∈ (0, 1] and the parameter 𝛾 ∈ (0, 4]. 𝐼2 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1002) ∗ 255)⌋, 3) + 1
𝐼3 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1003) ∗ 255)⌋, 30) + 1
2.2. Bifurcation diagram • Generate two Galois fields F1 and F2 using indices 𝐼1 and 𝐼2 ,
where 𝐼1 and 𝐼2 are the positions of elements in the set {19, 25, 31}.
The bifurcation graphic depicts the stability barrier and the effect of • Define the four parameters 𝑎, 𝑏, 𝑐, 𝑑
control settings. It involves setting up bifurcation parameters, comput- 𝑎 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1002) ∗ 1013 )⌋, 15) + 1
ing the system’s iterative sequence, and sketching the resulting chaotic 𝑏 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1003) ∗ 1014 )⌋, 15)
sequence. We fixed the initial value 𝑥0 = 0.778017556357603 and the 𝑐 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1004) ∗ 1015 )⌋, 15) + 1
bifurcation diagram is displayed in Fig. 2.1. 𝑑 = 𝑚𝑜𝑑(⌊(𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒(1005) ∗ 1016 )⌋, 15)

280
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 2.1. Bifurcation diagram of 1D Hybrid Chaotic map.

Fig. 2.2. LE of new hybrid chaotic map.

• Apply the mapping 𝜁 on elements of F1 × F2 . Convert elements by eliminating the fixed points, reverse fixed points, and short-period
into binary and concatenate the bits to form 8 bit values. Convert cycles. We defined a new way for the elimination of fixed and reverse
again to decimal values. Now all the values will be in the range fixed points. Our method consists of two parts. We will deal with the
0 − 255 and are placed randomly, which are stored as outputs of two cases for several fixed and reverse fixed points. We consider the
𝜁. cases with the utmost four fixed and reverse fixed points. The proposed
• Generate the Galois field with 256 elements using the index model can be described in the following steps;
variable 𝐼3 from the list of polynomials as available in order in Ali Case 1: If number of fixed points = number of reverse fixed points
et al. [7].
• Define the bijective mapping • We suppose that the 𝐹 𝑃 = {𝑥1 , 𝑥2 , … 𝑥𝑖 } and 𝑅𝐹 𝑃 = {𝑦1 , 𝑦2 , … 𝑦𝑖 }
{ are the sets of fixed and reverse fixed points of S-box. To eliminate
0, if 𝑡 = 0
𝑓 (𝑡) = these, swap the element 𝑆(𝑥𝑖 ) with 𝑆(𝑦𝑖 ) in the S-box.
2 −1
(𝑡 ) , if 𝑡 ≠ 0
which is indeed a composition of two bijective mappings, the Case 2: If number of fixed points ≠ number of reverse fixed points
Frobenius automorphism in Ali et al. [7] and inversion.
• If there is one fixed point and no reverse fixed point, swap the
• Define the two S-boxes by the following compositions
fixed point with the 1st element of the S-box and check whether
S-box 1(𝑥) = 𝜁(𝑓 (𝑥)) and S-box 2(𝑥) = 𝑓 (𝜁(𝑥)), where 𝑥 ∈
the reverse fixed point is created or not. If it is created then swap
{0, 1, 2, … 255}
the fixed point with the last element of S-box. A similar strategy
4. Detection and elimination of weakness in S-boxes can be employed if there is one reverse fixed point and no fixed
point.
Since the algebraic transformations may have fixed points, so there • If there are two fixed points and no reverse fixed points, swap the
is a dire need to boost the cryptographic strength of the proposed S-box fixed points with each other except the non-existence of reverse

281
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 2.3. Sensitivity Analysis.

Fig. 2.4. Comparison of LE values with Logistic and Tent Map.

fixed points, otherwise swap with their next element. Devise a If there is no short cycle then we will consider the generated S-boxes
similar plan for reverse fixed points. as our best candidates, otherwise, we will modify the initial value 𝑥(0)
• If the difference between the size of the set of fixed (reverse) using the rule 𝑥(0) = 𝑥(0) + 𝑠𝑖𝑛ℎ(𝑥(0)) + 𝑒𝑥(0) (mod 1).
points and reversed (fixed) points is 1, then swap the correspond- Two sample S-boxes are listed in the Tables 1 and 2 using 𝑥(0) =
ing elements, and the remaining one fixed (reverse) is swapped 0.351659507062997
with 1st element of the last element depending upon the non-
existence of new fixed (reverse) points. 5. Statistical performance analysis
• If the difference in the number of fixed (reverse) points and
reverse (fixed) points is 2, then swap the corresponding elements Several criteria are available to assess the success of S-box designs.
and the remaining two fixed (reverse) are swapped with each We analyze the performance of S-Boxes using six standard criteria:
other depending upon the non-existence of new fixed (reverse) bijectiveness and balancedness, nonlinearity, stringent avalanche cri-
points. terion (SAC), outputs bit independence criterion (BIC), differential
approximation probability (DP), and linear approximation probability
Now, we will check the existence of short cycles in the S-box which (LP).
may be generated by the removal of fixed and reverse fixed points.
The merging process of short-period cycles is as follows; let the cycles 5.1. Bijectiveness and balancedness
be (𝑎1 𝑎2 𝑎3 ... 𝑎𝑗 ), (𝑎𝑗+1 𝑎𝑗+2 𝑎𝑗+3 ... 𝑎256 ) then we define the new cycle
by fixing the 1st element of the second cycle as the image of the last An S-box is bijective if each input value corresponds to a single
element of 2nd cycle which looks like (𝑎1 𝑎2 𝑎3 ... 𝑎𝑗 𝑎𝑗+1 𝑎𝑗+2 𝑎𝑗+3 ... 𝑎256 ). output value, which is generated from a unique input value. Cryp-
If there are more than two cycles then we will use the prescribed way tographic algorithms need a bijective S-box for decryption since the
to merge them as a single cycle. inverse is used in the process. Furthermore, non-bijective S-boxes have

282
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Table 1
Best S-box 1.
57 194 160 54 159 47 85 165 238 141 201 248 196 67 200 133
229 0 151 123 45 251 69 80 224 242 36 76 22 149 9 180
164 152 13 153 68 61 97 71 86 158 120 169 90 94 216 60
18 187 82 73 99 184 55 7 14 199 145 235 59 204 117 254
110 234 48 64 223 93 38 118 30 96 179 114 75 146 167 144
23 203 74 127 218 8 190 197 252 189 92 65 119 77 44 126
62 225 3 139 39 6 186 228 174 168 173 166 46 5 125 185
111 1 253 81 237 128 52 170 21 244 220 227 240 113 132 106
195 53 91 214 78 112 213 176 206 25 116 34 31 245 15 230
243 171 147 208 221 250 231 42 247 191 63 101 4 89 11 205
29 155 131 202 193 157 135 28 207 70 178 37 26 249 140 79
2 163 232 239 182 154 98 255 188 219 233 172 19 121 198 136
107 212 87 84 156 100 211 181 134 58 40 104 161 217 115 49
27 66 109 215 148 17 33 72 51 32 10 124 241 41 50 35
20 222 83 175 12 183 16 56 210 137 236 24 130 103 150 142
102 122 246 129 105 209 88 43 95 138 177 192 162 143 108 226

Table 2
Best S-box 2.
20 7 152 228 77 34 11 149 59 221 94 98 49 68 67 69
35 54 233 218 24 14 163 90 125 142 203 106 155 245 108 97
249 251 45 195 5 141 185 29 18 40 104 135 166 242 230 50
41 130 55 171 147 217 244 165 227 209 33 139 3 30 13 143
136 235 129 132 89 214 196 220 145 164 153 208 117 86 75 8
76 122 0 61 253 38 199 25 255 254 113 179 2 60 211 215
167 42 158 197 138 225 241 213 180 210 23 205 134 71 81 137
91 22 64 151 240 70 110 174 102 36 229 32 198 236 144 176
192 124 12 224 48 4 105 37 72 63 16 154 148 39 78 177
189 252 246 219 234 191 231 116 126 247 79 239 204 237 159 56
156 44 121 66 200 62 212 250 118 109 160 170 58 19 181 243
127 52 216 28 128 83 43 84 193 184 115 222 73 57 183 85
88 46 9 150 186 226 51 95 201 6 82 112 223 187 190 99
123 80 238 131 21 202 100 107 96 207 101 146 31 188 103 140
65 15 178 27 53 47 74 206 120 173 194 119 10 114 168 17
93 1 169 161 172 162 87 232 157 111 92 182 26 175 133 248

worse cryptographic features than bijective S-boxes. A Boolean function According to this criteria, changing the third bit causes the first and
is balanced if its truth table has the same number of zeros and ones. second bits in the data block to change separately. This demonstrates
An S-box is balanced if all of its Boolean functions are balanced. An that the plaintext and ciphertext bits are adjusted separately. Nonlin-
unbalanced S-box may impair the security of cryptographic techniques earity and SAC are calculated for bit independence criteria (see Fig.
by biasing the output distribution towards certain bit values for some or 5.3).
all input values. The suggested best S-boxes in Table 1, 2 are bijective
and balanced. 5.5. Linear approximation probability

5.2. Nonlinearity The linear approximation probability of an S-box indicates the ex-
tent to which it may be approximated by a linear function. It measures
A nonlinear S-box differs greatly from a linear relationship between the correlation between an S-box’s input and output as binary vectors.
its input and output bits in terms of its nonlinearity. A simple linear To calculate an S-box’s linear approximation probability, count the
combination of the input bits of an S-box cannot reliably predict number of input and output vector pairs that meet a certain linear
its output bits. There are several statistical tests available, including equation. The linear approximation probability is the difference in the
correlation coefficients and Walsh transforms measure nonlinearity. percentage of pairs satisfying the linear equation with 0.5. S-boxes with
low linear approximation probability are often thought to be more safe
5.3. Strict avalanche criteria against cryptographic attacks.

The Strict Avalanche Criterion (SAC) is the third key cryptographic 5.6. Differential approximation probability
feature of an S-box. If one plaintext bit changes, all ciphertext bits
change with a probability of 0.5. All output bits must match input bits The differential uniformity (DU) of an S-box is the largest absolute
based on the avalanche effect. By observing how output bits affect input difference between all possible input differences that result in a given
bits, an observer can easily determine whether plaintext and ciphertext output difference.
are connected. The highest difference between the probability of two input differ-
ences leading to a certain output difference is calculated. This definition
5.4. Bit independence criteria explains how differential assaults operate. Attackers seek input changes
that increase the likelihood of a certain output variation, and these
S-box strength can be assessed by assessing its Bit Independent S-boxes with better differential uniformity may help prevent as-
Criterion (BIC). saults.

283
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Table 3
Analysis of best S-boxes.
S-boxes Mathematical structure Nonlinearity SAC BIC nonlinearity BIC SAC LAP DAP
Best S-box 1 𝐺𝐹 (28 ) 112 0.4998 112 0.5040 0.0625 0.0156
Best S-box 2 𝐺𝐹 (28 ) 112 0.5037 112 0.5010 0.0625 0.0156
Average Results 1st Composition 𝐺𝐹 (28 ) 111.5590 0.5016 111.5846 0.5020 0.0674 0.0191
Average Results 2nd Composition 𝐺𝐹 (28 ) 111.7447 0.5018 111.7530 0.5019 0.0654 0.0198
Ali et al. [7] 𝐺𝐹 (28 ) 112 0.5022 112 0.5008 0.0625 0.0156
Ali et al. [7] 𝐺𝐹 (28 ) 112 0.5002 112 0.5054 0.0625 0.0156
Ali et al. [3] 𝐺𝐹 (28 ) 112 0.4988 112 0.5008 0.0625 0.0156
Luo et al. [8] 𝐺𝐹 (28 ) 112 0.5066 111.28 0.5016 0.0703 0.0625
Ustun et al. [19] Mutation 111.25 0.5022 103.78 0.5036 0.1328 0.0391
Wang et al. [20] Genetic Algorithm 110.25 0.4953 104.07 0.5021 0.125 0.0391
Artuger and F [22] Chaos 110.25 0.5027 102.71 0.4936 0.1250 0.04687
Savadkouhi and Tootkaboni [23] Chaos 105.75 0.4939 103.43 0.5032 0.1171 0.0390
Ma et al. [24] Chaos 107.25 0.4981 104.42 0.5008 0.1171 0.0391
Artuger and Ozkaynak [25] Chaos 107 0.5012 103.07 0.4970 0.1250 0.04687
Liu et al. [13] Chaos 110.60 0.4966 109.67 0.5026 0.0790 0.0214
Garipcan et al. [26] Chaos 109.5 0.4978 103.21 0.5017 0.1328 0.1250
Vijayakumar and Ahilan [27] Chaos 103.75 0.4949 103.5 0.5036 0.0790 0.0391
Ullah et al. [28] Chaos 112 0.5829 104 0.5017 0.1406 0.0391
Ma et al. [29] Chaos 107.25 0.4981 104.42 0.5008 – 0.0391
Tariq et al. [30] Quantum Oscillator 110 0.5000 108.5 0.5001 0.1250 0.04687
Waheed and Subhan [15] Neural Network 114.5 0.4975 107 0.5080 0.135 0.0391
Haider et al. [31] ECC 108 0.5068 103.3571 0.5018 0.070 0.015
Alali et al. [5] ECC 112 0.5032 112 0.5059 0.0625 0.0156
Ibrahim and Abbas [32] ECC 107.75 0.5010 103.9286 0.5038 0.1250 0.0391
Artuger and Ozkaynak [33] Sine Cosine optimization 112 0.5056 104 0.4991 0.1250 0.0391
Artuger [34] Optimization 110.5 0.51 103 0.4998 – 0.0391
Shadab et al. [35] Optimization 105.4039 0.5024 105.3571 0.5063 0.1171 0.0390

Fig. 5.1. Nonlinearity of 1000 S-boxes.

5.7. Computational complexity Reverse Fixed Point Removal (𝑂(256)), Short period cycle removal
(𝑂(𝑛)). Thus the overall computational complexity is 𝑂(𝑛). (See Table
An S-box generation algorithm’s efficiency is often evaluated in 4)
terms of computational complexity, which includes the number of
operations necessary for field arithmetic, chaotic sequence creation, 6. Cryptanalysis
and bijective transformations. The proposed method consists of the
following major steps: Chaotic Sequence Generation (𝑂(𝑛)), Finite Field 6.1. Sensitivity with AES S-box
Selection and Mapping (𝑂(1)), Affine-like Transformation (𝑂(𝑙𝑜𝑔(16))),
Concatenation and Decimal Conversion (𝑂(1)), Generation of a 256- For both composition mappings, we generated S-boxes and cal-
Element Galois Field (𝑂(256)), Bijective Mapping (𝑂(256)), Fixed and culated the hamming distance between each S-box and AES S-box.

284
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 5.2. SAC of 1000 S-boxes.

Fig. 5.3. Overview of BIC Nonlinearity.

The average Hamming distances are 1020.68 and 1022.32 for both
Table 4 composition functions and can be observed in Figs. 6.1 and 6.2. The
Complexity analysis of the proposed approach and other chaotic S-boxes. average hamming distance is very close to the ideal value of 1024. These
Method Chaotic map Complexity Computational cost results are much better than the scores of Liu et al. [13].
Proposed S-box 1D (𝑛) Low
Ref. Zhao et al. [36] Logistic Map (𝑛) Low 6.2. Initial key sensitivity

We consider two initial keys 𝑥0 and 𝑥0 +10−16 and 1000 S-boxes were
generated by using these keys for 1st and 2nd composition function.
The average hamming distance between S-boxes of the 1st composition

285
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 5.4. Scores of BIC SAC.

Fig. 5.5. LP of 1000 S-boxes.

286
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 5.6. DP of 1000 S-boxes.

Fig. 6.1. Hamming Distance between S-box of 1st composition and AES.

287
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 6.2. Hamming Distance between S-box of 2nd composition and AES.

function with both keys is 1019.6 and 1020.7 for the 2nd composition 7. Image encryption application
function. These can be observed in Figs. 6.3 and 6.4. These results show
that our scheme is very sensitive to the initial key and almost a new
Digital images are made more secure with S-boxes which are the
S-box is obtained with a very small change in the initial key.
sole nonlinear components in block ciphers. Their responsibility is to
6.3. Sensitivity of irreducible polynomial of degree 8 replace the pixels of a simple picture with new values from a prede-
termined lookup table to create confusion. To provide good security,
We consider two irreducible polynomials randomly generated by nonlinear components make use of obscurity, nonlinearity, permuta-
the proposed chaotic map and 1000 S-boxes were generated by using tion, and diffusion. Simulation results are presented in this paper for
these polynomials for 1st and 2nd composition function. The average the proposed S-box for encrypting digital images using the proposed
hamming distance between S-boxes of the 1st composition function is methodology as described in Ali et al. [7] and Algorithm 3. Three plain
1010.4 and 1012.9 for the 2nd composition function. These can be images of Baboon, Pepper, and Cornfield are used. The plain images are
observed in Figs. 6.5 and 6.6. These results show that our scheme displayed in Figs. 7.5, 7.1, 7.3 while the cipher images 7.6, 7.2, 7.4.
is very sensitive to the irreducible polynomial and with only a slight
alteration to the original key, an almost new S-box is produced.
7.1. Key space analysis
6.4. Number of S-boxes
The number of unique keys that can be created and used is deter-
A large key space is needed in the case of dynamic S-box generation.
mined by key space analysis. Since it increases the number of keys an
The initial value 𝑥0 and 𝛾 has 16 decimal places so the key space of
attacker must try in a brute-force attack to effectively decode data, a
the new hybrid chaotic map is 1032 . Since there are three irreducible
polynomials of degree 4, so there are 3! choices for the direct product greater key space is preferable. Brute force attacks require regularly
of fields. The parameters 𝑎, 𝑏 ∈ {1, 2, 3, … 15} and 𝑐, 𝑑 ∈ {0, 1, 2, … 15} trying each key until the correct one is found. A bigger key space
so we have total 152 × 162 choices for the parameters. As there are increases the computational expenses and time complexity of brute
30 irreducible polynomials and for each polynomial we can use the force assaults, which improves the encryption technique’s security.
mapping 𝑡−1 , (𝑡2 )−1 , (𝑡4 )−1 , (𝑡8 )−1 , (𝑡16 )−1 , (𝑡32 )−1 , (𝑡64 )−1 , (𝑡128 )−1 . Image encryption schemes can withstand brute force assaults with a key
Hence the total key space is 𝐾 = 1016 ×4× 1016 ×3!×152 ×162 ×30×8 ≈ space of at least 2100 . Our technique uses a 2256 key space, including a
3.3178 × 1040 for a single composition function. further level of security provided by a 128 bit random vector.

288
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 6.3. Hamming Distance between S-boxes of 1st composition with changed initial keys.

7.2. Key sensitivity analysis average nonlinearity for 1st composition function is 111.5590
and 111.7447 for second composition function. Among 1000
Key sensitivity analysis is a process for determining how minor S-boxes generated by the 1st composition function, 432 best
changes to the encryption key affect the algorithm’s safety and effec- S-boxes are produced with nonlinearity 112 and overall 800 S-
tiveness. The encryption key is prone to slight changes or disruptions. boxes with nonlinearity greater than 111. If we analyze the
Individual bits can be adjusted, minor values added or withdrawn, or results of the 2nd composition function, there are 672 S-boxes
key generation settings tweaked. The same input image is then en- of nonlinearity 112, while 879 S-boxes with nonlinearity greater
crypted using the updated encryption keys instead of the original ones. than 111. These results are remarkable and are much better than
As a consequence, many encrypted variants of an identical image are the existing schemes without any weakness Liu et al. [13] which
generated. images encrypted with revised keys are compared against has an average nonlinearity of 110.60 while out of our 2000 S-
boxes generated by both compositions, there are 1950 S-boxes
images encrypted with the original, unaltered key. The comparison
with nonlinearity greater than the average score of Liu et al.
takes into account factors such as image quality, security, attack re-
[13]. The other existing schemes without any weakness have
silience, and processing efficiency. Key sensitivity study determines
much lower scores. The schemes Ali et al. [3],Alali et al. [5],Ali
how resilient an image encryption approach is to changes in the en-
et al. [7,9],Ustun et al. [19],Wang et al. [20],Savadkouhi and
cryption key. We used a grey image for the encryption procedure,
Tootkaboni [23],Ullah et al. [28],Artuger and Ozkaynak [33]
which included both the primary and revised keys. The outcomes are has fixed, reverse fixed points and short cycles with S-boxes of
displayed in Figs. 7.7, 7.8, 7.9, and Table 10. nonlinearity in range 105 − 112.
2. For evaluation of the strict avalanche criteria of S-boxes, we
8. Discussion on results computed dependency matrices for 1000 S-boxes and displayed
the average values in Table 3 and Fig. 5.2. The average scores
The findings of the proposed scheme are; for two sample S-boxes were 0.4498 and 0.5037 which are
good against the sample S-boxes of Liu et al. [13],Waheed and
1. We hope that the nonlinearity value will be as high as possible Subhan [15],Savadkouhi and Tootkaboni [23],Artuger [34]. For
since it directly affects password security. It is possible to resist dynamic 1000 S-boxes, our average score for the 1st composition
nonlinear attacks by increasing nonlinearity. The optimal value function is 0.5016 and 0.5018 for the 2nd composition function.
of nonlinearity for 8 bit S-boxes is 112, which is achieved by The SAC score of AES S-box is 0.5044 while our scheme has a
our best S-boxes of Tables 1 and 2. The nonlinearity for 1000 total of 769 S-boxes with an SAC score between 0.5 and 0.5044.
S-boxes is displayed in Fig. 5.1 and we can observe that nonlin- In comparison with the scheme of Liu et al. [13], our scheme’s
earity remains in the range 110 − 112 even after removing all average score is 0.5016 and produces 1191 best S-boxes with SAC
fixed points, reverse fixed points, and short-period rings. The score in the range of 0.4966 − 0.5044.

289
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 6.4. Hamming Distance between S-boxes of 2nd composition with changed initial keys.

Fig. 6.5. Hamming Distance between S-boxes of 1st composition with randomly generated two different irreducible polynomials.

3. Based on bit independence, BIC analyzes nonlinearity and SAC, [4],Alali et al. [5,5],Ali et al. [7],Wu and Kong [18],Ustun et al.
resulting in BIC-Nonlinearity and BIC-SAC. A BIC-SAC value of [19],Savadkouhi and Tootkaboni [23],Artuger and Ozkaynak
0.5 is optimal, while higher BIC-Nonlinearity values increase [25,33]. The average score of BIC Nonlinearity in Liu et al. [13]
assault resistance. The BIC Nonlinearity of sample S-boxes pre- is 109.67 and 111.34 for Luo et al. [8]. The average scores of
sented in Tables 1 and 2 is 112 which is equal to the score of our scheme are 111.5846 and 111.7530. There are 421 and 666
AES and existing sample S-boxes in Ali et al. [3],Arshad et al. S-boxes with BIC Nonlinearity 112 out of 1000 S-boxes generated

290
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 6.6. Hamming Distance between S-boxes of 2nd composition with randomly generated two different irreducible polynomials.

Fig. 7.1. Plain image of Baboon.

Fig. 7.2. Cipher image of Baboon.

Fig. 7.3. Plain image of Cornfield.

by both composition functions. The number of S-boxes that have 0.5040, 0.5010 and 0.5020, 0.5019 for 1000 S-boxes. The average
nonlinearity greater than 111 are 932 and 952 respectively. Our value in Luo et al. [8] is 0.5026 while our average score are
proposed scheme has better scores of BIC Nonlinearity than Luo 0.5019, 0.5020 and there are 1244 S-boxes with BIC SAC score in
et al. [8],Liu et al. [13]. The scores of BIC SAC of our sample range 0.4976 − 0.5026.
S-boxes and randomly generated 1000 S-boxes are presented in 4. LAP is a measure of how well the S-box withstands linear cipher
Table 3 and Fig. 5.4. The average scores for sample S-boxes are attacks. The closer it gets to 0, the stronger the resistance.

291
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Fig. 7.4. Cipher image of Cornfield.

Fig. 7.5. Plain image of Pepper.

Fig. 7.6. Cipher image of Pepper.

Fig. 7.7. Encrypted Image with Key K. Fig. 7.8. Encrypted Image with modified key.

292
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Algorithm 1 Chaotic S-Box Generation using Galois Fields


Algorithm 2 Handle Fixed and Reverse Fixed Points in S-box
1: Input: Number of iterations 𝑁 = 1005, initial value 𝑥0 = rand()
2: Output: Optimized S-Boxes 𝐵𝑒𝑠𝑡_𝑆𝑏𝑜𝑥1 , 𝐵𝑒𝑠𝑡_𝑆𝑏𝑜𝑥2 1: Input: S-box 𝑆
3: Initialize 𝛾 ← 3.999999999999999 2: Output: Modified S-box 𝑆 ′
4: Generate sequence array 𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒 of size 𝑁 + 1 3: Compute fixed points 𝐹 in 𝑆
5: 𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[1] ← 𝑥0 4: Compute reverse fixed points 𝑅𝐹 in 𝑆
6: for 𝑛 = 1 to 𝑁 do 5: if |𝐹 | = |𝑅𝐹 | then
7: 𝑐𝑢𝑟𝑟𝑒𝑛𝑡_𝑣𝑎𝑙𝑢𝑒 ← 𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[𝑛] 6: for each 𝑖 in 1 to |𝐹 | do
8: 𝑛𝑒𝑥𝑡_𝑣𝑎𝑙𝑢𝑒 ← mod(exp(𝑐𝑢𝑟𝑟𝑒𝑛𝑡_𝑣𝑎𝑙𝑢𝑒) + 7: Swap 𝑆[𝐹𝑖 ] with 𝑆[𝑅𝐹𝑖 ]
mod(cos(2𝜋(𝛾𝑐𝑢𝑟𝑟𝑒𝑛𝑡_𝑣𝑎𝑙𝑢𝑒(1 − 𝑐𝑢𝑟𝑟𝑒𝑛𝑡_𝑣𝑎𝑙𝑢𝑒))) 8: end for
+ sin(2𝜋(8 − 𝛾)𝑐𝑢𝑟𝑟𝑒𝑛𝑡_𝑣𝑎𝑙𝑢𝑒), 1), 1) 9: Display ‘‘Swapped fixed points with reverse fixed points.’’
9: 𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[𝑛 + 1] ← 𝑛𝑒𝑥𝑡_𝑣𝑎𝑙𝑢𝑒 10: else if |𝐹 | = 1 and |𝑅𝐹 | = 0 then
10: end for 11: Swap 𝑆[𝐹1 ] with 𝑆[1]
11: Define polynomials: 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠1 = {19, 25, 31} and 𝑃 𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠 = 12: Display ‘‘Swapped single fixed point with the first element.’’
{285, 299, … , 415} 13: else if |𝐹 | = 2 and |𝑅𝐹 | = 0 then
12: Compute indices: 14: Swap 𝑆[𝐹1 ] with 𝑆[𝐹2 ]
13: 𝐼𝑛𝑑𝑒𝑥1 ← mod(⌊𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[1001] × 256⌋, 3) + 1 15: Display ‘‘Swapped two fixed points with each other.’’
14: 𝐼𝑛𝑑𝑒𝑥2 ← mod(⌊𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[1002] × 256⌋, 3) + 1 16: else if |𝐹 | = 0 and |𝑅𝐹 | = 1 then
15: 𝐼𝑛𝑑𝑒𝑥3 ← mod(⌊𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[1001] × 256⌋, 30) + 1 17: Swap 𝑆[𝑅𝐹1 ] with 𝑆[1]
16: Generate GF(16) using irreducible polynomials: 18: Display ‘‘Swapped single reverse fixed point with the first
17: 𝑔𝑓 16 ← 𝐺𝐹 (0 ∶ 15, 4, 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠1 [𝐼𝑛𝑑𝑒𝑥1 ]) element.’’
18: 𝐺𝑓 16 ← 𝐺𝐹 (0 ∶ 15, 4, 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠1 [𝐼𝑛𝑑𝑒𝑥2 ]) 19: else if |𝐹 | = 0 and |𝑅𝐹 | = 2 then
19: Compute parameters: 20: Swap 𝑆[𝑅𝐹1 ] with 𝑆[𝑅𝐹2 ]
20: for 𝑖 = 1 to 4 do 21: Display ‘‘Swapped two reverse fixed points with each other.’’
21: 𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟𝑖 ← mod(⌊𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒[1000 + 𝑖] × 1013 ⌋, 15) + 1 22: else if |𝐹 | = 0 and |𝑅𝐹 | ≥ 3 then
22: end for 23: for each 𝑖 in 1 to |𝑅𝐹 | − 1 do
23: Compute mapping: 24: Swap 𝑆[𝑅𝐹𝑖 ] with 𝑆[𝑅𝐹𝑖+1 ]
24: 𝑎1 , 𝑎2 ← 𝐺𝐹 (𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟1 , 4, 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠1 [𝐼𝑛𝑑𝑒𝑥1 ]) 25: end for
25: 𝑎3 , 𝑎4 ← 𝐺𝐹 (𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟3 , 4, 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠1 [𝐼𝑛𝑑𝑒𝑥2 ]) 26: Display ‘‘Swapped three or more reverse fixed points with their
26: 𝑅𝑒𝑠𝑢𝑙𝑡1 ← 𝑎1 × 𝑔𝑓 16 + 𝑎2 next elements.’’
27: 𝑅𝑒𝑠𝑢𝑙𝑡2 ← 𝑎3 × 𝐺𝑓 16 + 𝑎4 27: end if
28: for each (𝑎, 𝑏) in Cartesian product of 𝑅𝑒𝑠𝑢𝑙𝑡1 and 𝑅𝑒𝑠𝑢𝑙𝑡2 do 28: Return modified S-box 𝑆 ′
29: Convert 𝑎 and 𝑏 to 4-bit binary strings
30: Concatenate binary strings and convert to decimal
31: end for
32: Generate GF(256) using polynomial 𝑃 𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠[𝐼𝑛𝑑𝑒𝑥3 ] Algorithm 3 Image Encryption Algorithm
33: Compute inverse of elements in GF(256) 1: Initialization and Setup
34: Compute square of inverses: 𝐺𝐹 _𝑠𝑞𝑢𝑎𝑟𝑒 = 𝐺𝐹 _𝑖𝑛𝑣2 2: Load the original image data
35: Apply mapping: 3: Separate the image into red, green, and blue color channels
36: 𝐻1 = 𝐺𝐹 _𝑠𝑞𝑢𝑎𝑟𝑒[𝑏𝑖𝑛𝑎𝑟𝑦_𝑐𝑜𝑛𝑐𝑎𝑡_𝑝𝑟𝑜𝑑𝑢𝑐𝑡 + 1] 4: Generate a random 256-bit encryption key
37: 𝐻2 = 𝑏𝑖𝑛𝑎𝑟𝑦_𝑐𝑜𝑛𝑐𝑎𝑡_𝑝𝑟𝑜𝑑𝑢𝑐𝑡[𝐺𝐹 _𝑠𝑞𝑢𝑎𝑟𝑒 + 1] 5: Define a custom S-box and a MixColumns transformation matrix
38: Assign S-Boxes: 6: Preparation
39: 𝑆𝑏𝑜𝑥1 ← 𝐻1 7: Flatten each channel into a 1D array of byte values
40: 𝑆𝑏𝑜𝑥2 ← 𝐻2 8: Apply padding to ensure each channel’s length is a multiple of 16
41: Process S-Boxes: bytes
42: 𝐵𝑒𝑠𝑡_1 ← handleFixedAndReverseFixedPoints(𝑆𝑏𝑜𝑥1 ) 9: Divide the padded data into 128-bit segments for processing
43: 𝐵𝑒𝑠𝑡_2 ← handleFixedAndReverseFixedPoints(𝑆𝑏𝑜𝑥2 ) 10: Encryption
44: Define short period threshold: 𝑠ℎ𝑜𝑟𝑡𝑃 𝑒𝑟𝑖𝑜𝑑𝑇 ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑 = 1 11: Initialize a "previous block" with random bytes to set up CBC mode
45: Process: 12: for each 128-bit block in the channel data do
46: (𝐵𝑒𝑠𝑡_𝑆𝑏𝑜𝑥1 , ℎ𝑎𝑠𝑆ℎ𝑜𝑟𝑡𝑃 𝑒𝑟𝑖𝑜𝑑𝑅𝑖𝑛𝑔1) ← 13: Perform XOR between the current block and the previous block
processSbox(𝐵𝑒𝑠𝑡_1, 𝑠ℎ𝑜𝑟𝑡𝑃 𝑒𝑟𝑖𝑜𝑑𝑇 ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑) (CBC mode)
47: (𝐵𝑒𝑠𝑡_𝑆𝑏𝑜𝑥2 , ℎ𝑎𝑠𝑆ℎ𝑜𝑟𝑡𝑃 𝑒𝑟𝑖𝑜𝑑𝑅𝑖𝑛𝑔2) ← 14: Add the round key to the current block
processSbox(𝐵𝑒𝑠𝑡_2, 𝑠ℎ𝑜𝑟𝑡𝑃 𝑒𝑟𝑖𝑜𝑑𝑇 ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑) 15: Use the S-box to perform byte substitution on the block
48: Return: 𝐵𝑒𝑠𝑡_𝑆𝑏𝑜𝑥1 , 𝐵𝑒𝑠𝑡_𝑆𝑏𝑜𝑥2 16: Apply a row-shifting transformation
17: Execute column mixing with the predefined matrix
18: Set the "previous block" to the current encrypted block for the
next iteration
The lowest possible LAP value attained by the AES S-box is 19: end for
0.0625 and both sample S-boxes attained the same score. The 1st 20: Post-processing
composition function generates 417 S-boxes with a LAP value of 21: Combine the encrypted blocks back into a single data array for each
0.0625 and 667 S-boxes are generated by the 2nd composition
channel
function. The average LAP scores of our scheme are 0.0674 and
22: Reshape each array into the original image dimensions
0.0654 as depicted in Fig. 5.5 which are quite good against the
23: Merge the red, green, and blue channels to create the fully
existing schemes of Luo et al. [8],Liu et al. [13],Ustun et al. [19].
encrypted image
5. The DAP index assesses S-box’s resistance to differential analysis.
The closer the DAP comes to 0, the greater the capacity to

293
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Table 5
Experimental results of entropy.
Images Red Green Blue
Baboon 7.9995 7.9995 7.9995
Pepper 7.9995 7.9995 7.9995
Cornfield 7.9977 7.9977 7.9978

8. An effective technique for figuring out the link between adjacent


pixel values in a picture is correlation analysis. We may assess
the correlation or relationship between the pixel values in both
photos by doing a correlation analysis between the plain image
and the cipher image. This investigation sheds light on how
pixel value correlation patterns are impacted by the encryp-
tion process. A correlation analysis was conducted to examine
the inter-pixel correlation in the vertical, horizontal, and di-
agonal directions for both the original picture and the cipher
image produced by utilizing the recommended image encryp-
tion algorithm. The linear relationship between two variables,
both in strength and direction, is measured by the correlation
coefficient. The results show that nearby pixels’ correlation coef-
ficients in the original picture had comparatively high values. On
the other hand, as compared to the plain image, the correlation
coefficients of adjacent pixels in the encrypted image show
Fig. 7.9. Difference of images.
a significant drop. By effectively upsetting the linear connec-
tions between adjacent pixels, the encryption process introduces
randomness and diffusion. This drop in correlation coefficients
withstand differential cipher attacks. The lowest possible score suggests that the cipher picture has more unpredictability and
of DAP which was attained by AES S-box is 0.0156. The sample security. The results of the correlation can be found in Table 6.
S-boxes presented in Tables 1 and 2 achieved the same results 9. The degree of unpredictability and information content included
as depicted by Table 6. Among 1000 randomly generated S-boxes in both the plain and encrypted photos as a consequence of
by both composition functions, there are 1027 S-boxes in Fig. 5.6 using the recommended image encryption method is measured
with the same DAP score as of AES. The average score of 1st using the entropy analysis. To evaluate the degree of random-
composition function is 0.0191 and 0.0198 for 2nd composition ness and information content in the original and encrypted
function. The similar schemes presented by Luo et al. [8],Liu pictures, we performed entropy analysis. An encrypted picture
et al. [13] have high DAP scores of 0.0214. The scores in our with an entropy value of eight should be generated using a
schemes are 0.0156 and 0.0234 which are better than Alali et al. perfect encryption system. Our proposed system created cipher
[5],Ali et al. [7],Wu and Kong [18],Ustun et al. [19],Artuger and pictures with larger entropy values than the existing encryption
F [22],Artuger and Ozkaynak [25],Tariq et al. [30],Artuger and algorithms, suggesting enhanced security and a higher degree
Ozkaynak [33]. of unpredictability. We can observe the entropy values of our
6. The goal of a cryptographer is to design S-boxes that have proposed scheme from Table 5, which are very close to the ideal
no weaknesses like the existence of fixed points, reverse fixed value of 8 and better than Alali et al. [5],Ali et al. [7],Ullah et al.
points, and short period cycles. We designed the efficient scheme [28].
in such a way that each of its S-boxes is without any fixed, 10. The difference in color or brightness that allows an item to be
reverse fixed points and short period cycles. There are some distinguished is referred to as contrast. It measures the range
schemes in literature that have designed these algorithms like Liu of tones present or the distance between an image’s darkest
et al. [13] which have low scores of nonlinearity, SAC, BIC SAC, and lightest areas. Images with high contrast feature distinct
BIC NL, LAP, and DAP. The authors did not devise any plan for lines separating the light and dark regions, making the image
the removal of short-period cycles. visually arresting and distinct. On the other hand, low-contrast
7. A popular method for examining the distribution of pixel in- photographs contain a limited range of tones, which makes it
tensities in a picture is histogram analysis. It offers informative difficult to distinguish between various features or parts in the
specifics on the image’s brightness, contrast, and the presence image. Table 7 presents the results of contrast and compared
of specific patterns or elements. The frequency of each pixel’s with some recent literature.
intensity level in a picture is shown by the histogram. We can 11. One important feature of picture encryption is the suggested
assess the effect of the encryption procedure on the distribution upgraded scheme’s amazing sensitivity to even the smallest
of pixel intensities by comparing the histograms of the original changes in the original image. This implies that the final cipher
and encrypted pictures. A cipher picture with a uniformly dis- picture should vary significantly even with a small alteration,
tributed histogram should ideally be produced by an appropriate such as a single bit. Evaluation measures like the Number
encryption technique. We can observe the difference between of Pixels Change Rate (NPCR) and Unified Average Changing
the histograms of plain and cipher images in Figs. 7.5, 7.6, Intensity (UACI) may be used to compare the encrypted pictures
7.2, 7.1, 7.4, 7.3. Compared to the plain image, the encrypted of the original image and its changed counterpart to determine
image’s histogram shows a more evenly distributed intensity the degree of sensitivity. The ideal values of NPCR and UACI are
profile, which is a significant exploration. This implies that the 99.60 and 33.45. By observing Tables 8 and 9, we confirmed the
cipher picture is effectively made random and diffuse by the efficiency of our proposed image encryption scheme with very
encryption process, making it difficult to identify any particular ideal values of NPCR and UACI.
patterns or information.

294
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

Table 6 S-box structures attempts to improve security standards in cryptogra-


Experimental results of correlation.
phy and provide effective defenses against emerging threats. Our inno-
Horizontal Correlation Red Green Blue vative cryptographic methods, based on Galois fields and hyper-chaotic
Baboon −0.0013 −0.0008 −0.0033
Pepper −0.0007 −0.0011 −0.0008
systems, have shown promising results. The proposed methodology
Cornfield −0.0027 −0.0015 −0.0029 uses the nonlinear transformations of the Galois fields and complex
Vertical Correlation Red Green Blue chaotic mappings. The work also suggests a methodology to detect and
Baboon −0.0026 −0.0023 −0.0017 eliminate the possible weakness in S-boxes. The resulting S-boxes out-
Pepper −0.0007 −0.0018 −0.0029 performed in key cryptographic parameters, including low differential
Cornfield −0.0023 −0.0017 −0.0022 probability, high nonlinearity values, no fixed or reverse fixed points,
Diagonal Correlation Red Green Blue and no short-period cycles. These findings demonstrate that the use of
Baboon −0.0027 −0.0025 −0.0008
S-boxes in block cipher systems can improve security against advanced
Pepper −0.00001 −0.0025 −0.0035
Cornfield −0.0034 −0.0037 −0.0024
attacks such as linear and differential cryptanalysis. Our suggested
technique outperforms current methods in fundamental security criteria
including SAC, BIC, and NL, as shown by comparisons to 30 similar
Table 7
research. Overall, the proposed approach is efficient and produces S-
Experimental results of energy, contrast, and homogeneity.
boxes with strong cryptographic features, making them suitable for use
Contrast Red Green Blue
Baboon 10.5813 10.5355 10.5899
in encryption schemes. The results of image encryption with the pro-
Pepper 10.5865 10.5909 10.5977 posed S-box show a high level of security for the image’s cryptosystem.
Cornfield 10.5314 10.4997 10.5451 In the future, we are interested in exploring the design of S-boxes using
Energy Red Green Blue chaotic theory, algebraic transformations, and optimization models.
Baboon 0.0156 0.0156 0.0157
Pepper 0.0157 0.0156 0.0157 CRediT authorship contribution statement
Cornfield 0.0156 0.157 0.0156
Homogeneity Red Green Blue
Sajjad Shaukat Jamal: Visualization, Formal analysis. Rashad Ali:
Baboon 0.3887 0.3896 0.3895
Pepper 0.3893 0.3895 0.3889 Writing – review & editing, Writing – original draft, Methodology, Con-
Cornfield 0.3886 0.3885 0.3902 ceptualization. Muhammad Kamran Jamil: Writing – review & edit-
ing, Supervision. Sameer Abdullah Nooh: Methodology, Data cura-
tion. Fahad Alblehai: Visualization, Formal analysis. Gulraiz: Writing
Table 8
Experimental results of differential analysis. – original draft, Investigation, Data curation.
NPCR Red Green Blue
Baboon 99.62 99.61 99.60 Declaration of competing interest
Pepper 99.61 99.59 99.60
Cornfield 99.61 99.59 99.60
The authors declare that they have no known competing finan-
UACI Red Green Blue cial interests or personal relationships that could have appeared to
Baboon 33.49 33.47 33.43
influence the work reported in this paper.
Pepper 33.46 33.44 33.45
Cornfield 33.43 33.49 33.47
Acknowledgments

Table 9
Comparative analysis of proposed image encryption scheme.
The authors extend their gratitude to the deanship of scientific
research of King Khalid University, for funding this work through a
Image Algorithm Entropy Correlation Contrast NPCR UACI
Baboon Proposed 7.9995 −0.0018 10.5311 99.61 33.45 research project under grant R.G.P.2/34/45.
Ali et al. [7] 7.9995 −0.0011 10.5211 99.6050 33.45
Alali et al. [5] 7.9994 −0.0079 10.6137 99.5980 33.354 References
Ali et al. [9] 7.9994 −0.0042 10.5556 99.59 33.48
Ullah et al. [28] 7.7536 −0.0025 75.2002 – –
[1] C.E. Shannon, Collected Papers, IEEE Press, New York, USA, 1993.
Pepper Proposed 7.9995 −0.0002 10.5345 99.61 33.45 [2] J. Daemen, V. Rijmen, AES proposal: Rijndael, 1999.
Ali et al. [7] 7.9995 −0.0009 10.5246 99.62 33.43 [3] J. Ali, M.K. Jamil, A.S. Alali, R. Ali, A medical image encryption scheme based
Alali et al. [5] 7.9994 10.6004 −0.0055 99.60 33.45 on Mobius transformation and Galois field, Heliyon 10 (1) (2024).
Ullah et al. [28] 7.7517 −0.0016 75.2042 – – [4] B. Arshad, N. Siddiqui, Z. Hussain, M. Ehatisham-ul Haq, A novel scheme for
Salman et al. [37] 7.9966 0.00304 – 99.594 33.5772 designing secure substitution boxes (S-boxes) based on Mobius group and finite
Cornfield Proposed 7.9977 −0.0023 10.5254 99.60 33.45 field, Wirel. Pers. Commun. 124 (4) (2022) 3527–3548.
Ali et al. [7] 7.9976 −0.0021 10.5246 99.62 33.43 [5] A.S. Alali, R. Ali, M.K. Jamil, J. Ali, Gulraiz, Dynamic S-box construction using
mordell elliptic curves over galois field and its applications in image encryption,
Mathematics 12 (4) (2024) 587.
Table 10 [6] A. Razaq, M. Ahmad, A.A.A. El-Latif, A novel algebraic construction of strong
NPCR and UACI results for key sensitivity analysis. S-boxes over double GF (27) structures and image protection, Comput. Appl.
S-box NPCR UACI Math. 42 (2) (2023) 90.
[7] R. Ali, J. Ali, P. Ping, M.K. Jamil, A novel S-box generator using Frobenius
Gray image automorphism and its applications in image encryption, Nonlinear Dynam.
Proposed 99.6050 33.44 (2024) 1–24.
[8] C. Luo, Y. Wang, Y. Fu, P. Zhou, M. Wang, Constructing dynamic S-boxes based
on chaos and irreducible polynomials for image encryption, Nonlinear Dynam.
(2024) 1–19.
9. Conclusion [9] R. Ali, M.K. Jamil, A.S. Alali, J. Ali, G. Afzal, A robust s box design using cyclic
groups and image encryption, IEEE Access 11 (2023) 135880-135890.
[10] S.A. Jassim, A.K. Farhan, Designing a novel efficient substitution-box by using
Research has been conducted to examine how changes in the ar- a flower pollination algorithm and chaos system, Int. J. Intell. Eng. Syst. 15 (1)
(2022).
chitecture of S-box structures impact the durability of cryptographic [11] J. Ali, M.K. Jamil, R. Ali, Extended fractional transformation based S-box and
algorithms, as they are often the underlying components. Research into applications in medical image encryption, Multimedia Tools Appl. (2025) 1–17.

295
S.S. Jamal et al. Alexandria Engineering Journal 125 (2025) 278–296

[12] S.T. Dougherty, J. Klobusicky, S. Şahinkaya, D. Ustun, An S-box construction [26] A.M. Garipcan, Y. Aydin, F. Özkaynak, An efficient 2D hyper chaos and
from exponentiation in finite fields and its application in RGB color image DNA encoding-based s-box generation method using chaotic evolutionary im-
encryption, Multimedia Tools Appl. 83 (14) (2024) 41213–41241. provement algorithm for nonlinearity, Chaos Solitons Fractals 191 (2025)
[13] R. Liu, H. Liu, M. Zhao, Cryptanalysis and construction of keyed strong S-box 115952.
based on random affine transformation matrix and 2D hyper chaotic map, Expert [27] M. Vijayakumar, A. Ahilan, An optimized chaotic S-box for real-time image
Syst. Appl. 252 (2024) 124238. encryption scheme based on 4-dimensional memristive hyperchaotic map, Ain
[14] X. Tong, L. Cheng, Z. Wang, M. Zhang, Design of S-box multi-objective opti- Shams Eng. J. 15 (4) (2024) 102620.
mization algorithm based on combined chaotic system, Phys. Scr. 99 (2) (2024) [28] S. Ullah, X. Liu, A. Waheed, S. Zhang, An efficient construction of s box based on
025206. the fractional order rabinovich fabrikant chaotic system, Integration 94 (2024)
[15] A. Waheed, F. Subhan, S-box design based on logistic skewed chaotic map and 102099.
modified rabin-karp algorithm: applications to multimedia security, Phys. Scr. [29] Y. Ma, Y. Tian, L. Zhang, P. Zuo, Two-dimensional hyperchaotic effect coupled
99 (5) (2024) 055236. mapping lattice and its application in dynamic S-box generation, Nonlinear
[16] S.S. Jamal, M.M. Hazzazi, M.F. Khan, Z. Bassfar, A. Aljaedi, Z. ul Islam, Region Dynam. 112 (19) (2024) 17445–17476.
of interest-based medical image encryption technique based on chaotic S-boxes, [30] S. Tariq, A. Elmoasry, S.I. Batool, M. Khan, Quantum harmonic oscillator and
Expert Syst. Appl. 238 (2024) 122030. schrodinger paradox based nonlinear confusion component, Internat. J. Theoret.
[17] S. Yuyue, T. Xiaojun, Z. Miao, Zhu W., A new S-box three-layer optimization Phys. 59 (2020) 3558–3573.
method and its application, Nonlinear Dynam. 111 (2022) 2841–2867. [31] T. Haider, N.A. Azam, U. Hayat, Substitution box generator with enhanced
[18] W. Wu, L. Kong, Image encryption algorithm based on a new 2D polynomial cryptographic properties and minimal computation time, Expert Syst. Appl. 241
chaotic map and dynamic S-box, Signal, Image Video Process. 18 (4) (2024) (2024) 122779.
3213–3228. [32] S. Ibrahim, A.M. Abbas, Efficient key-dependent dynamic S-boxes based on
[19] D. Ustun, S. Sahinkaya, N. Atli, Developing a secure image encryption technique permutated elliptic curves, Inform. Sci. 24 (2021) 6–264.
using a novel S-box constructed through real-coded genetic algorithm’s crossover [33] F. Artuger, F. Ozkaynak, A new algorithm to generate aes-like substitution boxes
and mutation operators, Expert Syst. Appl. 256 (2024) 124904. based on sine cosine optimization algorithm, Multimedia Tools Appl. 83 (13)
[20] Y. Wang, Z. Zhang, L.Y. Zhang, J. Feng, J. Gao, P. Lei, A genetic algorithm for (2024) 38949–38964.
constructing bijective substitution boxes with high nonlinearity, Inform. Sci. 523 [34] F. Artuger, Strong S-box construction approach based on josephus problem, Soft
(2020) 152–166. Comput. (2024) 1–13.
[21] M. Zhao, H. Liu, Y. Niu, Batch generating keyed strong S-boxes with high [35] M. Shadab, M.S. Jawed, M. Sajid, Substitution box construction using transfer-
nonlinearity using 2D hyper chaotic map, Integration 92 (2023) 91–98. function assisted metaheuristic and booster algorithm: A hybrid approach, Secur.
[22] Artuger, F, A method for designing substitution boxes based on chaos with high Priv. (2024) e462.
nonlinearity, Wirel. Pers. Commun. (2024) 1–16. [36] M. Zhao, Y. Zheng, Lixiang. L, Xiu-Bo C., A novel efficient S-box design algorithm
[23] M.B. Savadkouhi, M.A. Tootkaboni, S-boxes design based on the lu-chen system based on a new chaotic map and permutation, Multimedia Tools Appl. 83 (24)
and their application in image encryption, Soft Comput. (2024) 1–22. (2024) 64899–64918.
[24] Y. Ma, Y. Tian, L. Zhang, P. Zuo, Two-dimensional hyperchaotic effect coupled [37] R.S. Salman, A.K. Farhan, A. Shakir, Creation of S-box based one-dimensional
mapping lattice and its application in dynamic S-box generation, Nonlinear chaotic logistic map: Colour image encryption approach, Int. J. Intell. Eng. Syst.
Dynam. (2024) 1–32. 15 (5) (2022).
[25] F. Artuger, F. Ozkaynak, A new chaotic system and its practical applications in
substitution box and random number generator, Multimedia Tools Appl. (2024)
1–15.

296

You might also like