Secure communication through reliable S-box design: A proposed approach using coset graphs and matrix operations

Protection of sensitive information has been always the major security concern since decades to withstand against illegitimate access and usage. Substitution-boxes (S-boxes) are vital components of any modern day cryptographic system that allows us to ensure its resistance to attacks. The prime problem with creating S-box is that we are generally unable to discover a consistent distribution among its numerous features to withstand diverse cryptanalysis attacks. The majority of S-boxes investigated in the literature has good cryptographic defenses against some attacks but are susceptible to others. Keeping these considerations in mind, this paper proposes a novel approach for S-box design based on a pair of coset graphs and a newly defined operation of row and column vectors on a square matrix. Several standard performance assessment criteria are used to evaluate the reliability of proposed approach, and the results demonstrate that the developed S-box satisfies all criterions for being robust for secure communication and encryption.


Background
In this era of the 21st century, where technology has advanced to new heights, researchers face significant difficulty when it comes to secure communication. Online data transfer from one place to another is widely done through various communication channels that demand privacy and protection. This protection can be achieved through the use of cryptography [1,2], which is a technique for safeguarding data and communication by using codes so that only the intended recipient can understand it. In computer science, the term "cryptography" relates to safe communication and information methods that use mathematical ideas and a system of calculations to transform messages in such a way that they become difficult to decode [3]. These methods are employed in designing cryptographic keys, digital signatures, and confirmation to maintain online browsing over the internet and private communications, transactions with credit cards and email, and confidential information.
There are two major branches of cryptography: asymmetric key cryptography [4] and symmetric key cryptography [5]. Asymmetric key cryptography employs two keys: one public and one private. The sender is linked to the public key, which is utilized to encrypt messages. When the message is delivered, it can only be decoded using the private key possessed by the recipient. The present study deals with symmetric cryptography. There are two different approaches to using symmetric cryptographic techniques to encipher plaintext: block ciphers and stream ciphers. In a stream cipher, one plaintext symbol is directly transformed into an encrypted text symbol. On the other hand, a series of plaintext symbols are encrypted as one block using block cipher [6]. An example of a block cipher is simple substitution, while columnar transposition is a stream cipher. Block ciphers are the most common symmetric encryption techniques used today.
A substitution-box (S-box), a vital integrant of symmetric-key cryptography, is used to execute substitution. In block ciphers, it is widely used to ensure the confusion property described by C.E. Shannon for concealing the connection between the key and the encrypted data [7,8]. One of the most secure block ciphers that encrypts plaintext and enables secure transmission is the Advanced Encryption Standard (AES) [9]. With the assistance of the substitution-box, the first phase, often known as the substitution step, involves performing byte substitution. This emphasizes the significance of S-box in the encryption process. It is the sole nonlinear constituent, and its robustness determines the performance and security of block ciphers.
The chosen S-box must be strong and demonstrate resistance to any cryptanalytic attempt. In an encryption scheme, nonlinearity is regarded as the S-box's leading performance criterion. Researchers have been interested in obtaining S-boxes that are both algebraically and cryptographically resilient for more than a decade. These S-boxes display many striking characteristics and provide intriguing outcomes for various ciphers. However, the primary goal is to increase the nonlinearity score of the S-boxes [10,11]. Security experts have become interested in evolving strong S-boxes, especially of the order of 8 × 8, as a result of their successful use in the AES block cipher.

