Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Where octagonal geometry meets chaos: A new S-Box for advanced cryptographic systems

  • Abdulbasid Banga ,

    Contributed equally to this work with: Abdulbasid Banga, Yasir Mahmood, Naif Al Mudawi, Nisreen Innab, Nadeem Iqbal, Hossam Diab

    Roles Conceptualization, Methodology, Writing – original draft

    Affiliation Saudi Electronic University, College of Computing and Informatics (CCI), Riyadh, Saudi Arabia

  • Yasir Mahmood ,

    Contributed equally to this work with: Abdulbasid Banga, Yasir Mahmood, Naif Al Mudawi, Nisreen Innab, Nadeem Iqbal, Hossam Diab

    Roles Software, Validation, Writing – original draft

    Affiliation Department of Computer Science & Software Engineering, College of IT, United Arab Emirates University (UAEU), AlAin, Abu Dhabi, United Arab Emirates

  • Naif Al Mudawi ,

    Contributed equally to this work with: Abdulbasid Banga, Yasir Mahmood, Naif Al Mudawi, Nisreen Innab, Nadeem Iqbal, Hossam Diab

    Roles Formal analysis, Project administration, Validation, Writing – review & editing

    Affiliation Department of Computer Science and Information System, Najran University, Saudi Arabia

  • Nisreen Innab ,

    Contributed equally to this work with: Abdulbasid Banga, Yasir Mahmood, Naif Al Mudawi, Nisreen Innab, Nadeem Iqbal, Hossam Diab

    Roles Methodology, Software, Writing – original draft

    Affiliation Departmentof Computer and Information Systems, College of Applied Sciences, AlMaarefa University, Diriyah, Riyadh, Saudi Arabia

  • Nadeem Iqbal ,

    Contributed equally to this work with: Abdulbasid Banga, Yasir Mahmood, Naif Al Mudawi, Nisreen Innab, Nadeem Iqbal, Hossam Diab

    Roles Investigation, Methodology, Writing – review & editing

    nadeem.iqbal537@gmail.com

    Affiliation Department of Computer Science & IT, The University of Lahore, Lahore, Pakistan

  • Hossam Diab

    Contributed equally to this work with: Abdulbasid Banga, Yasir Mahmood, Naif Al Mudawi, Nisreen Innab, Nadeem Iqbal, Hossam Diab

    Roles Methodology, Validation, Writing – review & editing

    Affiliations Menouï¬#129;a University, Math and Computer Science Department, Faculty of Science, Menouï¬#129;a, Egypt, Taibah University, Computer Science Department, Applied College, Madinah, Saudi Arabia

Abstract

Substitution Box (S-Box) has had been a cardinal component of various cryptographic systems. In this paper, we introduce a novel S-Box design that merges octagonal geometry with chaotic dynamics to enhance the security effects of the cryptographic systems. In particular, the proposed method leverages the geometric properties of octagons and the unpredictability of chaotic maps to construct a novel S-Box with improved security features. The mathematical construct octagon carries out the necessary operation of confusion in the proposed S-Box. The centres of these octagons are hypothetically created within the confines of the matrix of numbers. Further, these octagons have different radii, locations, and the amounts with which the numbers lying on their boundaries have to be circularly shifted clockwise or anti-clockwise to create the confusion effects. In case, a portion of octagon goes past the edges of the matrix, the numbers lying on its boundary have been wrapped out. This process has been repeated numerous times to come up with a reliable and a secured S-Box. The comprehensive security analyses validate that the proposed S-Box is furnished with nice security effects and has the requisite resilience to defy the varied cryptanalytic threats. The results of non-linearity and differential probability are 105.625 and 0.0391 respectively which signals towards the inherent robustness of the suggested S-Box.

1 Introduction

In the rapidly evolving landscape of cybersecurity, the need for robust cryptographic mechanisms is more pressing than ever in the history of mankind. At the heart of many cryptographic algorithms lies the Substitution box, or S-Box [4], the horsepower of cryptography that cements the security and integrity of varied encryption processes. Although it is a small element but it plays a very cardinal role in safeguarding sensitive information across numerous domains, including communication [5], finance [28], healthcare [6], and smart cities [7] to name a few.

The block ciphers like Advanced Encryption Standard (AES) [8] and Data Encryption Standard (DES) [9] depend heavily over the S-Box. These ciphers carry out substitution operations to introduce non-linearity into the encryption process. Non-linearity is very important since it protects encrypted data from differential and linear cryptanalysis, making it exceedingly difficult for attackers to predict or reverse-engineer the encrypted information.

In the various communication systems, the role of S-Boxes is critical. It safeguards the integrity and confidentiality of data [1]. By permuting the plaintext in a way which is computationally infeasible to reverse without having the knowledge of the correct key, S-Boxes facilitate in protecting the sensitive communications, whether they are between individuals, organizations, or even between devices in the Internet of Things (IoT) [10]. Open and insecure communication, on the other hand, may result in eavesdropping, data breaches, and unauthorized access, but robust S-Box facilities mitigate these risks efficiently.

The financial sector depends upon the enterprise of cryptography for the secure transactions, authenticating users, and protecting other digital assets [11]. S-Boxes play a key role in encrypting the financial data, like credit card information, online banking transactions, and blockchain-based cryptocurrencies [12]. The robustness of an S-Box can directly impact the safety of financial systems, making it a critical component in preventing fraud, identity theft, and financial cyberattacks.

With the increasing digitization of medical records and the rise of telemedicine, the healthcare sector is particularly vulnerable to cyber threats [13]. S-Boxes are employed in the encryption algorithms that protect electronic health records (EHRs), ensuring that patient data remains confidential and inaccessible to unauthorized parties [14]. The robustness of the S-Boxes used, can be the difference between secure patient data and a devastating breach that compromises sensitive health information.