Literature review
To form secure S-boxes, numerous innovative methods and procedures have recently been developed. In Ref. [12], an innovative method for designing S-boxes is discussed. The authors used a pair of chaotic and fitness maps in the algorithm of S-box design. An efficient method for constructing robust S-boxes involving chaotic maps and symmetry groups is devised by Javed et al. in Ref. [13]. With the use of a chaotic system, an initial S-box is constructed and then the proposed S-box is generated through the action of S 256 on initial S-box. In Ref. [14] a certain type of group theoretic graphs and a bijective function were utilized to generate a new S-box. Several performance indicators confirmed the robustness of suggested S-box. Lambic [15] designed a novel discrete-space chaotic function based on standard multiplication and circular shift. This map was then used to create an S-box with excellent security features. Anees and Ahmed [16] designed a potent S-box by investigating the behavior of van der pol oscillator. Firstly, the author used a technique to obtain the iterative solution of chaotic map. Then the ceiling function is employed to those solutions to achieve the task. A systematic scheme to evolve a S-box with high nonlinearity value is given in Ref. [17]. The chaotic map iteration yields a 16× 16 matrix on which the genetic algorithm is applied to obtain suggested S-box. Mahboob et al. presented a robust S-box based on the reciprocal of degree 5 equation [18]. A new approach using zig-zag transformation is investigated through different chaotic systems for enhancing the efficiency of substitution-box structures based on chaos is examined in Ref. [19]. It has been shown that features of input S-box structure can be improved by exchanging the elements of S-box as per the zig-zag traversal. In Ref. [20] Zhang et al. proposed a method of encrypting images using newly designed 8 × 8 S-box which was constructed with the help of a new fractional order logistic map that has larger key space, more parameters, better efficiency than conventional logistic map. Whereas, Quiroga et al. in Ref. [21] utilized an integer chaotic lag time series generated from extended and improved logistic map to develop a scheme for constructing 8 × 8 S-boxes suited for high-speed secure communication. In Ref. [22], Yousaf et al. employed an efficient concept of permutation group theory to improvise the cryptographic strength of seed S-boxes. The effectiveness of the approach is tested over several S-boxes schemes where it has been found that post action of the approach results a strong structure of S-box which sufficiently better than seed S-boxes. In Ref. [23], a simple method of S-box generation is suggested which was based on a cascade discrete-time logistic-Chebyshev function which was applied to build an efficient image cryptosystem. The current study demonstrates a novel method to generate S-boxes having decent cryptographic resilience.

Analysis of weaknesses in existing designs and proposed scheme for improved cryptographic security
Since the design of S-boxes is a crucial component in the development of secure cryptographic systems. To achieve this, numerous algebraic and chaotic systems-based techniques have been proposed within the literature. However, it is important to note that despite the advantageous features conferred by these approaches, potential weaknesses have been identified that require careful consideration. In particular, S-box designs based solely on algebraic structures are vulnerable to attacks targeting the inherent algebraic structure of such designs. There are various attacks that can be executed on S-boxes constructed using algebraic techniques. Linear and differential attacks [24,25] are two examples of such attacks, which are designed to exploit the linear and differential characteristics of the S-box, respectively. XL attacks [26], Gröbner basis attacks [27], SAT solver attacks [28], side-channel attacks [29], XSL attacks [30], and Interpolation attacks [31] are other examples of attacks that can be executed on S-boxes based on algebraic constructions.
Similarly, despite the widespread adoption of chaotic systems in substitution box designs, several weaknesses have been identified in the literature. One of the critical issues is the algorithmic evolution of control parameters, which can result in periodicity and nonrandomness in chaotic sequences [32,33]. This problem can compromise the security of cryptographic systems, as attackers can exploit the predictable nature of the chaotic sequences to launch attacks. Another weakness is the non-uniform distribution of chaotic sequences, which can result in biases and patterns that can be exploited by attackers. Furthermore, the finite precision effect can cause errors and inaccuracies in chaotic sequences, reducing the randomness and security of cryptographic systems. The dynamical degradation of chaotic functions is another issue that can significantly affect the security of cryptographic systems. The continuous evolution of control parameters can lead to a loss of randomness . Additionally, the limited number of control parameters and frail chaos in some chaotic systems can restrict the amount of randomness generated, limiting their suitability for cryptographic applications. The insufficient quantity of randomness can result in weak cryptographic keys, making the system vulnerable to attacks.
Moreover, the intrinsic evolution of algebraic structures and their automorphism nature represent a significant issue that must be addressed in the design of cryptographic systems. The automorphism nature of algebraic structures can introduce symmetries and patterns that can be exploited by attackers, compromising the security of cryptographic systems. Thus, in light of the weaknesses identified in existing S-box designs, there is a need to developed more innovative schemes for secure communication.
Alternatively, to achieve a high degree of randomness, researchers recommend the use of true random sequences generated by naturally occurring processes. True random sequences are characterized by their unpredictability, irreversibility, and unreproducibility, making them highly resistant to attacks by adversaries. The unpredictability of true random sequences is attributed to their generation from physical processes that are inherently random. The irreversibility of true random sequences means that once a sequence has been generated, it cannot be recreated or predicted even if an adversary has knowledge of its internal structure and response history.
The focus of recent research has been on developing techniques for extracting true random numbers for cryptographic applications. The proposed technique involves the integration of group theory and graph theory. The integration of these two theories enables the extraction of true random numbers, which are then used to construct cryptographically robust substitution boxes.
The major contributions of this paper are as follows: 1. There exists limited research on S-box design based on a single graph in the literature. In order to introduce more randomness and complexity, we propose the development of two graphs based on concepts from group theory. 2. We introduce a new operation using row and column vectors over a square matrix to generate a new matrix. We utilize this operation to enhance the robustness of the initial S-box and generate the proposed S-box. 3. The strength of the proposed S-box is tested using various benchmark algebraic parameters. The outcomes obtained from these evaluation tools validate the reliability and robustness of the proposed S-box in preventing several attacks. 4. We demonstrate the effectiveness of the proposed S-box in image encryption applications.
Thus, our contributions provide a novel approach to S-box design and demonstrate the potential of the proposed S-box for improving the security of various cryptographic applications.
The remainder of the paper is divided into the following sections. We outline some preliminary concepts and the novel operation on square matrix needed to set up the proposed S-box in section 2. Section 3 contains comprehensive detail about pair of coset graphs whose sum of vertices is 256. The proposed S-box design approach is presented in Section 4. Some well-known security tests are performed in Section 5 to assess the strength of the presented S-box. Several statistical studies are carried out in Section 6 to determine the acceptability of proposed S-box for image encryption applications. The conclusion of this work is described in Section 7.

Preliminaries
In this section, we go through a few mathematical notions that are relevant to suggested S-box design strategy.

Coset graphs of modular group over prime field
The modular group G is a non-abelian group of infinite order generated by two elements α and β which are linear fractional transformations defined by α(x) = − 1 x and β(x) = x− 1 x . The finite presentation of G is 〈α, β = α 2 = β 3 = 1〉. Due to its extensive applications across numerous scientific domains, the modular group G is considered as the most significant infinite discrete group. There is a long history of research into how G acts on various mathematical structure. Coset graphs for G over a prime field were established by Higman in the late 1970s. Since α 2 = β 3 = 1, therefore these graphs are made up of triangles which are joined together by edges. The edge of a triangle Δxyz (in anticlockwise order) linking vertices x and y is symbolized by β. A line, that is not an edge of a triangle, connecting two vertices (which may or may not of the same triangle) is denoted by the symbol α. It is important to mention that if the vertices that are joined by α lie on the same triangle, then a cap appears on such a triangle (See triangle Δ0.∞.1 in Fig. 1). We refer to Refs. [34][35][36][37] for more information on coset graphs. It is well known that, for a prime number p, F P = {0, 1, 2, …, p − 1} is a field. The  Since the permutation β is the product of 8 disjoint cycles of length 3, therefore the coset graph of F 23 ∪ {∞} has eight triangles. A triangle Δ9.6.20 (in anticlockwise order) is represented by the cycle (9,6,20). Similarly, all of the triangles are labelled. Furthermore, the permutation α is the product of 12 transpositions such that each of which connects any two vertices of the 8 triangles. For instance, the transposition (2,11) joins vertex 2 of Δ2.12.21 to vertex 11 of Δ11.3.16. In this way, the whole graph is emerged. Fig. 1 depicts the coset graph made up of the permutation representations of α and β.