As smart cities evolve, they integrate vast networks of interconnected devices and systems, from traffic management and energy grids to surveillance and emergency response systems. These systems are prime targets for cyberattacks [15]. S-Boxes contribute to the security of the cryptographic protocols that protect the data flowing through these systems, ensuring that critical infrastructure remains resilient against cyber threats. In a smart city, where the stakes are high, the reliability and strength of the S-Boxes used, can have far-reaching implications for public safety and national security [16].

In the recent years, many efforts have been made to develop S-Boxes based on numerous constructs and theories like algebra [1721], chaotic systems [2224], trigonometry [25], complete latin square [4], cuckoo search algorithm [26], chess piece Castle [1] etc. The work [17], for example, exploited the inherent power of adjacency matrices and graph theory in order to design a novel S-Box algorithm. In particular, the authors of the reported work employed the coset diagram for action of the Mobius group. Besides, the theory of Galois field was also employed to render novel S-Boxes. Moreover, the work [19] used the elements of the multiplicative subgroup of the Galois field instead of the entire Galois field to write novel S-Box. The thorough security analysis of the said work rendered very promising results. Additionally, the newly developed S-Box was applied for watermarking of digital images which produced nice results.

In a yet another research endeavor [22], novel S-Box was written using the chaotic Rabinovich–Fabrikant fractional order (FO) system. Additionally, a new key-based permutation technique was developed to enhance the functionality of the initial S-Box to construct the final S-Box. The security analysis demonstrated that the proposed S-Box was more secured and robust as compared to the state of the art. Apart from that, final S-Box’s efficacy in the image encryption was measured through the benchmark of majority logic criterion (MLC) which rendered very exceptional results. Moreover, the work [4] mixed the constructs of chaotic map and complete Latin square to come up with a novel S-Box algorithm. The peculiar modus operandi of the reported research work goes like this. Firstly, a complete Latin square was produced through the usage of chaotic sequences. Secondly, S-Box was constructed by using the complete Latin square. Validation of the reported work demonstrated that the suggested S-Box was furnished with high performance and has the power to defy varied cybersecurity threats. Moreover, the S-Box was applied over the digital images to show its applicability. Security analysis gave very satisfactory outcomes.

The current study introduces a novel algorithm for the construction of an S-Box. In particular, it fuses octagonal geometry with chaotic dynamics. To put this in other words, this study introduces a new class of S-Boxes that harnesses the peculiar geometric properties of octagons and the intrinsic randomness of chaotic maps. By the implementation of octagonal structures with a set of varied parameters, diffusion properties have been enhanced. Moreover, transformation through the chaos introduces additional layers of chaoticity and irregularity.

The motivation to address the issues with conventional S-Box designs, which could be vulnerable to the varied cryptanalytic threats, is what spurred this research. While chaotic maps render abundant non-linearity and randomness, octagonal geometry provides a distinctive setting for adjusting the substitution values. By synergizing these components, the goal is to produce an S-Box that outshines the services given by conventional cryptography methods.

In the sections that follow, we detail the preliminary studies (Section 2). In this section, Lorenz chaotic system and geometrical figure octagon have been described. In Section 3, the proposed algorithm using the construct octagon has been described in details. Simulation and performance analysis have been carried out in the Section 4. The results obtained and the particular methodology of the algorithm have been discussed in the Section 5. Sections 6 and 7 close the paper with necessary concluding remarks and the possible future work.

2 Preliminaries

2.1 Lorenz chaotic system

Edward Lorenz in 1960 came up with a novel chaotic system dubbed as Lorenz system after his name. Nonlinear system of ordinary differential equations written below characterizes this chaotic system. Apart from that, it is dynamical system [2]:

(1)

In the above set of equations, the variables , and correspond to the control parameters. Besides, state variables of this dynamical system are x,y,z. Using Runge–Kutta methods such as the RK45 [3], System (1) is commonly solved numerically. Additionally, other methods can also be applied. The chaotic attractors of both the 2D and 3D have been drawn in Figs 14.

2.2 Octagon — A mathematical construct

Definition: In geometry, an octagon is a polygon with eight sides, also known as an 8-gon. A regular octagon is a specific type of octagon where all sides are equal in length and all internal angles are congruent (see Figs 57). It possesses eight lines of reflective symmetry and exhibits rotational symmetry of order 8. Each internal angle in a regular octagon measures (or radians), while the central angle is (or radians).

thumbnail
Fig 5. An octagon with central angle , interior angle α, exterior angle , inradius r, circumradius R and side s.

https://doi.org/10.1371/journal.pone.0320457.g005

thumbnail
Fig 6. A white-colored octagon with alternate sides parallel to the x- or y-axes.

https://doi.org/10.1371/journal.pone.0320457.g006

thumbnail
Fig 7. A black-colored octagon with alternate sides parallel to the x- or y-axes.

https://doi.org/10.1371/journal.pone.0320457.g007

The vertex coordinates for a regular octagon, which is centered at the origin and has a side length of s, are:

In a regular octagon with side length s, there are three distinct types of diagonals, each with its own length, as described below:

  • Short diagonal:
  • Medium diagonal: (silver ratio times s)
  • Long diagonal:

The inradius r, circumradius R, and area A of a regular octagon can be directly calculated using the formulas for a general regular polygon with side length s, as follows:

(2)(3)(4)(5)(6)(7)

The central angle , vertex angle , and exterior angle are given by:

(8)(9)(10)

An octagon with an inradius of 1 can be specified by the following inequalities:

(11)

An octagon may also be oriented so that its vertices lie along the x- and y-axes and at 45-degree angles to them, as illustrated in Fig 8. An octagon with circumradius in this orientation can be specified by the inequality:

(12)
thumbnail
Fig 8. Two octagons oriented at 45-degree angles along the x- and y-axes.

https://doi.org/10.1371/journal.pone.0320457.g008

Relevance to Cryptography. We contend that the unique geometric properties of an octagon can be leveraged to design a secure and efficient S-Box. Sliding boundary values around an octagon can introduce complex permutations, enhancing the cryptographic strength of the S-Box.

Application in the Proposed Algorithm. The construct of octagon will be used in the proposed algorithm, such as by creating boundaries of the octagon within the S-Box to scramble and reorder elements. This act will cement the security, including increased resistance to numerous cryptanalytic attacks.

3 Proposed octagonal chaotic transformation algorithm for S-Box (OCTA-SBox)

The mathematical figure octagon in the context of the new S-Box algorithm, has been employed in providing a dynamic scrambling mechanism. The S-Box experiences non-linear permutations due to the systematic shifting of the octagon’s border values. This technique makes use of the octagon’s geometric features to improve confusion, which is one of the most important parts of secure encryption. The method obtains a greater level of security by using this shape, increasing its resistance to several types of cryptanalysis, including differential and linear assaults. The use of octagonal structures in the S-Box design offers several advantages:

  • Complex Permutations: The shifting of octagonal boundaries allows for intricate permutations of data, significantly complicating potential attacks.
  • Increased Resistance: The non-linear nature of the transformations introduced by the octagon enhances the algorithm’s resistance to varied cryptanalytic techniques.
  • Efficiency: The octagon’s symmetry ensures that these transformations can be performed efficiently, maintaining the algorithm’s performance while boosting security.

3.1 Key streams generation algorithm

This algorithm generates the key components for a cryptographic system by utilizing the Chaotic System (1). The input parameters of this algorithm are x0, y0, z0, , , , . The list of parameters x0, y0, z0, , , will spark the chaotic system while refers to the size of the required S-Box. Output of the algorithm is the two key streams , . The first key stream contains the coordinates of the octagon centers, while the second key stream has the radii and the step values for each generated octagon. Fig 9 shows the different steps of this algorithm.

Algorithm 1. KeyStreamGeneration.

Here a step by step explanation will be given for this algorithm.

Initialization:

Line 1 sparks the chaotic system with the given values and parameters. It generates sequences x, y, and z with length , where . We have neglected the initial n0 values of the keystream. The purpose of neglecting these values is the avoidance of the transient effects of the system.

Normalization:

Lines (2-5) normalize the chaotic sequences into values between 1 and 16. Xnorm, Ynorm, and Znorm represent normalized versions of the chaotic sequences x, y, and z. Besides, Wnorm combines the normalized values (Xnorm, Ynorm, and Znorm) to generate a fourth key stream.

Initialize Arrays:

Two arrays, and , are being initialized to zeros. They will store the octagon center coordinates and radius/step values, respectively. Each array has rows and 2 columns (Line 6-7).

Populate Arrays:

The array is populated with Xnorm and Ynorm, representing the x and y coordinates of the centers. The array is populated with Znorm (radius) and the Wnorm (step value) Lines (8-11).

Return Results:

The function returns the and arrays, which are used in further cryptographic operations (Line 12). This key generation algorithm leverages chaotic sequences to create complex and unpredictable values, enhancing the security of the cryptographic system.

3.2 OCTA-SBox algorithm

Fig 10 shows the proposed methodology. Invoke the Algorithm (2) with the set of parameters sbox, , and where .

Algorithm 2. OCTASBox.

The algorithm OCTASBox is designed to generate a scrambled S-Box using octagonal patterns within an sbox array. Here’s a breakdown of how the algorithm works:

Reshape the sbox array:

Reshape the sbox array to the size of ψ×ψ (Line 1).

Loop Through Octagon Centers:

The algorithm iterates through each element in the array (Line 2).

idx: The index used to access the current octagon’s center coordinates.

Extract Octagon Parameters:

For each octagon, the algorithm extracts its center from and its corresponding radius and steps from (Lines 3-5).

Create Octagon:

The function CreateOctagon is called to calculate the boundary points of the octagon based on its center and radius (Line 6).

Check Boundary Points:

If the calculated is not empty, the algorithm proceeds to slide these points along the boundary of the octagon using the specified number of steps (Line 7).

Slide Boundary:

The function SlideBoundary shifts the elements located at the boundary points within the sbox by the specified number of steps. This step effectively scrambles the values on the boundary of the octagon (Line 8).

End Loop:

The loop continues until all octagons have been processed (Line 10).

Return Scrambled S-Box:

Finally, the scrambled S-Box is returned as the output of the algorithm (Line 12).

Here we will explain the CreateOctagon function.

Before explaining the function, we can see the Fig 11 in which the eight sides have been named. We will refer to them with their names during the explanation of the algorithms.

thumbnail
Fig 11. The nomenclature being used for the eight sides of the octagon.

https://doi.org/10.1371/journal.pone.0320457.g011

Extract x– and y–coordinates from the center:

x and y are being assigned the values taken from the center array (Line 1-2). points is initialized as an empty list to be filled with data points later in the algorithm (Line 3).

Loop Initialization:

The loop iterates over a range from -radius to +radius. The variable i represents an offset from the center point along the x or y direction (Line 4).

Top and Bottom Sides:

: Adjusts the x-coordinate by i while keeping the y-coordinate fixed at . This calculates the points along the top boundary of the octagon (Line 5). Similarly, : Adjusts the x-coordinate by i while keeping the y-coordinate fixed at yradius. This calculates the points along the bottom boundary of the octagon (Line 6).

Right and Left Sides:

Adjusts the y-coordinate by i while keeping the x-coordinate fixed at This calculates the points along the right boundary of the octagon (Line 7).

: Adjusts the y-coordinate by i while keeping the x-coordinate fixed at xradius. This calculates the points along the left boundary of the octagon (Line 8).

Slant Sides (Top-Right, Bottom-Left, Top-Left, Bottom-Right):

The condition abs(i)<radius ensures that the slant sides are only calculated for points that are within the octagon’s boundaries (Line 9).

Top-Right and Bottom-Left Slant calculation:

: Adjusts the x-coordinate based on the distance i from the center, ensuring the point lies on the slant side of the octagon (Line 10).

Top-Left and Bottom-Right Slant calculation:

: Similar adjustment for the other diagonal side of the octagon (Line 11).

Points Accumulation:

In each iteration, the calculated points are accumulated into the points array, forming the boundary of the octagon (Lines 10-11).

Filtering Points:

The line 14 filters the points array, keeping only those points where both coordinates are within the bounds of a ψ×ψ matrix. Specifically, it ensures that the x-coordinate (first column) and the y-coordinate (second column) of each point are between 1 and .

Return Points:

Finally, line 15 returns the points array to the Algorithm OCTASBox.

Algorithm 3. CreateOctagon.

Consider the line 7 of the Algorithm 2. If the if condition of the line 7 evaluates to be false, control shifts at the line 2 for the next iteration of the for loop. In case, the if condition at the line 7 evaluates to be true, SlideBoundary algorithm is invoked. Let’s explain here this algorithm.

Algorithm Overview:

This algorithm is designed to slide (or shift) the integers along the boundary of an octagon-shaped region within the given sbox. This is done by a specified number of steps, creating a scrambled version of the sbox.

Input Parameters

sbox: The original matrix, e.g., () where the octagon boundary is located.

boundary_points: A list of coordinates that define the points on the octagon boundary.

steps: The number of positions to shift the boundary values.

The variable holds the number of boundary points (rows) in . returns the number of rows in the matrix, which corresponds to how many points are on the boundary (Line 1). The line 2 initializes the array with zeros.

Extracting Boundary Values from the sbox:

Loop (Lines 3-6) iterates through each boundary point.

wrapped_pt: This calls the WrapAround function, which ensures that if a point is out of the sbox’s bounds, it wraps around to the other side. It effectively handles edge cases where the boundary might exceed the matrix limits. We will explain the WrapAround function shortly.

boundary_values(i): Retrieves the value from the sbox at the location and stores it in the array.

Perform Circular Shift:

circshift: This is the “meatiest” instruction performing the real “manufacturing” task. This function shifts the elements of circularly by the amount specified in step. If step is positive, the shift is to the right; if negative, to the left. Moreover, it places the shifted values back into the (Line 7).

Loop: Again iterates through each boundary point (Line 8).

: Ensures the point is within matrix bounds (Line 9).

Assigning Values: The shifted values are placed back into the sbox at their respective boundary positions (Line 10).

Final Output:

The modified sbox is returned, with the boundary values shifted according to the specified steps. This creates a scrambled effect within the sbox based on the octagonal boundary. This algorithm is integral in creating a secure and randomized structure within the sbox, useful for encryption or other applications requiring complex data scrambling.

Algorithm 4. SlideBoundary.

The WrapAround algorithm is designed to adjust a point’s coordinates to ensure they stay within the bounds of a grid, wrapping around if they exceed the boundaries.

Extract Coordinates: The x and y coordinates of the input point are extracted (Line 1-2).

Wrap Around Calculation:

The coordinates are adjusted using the modulus operation to ensure they stay within the grid’s boundaries. The calculation wraps the coordinates around if they exceed the grid limits (Line 3).

Return Wrapped Point:

The adjusted (wrapped) coordinates are returned as to the calling algorithm.

Algorithm 5. WrapAround.

4 Simulation and performance analysis

As the Algorithm 1 was simulated by taking , we got the S-Box (Table 1) drawn in hexadecimal numbers.

Merely developing cryptographic products is not enough; they must also adhere to the latest standards, benchmarks, and evaluation criteria established by analysts, security experts, and cryptographers. In this section, we will demonstrate the strength and resilience of the proposed S-Box using these benchmarks.

4.1 Bijectivity

Typically, an S-Box of size is considered bijective if it contains distinct values [27]. Moreover, these values span the range of []. It is clear that the S-Box presented in Table 1 meets this bijectivity condition.

4.2 Non-linearity

Potential attackers sometimes employ linear cryptanalysis to compromise security products [28]. To counter this threat, the designed S-Boxes must incorporate a high level of non-linearity. If a linear relationship exists between the plaintext and ciphertext, adversaries could exploit it to attack the S-Box. The inherent non-linearity of an n-bit Boolean function, such as b(k), can be evaluated using the following mathematical equation (2) [29].

(13)

In this equation, WSb(h) represents the Walsh spectrum of the function b. Additionally, the non-linearity of the n-bit Boolean function b(k) can be determined using the following mathematical expression.

(14)

The equation is provided, where the dot product between h and x is represented by h.x. This dot product can be calculated using the following method.

(15)

The non-linearity values for the proposed S-Box are 107, 102, 103, 105, 107, 108, 109, and 104. The minimum, maximum, and average values are 102, 109, and 105.625, respectively. The non-linearity for each of the eight Boolean functions is detailed in Table 2.