Parametrization technique for evolving coset graphs
The coset graph shown in Fig. 1, is obtained from the natural action of G on F 23 ∪ {∞}. All the vertices of such graphs are by fixed by α 2 , β 3 and (αβ) p . So, these graphs represent the diagrammatic version of the triangle group 〈α,β = α 2 = β 3 = (αβ) p = 1〉. In Ref. [38], it has been proved that, corresponding to each element t in F p a separate coset graph can be compose. The method that is used for drawing these types of graphs is called parametrization method. Irrespective of the natural action which allows only one coset graph, the parametrization process enables us to evolve p number of coset graphs for each F p . Another advantage of parametrization method is that it allows us to generate coset diagrams over F p for several triangle groups (2, 3,n) = 〈α,β = α 2 = β 3 = (αβ) n = 1〉, where n is divisor of p + 1 or p − 1. Next, we briefly illustrate the parametrization method.
Choose F p , the prime field over which coset graph is intended to compose. Then select the divisor n of p + 1 or p− 1 so that diagrammatic form of 〈α, β = α 2 = β 3 = (αβ) n = 1〉 can be obtained. Each n is associated with a polynomial f(t) [38] whose solutions in F p provide a key to solve five equations of parametrization method (See Eqs (2.1) to (2.5)). Let t be the one of the roots of f(t) and set Solve equations (2.1)-(2.5) to find α and β.

Table 1
Relationship between k and f (t).
The polynomials associated with first 20 values of n are written in Table 1. If one needs to obtain a polynomial for higher value of n, the method can be found in Ref. [38].
We refer to Ref. [38] for a more detailed description and proof of this method.

A newly defined operation between row/column and square matrices
Here, we introduce a new operation between a row vector of order 1 × n and a square matrix of order n. Definition 2.1 Let A be a square matrix of order n with entries from {0, 1, 2, 3, …, n 2 − 1} and R be a row vector of n elements from {1, 2, 3, …, n}. Then the operation of R on A results a new square matrix A ′ of order n in the following manner.
Similarly, we can define operation between a column vector C of order n × 1 and an n × n matrix.

Coset graphs employed in the proposed scheme
An 8 × 8 S-box has 256 elements and it is a 16 × 16 matrix with entries ranging from 0 to 255. Many researchers used the Galois field of order 256 in the construction of S-boxes. Some S-box construction methods involve the action of some suitable group on F 257 . In this work, we have presented a new idea of evolving S-boxes involving a pair of prime fields, the sum of whose elements is 256. We find the following pairs of prime fields, F i and F j such as i + j = 256.
This generates the initial S-box with decent cryptographic strength. To add more randomness and complexity, we use the row and column vectors on the initial seed S-box that leads to the suggested S-box

Arrangement and mixing of αβ cycles of D 1 and D 2
We use cycles of the permutations αβ of D 1 and D 2 in a certain way to break the initial sequence 0, 1, 2,..,255. The number of cycles in αβ for D 1 and D 2 are 38 and 6 respectively. First, we write them in a certain pattern. We call first cycle of D 1 (D 2 ) in which the least element of F 149 (F 107 ) that is 0 is present and denote this by λ ). The third, fifth and seventh cycles of D 1 (D 2 ) are those cycles having available second, third and fourth least elements respectively. In the same way the fourth, sixth and eighth cycles of D 1 (D 2 ) will be those cycles containing available second, third and fourth largest elements respectively. This process continues till all the cycles get consumed. Therefore, the arrangements for all cycles of D 1 and D 2 are given below as arrangement 1 and arrangement 2, respectively: The diagrammatic descriptions of the arrangements 1 and 2 are presented in Figs. 5 and 6, respectively. The aforementioned arrangements are combined in a ratio of 1:6:1:6:1:7:1:7:1:6:1:6. In this composition, each integer "1", presented in regular font, represents a single cycle λ (n) i of D 1 while bold integers "6 and 7" represent six and seven consecutive cycles ρ (m) j of D 2 respectively. As a result, the final structure obtained is as follows;

Arrangement 3
10 , λ i of D 1 . We use the term "pivot element" to refer to the element n ∈ F 149 in λ (n) i , which is either the least element in the cycle if it appears at an odd position in the arrangement 1, or the largest element of the cycle otherwise. Similarly, the element m is considered the pivot element in the cycle ρ (m) j of D 2 .

Proposed scheme
In this section, we describe the suggested scheme of S-box construction based on.

4.2.
Step II An S-box is a square matrix of order 16, comprising 256 elements with values ranging from 0 to 255, arranged randomly.  Table 3). This matrix is referred to as the initial S-box, which has robust cryptographic properties (NL value = 101) to reinforce the block cipher. The subsequent step focuses on introducing more randomness and complexity to the S-box to further improve its security.

Step III
The performance and quality of an S-box can be enhanced by operating (See Definition 2.1) row and column vectors R and C on it simultaneously.
Here  Table 4. Figs. 7 and 8 provide a graphical description of the operation of the row and column vectors on the initial S-box, respectively A block diagram has been presented in Fig. 9 to illustrate the construction of the suggested S-box design .

Experimental setup and analysis
This section details the experimental design and analysis aimed at assessing the efficacy of the proposed scheme [39]. Specifically, it covers the simulation platform used, the algebraic performance metrics utilized, a brief discussion of the algebraic analysis results, the Friedman test used to validate the superiority of the proposed model compared to other S-box models and limitations of the proposed scheme for S-box construction.

Simulation platform
The simulations were conducted using the computer language MATLAB. To minimize any potential bias in interpreting the data, the simulations were performed on a single computer equipped with an Intel Core i5 CPU operating at 3.2 GHz Quad-Core Processor and 16 GB RAM, running on the Windows 10 operating system. To ensure consistency in the experimental approach and control for any confounding variables, it is necessary to replicate the experiment using the same compiler and running it on a computer system with equivalent processing capability.

Nonlinearity (NL)
Nonlinearity is a key factor to examine the robustness of an S-box. If an S-box maps input to output linearly, its resistance is very low [40]. A robust S-box nonlinearly maps input to output. Any S-box with a higher nonlinearity value guarantees more security against cryptanalytic attacks. In the case of Boolean function of the form θ : F n 2 ⟶F 2 , The nonlinearity is computed as.
h represents the Walsh spectrum of θ(g). Table 5 indicates the nonlinearity values of all Boolean functions of the proposed S-box. The mean Non-linearity of our S-box is 107.75. A comparison of our S-box with some recently designed S-boxes in terms of NL score is given in Table 10.

Strict avalanche criteria (SAC)
SAC is effective technique to check the security of an S-box [48]. To meet this requirement, the input bit of any cryptosystem must change along with a 50% change in the output bits. The SAC performance of the S-box is evaluated by the dependency matrix. The perfect SAC score for the best cryptographic confusion is 0.5. Tables 6 shows the dependency matrix of SAC values obtain by proposed S-box. The mean SAC value of proposed S-box is 0.4983, which differs slightly from the ideal score. Thus, our S-box fulfills the SAC criterion.

Bit independence criterion (BIC)
This test [48] is satisfied if the output bits operate independently, i.e. do not depend on each other. More specifically, no statistical dependencies or patterns should be present in the bits of the output vectors. It is intended to boost output bit autonomy for greater security. . Table 7 and 8 depict the dependency matrices for BIC-nonlinearity and BIC-SAC respectively. The results show that the proposed S-box conforms to the required BIC standards.