4.3 Strict-avalanche criterion (SAC)

To satisfy the strict avalanche criterion (SAC), changing a single input bit n should result in a 50% chance of altering the corresponding output bit m [29]. In other words, the S-Box exhibits sufficient unpredictability and chaotic behavior if its SAC value is close to 0.5. The SAC values calculated for the proposed S-Box are presented in Table 3, also known as the dependency matrix. The average SAC value of 0.508391 for the proposed S-Box meets the established standard.

4.4 Bit-independence criterion (BIC)

Cryptographers use this additional criterion to evaluate the robustness of their S-Box. According to this benchmark, an S-Box is deemed effective at isolating output bits if a change in a single input bit, such as q, results in changes in the output bits r and s independently [29]. To achieve this, the Boolean functions that form the S-Box must satisfy specific non-linearity conditions. The performance of the S-Box, denoted as T, is assessed by calculating the difference over the entire range of input values p from 0 to 255. This measure, known as the BIC-SAC performance, evaluates how well the S-Box maintains the BIC property. For this evaluation, p and q should differ by exactly one bit. The average BIC-SAC values, which reflect the efficacy of the S-Box, should be close to 0.5 for optimal performance. Tables 4 and 5 show the criteria used for assessing SAC and non-linearity in the component Boolean functions of the proposed S-Box. The mean non-linearity and SAC values for the proposed S-Box are 103.267857 and 0.5090107, respectively.

According to Carlisle and Stafford [30], an S-Box is considered to have the BIC property if it meets both non-linearity and SAC requirements. The values of 103.267857 and 0.5090107 for the proposed S-Box indicate a notably weak linear relationship among the output bits, affirming that the proposed S-Box indeed exhibits the BIC property.

4.5 Linear-probability (LP)

The concept of linear probability is essential for assessing the inherent relationship between an S-Box’s input and output. A lower linear probability (LP) value indicates a robust S-Box. In the case of the suggested S-Box, the equation below yields a maximum LP value of 0.1224:

In this equation,

  • T represents the S-Box.
  • az and bz are input and output masks, respectively.
  • N encompasses integers from 0 to 255.

This LP value suggests that the S-Box is sufficiently resilient against linear cryptanalysis attempts.

4.6 Differential probability (DP)

In differential cryptanalysis, the goal is to recover the initial plaintext by analyzing the differences between pairs of ciphertexts and their corresponding plaintexts. Adversaries and cryptanalysts exploit these discrepancies to gain access to the secret key. For a robust S-Box, this statistical measure should have a relatively low value.

The notion of differential probability (DP) quantifies the likelihood of a specific output differential given an input differential. It can be calculated using the following equation:

In this equation,

  • T represents the S-Box.
  • and △z denote the output and input differentials, respectively.
  • N covers integers from 0 to 255.

According to the evidence in Table 6, the suggested S-Box yields a differential probability of 10/256 = 0.0391. This result indicates strong defense against various differential cryptanalysis attacks.

4.7 Fixed and reverse fixed points analysis

Many S-Boxes have been published which contain the fixed and reverse fixed points vulnerabilities [45]. Fixed points occur in the S-Boxes if the elements contained by the boxes are mapped to themselves. In this way, the given input becomes equal to the output which can be exploited by the potential hackers. Besides, the phenomenon of reverse fixed point happens if the particular element of S-Box is mapped to its corresponding binary complement. For instance, if 11001010 (202 in decimal) is placed in some input and its output is its binary complement i.e., 00110101 (53 in decimal). Cryptographers must check their S-Boxes while designing them that there should not be any fixed or reverse fixed points in the S-Boxes. In case, they occur, the adversaries and attackers may breach the underlying security of the systems employing the vulnerable S-Boxes [43, 44]. Table 7 shows the number of fixed and reverse fixed points of the proposed study which are 0 and 0 respectively. Besides, the proposed work has also been compared with other state of the art researches. One can see that the suggested work beats the studies [4554] as far as the metric of fixed and reverse fixed point is concerned.

4.8 Attacks analyses: Chosen plaintext, known plaintext & ciphertext only

In order to demonstrate the defiance of the suggested S-Box from the varied cryptographic attack, we have chosen the Baboon and the two special images. These two special images are Black and White. Figs 1220 show the encryption and decryption of these chosen images. The suggested S-Box carried out a very seminal role while encrypting and decrypting the chosen plaintext images.

In the field of cryptanalysis, hackers often employ plaintext and ciphertext attacks to compromise cryptosystems [57]. In a ciphertext-only attack, the hacker has access to one or more ciphertexts. In a known plaintext attack, the hacker possesses one or more plaintext-ciphertext pairs. In a chosen plaintext attack, the hacker temporarily gains access to the encryption mechanism, allowing them to generate as many ciphertexts as desired for chosen plaintexts. If we demonstrate that the proposed image cipher is resistant to chosen plaintext attacks, it inherently ensures immunity against known plaintext and ciphertext-only attacks, as these are considered subsets of the chosen plaintext attack.

In a chosen plaintext attack, the hacker temporarily gains access to the encryption algorithm and may select a specific image, such as a Black image (Fig 21), for encryption to deduce the secret key used in the process. After encrypting the Black image (Fig 22), the chaotic data utilized in the encryption algorithm (the secret key) is exposed. Subsequently, the hacker may select an arbitrary plain image, such as Baboon, and attempt to encrypt it (Fig 23) by launching a known plaintext attack using the secret key obtained from the Black image encryption. However, to their frustration, the encrypted Baboon image cannot be successfully decrypted using this key (Fig 24). A similar process is repeated using another specific image, a White image, as shown in Figs 2528. This process effectively demonstrates the cipher’s resistance to chosen plaintext, known plaintext, and ciphertext-only attacks.