Linear probability (LP)
Modern block ciphers are designed to create as much complexity among the bits as possible to protect the privacy of the information and to offer protection against various decryption techniques employed by the cryptanalysts. It is accomplished by S-Box. The lower the value of LP, the better the capability of S-box to withstand linear attacks. The LP value of an S-box is calculated by using the following formula [49].
where K = {0, 1, . . ., 2 n } and Γw and Γw ′ are the input and output masks respectively . The LP score of constructed S-box is 0.1328. Fig. 9. Block diagram describing the suggested S-box construction.

Differential uniformity (DU)
The differential uniformity (DU) examines the capability of S-box to resist the differential cryptanalysis [50]. To compute DU, an input differential Δσ i is uniquely mapped to an output differential Δρ i , for all i. For a given S-box, its value can be calculated by using the following formula: It is necessary to design an S-box with smaller DU score to counter differential cryptanalysis attacks. The maximum DU score of our S-box is 10 (See Table 9), indicating its ability to counter differential attacks.

Discussion of performance results
Based on the comparative analysis conducted in this study, it was observed that the suggested technique for designing S-boxes resulted in better cryptographic features compared to many other recently designed S-boxes that utilized optimization, chaos and algebraic techniques. Table 10 presents a comparison of the different S-boxes, which clearly demonstrates the superiority of our proposed approach.
1. One of the important factors that contribute to the robustness of an S-box is its ability to resist linear attacks. This is typically measured by the Non-Linear (NL) score of the S-box. The NL value of an S-box is a measure of its degree of complexity and confusion-making ability, which are desirable properties for resisting linear cryptanalysis. As shown in Table 10, the suggested Sbox has an average NL of 107.75, which is higher than the average NL scores of the S-boxes designed in Refs. [41,42,[45][46][47]. This implies that our S-box has a higher degree of complexity and is more capable of creating confusion, thereby making it more resistant to linear cryptanalysis. 2. Strict avalanche criterion (SAC) is an important property of an S-box that measures its ability to resist cryptographic attacks. In the context of S-box design, achieving a SAC score as close to the optimal value (0.50) as possible is a primary objective. In Table 10, our S-box was found to have a SAC score of 0.4983, which is superior to the majority of recently constructed S-boxes based on optimization, chaos, and algebraic techniques, including [42,[44][45][46]. This score is also extremely close to the ideal SAC value of 0.50. The close proximity of our S-box's SAC score to the ideal value indicates that it satisfies the requirements of strict avalanche criterion well. This property is important for ensuring the security of cryptographic systems. By exhibiting a strong SAC score, the S-box is able to provide greater resistance against various cryptographic attacks, including differential and linear cryptanalysis. 3. The obtained readings of BIC-NL and BIC-SAC from the proposed S-box are highly encouraging, as they outperform a significant number of S-boxes presented in Table 10. This outcome suggests that the suggested S-box has better properties in terms of BIC-NL and BIC-SAC compared to a considerable number of S-boxes designed through different approaches. 4. A potent S-box has a smaller DU value. As seen in Table 10, the DU score of the suggested S-box is less than or equal to the DU scores of S-boxes developed in Refs. [41][42][43][45][46][47], thereby showing the acceptable robustness to differential cryptanalysis. 5. A smaller LP score makes an S-box more resistant to linear cryptanalysis. The LP score of our S-box is 0.1328, which is slightly higher than AES but lower than or equal to the LP values of many other recent S-boxes investigated in studies such as [41,42,[45][46][47].

Friedman test
The Friedman test is a non-parametric statistical test that is used to analyze differences between two or more related groups [51,52]. It is similar to the repeated measures ANOVA test, but it does not require the assumption of normality or equal variances. The results of applying the Friedman test to the data are as follows. For the mentioned data, the degree of freedom is 7, default alpha is 0.05, and critical chi-square is 14.067. The applied the Friedman test which gives a p-value of p = 0.002897862191825 is considerably lower than the alpha value of 0.05 and the obtained chi-square is 21.67 which pretty higher than critical score. Thereby, it rejects the null hypothesis of equal performance of all S-boxes. The comparison made in Table 10 clearly indicates the better cryptographic performance of the proposed S-box over the existing ones.

Limitations of the proposed scheme for S-box construction
The construction of S-boxes has been a subject of intense research due to its significance in modern cryptography. Previous graphical methods for constructing S-boxes relied on a single graph to generate the substitution table. However, the present approach utilizes a combination of two graphs, which enhances the strength and security of the generated S-boxes. Our evaluation of the performance of the S-boxes generated through this approach has yielded promising results for almost all metrics. The major limitation of the proposed scheme is that we cannot obtain a bijective S-box directly from the combination of a pair of graphs. Although a random sequence of 256 elements was obtained, it contains numerous duplicated entries and an equal number of missing entries. However, this flaw is addressed in our study by introducing a bijective function that maps the sequence to Z 256 . We ensure that the applied bijective function must retain the sequence pattern to the greatest degree possible, solving the issues of repetition and missing values at the same time. Although, this approach successfully resolves the issue of obtaining a bijective S-box, there are potentially other approaches that could also be used to address this limitation

Image encrption applications
In order to determine the suitability of an S-box for encryption, its statistical competence is typically evaluated using the widely recognized majority logic criterion (MLC) [53]. Various statistical and analytical methods have been proposed in the literature to assess the S-box's confusion generating capacity. Due to the image distortion caused by the encryption process, it is important to understand the effects of statistical characteristics. The MLC consists of several tests, including entropy, contrast, homogeneity, correlation, and energy. We demonstrate the applicability of a proposed substitution-box for multimedia security and image encryption by using it to encrypt digital images. The proposed substitution-box is evaluated using the MLC and found to exhibit satisfactory statistical competence, indicating its potential for use in encryption applications. In the present study, three standard 256 × 256 sized grayscale images, namely Pepper, Cameraman, and Baboon, sourced from the USC-SIPI image database [54], and were selected for image processing. The proposed encryption procedure consists of two rounds of substitution utilizing an S-box. In the first round, the substitution process is executed in the forward direction, i.e., from the first pixel to the last pixel of the image. Wherein the image pixels are substituted with the help of proposed S-box in random fashion using cipher-block-chaining mode of encryption operations. In second round, the obtained forwardly substituted image obtained is passed through another substitution process but in the backward direction, i.e., from the last pixel to the first pixel using randomly picking S-box elements for substitution in cipher-block chaining mode. All experimental and simulation activities were performed using the MATLAB. The pseudo-code of the encryption scheme using proposed S-box S is provided in Table 11. Fig. 10 (a − c) illustrates the original images and their encrypted versions obtained using the proposed S-box. The encrypted images exhibit a high degree of dissimilarity and indistinguishability compared to their respective plain-images. This is attributed to the absence of any discernible patterns that may reveal even the slightest information of the original image data. Consequently, the encrypted images display a considerable amount of visual distortion.

Entropy
Entropy analysis is a common approach used to quantify the level of randomness present in encrypted images. Mathematically, entropy can be expressed as where H is the entropy value, p(x j ) is the probability of occurrence of pixel intensity x j , and the summation is taken over all possible pixel intensities. The entropy value ranges from 0 to the maximum entropy value for the image, which is dependent on the number of intensity levels present in the image. A higher entropy value indicates a higher level of randomness in the image. Table 12 displays the entropy values of both the original and encrypted images. These findings indicate that in the image encryption process utilizing the suggested S-box, the degree of information leakage is negligible. This is substantiated by the considerably high entropy values exhibited by the encrypted images.

Contrast
During the process of image processing, adjustments are made to ensure optimal viewing conditions for contrast and brightness. Contrast refers to the disparity in brightness among objects. The non-linear substitution of the S-box in the encryption process results in a direct correlation between contrast and image randomness. A uniform plain-image will possess a contrast value of zero. In most cases, an image's contrast is measured through the following means: Here, p(j, k) denote the position of pixels in gray level co-occurrence matrices. The contrast values of three distinct sets of images are presented in Table 12. The encrypted images exhibit notably high contrast scores in comparison to the original images. This disparity indicates that the proposed encryption process has minimal information leakage.

Correlation
The correlation test is a commonly used technique to quantify the similarity between a plain image and its encrypted version. It involves comparing the pixel values of the original image with those of the encrypted image. The correlation coefficient is a measure of how closely the pixel values of neighboring pixels in the two images are related. A high correlation coefficient indicates that the two images are highly similar, while a low correlation coefficient indicates that the images differ significantly. A lower correlation value between the host and encrypted image implies that more distortion has been introduced by the encryption process.

Table 11
The Pseudo code of the algorithm.

Energy
In energy analysis, the calculation of the sum of squared gray level co-occurrence members is utilized. In the gray level cooccurrence matrix, pixels with high values occur in specific regions of a plain image, which results in a higher energy value. However, in an encrypted image, the energy values are more evenly distributed, leading to a smaller overall energy value compared to the original image. The energy analysis performed under maximum likelihood classification (MLC) is represented by a mathematical expression E = ∑ j,k p(j, k) 2 = Table 12 displays the energy values of three plain and encrypted images. The significantly smaller energy values obtained for encrypted images indicate a positive encryption effect in comparison to the plain-images.

Homogeneity
Homogeneity is a measure of the closeness of the distribution of elements in the diagonal of the gray level co-occurrence matrix and the gray level co-occurrence itself, and it is evaluated through a mathematical procedure. The range of homogeneity values is between 0 and 1, and its magnitude is primarily influenced by the elements present in the diagonal of the gray level co-occurrence matrix. A lower homogeneity value in encryption indicates a stronger encryption algorithm. The calculation of homogeneity in digital image content is determined using the following formula; The homogeneity scores computed for each of the three plain and encrypted images have been documented in Table 12. The results demonstrate that the homogeneity values for the encrypted image are notably lower than those of the original image, reaffirming the significant impact of the encryption process.

Conclusion
This paper presents a novel approach for developing reliable S-boxes. The approach is based on coset graphs for F 107 ∪ ∞ and F 149 ∪ ∞ along with a newly defined operation of row and column vectors R and C on a square matrix. An initial S-box is generated by defining a precise method for selecting the vertices from both graphs and setting them at specific positions within the S-box matrix. Then the operation of R and C on the initial S-box evolves our S-box. The constructed S-box is examined for cryptographic strength using some performance evaluation metrics. In comparison to various contemporary S-boxes present in the literature, the performance outcomes of the proposed S-box are found to be superior. The S-box is used to encrypt the digital images, and the outcomes of the majority logic criteria demonstrated good encryption quality in the encrypted content. Thus, the application of the proposed S-box in the field of image encryption suggests its suitability for ensuring data security during transmission over an insecure channel.
It is not always possible to construct a uniform distribution among characteristics of an S-box that can survive a broad variety of cryptanalysis assaults. This is the most difficult aspect of constructing an S-box. The majority of S-boxes documented in academic literature provide effective cryptographic security against certain assaults, but inadequate protection against others. The suggested Sbox is suitable for use in image encryption applications and has strong algebraic properties for resisting linear and differential assaults.
In terms of practical applications, the proposed S-box could be integrated into existing encryption protocols to enhance their security and ensure the confidentiality of sensitive data during transmission over insecure channels. The direction of future research in cryptography should focus on developing more robust and secure encryption techniques that can withstand advanced cryptanalysis attacks. The use of innovative approaches, such as the coset graphs and R and C operations proposed in this paper, could lead to the development of more effective encryption methods and contribute to the advancement of the field of cryptography. Furthermore, the use of this S-box in image encryption applications suggests that it could be used in other multimedia encryption scenarios, such as video or audio encryption.