thumbnail
Fig 24. Decrypted Baboon image with possible secret key from the Black image.

https://doi.org/10.1371/journal.pone.0320457.g024

thumbnail
Fig 28. Decrypted Baboon image with possible secret key from the White image.

https://doi.org/10.1371/journal.pone.0320457.g028

5 Discussion

In today’s high-tech world, where digital security threats are increasingly becoming sophisticated and pervasive, S-Boxes play a critical role in safeguarding sensitive information. These substitution boxes are integral to encryption algorithms, providing a crucial layer of non-linearity and confusion that transforms plaintext into secure ciphertext. Their ability to obscure patterns and resist cryptanalysis is essential for protecting data from unauthorized access and ensuring the integrity of secure communications. As technology evolves and cyber-attacks become more advanced, the necessity for robust, well-designed S-Boxes grows, highlighting their fundamental importance in maintaining security and privacy in a digitally interconnected world.

The integration of octagonal geometry in the current work adds another layer of sophistication. Octagonal geometry introduces a higher degree of symmetry and structural complexity, which enhances the S-Box’s ability to distribute and mix data more thoroughly. This geometric approach enables the S-Box to exploit the spatial properties of the octagon, leading to more robust and non-linear transformations. The geometric properties ensure that each element of the S-Box undergoes a unique transformation, contributing to the overall strength and unpredictability of the cryptographic system.

The results obtained from this approach are promising as shown in the Table 8. Empirical evaluations indicate that the proposed S-Box exhibits superior resistance to various forms of cryptanalysis compared to traditional S-Boxes. The statistical analyses reveal that the S-Box maintains a high level of confusion and diffusion, crucial for the security of cryptographic algorithms. Additionally, the S-Box’s performance in terms of avalanche effect and uniformity of output further supports its effectiveness.

thumbnail
Table 8. Comparative analysis of suggested S-Box with other published ones.

https://doi.org/10.1371/journal.pone.0320457.t008

In summary, the development of the S-Box through the integration of chaos theory and octagonal geometry marks a noteworthy contribution to cryptographic technology. The enhanced security features and promising results underscore the value of interdisciplinary approaches in the advancement of cryptographic techniques. This work not only addresses current security challenges but also paves the way for future innovations in the field.

6 Conclusion

By marrying the theory of chaos and geometrical figure octagon, this research endeavor has written a yet another S-Box to safeguard the digital assets. Firstly, a “raw” 2D S-Box (matrix) was created with 1 to 256 integers. To convert this matrix into a sophisticated S-Box, the instrument of octagon carried out a seminal role. Octagons of different radii and of different centers were hypothetically generated within this matrix to scramble the integers. The integers lying on the boundary of octagon were shifted circularly both clockwise and anti-clockwise. This operation has been repeated a lot of times to embed the security effects in the required S-Box. In case, some portion of the octagon goes past its any edge, the numbers have been wrapped out—an other layer of complexity. The random data has been generated with the help of the Lorenz chaotic system. Both the simulation and security analysis rendered very satisfactory results. Given these findings, we assert that the proposed S-Box can be used in various domains of cryptographic applications like health, finance, business, e-government etc.

7 Future work

Building upon the foundational work of this research, future efforts will concentrate on the practical deployment of the proposed S-Box for enhancing digital image scrambling techniques. The primary goal is to integrate the S-Box into advanced image encryption algorithms and evaluate its performance in real-world scenarios. This involves assessing the S-Box’s effectiveness in various image types, such as grayscale and color images, and measuring its impact on encryption quality and computational efficiency.

In addition to image encryption, future research will investigate the S-Box’s potential in other critical areas of digital security. One promising avenue is its application in secure video transmission, where maintaining the integrity and confidentiality of video data is crucial. The S-Box’s performance will be tested in video encryption frameworks to determine its suitability for protecting streaming and stored video content.

Another area of exploration will be the use of the S-Box in digital watermarking. Watermarking is essential for copyright protection and content verification, and the proposed S-Box could enhance watermarking techniques by improving their robustness against tampering and unauthorized access. Furthermore, the research will aim to optimize the S-Box for computational efficiency, ensuring that it performs well in real-time applications. This involves refining the algorithm to reduce processing time and resource usage, making it practical for use in environments with stringent performance requirements.

By exploring these diverse applications and focusing on optimization, the future work aims to demonstrate the versatility of the proposed S-Box and its potential to advance cryptographic techniques contributing to broader areas of digital security.

References

  1. 1. Alqahtani J, Akram M, Ali GA, Iqbal N, Alqahtani A, Alroobaea R. Elevating network security: A novel S-box algorithm for robust data encryption. IEEE Access. 2024;12:2123–34.
  2. 2. Shen B-W. A review of Lorenz’s models from 1960 to 2008. Int J Bifurcat Chaos. 2023;33(10).
  3. 3. Zwarycz-Makles K, Majorkowska-Mech D. Gear and Runge-Kutta numerical discretization methods in differential equations of adsorption in adsorption heat pump. Appl Sci. 2018;8(12):2437.
  4. 4. Hua Z, Li J, Chen Y, Yi S. Design and application of an S-box using complete Latin square. Nonlinear Dyn. 2021;104(1):807–25.
  5. 5. Kuznetsov O, Poluyanenko N, Frontoni E, Kandiy S. Enhancing smart communication security: A novel cost function for efficient S-box generation in symmetric key cryptography. Cryptography. 2024;8(2):17.
  6. 6. Fauzi M, Jati G, Rachmadi MF, Jatmiko W. Improved logistic-sine chaotic map based S-box and bit-plane scrambling encryption schemes performance on compressed ECG data. In: 2020 international workshop on big data and information security (IWBIS); 2020. p. 97–102. https://doi.org/10.1109/iwbis50925.2020.9255507
  7. 7. Hashmi MA, Noshina Tariq. An efficient substitution box design with a chaotic logistic map and linear congruential generator for secure communication in Smart cities. EAI Endorsed Trans Smart Cities. 2023;7(1):e5.
  8. 8. Hasija T, Kaur A, Ramkumar KR, Sharma S, Mittal S, Singh B. A survey on performance analysis of different architectures of AES algorithm on FPGA. In: Modern electronics devices and communication systems: Select proceedings of MEDCOM 2021; 2023. p. 39–54.
  9. 9. Sugier J. Cracking the DES cipher with cost-optimized FPGA devices. In: Engineering in dependability of computer systems and networks: Proceedings of the fourteenth international conference on dependability of computer systems DepCoS-RELCOMEX; 2019. p. 478–87.
  10. 10. Asghari P, Javadi S. Lightweight key-dependent dynamic S-boxes based on hyperelliptic curve for IoT devices. arXiv preprint arXiv:2102.13340. 2021.
  11. 11. Waheed A, Subhan F, Suud MM, Alam M, Ahmad S. An analytical review of current S-box design methodologies, performance evaluation criteria, and major challenges. Multimed Tools Appl. 2023;82(19):29689–712.
  12. 12. Thakral M, Singh S. A secure bank transaction using blockchain computing and forest oddity. In: Security and privacy in cyberspace; 2022. p. 101–13.
  13. 13. Bernard R, Bowsher G, Sullivan R. Cyber security and the unexplored threat to global health: a call for global norms. Global Secur Health Sci Policy. 2020;5(1):134–41.
  14. 14. Sammeta N, Parthiban L. Hyperledger blockchain enabled secure medical record management with deep learning-based diagnosis model. Complex Intell Syst. 2022;8(1):625–40.
  15. 15. Farahat IS, Tolba AS, Elhoseny M, Eladrosy W. Data security and challenges in smart cities. In: Security in smart cities: Models, applications, and challenges; 2019. p. 117–42.
  16. 16. Kuznetsov A, Poluyanenko N, Frontoni E, Kandiy S, Peliukh O. A new cost function for heuristic search of nonlinear substitutions. Expert Syst Applic. 2024;237:121684.
  17. 17. Arshad B, Siddiqui N, Hussain Z, Ehatisham-ul-Haq M. A novel scheme for designing secure substitution boxes (S-boxes) based on Mobius group and finite field. Wireless Person Commun. 2022;124(4):3527–48.
  18. 18. Shah T, Jahangir S, de Andrade AA. Design of new 4 × 4 S-box from finite commutative chain rings. Comp Appl Math. 2015;36(2):843–57.
  19. 19. Shah T, Qureshi A. S-box on subgroup of Galois field. Cryptography. 2019;3(2):13.
  20. 20. Ali R, Jamil MK, Alali AS, Ali J, Afzal G. A robust S box design using cyclic groups and image encryption. IEEE Access. 2023;11:135880–90.
  21. 21. Arshad S. Construction of 4×4 substitution box using elliptic curves and algebraic group structures. Wireless Person Commun. 2023;131(3):1913-27.
  22. 22. Ullah S, Liu X, Waheed A, Zhang S. An efficient construction of S-box based on the fractional-order Rabinovich-Fabrikant chaotic system. Integration. 2024;94:102099.
  23. 23. Yang S, Tong X, Wang Z, Zhang M. S-box generation algorithm based on hyperchaotic system and its application in image encryption. Multimed Tools Appl. 2023;82(17):25559–83.
  24. 24. Tong X, Cheng L, Wang Z, Zhang M. Design of S-box multi-objective optimization algorithm based on combined chaotic system. Phys Scr. 2024;99(2):025206.
  25. 25. Zahid AH, Tawalbeh L, Ahmad M, Alkhayyat A, Hassan MT, Manzoor A, et al. Efficient dynamic S-box generation using linear trigonometric transformation for security applications. IEEE Access. 2021;9:98460–75.
  26. 26. Alhadawi HS, Majid MA, Lambić D, Ahmad M. A novel method of S-box design based on discrete chaotic maps and cuckoo search algorithm. Multimed Tools Appl. 2020;80(5):7333–50.
  27. 27. Corona-Bermúdez E, Chimal-Eguı́a JC, Corona-Bermúdez U, Rivero-Ángeles ME. Chaos meets cryptography: Developing an S-box design with the Rössler attractor. Mathematics. 2023;11(22):4575.
  28. 28. Aboytes-González JA, Soubervielle-Montalvo C, Campos-Cantón I, Perez-Cham OE, Ramı́rez-Torres MT. Method to improve the cryptographic properties of S-boxes. IEEE Access. 2023;11:99546–57.
  29. 29. Malik AW, Zahid AH, Bhatti DS, Kim HJ, Kim K-I. Designing S-box using tent-sine chaotic system while combining the traits of tent and sine map. IEEE Access. 2023;11:79265–74.
  30. 30. Sevin A, Mohammed AAO. A survey on software implementation of lightweight block ciphers for IoT devices. J Ambient Intell Hum Comput. 2021;14(3):1801–15.
  31. 31. Belazi A, Khan M, El-Latif AAA, Belghith S. Efficient cryptosystem approaches: S-boxes and permutation-substitution-based encryption. Nonlinear Dyn. 2016;87(1):337–61.
  32. 32. Abd El-Latif AA, Abd-El-Atty B, Amin M, Iliyasu AM. Quantum-inspired cascaded discrete-time quantum walks with induced chaotic dynamics and cryptographic applications. Sci Rep. 2020;10(1):1930. pmid:32029798
  33. 33. Khan NA, Altaf M, Khan FA. Selective encryption of JPEG images with chaotic based novel S-box. Multimed Tools Appl. 2020;80(6):9639–56.
  34. 34. Khan M, Asghar Z. A novel construction of substitution box for image encryption applications with Gingerbreadman chaotic map and S8 permutation. Neural Comput Applic. 2018;29(4):993–9.
  35. 35. Abd-El-Atty B. Efficient S-box construction based on quantum-inspired quantum walks with PSO algorithm and its application to image cryptosystem. Complex Intell Syst. 2023;9(5):4817–35.
  36. 36. Farah M, Farah A, Farah T. An image encryption scheme based on a new hybrid chaotic map and optimized substitution box. Nonlinear Dyn. 2020;99(4):3041–64.
  37. 37. El-Latif A, Abd-El-Atty B, Belazi A, Iliyasu A. Efficient chaos-based substitution-box and its application to image encryption. Electronics. 2021;10(12):1392.
  38. 38. Farah T, Rhouma R, Belghith S. A novel method for designing S-box based on chaotic map and teaching-learning-based optimization. Nonlinear Dyn. 2016;88(2):1059–74.
  39. 39. Alabdullah B, Banga A, Iqbal N, Ikram A, Diab H. Advancing cryptographic security with a new Delannoy-derived chaotic S-box. IEEE Access. 2024.
  40. 40. Qazi AS, Zahid AH, Baz A, Arslan F, Ali M, Ali J. Innovative transformation of S-box through chaotic map using a pragmatic approach. IEEE Access. 2024;12:42725–36.
  41. 41. Isa H, Syed Junid SAA, Z’aba MR, Endut R, Ammar SM, Ali N. Enhancement of non-permutation binomial power functions to construct cryptographically strong S-boxes. Mathematics. 2023;11(2):446.
  42. 42. Alali AS, Ali R, Jamil MK, Ali J. Dynamic S-box construction using mordell elliptic curves over galois field and its applications in image encryption. Mathematics. 2024;12(4):587.
  43. 43. Zahid AH, Ahmad M, Alkhayyat A, Arshad MJ, Shaban MMU, Soliman NF, et al. Construction of optimized dynamic s-boxes based on a cubic modular transform and the sine function. IEEE Access. 2021;9:131273–85.
  44. 44. Zahid AH, Iliyasu AM, Ahmad M, Shaban MM, Arshad MJ, Alhadawi HS, Abd El-Latif AA. A novel construction of dynamic S-box with high nonlinearity using heuristic evolution. IEEE Access. 2021;9:67797–812.
  45. 45. Naseer Y, Shah T, Shah D, Hussain S. A Novel algorithm of constructing highly nonlinear S-p-boxes. Cryptography. 2019;3(1):6.
  46. 46. Aboytes-González JA, Murguı́a JS, Mejı́a-Carlos M, González-Aguilar H, Ramı́rez-Torres MT. Design of a strong S-box based on a matrix approach. Nonlinear Dyn. 2018;94(3):2003–12.
  47. 47. Yang C, Wei X, Wang C. S-box design based on 2D multiple collapse chaotic map and their application in image encryption. Entropy (Basel). 2021;23(10):1312. pmid:34682036
  48. 48. Al Solami E, Ahmad M, Volos C, Doja MN, Beg MMS. A new hyperchaotic system-based design for efficient bijective substitution-boxes. Entropy (Basel). 2018;20(7):525. pmid:33265614
  49. 49. Khan MF, Saleem K, Hazzazi MM, Alotaibi M, Shukla PK, Aqeel M, et al. Human psychological disorder towards cryptography: True random number generator from EEG of schizophrenics and its application in block encryption’s substitution box. Comput Intell Neurosci. 2022;2022:2532497. pmid:35774444
  50. 50. Hussain I, Anees A, Al-Maadeed TA, Mustafa MT. Construction of S-box based on chaotic map and algebraic structures. Symmetry. 2019;11(3):351.
  51. 51. Liu X, Tong X, Wang Z, Zhang M. Efficient high nonlinearity S-box generating algorithm based on third-order nonlinear digital filter. Chaos Solitons Fractals. 2021;150:111109.
  52. 52. Alshammari BM, Guesmi R, Guesmi T, Alsaif H, Alzamil A. Implementing a symmetric lightweight cryptosystem in highly constrained IoT devices by using a chaotic S-box. Symmetry. 2021;13(1):129.
  53. 53. Özkaynak F. On the effect of chaotic system in performance characteristics of chaos based s-box designs. Physica A: Stat Mech Applic. 2020;550:124072.
  54. 54. Zhu C, Wang G, Sun K. Cryptanalysis and improvement on an image encryption algorithm design using a novel chaos based S-box. Symmetry. 2018;10(9):399.
  55. 55. Lu Q, Zhu C, Wang G. A novel S-box design algorithm based on a new compound chaotic system. Entropy. 2019;21(10):1004.
  56. 56. Yan W, Ding Q. A novel S-box dynamic design based on nonlinear-transform of 1D chaotic maps. Electronics. 2021;10(11):1313.Yan W, Ding Q. A novel S-box dynamic design based on nonlinear-transform of 1D chaotic maps. Electronics. 2021;10(11):1313.
  57. 57. Alvarez G, Li S. Some basic cryptographic requirements for chaos-based cryptosystems. Int J Bifurcation Chaos. 2006;16(08):2129–51.