Introduction

In today’s fast-paced digital world, multimedia security is crucial due to the increasing transmission of visual and audio data. Unlike text documents, multimedia files such as images and videos possess high redundancy and spatial correlations, making them vulnerable targets for cyber-attacks. To overcome these challenges, different cryptographic techniques specifically designed for the multimedia content have been investigated in a lot of detail, with a main aim of providing a high level of security while at the same time keeping the resource consumption of the algorithms as low as possible. In these, S-boxes or substitution boxes are unparalleled; they stand as the nonlinear part of most square like procedures in many encryption schemes. They offer protection from differential and linear attacks by adding confusion to the encrypted data and therefore offering a good protection against other attacks. Color image encryption especially in the SPN framework has been widely considered because it is efficient in creating security to the color images. In the case of SPN-based encryption, confusion is obtained during the substitution phase through the S-box while the next phase, permutation phase that actually reorders the image pixel values achieves diffusion. When extended to the three channels of the images, which are Red, Green and Blue, this would guarantee comprehensive security as it considers dependencies that exist between components of a given color channel. The application of the more complex mathematical models including graphs and fields in the formation of S-boxes improves the encryption cycle. These innovations allow for development of the strong cryptographic methods that can resist the attacks used in the contemporary cryptanalysis, hence providing adequate security and integrity of multimedia data as used in various applications.

The novelty of image encryption algorithms has been a central theme of interest to the research community because of the tremendous need for secure multimedia communication. The preliminary cryptography used in modern encryption systems were only complemental in the context of cryptography but failed to respond to the problem of image processing due to issues like high pixel correlation and high redundancy by Smart1. Dooley2, shows the background on the use of cryptography focusing more on having a special way of handling images. Among these, S-boxes have become a critical component of encryption techniques because they afford nonlinearity and serve to resist cryptanalytic assaults by Cheung3. Significant attention was given to the various designs, as well as the optimization of the S-boxes. Khudhair et al.4 described dynamical S-boxes using Tinkertbell and Duffing maps in a case of lightweight cryptography. Guoping and Yong5, proposed a method of constructing S-boxes using chaotic maps, whereas Fatih and Ahmet6, used the Lorenz system for constructing secure S-boxes which are nearly minimally vulnerable to differential attacks. The extended method by Chen et al.7 used improvement of S-box properties with three-dimensional chaotic Baker maps and took the research to the next level. Likewise, Khan et al.8 and Çavuşoğlu et al.9 notable uses of chaotic systems to generate strong S-boxes in present day cryptographic systems. The incorporation of S-boxes in image encryption techniques has received considerable attention. Liu and Wang10, developed a scheme using one-time keys and robust chaotic maps to achieve improved levels of security. Enayatifar et al.11, applied DNA sequences to genetic algorithm to improve chaos based encryption and Ibrahim and Alharbi12 introduced Henon maps with elliptic curve cryptography to improve encryption. Wang et al.13 applied DNA sequence operations for chaotic image encryption and stressed that these methods are very flexible for use. Liu and Wang14, has taken this domain to another level by adding spatial bit-level permutation with high-dimensional chaotic systems. The most recent studies have called for the diversification of the method which is used for encryption. Guo15, have proposed a heuristic method for S-box design Whereas, Cheng et al.16 and Zhou and Wang17, used hyper-chaotic system and closed-loop diffusion for encryption of color image. For instance, Wang and Gao18, utilized Boolean networks and matrix semi-tensor product theory to advance the use of mathematical concepts. Thus, the work by Wang et al.19 concentrated on parallel computing for fast ciphering, on the computational load of large-scale multimedia data.

Graph theory and Galois fields have not eluded encryption research as well. Both Naduvath20 and Bondy and Murty21 gave basic information on graph theory and Bini and Flamini22 described use of finite commutative rings in cryptographic technique. Nagpaul23 and Benvenuto24 discussed the ability to use Galois fields, most preferably the \(GF({2}^{8}),\) when designing components for cryptographic applications such as S-boxes. Sajjad et al.25 have employed Gaussian integers for the construction of nonlinear components for block cipher whereas their other works generalized this to quasilinear components based on quaternions and Eisenstein integers which asserted the robbery of abstraction features of higher algebraic structures. Literature review also boasts of important contributions towards image encryption under different frameworks. Malik and Shah26 proposed a 3D chaotic map based algorithm for multiple image encryption while Shamsi and Laiphrakpam27 worked on audio as an embeddable encrypted image medium. Shamsi et al.28 provided visually meaningful cipher data hiding methods and Abd EL-Latif et al.29 put forward a QW based PRNG for quantum image security. Wang et al.30 further supported the understanding of chaotic systems by pointing out that they should be used for increasing encryption capability. BY integrating algebraic and chaotic systems new developments made by Sajjad et al. Thus, all the essentials were incorporated into SPN-based RGB image encryption using Gaussian integers to attain high security31. For instance, Zhu et al.32, Li et al.33, and Yao et al.34 presented a number of papers on more chaos-based encryption schemes, suggesting that the current research in the area is active. The following works form a strong background and understanding of the planned study, which aims at combining graph theory, Galois fields and SPN frameworks to improve the image encryption. This bibliographic regression proves the constant and dynamic development and the complexity of the field by reviewing scholarly productions. It also show the weakness and the prospects that the proposed methodology will covers, to support the multimedia data transmission in a more secure and effective manner.

Recent advancements in image encryption have leveraged various algebraic and chaotic frameworks to enhance security and efficiency. The foundational work by Daemen and Rijmen35 on the design of Rijndael, which underpins the Advanced Encryption Standard (AES), has inspired numerous studies in nonlinear component design and secure data transformation. Building on such principles, Duong et al.36 proposed compact 8-bit S-boxes using multiplication over the Galois Field GF(24)\(,\) offering lightweight yet secure cryptographic primitives. Zhao et al.37 introduced a fast color image encryption method utilizing a novel chaotic structure and dynamic strong S-boxes to ensure high-level diffusion and confusion. Similarly, Özpolat et al.38 developed a secure image encryption scheme based on a hyperchaotic system-driven pseudorandom number generator (PRNG) and S-box design. Rani39 employed a novel ICMM model and modified differential encoding to create a robust image ciphering algorithm. In evaluating encryption performance, Wu et al.40 highlighted the importance of NPCR and UACI metrics for assessing randomness in encrypted images. Furthermore, Hu et al41 presented a dynamic chaos and matrix convolution-based color image encryption algorithm, achieving enhanced security through structural complexity and adaptive operations. These contributions form the foundation for the development of innovative encryption schemes based on algebraic and chaotic dynamics. Sajjad and Alqwaifly42 proposed an RGB image encryption scheme utilizing operations over residue classes of Eisenstein integers \(Z{\left[\omega \right]}_{\pi },\) offering enhanced security through algebraic structures. Several works by Razaq et al. introduced novel S-box constructions, such as the use of coset graphs and symmetric groups for strong cryptographic components43, fuzzy logic for robust medical image encryption in telemedicine44, and matrix operations combined with coset graphs for secure communication45. Further, algebraic methods over double \(GF({2}^{7})\) structures46 and group-theoretic approaches47 have been proposed to achieve high nonlinearity and resistance against cryptanalytic attacks, demonstrating the growing integration of advanced mathematical frameworks in modern cryptosystem design.

Due to the advancement of complex threats in the multimedia data, secure image encryption has now become an important research segment. Although, the application of classical cryptographic technique offers a basis for image encryption, recent experimentations portray their shortcomings in image encryption due to the structural and redundant nature of image data. Chaotic maps and dynamic S-boxes have been proposed as possible solutions to these problems, revealing high sensitivity to initial conditions as well as increased resistance to cryptanalysis13,14. Nevertheless, the major part of the approaches developed deals mainly with the usage of chaotic systems, which, although possessing numerous advantages, bring computational complexity and possible drawbacks if the parameters of chaos are not correctly adjusted17. This calls for other approaches that integrate the level of mathematical formalism together with the level of practical applicability for security and reliability of encryption. These challenges would be well complemented by the fundamentals of graph theory and arithmetic of the Galois field. The very structure of the adjacency matrix of a graph suggests that this approach is superior to previous attempts at constructing S-boxes with high nonlinearity and strong diffusion capabilities21. The \(GF\left({2}^{8}\right)\) widely used in cryptography because of its well-admired algebraic tactical structure and proficient in finite computation24. In incorporating these concepts, this work is meant to address the limitations of chaotic-based approaches and present a classifier method that is both computationally efficient and capable of fending off new threats. This work is based on earlier works revealing the virtues of the developed SPN frameworks and the improved S-boxes in improving the encryption performance6,31, thus opening up new possibilities of the proposed method in designing new records in secure image encryption.

This work presents a novel encryption framework based on graph theory, Galois fields and SPN for improving the security of color image encryption. One of the major contributions of this work is the establishment of 8 × 8 S-boxes from the adjacency matrix of a simple graph together with arithmetical finite field \(GF({2}^{8}).\) The designed S-boxes obtained high nonlinearity and low correlation rate; they also possess excellent resistance against differential attack and linear attack and therefore are good candidates for use in cryptographic systems. In contrast to previous methods that only dealt with the scrambling of bits through the use of chaotic systems, the novel method proposed here gives a deterministic and organized process for S-box design in view of the topology of graphs and finite fields. These S-boxes form the non-linear building block of the SPN architecture with provision for strong confusion and diffusion throughout. Another contribution is the usage of the developed s-boxes in a multi-stage encryption process suitable for RGB images. The encryption scheme employs three distinct S-box transformations: that are substitution, permutation and exclusive or operation. This multilevel approach improves the security of encrypted images by interfering with spatial connection with the pixels and bringing in high entropy. Meticulous experimental assessments show the effectiveness of the developed method to achieve both secure and efficient encrypting. By using entropy metrics, the encrypted images show high entropy levels and low pixel correlation, suggesting their immunity to statistical and differential attacks. Also, computational performance and ability to process images in digital formats further prove that the scheme is applicable in real-world applications.

Preliminaries

In this section you will learn about graph theory concepts, adjacency-matrix representation, and Galois field.

Graph with properties

A graph \(G=(V,E)\) is an ordered pair in \(V\) is a set of vertices or nodes; \(E\) is a set of edges; each of which connects two vertices and has no direction. Alternatively, an edge \(e\in E\) can be defined in advance for a pair of nodes such that there are two nodes for instance \(u\) and \(v\) where the two nodes are connected and the connection is two way. For example, a graph in Fig. 1 has vertices of value \(V=\{{v}_{1},{v}_{2},{v}_{3},{v}_{4}\}\) and the edges of value \(E=\{{e}_{1}, {e}_{2}, {e}_{3}, {e}_{4}, {e}_{5}, {e}_{6}, {e}_{7}\}.\) For an undirected graph the order denoted by \(|V|\) refers to the number of vertices in it. The degree of an undirected graph represented by \(|E|\) is the size of the edge as earlier defined. These are simplest parameters which define relative dimensions of the graph. For example, a graph network that has 4 nodes and 7 arcs will present an order of 4 and a size of 7 in Fig. 1 below. An undirected graph is simply described as finite in the case that there are a finite number of vertices adjoined to the graph or/and there are finite edges in it. It is, however, an infinite graph if one or both of the parameters such as number of vertices and edges are not restricted. It is the finite undirected graphs that which are frequently used and are used for solving numerous real-life problems, in which the listed elements are countable. There are a fewer practical applications of using infinitely non-oriented graphs, but they are utilizations for theoretical purpose say modelling of infinite nets and lattices. In undirected graph, the self-loop is an edge which set as \(\{v, v\}.\) While it is important to note that there are no nodal loops allowed in simple undirected graph a multigraph is allowed here. Self-loops have unique implications for degree calculations: Here, self-loop is present at some vertex, so each self-loop contribute towards the degree of its corresponding vertex because it is connected with that vertex twice. As it was mentioned, self-loops are not historically seen often in undirected real-world graph schemes, although it is not excluded that self-loops can be met in some theoretical models of graphs, as well as in particular applied problems. For instance the two vertices which are mentioned here as \({v}_{2}\) and \({v}_{4}\) in Fig. 1 have the self-loop as indicated above. A parallel edge is a feature of undirected graph in which two or more than two edges connect a vertex to a given other vertex. Although allowed in multigraphs, these are not allowed in simple graphs. Hence the implementation of parallel edges to denote scenarios whereby a given pair of nodes are linked in number of relations such as connectivity by transport systems between two cities in which the two cities can be interlinked through various ways. For example, when looking at Fig. 1 some of the edges are \({e}_{4}\) and \({e}_{5}\) of which are parallel edges. The degree sequence is the same for both the graphs as with undirected graph the degree of the vertex is the edge also called as the incidence. For instance if a vertex \(v\) has three outbound links connected with it the degree of the vertex is equal to three, \([\) degree \((v)=3].\) The degree sequence of a graph is an ordered list of the vertices of a given graph in a non-increasing order of their degrees. For instance, connectivity list of the mentioned graph is2,3,3,4; There are four main goals of degree sequences in analyzing global architecture of undirected graphs, identification of isomorphic graphs, and assessment of graph reliability20,21.

Fig. 1
Fig. 1
Full size image

Undirected graph.

Theorem 2.120

The odd degree vertices in a graph is even.

Subgraphs and Spanning Subgraphs: A subgraph \(H\) of undirected graph \(G\) is a graph in which every vertices and edges of \(H\) must contains in every vertices and edges of \(G.\) To increase the tractability, specific aspects of a graph are studied by a class of graphs known as subgraphs. A spanning subgraph is one which has all the vertices of graph isomorphic with the graph but containing null edges also20. In Fig. 2, the second is a spanning subgraph of the first and the third is a subgraph of the first.

Fig. 2
Fig. 2
Full size image

Subgraphs with spanning subgraphs.

Simple and Multi Graphs: An element of a simple undirected graph is a pair of vertices in which no two vertices produce more than an edge, no vertex produces an edge with itself and no two edges are equivalent. These are basic graphs in graph theory because they are often utilized and studied frequently for analysis and the solution is known because of the simplicity of the problems20. Therefore, the graphs in question can only be simple graphs as shown in the Fig. 3 below.

Fig. 3
Fig. 3
Full size image

Simple graphs with 4, 5 and 6 vertices.

Adjacency matrix of a simple graph20

In other words, this subject matter is associated with the representations of simple graphs in terms of an array of real numbers known as the adjacency matrix. In more detail, for a graph \(G\) with vertices \({v}_{1}, {v}_{2}, \dots , {v}_{n}\) an adjacency matrix \(A\) is an \(n\times n\) matrix where entry \({a}_{ij}\) is set 1 for the vertices \({v}_{i}\) and \({v}_{j}\) are adjacent, else set 0. This is because the graph is simple, it is undirected and has no loops or multiple edges the function \({a}_{ij}={a}_{ji}\) and all diagonal elements are equal to zero. This matrix effectively captures the geometry of the graph, making it an important and categorical weapon in graph analysis and computation in the analytic and computational paradigms.

$$\left(\begin{array}{ccc}0& 1& \begin{array}{cc}1& 1\end{array}\\ 1& 0& \begin{array}{cc}1& 0\end{array}\\ \begin{array}{c}1\\ 1\end{array}& \begin{array}{c}1\\ 0\end{array}& \begin{array}{c}\begin{array}{cc}0& 1\end{array}\\ \begin{array}{cc}1& 0\end{array}\end{array}\end{array}\right), \left(\begin{array}{ccc}0& 1& \begin{array}{ccc}1& 1& 1\end{array}\\ 1& 0& \begin{array}{ccc}0& 0& 0\end{array}\\ \begin{array}{c}1\\ 1\\ 1\end{array}& \begin{array}{c}0\\ 0\\ 0\end{array}& \begin{array}{ccc}\begin{array}{c}0\\ 1\\ 1\end{array}& \begin{array}{c}1\\ 0\\ 1\end{array}& \begin{array}{c}1\\ 1\\ 0\end{array}\end{array}\end{array}\right), \left(\begin{array}{ccc}0& 1& \begin{array}{ccc}1& 0& \begin{array}{cc}1& 1\end{array}\end{array}\\ 1& 0& \begin{array}{ccc}1& 1& \begin{array}{cc}1& 1\end{array}\end{array}\\ \begin{array}{c}1\\ 0\\ \begin{array}{c}1\\ 1\end{array}\end{array}& \begin{array}{c}1\\ 1\\ \begin{array}{c}1\\ 1\end{array}\end{array}& \begin{array}{ccc}\begin{array}{c}0\\ 1\\ \begin{array}{c}1\\ 0\end{array}\end{array}& \begin{array}{c}1\\ 0\\ \begin{array}{c}1\\ 1\end{array}\end{array}& \begin{array}{c}\begin{array}{cc}1& 0\end{array}\\ \begin{array}{cc}1& 1\end{array}\\ \begin{array}{c}\begin{array}{cc}0& 1\end{array}\\ \begin{array}{cc}1& 0\end{array}\end{array}\end{array}\end{array}\end{array}\right).$$

Galois field22,23,24

The \(GF({p}^{m})\) represent a certain Galois field consisting of \({p}^{m}\) elements; where \("p"\) a prime number or characteristic of the field, \(m\) is a positive integer defining the extension degree of the field. If \(m=1,\) then \(GF({p}^{1})\equiv {\mathbb{Z}}_{p}\) is the field of integers modulo \(p.\) Here, addition and multiplication are modulated on the ‘p’. If \(m>1,\) then \(GF({p}^{m})\) is the extension field of \(GF(p).\) The elements of \(GF({p}^{m})\) are represented as polynomials over \(GF(p)\) with degree less than \(m\) as; \(b(x)={b}_{0}+{b}_{1}x+{b}_{2}{x}^{2}+\dots +{b}_{m-1}{x}^{m-1},\) where \({b}_{i}\in GF(p).\) The \(m\) degree irreducible polynomial \(g(x)\) over \(GF(p)\) is selected. The authors wants to point out, that this polynomial cannot be represented as a product of two polynomials with lesser degree in \(GF(p).\) The field is formed by the set of equivalence classes of polynomials modulo \(g(x).\) Specifically;

$$GF\left({p}^{m}\right)=\frac{GF\left(p\right)\left[x\right]}{\left(g\left(x\right)\right)}=\left\{{b}_{0}+{b}_{1}x+{b}_{2}{x}^{2}+\dots +{b}_{m-1}{x}^{m-1}: \forall {b}_{i}{\prime}s\in GF\left(p\right)\right\}.$$

Here, \(GF(p)[x]\) represents the ring of polynomials over \(GF(p).\) When one polynomial is multiplied by the other, it is done with the condition that the outcome is still a polynomial of degree no more than \(m-1,\) or less than that, all carried out modulo \(g(x).\) Sub-group \(GF\left({p}^{m}\right)\) is called multiplicative group of \(GF({p}^{m})\) denoted by \(GF{\left({p}^{m}\right)}^{*}=GF({p}^{m})\setminus \{0\}\) is cyclic for finite field, that is, there exist an element such that \({\beta }^{i}\) for \(i=0, 1,\dots , {p}^{m}-2.\)

Nonlinear component of \({\varvec{n}}\times {\varvec{n}}\) block cipher over the simple graph based adjacency matrix and galois field

The proposed nonlinear components in block cipher and color image over simple graph with GF operations is an extension of the previous researches which are done in the domain of cryptography and image encryption. Prior art has investigated different algebraic structures and chaotic systems to improve the stability and security of encryption methods. Some of these are chaotic maps (CM) that utilize the natural chaotic behavior to amplify the pixel values; Coset graphs (CG), Gaussian integers (GI) and Eisenstein integers (EI) for better manipulation functions to diffuse and confound; Quaternion integers (QI) for their hyper complex structure and non-commutative nature to inject non-linearity in encryption; finally elliptic curve (EC) cryptography proven to be complex and secure. Prior approaches to this problem concern methods of how to build strong encryption with the use of such techniques as complexity, randomness, and diffusion that will be incorporated into the process of encryption. Yet, combining the algebraic structures with graph transformations where graph predicates are performed over the Field of prime order \({p}^{n},\) adds new perspective at the encryption of color images. This combination gives not only improved security qualities, but better processing and implementation capacity, making this approach a promising area for protecting multimedia data. The pixel graph structure is considerably simple; however, the algebraic operations over the finite field \(GF({p}^{n})\) provide the model that this proposed work seeks to enhance and optimize the cryptographic security of image encryption while achieving balance on the factors of complexity, randomness, and computation. Some Attention to the redesigning of \(n\times n\) nonlinear component of block cipher over the simple graph and Galois field (SG & GF).

  1. 1.

    Plot a simple graph \(G\) with \(n\) vertices \(V=\left\{{v}_{1}, {v}_{2},\dots ,{v}_{n}\right\}.\) Link all the vertex with the other vertex end up having \(\left|E\right|\) edges.

  2. 2.

    Set up an \(n\times n\) adjacency matrix which represents a simple graph—the matrix \(A.\)

  3. 3.

    Select an irreducible polynomial \(f(x)\) over \(GF(p)\) of degree less then \(n.\) If you will remember, \(GF(p)\) is a field comprising of \(0, 1,\dots , p-1\) elements, compare this to the field defined in this section as all polynomials of degree less than \(n\) with coefficients in \(GF(p).\) Similarly, find the inverse of each element correspondingly.

Apply Euclidean transformation \(f({x}_{i})=(A{\left({x}_{i}^{-1}\right)}^{T}+{b}^{T}) (\) mod \({p}^{n})\), where \(A\) is the adjacency matrix of the simple graph \(G,\) \(b\) is an \(n-\) bit vector of \(GF({p}^{n})\) and \({x}_{i}\) is the element of \(GF({p}^{n})\) then if \({x}_{i}\) is a null vector \(\left(O\right),\) then we assign \(f(O)= b.\) The chosen parameters ensure maximal nonlinearity, resistance to linear attacks, and maintain bijective behavior over GF(28)\(.\) Their range was carefully selected to balance cryptographic strength and computational efficiency, with particular attention to preserving invertibility and avoiding fixed points or linear structures. These additions clarify the design decisions and reinforce the security of the proposed S-box construction.

  1. 4.

    The above affine mapping \(f({x}_{i})\) with different value of \(A\) and \(b\) used to construct different type of S-boxes. The spectral properties, including the nonlinearity and the maximum distance from affine functions, are crucial for ensuring that the S-box provides strong confusion and diffusion. A good S-box should ideally have a flat spectrum, with no low-order Fourier coefficients, to avoid correlations that could be exploited by attackers. Authors have now included a discussion of these aspects, along with how our S-boxes exhibit favorable spectral characteristics, further enhancing the overall security of the encryption scheme.

  2. 5.

    The pseudocode for Algorithm 1, which outlines the construction of the nonlinear component of the block cipher based on a simple graph and Galois field operations, is presented below:

Pseudo Code Algorithm 1
Pseudo Code Algorithm 1
Full size image

Nonlinear component based on simple graph and galois field GF(pⁿ)

Redesigning and analysis of \(8\times 8\) nonlinear component of block cipher over the simple graph based adjacency matrix and galois field

Our main attention to the redesigning of 8 × 8 nonlinear component of block cipher over the simple graph and Galois field (SG & GF). Let a simple graph \(G\) with eight vertices \(\left\{{v}_{1}, {v}_{2},\dots ,{v}_{8}\right\}\) and edges \(\left|E\right|\) given in Fig. 4. Set up an \(8\times 8\) adjacency matrix \(A\) of a simple graph \(G.\)

Fig. 4
Fig. 4
Full size image

Simple graph \({\varvec{G}}\) of eight vertices.

$$A=\left(\begin{array}{ccc}0& 1& \begin{array}{ccc}0& 1& \begin{array}{ccc}1& 1& \begin{array}{cc}0& 1\end{array}\end{array}\end{array}\\ 1& 0& \begin{array}{ccc}1& 0& \begin{array}{ccc}1& 0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\\ \begin{array}{c}0\\ 1\\ \begin{array}{c}1\\ 1\\ \begin{array}{c}0\\ 1\end{array}\end{array}\end{array}& \begin{array}{c}1\\ 0\\ \begin{array}{c}1\\ 0\\ \begin{array}{c}0\\ 0\end{array}\end{array}\end{array}& \begin{array}{ccc}\begin{array}{c}0\\ 1\\ \begin{array}{c}1\\ 0\\ \begin{array}{c}1\\ 1\end{array}\end{array}\end{array}& \begin{array}{c}1\\ 0\\ \begin{array}{c}0\\ 0\\ \begin{array}{c}0\\ 0\end{array}\end{array}\end{array}& \begin{array}{c}\begin{array}{ccc}1& 0& \begin{array}{cc}1& 1\end{array}\end{array}\\ \begin{array}{ccc}0& 0& \begin{array}{cc}0& 0\end{array}\end{array}\\ \begin{array}{c}\begin{array}{ccc}0& 1& \begin{array}{cc}1& 1\end{array}\end{array}\\ \begin{array}{ccc}1& 0& \begin{array}{cc}1& 0\end{array}\end{array}\\ \begin{array}{c}\begin{array}{ccc}1& 1& \begin{array}{cc}0& 1\end{array}\end{array}\\ \begin{array}{ccc}1& 0& \begin{array}{cc}1& 0\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\right).$$

Using the transformation of step 4 of the construction of \(8\times 8\) nonlineacomponent of block cipher over the simple graph and Galois field \(GF({2}^{8}),\)

$$f\left( {x_{i} } \right) = \left( {\left( {\begin{array}{*{20}c} 0 & 1 & {\begin{array}{*{20}c} 0 & 1 & {\begin{array}{*{20}c} 1 & 1 & {\begin{array}{*{20}c} 0 & 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ 1 & 0 & {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 0 & 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 1 \\ 1 \\ {\begin{array}{*{20}c} 0 \\ 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 1 \\ 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 1 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 0 & 0 & {\begin{array}{*{20}c} 0 & 0 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} {\begin{array}{*{20}c} 0 & 1 & {\begin{array}{*{20}c} 1 & 1 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 0 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} {\begin{array}{*{20}c} 1 & 1 & {\begin{array}{*{20}c} 0 & 1 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \right)\left( {x_{i}^{ - 1} } \right)^{T} + \left( {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 1 \\ 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \right)} \right)\;(\bmod 2^{8} )\;,$$
(1)

where \({x}_{i}^{-1}\) is the inverse entries of the \(GF\left({2}^{8}\right).\) The elements of Galois field \(GF\left({2}^{8}\right)\) with primitive irreducible polynomial \(f\left(x\right)=1+{x}^{2}+{x}^{4}+{x}^{5}+{x}^{6}+{x}^{7}+{x}^{8}\) with inverses are given in Tables 1 and 2.

Table 1 Elements of \(GF({2}^{8})\).
Table 2 Inverse Elements of \({\varvec{G}}{\varvec{F}}({2}^{8})\).

Using the transformation of Eq. (1) with the help of Tables 1 and 2, get \(8\times 8\) nonlinear component of block cipher \(A\) over the simple graph \(G\) of 8 vertices and \(GF\left({2}^{8}\right),\) which is given in Table 3.

Table 3 Nonlinear component of block cipher A over the simple graph and \(GF({2}^{8})\).

Similarly, using the transformation of step 4 of the construction of 8 × 8 nonlinear component of block cipher over the simple graph and Galois field \(GF({2}^{8}),\)

$$f\left( {x_{i} } \right) = \left( {\left( {\begin{array}{*{20}c} 0 & 1 & {\begin{array}{*{20}c} 0 & 1 & {\begin{array}{*{20}c} 1 & 1 & {\begin{array}{*{20}c} 0 & 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ 1 & 0 & {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 0 & 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 1 \\ 1 \\ {\begin{array}{*{20}c} 0 \\ 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 1 \\ 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 1 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 0 & 0 & {\begin{array}{*{20}c} 0 & 0 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} {\begin{array}{*{20}c} 0 & 1 & {\begin{array}{*{20}c} 1 & 1 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 0 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} {\begin{array}{*{20}c} 1 & 1 & {\begin{array}{*{20}c} 0 & 1 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} 1 & 0 & {\begin{array}{*{20}c} 1 & 0 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \right)\left( {x_{i}^{ - 1} } \right)^{T} + \left( {\begin{array}{*{20}c} 1 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 0 \\ {\begin{array}{*{20}c} 0 \\ 1 \\ {\begin{array}{*{20}c} 1 \\ 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } \\ \end{array} } \right)} \right)\;(\bmod \;2^{8} )$$
(2)

where \({x}_{i}^{-1}\) is the inverse entries of the \(GF\left({2}^{8}\right).\) Using the transformation of Eq. (2) with the help of Tables 1 and 2, get \(8\times 8\) nonlinear component of block cipher B over the simple graph \(G\) of 8 vertices and \(GF\left({2}^{8}\right),\) which is given in Table 4.

Table 4 Nonlinear Component of Block Cipher B over the Simple Graph and \({\varvec{G}}{\varvec{F}}({2}^{8})\).

Justification for Selecting \(GF({2}^{8})\): The choice of the Galois Field \(GF({2}^{8})\) is both mathematically and practically motivated. From a practical standpoint, \(GF({2}^{8})\) aligns directly with the structure of 8-bit color channels commonly used in digital images. Each pixel component (Red, Green, Blue) in standard RGB images is represented using 8 bits, allowing values from 0 to 255. Therefore, using \(GF({2}^{8})\) facilitates direct and efficient operations on image data without requiring additional conversions or padding. Furthermore, \(GF({2}^{8})\) is extensively adopted in modern cryptographic protocols and standards. Notably, the Advanced Encryption Standard (AES) operates over \(GF({2}^{8})\), specifically using the irreducible polynomial \(1+{x}^{2}+{x}^{4}+{x}^{5}+{x}^{6}+{x}^{7}+{x}^{8}.\) This prevalence ensures that \(GF({2}^{8})\)-based components are highly compatible with existing security infrastructures, hardware acceleration capabilities, and implementation libraries. In our proposed SPN structure and nonlinear components, using \(GF({2}^{8})\) ensures efficient integration with both image processing pipelines and cryptographic primitives. It simplifies the substitution and permutation operations while maintaining strong algebraic properties essential for confusion and diffusion in block ciphers.

Nonlinearity (NL)

A significant part of dynamically reconfigurable blocks, for example the substitution box (S-box), includes the nonlinearity of a block cipher to enable efficient protection against linear or differential attacks. Specifically, using the method above with simple 8-vertex graph theory and \(GF\left({2}^{8}\right),\) the combination of the graph theory and finite field algebra can give some interesting results for designing and evaluating S-boxes. The nodes in the graph can be the members of \(GF({2}^{8})\) and the arcs can denote certain algebraic or cryptographically correspondences either the differences of the field’s members or the connectivity that arises from the bijective nature of the S-box. Nonlinearity in turn is defined as the minimum Hamming distance of all Boolean functions that are implemented in the S-box to all linear or affine functions. This measure defines the ability of the cipher to withstand attack based on linear distinguisher. From this, it can be seen that the nonlinear graph is present by the structure of vertices and edges over the graph; and the S-box mapping ensures a deterministic nature of no patterns can be established. The change should also have to increase the density and interconnectivity of the graph so that each input–output pair must be as autonomous as possible. This results in the construction of S-boxes with the maximum cryptographic features including high nonlinearity as well as avalanche effect. In the context of \(GF\left({2}^{8}\right),\) the elements are 8-bit vectors S-box can be studied by deriving Boolean functions associated with the outputs of S-box. This paper further shows how the graph-based representation helps in understanding how these functions relate to the cipher. The transformations of the S-box can be represented through the adjacency matrix of the graph and the analysis of its spectrum provides insights into the diffusion and confusion achieved with the S-box. For high nonlinearity, design should utilize all the possible algebraic operations in \(GF({2}^{8})\) using irreducible polynomial and modular arithmetic to produce a bijective mapping. This allows the mapping so as to manage to maximize the minimum Hamming distance from affine functions. The impact of the topology of the graph and the finite field operations can be jointly fine-tuned so as to maximize the resistance of the structure to differential cryptanalysis by minimizing the maximum differential uniformity. Therefore, nonlinearity of an S-box over a graph with 8 vertices in \(GF({2}^{8})\) demonstrates how both graph-theoretical and algebraic designs are intricately combined to establish a highly efficient nonlinear component for block cipher security. The nonlinearity of the proposed work and literature is given in Tables 5 and 6.

Table 5 Nonlinearity of the proposed nonlinear component of block ciphers functions.
Table 6 Nonlinearity comparison of the nonlinear component of block ciphers.

Bit independent criteria (BIC)

The Bit Independent Criteria BIC is an important requirement for assessing the cryptographic properties of the nonlinear part of a block cipher such as the S-box. To achieve this the BIC analyzes and guarantees that the output bits of the S-box does not have controlled relation and have a statistical independent look despite when particular input bits are stimulated. In the case of the BIC over a simple graph with 8 vertices representing the elements of GF(28), structural relationships of the graph can be used to explain interpret the results. Any vertex of graph is connected with an element of the finite field, in other words, each node is related to one element of the finite field, and edges can represent the S-box mappings or transitions. To meet the mentioned BIC, an S-box should be designed in a way that for any one input string, each output bit depends on different input bits and changes if the corresponding input bit is changed. This ensures that there is no relation whatsoever between the bit positions of the input and output, an important criteria in fending of Vigenere, differential and linear cryptanalysis attacks. In view of BIC in the \(GF({2}^{8})\) context, it is desirable to construct an S-box for which the adjacency matrix of the generated graph looks least biased and as random as possible. In other words, if any two out of N bits are the corresponding output bits, then the change in outputs should be statistically independent of the input changes irrespective of whether the changes were complementary or otherwise. This property is useful when developing a cipher that has to have high degree of diffusion whenever any small change in the input affects all the output bits randomly. From a graph-theoretical point of view, this is equivalent to having a topology where no two vertices exhibit strongly connected or weakly connected features with such degrees of distinction, but instead each vertex has a topology connection with any other independent of the others. To map a q-input bit to a 4-output bit cryptographers utilize algebraic structure of \(GF({2}^{8})\), which makes an S-box satisfy the BIC and withstand complex attacks. Tables 7, 8 and 9 below, shows the results using BIC on the text corpus and the comparison with the related literature.

Table 7 BIC of nonlinear component of block cipher A.
Table 8 BIC of nonlinear component of block cipher B.
Table 9 BIC comparison of nonlinear component of block ciphers.

Strict avalanche criterion (SAC)

The SAC is an essential parameter of evaluation of cryptographic security of nonlinear elements, the S-box in block ciphers. SAC makes certain that, if an individual input bit of the S-box undergoes change, half of the output bits will also change, ensuring unpredictability and strong diffusion. If it is analyzed over a simple graph with 8 vertices that are elements of the \(GF\left({2}^{8}\right),\) the remaining part of the described scheme can manifest itself through the construction of the graph. The connections (edges) from and to these vertices are representative of the input to output element mapping performed by the S-box. For SAC to be satisfied, such mappings have to be uniformly distributed or, in other words, the perturbation of even a single input ought to ripple through the output space erratically. Adjacency patterns must be evaluated to get a clear understanding on the structural analysis of such a graph and it must achieve high connectivity and randomness to be in conformity with the SAC criterion. In algebraic GM, an S-box is a bijective function from the 8-bit vectors and for satisfying SAC property, this mapping is constructed using the irreducible polynomial and modulo arithmetic. SAC compliance can be visually depicted to mean that one cannot come with input output map that would make it possible for the attackers to influence an output by controlling an input and at the same influences an input in the process. Ideally the adjacency matrix of the graph should not bear any features of a foreseen or predictable inherent bias or function of the influence of any particular input bit over all the output bits. SAC can be mathematically proved via examination of node connectivity of the super graph, and quantitatively examining the effect of alteration of the input bits on the patterns on the output. This criterion guarantees that the cipher reaches high diffusion, which is the pre-requisite for countering Differential Cryptanalysis and guaranteeing that encrypted information will be impossible to predict. In Tables 10, 11, and 12, the authors have compared the findings of the current study with those obtained earlier by other researchers by using SAC.

Table 10 SAC of nonlinear component of block cipher A.
Table 11 SAC of nonlinear component of block cipher B.
Table 12 SAC comparison of nonlinear component of block ciphers.

Linear approximation probability (LAP)

The LAP is an essential measurement process that is applied to assess the protection specificity of other elements in the block cipher especially the S-box against the linear attack techniques. It quantifies the largest likelihood of representing an independent binary combination of inputs to an independent binary combination of outputs via the S-box. So a lower LAP is desirable, since it means the data has better cryptographic security—fewer linear dependencies that can be exploited. Upon making analysis with a simple graph model having 8 vertices each corresponds to \(GF({2}^{8})\) elements, LAP can be clearly seen as a measure of the uniformity and/or unpredictability of the mappings between the vertices. The sphere of vertices corresponds to an element of \(GF\left({2}^{8}\right),\) and edges refer to the transformations provoked by the S-box. As a result, the arrangement of mappings found within the context of the graph must not incorporate patterns of bias within linear approximations so as to yield high diffusion and confusion. The nonlinearity of Boolean functions determines the ability of the \(GF({2}^{8})\) LAP to form the algebraic structure of the S-box. Specifically in case of the graph depicting 8 vertices, one is able to analyze the associated adjacency matrix in order to eliminate the case of linear regression between inputs and output. Thus using spectral properties of matrix assist to understand the uniformity of transformation and its importance for obtaining low LAP. It was earlier demonstrated that through the proper design of the S-box, with the best compromise being maximal nonlinearity and balanced bit mappings, the LAP can be minimized preferentially. This makes the S-box a strong nonlinear component that is important in the protection of block ciphers from linear attacks. Table 13 below shows the proposed work LAP with comparison to the existing literature.

Table 13 LAP comparison of nonlinear component of block ciphers.

Differential approximation probability

In order to assess the resistance of block cipher’s nonlinear part including the S-box against differential cryptanalysis, the Differential Approximation Probability (DAP) is used. Through S-box it is calculated the greatest likelihood of achieving a specific output difference (ΔY given ΔX). The lower the DAP, the better, for cryptographic strength, because S-box mappings do not have perceptible patterns that may be recognized by attackers. Above a simple graph with 8 vertices signifying elements of Galois field \(GF\left({2}^{8}\right),\) the DAP is equivalent to the uniform distribution of differences in vertex mapping. The vertex implies a finite field element and edge fully corresponds to the transformations performed by S-box. For having a low DAP the mappings should ensure that the consistent patterns of input-off difference are avoided while having a strong diffusion and immunity to differential attacks. In the algebraic structure of Galois field \(GF\left({2}^{8}\right),\) the goal of low DAP is achieved in the context of S-box design where all the input differences responses unpredictably in output differences. As a matrix, this can be understood graphically as the degree of randomness and balance in the connections between habitats as represented by the vertices of the graph. In a way, no patterns should dominate the matrix that would directly link input and output differences. —Most cryptographers employ approaches that analyze the difference distribution table (DDT) of S-box in order to eliminate high-probability difference pairs. By combining graph theoretical and algebraic approaches, the DAP of the S-box can be improved to strengthen it as a proper nonlinear fundamental component in secure block cipher structures. Proposed results are compared with the findings of earlier studies in the following Tables 14, 15 and 16.

Table 14 DAP of nonlinear component of block cipher A.
Table 15 DAP of nonlinear component of block cipher B.
Table 16 DAP comparison of nonlinear component of block ciphers.

LBN, DBN, fixed point and linear structure

Linear Branch Number (LBN): A Linear Branch Number (LBN) of an S-box is defined as a property of its diffusion capability to quantify the way how input differences propagate through the substitution layer in linear transformations. Through examining the minimum weight sum of an input output pair, this is determined by ensuring that small changes on the input produce large changes on the output. The better diffusion is the higher LBN and this is a desirable property for the crypto graphical strength51.

Differential Branch Number (DBN): Differential Branch Number (DBN) is a measure of an S-box’s resistance to differential cryptanalysis by quantifying the impact of input differences to output differences. It measures the effectiveness with which the S-box spreads the input fluctuations among several output bits to minimize the occurrence of patterns that can be used by attackers. Security is enhanced through the presence of an S-box with a high DBN, which means differential propagation is unpredictable and dispersed51.

Fixed Points: It is the case when an input value remains unchanged after substitution \(S(x)=x\) for some \(x.\) If those points introduce exploitable patterns, they can cause vulnerabilities in cryptographic designs. It is essential to understand the structural behavior of an S-box by studying fixed points across an adjacency matrix of a simple graph or a Galois field, in order to guarantee the unpredictability of an S-box against attacks51.

Linear Structure: The linear structure of the s-box describes in how prescient certain affine transformations of input differences can be used to compute the output differences. This structure aids in evaluating nonlinearity and robustness when studied over adjacency matrices of simple graphs, and Galois fields. Good S-boxes should possess no linear structures, therefore, these are resistant to attacks such as linear approximations of its behavior51. Comparison of LBN, DBN, FP, LS are given in Table 17.

Table 17 Comparison of LBN, DBN, FP and LS.

Static behavior of the S-boxes

It is important to note that for a fixed encryption key, the generated S-box remains static. This is because the structure of the S-box is entirely determined by the adjacency matrix AA of the simple graph and the key-dependent vector bb used in the affine transformation \(f({x}_{i})=(A{\left({x}_{i}^{-1}\right)}^{T}+{b}^{T})(mod\hspace{0.17em}{p}^{n}).\) Once \(A\) and \(b\) are defined by the chosen key, the resulting nonlinear mapping is fixed, ensuring that both encryption and decryption use the same bijective transformation. This static property guarantees consistency between communicating parties while maintaining high nonlinearity, resistance to linear and differential attacks, and cryptographic robustness. When a different key is selected, \(a\) completely new S-box is generated, thus preserving key sensitivity and overall system security.

Graph-theory and galois-field-based color image encryption: security and performance evaluation

The combination of RGB image encryption with the substitution permutation SP network of a \(8\) nodes graph and \(GF({2}^{8})\) advances the features of secure image processing. The feature of the SP network—the layered nonlinear substitution and linear permutation—further increases confusion and diffusion at work in the encryption process. Graph structure is then used where pixel values are directly represented as vertices to allow for scrambling based on graph traverse or relatedness. The substitution layer over \(GF({2}^{8})\) makes it secure for cryptographic application because of the rich algebraic structure of \(GF\left({2}^{8}\right),\) it resists cryptanalysis. This approach is most relevant to the medical imaging, military surveillance and confidential documents area where image authenticity and security are paramount. This method is beneficial as well because it is efficient and can be implemented on resource-limited systems, including low-power IoT devices, autonomous vehicles, as well as smart grids. This means that, the SP network’s flexibility in terms of the encryption parameters makes it easy to cope with different levels of security needed along the images’ resolution. Besides, its compatibility with current enhancements like GPU and FPGAs makes it capable of real-time data processing of faster and highly secure video streaming services and multimedia delivery. This encryption approach, using SP network and graph theory at the same time, not only is secure and efficient but also flexible, so it is a potential solution to the next generation of secure communication requirement. The algorithm steps are as;

Step 1: Splitting the Image into Color Channels

In every RGB image there are three independent color channels which make up Red (R), Green (G) and Blue (B). These represent each picture in the image with 3 intensity value associated with the channel. In order to start encrypting, factor the input image into three separate matrices, which contain the values of the intensity of the three channels of the original image. Only red intensities values will be stored in the Red channel matrix, green intensities stored in the Green channel matrix and blue intensities stored in the Blue channel matrix. This separation is necessary as it will allow each channel to be processed independently for the encryption steps that follow in which the cryptographic transformations will take place independently on the different color components.

Step 2: Substitution of Pixel with S₁

The image is split into its own color channels, an operation of substitution is performed using a predefined substitution box, or S-box with notation S₁. The aim of this step is to bring in non-linearity and some degree of confusion in the encryption scheme. For each pixel value in Red channel, Green channel, and Blue channel, they are replaced with the equivalent value provided by S₁. This will reoccur independently within each channel, and thus the channels do not interact at this stage. This way the pixel values encrypted with them will be independent and unpredictable and difficult to trace down to their original form.

Step 3: Pixel Swapping Between Corresponding Channels with S₂

After the substitution step, the next step is to perform pixel permutation in order to boost diffusion. All this is done using a permutation key S2, which tells how to swap between pixels. This step is different from the simple intra channel shuffling in that the pixels are swapped in their positions intervening between the Red, Green, and Blue channels (with inter channel dependencies). This step, of course, is to scatter the pixels on the image and make it blind to statistical attacks. This transformation then redistributes pixel values across the channels ensuring that it’s impossible for an attacker to easily reconstruct the original image structure.

Step 4: XOR Operation Using S₃

After performing the permutation process, another cryptographic transformation is used based on bitwise XOR ( ) operation against a key called S₃. However, S₃ = S₁  S₂ is derived to be this key such that the final transformation exhibits the combined substitution and permutation effects. Further randomness and the encryption are enhanced by applying the XOR operation to each pixel in the permuted image. The purpose of this operation is to make the pixel values very unpredictable and resistant to differential attacks. This step results in final transformed pixel values of this channel that will be used to reconstruct encrypted image.

Step 5: Reconstructing the Encrypted RGB Image

Finally, the fully encrypted image is reconstituted out of the processed Red, Green and Blue channels. Due to the fact that each channel went through many cryptographic transformations such as substitution, permutation, and XOR operations and finally become completely obfuscated, and lacked any recognizable, the image is an unrecognizable, much randomized visual representation of the original image. Superior security in this encryption scheme is achieved by the use of confusion (substitution) and diffusion (permutation, inter-channel mixing and so forth), rendering it immune to the known cryptanalysis techniques. The security of the final output is a securely encrypted RGB image ready to be sent or stored with significantly enhanced protection of access to the image by unauthorized persons.

Practical applicability in real-time scenarios: The proposed encryption scheme is practically applicable in real-time scenarios such as secure video streaming, surveillance, and IoT-based image transmission. The use of GF(28) aligns with 8-bit image formats and is compatible with standard hardware, enabling efficient and low-latency processing. Its integration with the SPN structure allows for parallel execution, making the system suitable for real-time environments where both speed and security are critical.

The implementation flowchart of the proposed RGB color image encryption scheme is illustrated in Fig. 5. The corresponding pseudocode for Algorithm 2, which details the graph-theory and GF(2⁸)-based RGB image encryption using the SPN structure, is provided below.

Fig. 5
Fig. 5
Full size image

Flowchart of proposed color RGB image encryption.

Pseudo Code Algorithm 2
Pseudo Code Algorithm 2
Full size image

Graph-Theory and GF(2⁸)-Based RGB Image Encryption Using SPN.

Apply the algorithm steps to the standard original RGB images—Deblur, Oakland, Stockton, and House—obtained from the USC-SIPI Image Database (https://sipi.usc.edu/database/), and obtain the corresponding cipher images, which are shown in Fig. 6.

Fig. 6
Fig. 6
Full size image

Four different original and encrypted images.

Histogram analysis

The Histogram analysis can be considered as one of the main tools to determine the efficiency of RGB image encryption techniques, first of all, the uniformity of the pixel distribution, and resistance to statistical attacks. As seen in the experiments where RGB image encryption is done on simple graph 8 vertices and \(GF\left({2}^{8}\right),\) the histograms of the encrypted images of the three channels, red, green, and blue differ greatly from the histograms of the initial image. This uniformity speaks to the fact that the particular encryption technique conceals the content of the image such that the would-be attackers cannot decipher much about the original images. By integrating the graph structure for pixel scrambling with the finite field, pixel intensities are well diffused throughout the image, which adds to the security. It also demonstrates good resistance against statistical attack, this is because the histogram of the encrypted image looks random thus it does not highly depend on either the original image or even the histogram of the original image. In addition to this, for implementing \(GF({2}^{8})\) operations will further increase randomness in the process of encryption since adjacent pixels will not be correlated. From the histogram analysis, the authors validate that this implementation of the encryption method randomizes the pixels well enough, thus applying the method in the safe transmission and storage of sensitive image data. The fact that the method shows a high level of protection against histogram-based attacks guarantees its relevance for the industries that require high levels of data security, like biometric authentication systems, secure medical imaging, and protection of classified documents. The authors include the histogram analysis of standard RGB Deblur and Oakland original images obtained from The USC-SIPI Image Database (https://sipi.usc.edu/database/) and encrypted Images, which are given in Figs. 7 and 8.

Fig. 7
Fig. 7
Full size image

Histogram analysis of Deblur original and encrypted images.

Fig. 8
Fig. 8
Full size image

Histogram analysis of Oakland original and encrypted images.

NPCR and UACI

The NPCR measures the number of pixels differing from one encrypted image to another when there is only a single pixel change in the plaintext image. For RGB image encryption using simple graph with 8 vertices and \(GF\left({2}^{8}\right),\) NPCR measures the number of pixel values that change in two encrypted images when there is a small change (such as flipping a pixel) in the original image. This method uses a graph-based scrambling along with the scrambling-substitution and a permutation-substitution (SP) operation that is implemented over GF 2^8 so that are all minor input transformations are reflected in a dramatic changed encrypted output. Normally an optimal NPCR value is near about a hundred percent for each of the RGB channels which informs us that almost all the tiny portions of the pixels are modified while the plaintext image is encrypted. The high NPCR values are obtained by this method signify the better diffusion characteristics which are necessary to withstand differential attacks. Applying the finiteness property of \(GF({2}^{8})\) and the transformations with the help of graph, small change in plaintext means that the change propagates to all over the encryption system and the resulting ciphertext looks completely different. This makes it especially suitable for secure applications because the chance of adversaries being able to determine patterns or indeed derive some usable information about the original image through differential techniques is significantly reduced.

The Unified Average Changing Intensity (UACI) quantifies the average variation in pixel intensity between two encrypted images obtained from a small modification to the original image. Like most of the other measurements, it is another important measure for determining the practicability of the encryption technique and how well the relationship between the plain text and cipher text is hidden. In the RGB image encryption using simple graph with 8 vertices employing \(GF\left({2}^{8}\right),\) the UACI computes the percentage of end-to-end difference in intensity of each pixel with respect to the three channels of RGB. The method guarantees the uniformity of the intensity variation with graph-based with ‘scrambling’ and SP operations as performed over \(GF({2}^{8})\) that uses the introduced randomness from the finite field arithmetic. UACI value should be approximately 33–34%; this offers a substantial mean difference in pixel’s intensities which indicates good encryption result. The observed high UACI values for this encryption system imply that the cipher produces a ciphertext with high entropy, even with two images that are very similar to one another. This characteristic makes the algorithm statistically resistant for attacks and improves its performance as applied in scenarios requiring high levels of security such as image storage and transmission in applications like medical imaging and military communications7,11,31,39,40,41. However, the NPCR and UACI of Deblur, Oakland, Stockton and House is presented in the Table 18 below.

Table 18 NPCR and UACI of encrypted RGB images.

Key space and key sensitivity analysis

Space analysis is the chief determinant of the security of any cryptographic system; RGB image encryption over a graph-based scheme is no exception. Consider a simple graph with 8 nodes and 16 arcs, in which encryption is worked under \(GF\left({2}^{8}\right),\) this case, size of the keyed space afford flexibility measure for the strength of the keyed encryption. The Galois field \(GF({2}^{8})\) is a field of 8 bits comprising 256 members, which are bytes used for encryption of the image information. For the perspective, all of the 8 vertices of the graph above are able to independently characterize the encryption key component, while at each of the vertex there are 256 possible values that can be chosen from the Galois field. Therefore the total key space is then \({256}^{8},\) since the 8 vertices can be selected independently from the 256 elements in the field. However, the contribution does not only come from the vertices of the exaggerate graph but also the edges of the exaggerated graph. Each of the 16 edges in the graph can also be of any value of \(GF({2}^{8})\) of which there are 256 possible values giving the edge key space \({256}^{16}.\) Hence, the total key space of the encryption scheme, based on the scheme described in this paper for using the vertices and the edges of the graph is the multiplication of the key spaces of the vertices and edges. The last key space is \({256}^{8}\times {256}^{16}={256}^{24}.\) As with the previous attacks, to signify the vast number of key combinations, the total key space is expressed in powers of 2 equal to \({2}^{192}.\) Such a large key space is also necessary for the encryption scheme so that the programmer is protected from brute force attacks, and to ensure that the encrypted RGB image should not be vulnerable to numerous key ambient.

Maximum deviation and irregular deviation

The maximum deviation analysis considers the supreme values of difference of pixel intensity between the encrypted and plaintext images and it gives information about the strength and randomness of the encryption algorithm. In the RGB image encryption method where simple graph is used with 8 vertices and \(GF\left({2}^{8}\right),\) the maximum deviation measure shows the maximum deviation that has been calculated through the difference of pixel values of encrypted image from pixel values of original image. This approach includes graph based scrambling which moves the spatial locations of the pixel and substitution-permutation (SP) operations over \(GF({2}^{8})\) with nonlinear transformations and high diffusion. The method makes sure that slight changes in terms of pixels of the plaintext image will have a huge difference on the encrypted image. A high values correlations across the red, green, and blue channels show the effectiveness of encryption since they reveal the strong range of the pixel intensity by the algorithm. The use finite field arithmetic and graph transformation has been deployed to introduce randomness into the image where the maximum deviation is distributed in the image randomly to withstand differential as well as statistical attack. In this paper it is convenient to note that this property is important when, due to high levels of data confidentiality required, there can be no recognizable connections between the image of the plaintext and ciphertext. The stability of this process can be attributed to the effectiveness of proposed approach for secure communication, protection of biometric data, and more importantly the field of image encryption that call for high security as well as efficiency in solving the encryption algorithm31,52. MD results are shown in Table 19 below.

Table 19 MD and ID of original and encrypted RGB images.

Irregular deviation quantifies the randomness and non-periodicity of the difference in the pixel intensity of the encrypted and the original images as a way of characterizing encryption algorithms for their capacity to obscure the visual information. According to the encryption of the RGB image using a simple graph with 8 vertices and \(GF\left({2}^{8}\right),\) irregular deviation measures the pixel intensity fluctuation which is deviated irregularly across the encrypted image. This encryption technique uses graph based scrambling technique which randomizes the spatial distribution of pixel and substitution-permutation (SP) operation which is performed over \(GF({2}^{8})\) and results in nonlinear and non-uniform. These processes guarantee that pixel intensity variations are nonsynchronous and random for both the red, green and blue facets. Higher values of irregular deviations suggest that the application of encryption algorithm brings abrupt and random behavior for the change in the pixel value, which makes it unlikely that the attacker would be able to identify something familiar from the encrypted picture. This characteristic is particularly useful in defeating statistical attacks because original deviations demand unpredictability thus eliminating consistency that may be exploited by the attacker. This method of distributing the pixel intensity changes in a random manner/order provides maximum security to images hence can be used in secure image storage as in some other applications such as confidential communication systems and defense on visual data. Additionally, this approach is scalable and flexible for different image encryption algorithms since graph theory and finite field operations are incorporated in this attack31,52. The ID results are presented in Table 19 below.

Correlation analysis

Correlation analysis assesses the interdependency between adjacent pixels in relation to the ability of an encryption algorithm to decouple these pixels. In the RGB image encryption using simple graph with 8 vertices over \(GF\left({2}^{8}\right),\) the major aim is to decrease the correlation of the pixel values of the enciphered images in horizontal, vertical, diagonal directions. The original image generally contains high inter pixel correlation as the natural images are usually having smooth gradations and localized patterns. PSNR distortion minimization at progressive scalar quantization using LUTs was achieved utilizing graph-based scrambling and an adjacency matrix to disrupt the spatial organization of pixels, ASP which is substitution-permutation operations over \(GF({2}^{8})\) for achieving nonlinear and high diffused transformation. Both of these processes significantly decrease the pixel correlations in all three dimensions to a near-zero correlation co-efficient for the encrypted image. This clearly shows how in this algorithm the pixel relationship is randomized well enough so that the encrypted image does not give any hint towards the identification of the plaintext. Small correlation values make the encryption highly insensitive to statistical attacks since the spatial dependency of data points cannot be exploited to learn the image. The features of this property are required for secure multimedia transmission, biometrics, and virtually any cases where confidentiality and obscurity are vital. The incorporation of theory of graph and finite field computations also improves this process as such de-correlation effect is quite comprehensive and viable depending on the high security image encryption solicitation. The authors demonstrate the correlation of standard RGB original images obtained from The USC-SIPI Image Database (https://sipi.usc.edu/database/) and encrypted Images, which are given in Figs. 9, 10 and Table 20.

Fig. 9
Fig. 9
Full size image

Horizontal, vertical and diagonal correlation of Deblur.

Fig. 10
Fig. 10
Full size image

Horizontal, vertical and diagonal correlation of house.

Table 20 Correlation of color RGB images.

Information and local entropy

Information entropy, when studied over a simple graph and the finite field \(GF({2}^{8})\), becomes a vital metric for quantifying the degree of randomness and unpredictability introduced during the encryption process, particularly when dealing with RGB images represented as graph-based structures. In the proposed model, the pixel values of an RGB image are mapped onto a simple graph with 8 vertices, where each vertex or edge label corresponds to an element in \(GF({2}^{8})\), and encryption operations are driven by finite field arithmetic and graph transformations. Information entropy measures how effectively the original, inherently structured pixel values are randomized during encryption, ensuring that all observable patterns, correlations, and statistical redundancies are erased. In typical unencrypted or poorly encrypted images, consecutive pixels exhibit strong dependencies, resulting in lower entropy and exposing the data to statistical attacks. However, by employing substitution-permutation operations based on \(GF({2}^{8})\) combined with graph-based dispersion mechanisms, the encryption process ensures a thorough diffusion of pixel relationships across the entire structure, producing an encrypted image with entropy values close to the theoretical maximum of 8 bits per pixel per color channel. This high information entropy implies that the pixel intensities are almost uniformly distributed, with no detectable patterns, thus providing strong resistance against histogram analysis, entropy-based attacks, and other forms of statistical cryptanalysis. Therefore, information entropy calculated over the simple graph and \(GF({2}^{8})\) reflects the success of the proposed encryption method in achieving high confusion and diffusion, both essential properties for constructing secure, efficient, and resilient cryptographic systems suited for secure communications, protected multimedia storage, and sensitive data handling11,29,31,34,53. The results of information entropy is given in Table 21.

Table 21 Information entropy analysis.

Local entropy, when evaluated over a simple graph with 8 vertices and pixel data encoded in \(GF({2}^{8})\), serves as an essential measure of localized randomness within small regions of an encrypted RGB image, offering a deeper understanding of the encryption system’s ability to destroy short-range pixel correlations. While global information entropy assesses overall randomness, local entropy focuses on analyzing small windows or blocks of the image to check whether neighboring pixels remain correlated after encryption. In the proposed scheme, the use of simple graphs mapped to \(GF({2}^{8})\) ensures that pixel values are shuffled not only globally but also locally, with each pixel’s value being influenced by nonlinear transformations based on the adjacency relations of the graph and finite field operations. The substitution and permutation layers implemented over \(GF({2}^{8})\) introduce complex local perturbations, while the graph structure guarantees that even small clusters of pixels undergo significant changes, leading to a near-uniform distribution of values within any localized region. High local entropy across the image indicates that there are no residual structural patterns, making the encrypted image highly resistant to localized statistical attacks, such as differential cryptanalysis and block-wise analysis. Achieving high local entropy is critical because attackers often exploit weakly encrypted patches even when the global randomness appears sufficient. Thus, through the integration of simple graphs and \(GF({2}^{8})\) arithmetic, the encryption strategy maintains robust randomness at every scale, ensuring that no exploitable patterns remain, and making the system highly suitable for secure image transmission, military-grade data protection, and privacy-preserving multimedia applications. The information and local entropy of the standard RGB original images obtained from The USC-SIPI Image Database (https://sipi.usc.edu/database/) and encrypted Images are given in Table21 and Fig. 11.

Fig. 11
Fig. 11
Full size image

Local entropy of Deblur, Oakland, Stockton, & House Original and Encrypted Images.

MSE and PSNR

The Mean Squared Error (MSE) is one of the most generally used quantities to estimate the quality of an image encryption scheme by the average sum of the squared differences between the pixel values of the original and encrypted images. When considering RGB image encryption over the simple graph with 8 vertices and \(GF\left({2}^{8}\right),\) MSE is solely instrumental in deciding how the original image will be transformed to enable denial of its original content to any third party. The graph-based pixel scrambling and the substitution-permutation mechanisms involving \(GF({2}^{8})\) lead to overwhelming changes in the pixel information which increases the value of MSE. In an ideal encryption process, the MSE as much as is desirable, which gives information regarding how different the encrypted would be from the original picture. A higher MSE suggests that encryption algorithm has done its best to hide the content of the image to enable the attacker to take very much time to reconstruct the said image. For this particular encryption methodology, whilst the MSE scores are commonly significantly large due in principal to the graph and finite field operation, the effective diffusion and confusion are achieved. This high MSE guarantees that the encrypted image is much more dissimilar to the original plaintext raising the level of security, which can partly counteract image attacks based on pixel value distinction52.

The Peak Signal-to-Noise Ratio (PSNR) is a basic metric frequently employed to assess the image after encryption and for providing a direct means for comparing images. For the task of color image encryption with help of the simple graph by having 8 vertex number, and \(GF({2}^{8})\) the PSNR value allows comparing the impact of the encryption process on the images. This means that is the MSE increases, the PSNR decreases, which is preferred in encryption system. This is because a low PSNR means image after encryption is significantly different from the original image so it becomes more difficult to recognize when encrypted. The transformations built on the graph graph-based approach along with the \(GF({2}^{8})\) based substitution the encrypted image has very less similarity with the original image, hence, the percentage of distortion is high and so the PSNR value is low. The PSNR value typical for such highly secure encryption methods as the one described in this work is rather low, it can often score 20–30 dB, which means that the encrypted image does not even remotely resemble the original and thus even attempts at decryption based on the observed differences in the images will be impossible. This low PSNR value is important in cryptographic security, as it guarantees that the encrypted image is either noisy or highly complex to the naked eye ensuring that the encryption is sound against any attacker using measures to look for correlation between plaintext and the image52. Table 22 expresses the value of PSNR and MSE which was observed after the experiment.

Table 22 PSNR and MSE analysis.

Salt and peppers analysis

Salt and Peppers analysis over a simple graph and the Galois Field \(GF\left( {2^{8} } \right)\) involves studying how impulsive noise affects data structures represented by graphs, especially when node or edge values are encoded using elements of GF(2⁸). In this context, salt noise can be interpreted as random assignment of the maximum value (255 in \(GF\left( {2^{8} } \right)\)) to certain nodes or edges, while pepper noise assigns the minimum value (0). When applying such noise to graph-based data or images modeled through adjacency matrices over \(GF\left( {2^{8} } \right)\), it is critical to analyze how structural properties, connectivity, or embedded information (such as encrypted data or watermarks) are disrupted. Salt and pepper noise can simulate random corruptions in communications or storage systems using finite fields, offering a way to evaluate the resilience of encoding, encryption, or error-correction methods deployed over graphs. Robust systems must ensure that even when certain parts of the graph (or corresponding field elements) are flipped to extreme values, the essential structure or retrievable information remains largely intact. Thus, salt and pepper analysis over graphs in \(GF\left( {2^{8} } \right)\) not only tests noise immunity but also helps in designing fault-tolerant cryptographic and network coding schemes. Salt and Peppers analysis of deblur images are given in Fig. 12.

Fig. 12
Fig. 12
Full size image

Deblur ciphered and deciphered images with salt and pepper variance 0.0005, 0.005, 0.05, and 0.5

Gaussian variance analysis

Gaussian variance analysis over a simple graph and \(GF\left( {2^{8} } \right)\) focuses on studying the behavior of graph-associated data when subjected to noise modeled by a Gaussian-like distribution adapted for finite fields. Although classical Gaussian noise is continuous, in \(GF\left( {2^{8} } \right)\), an analogous concept involves probabilistic perturbations where graph node or edge values deviate around a central field element, with a certain “variance” reflecting the likelihood of larger errors. By introducing such controlled perturbations in the adjacency matrix or labeling of a simple graph, researchers can analyze how sensitive structural properties, such as connectivity, eigenvalues, or embedded codes, are to finite field-based noise. Gaussian variance analysis becomes essential in cryptographic constructions, coding theory, and error-resilient communications that model data over graphs using \(GF\left( {2^{8} } \right)\), where understanding the tolerance of field elements to random fluctuations directly influences the reliability of transmission or encryption schemes. In practical terms, analyzing how small or large perturbations in \(GF\left( {2^{8} } \right)\) impact the graph allows the design of more robust systems capable of handling real-world imperfections without compromising critical information. The Gaussian variance analysis of the standard RGB original images obtained from The USC-SIPI Image Database (https://sipi.usc.edu/database/) and encrypted Images are given in Fig. 13.

Fig. 13
Fig. 13
Full size image

Deblur ciphered and deciphered images with Gaussian variance 0.0004, 0.0003, 0.0002, and 0.0001.

Cropping attack

A cropping attack over a simple graph and \(GF\left( {2^{8} } \right)\) refers to the deliberate removal of parts of the graph—such as deleting nodes, edges, or sections of the adjacency matrix—where all values are elements from \(GF\left( {2^{8} } \right)\), with the aim of destroying or concealing embedded information like watermarks, secret shares, or error-correcting structures. In graphical models, especially those representing coded or encrypted data over \(GF\left( {2^{8} } \right)\), a cropping attack can severely impact the global properties of the graph, including connectivity, minimum spanning trees, or flow paths, making data reconstruction difficult or impossible. When the adjacency matrix is modified by zeroing out submatrices or truncating parts (equivalent to setting certain \(GF\left( {2^{8} } \right)\) elements to zero or discarding them), the original encoding or cryptographic signature may be lost or degraded. Studying cropping attacks in this context helps assess the robustness of graph-based security and communication models, pushing for the development of systems that embed redundancy and localized recovery strategies. Thus, the analysis of cropping attacks over simple graphs and \(GF\left( {2^{8} } \right)\) is vital for enhancing the durability and trustworthiness of modern cryptographic and network communication frameworks. The different type of cropping attacks of standard RGB original images obtained from The USC-SIPI Image Database (https://sipi.usc.edu/database/) and encrypted Images are given in Fig. 14.

Fig. 14
Fig. 14
Full size image

Cropping attack of 25% of Deblur ciphered and deciphered images.

Contrast and energy

The contrast is further used in evaluating the efficiency of image encrypted scheme, which is defined as the difference in intensity between two successive pixels of the image in the encrypted domain. When it comes to RGB image encryption using simple graph with 8 vertices and \(GF\left( {2^{8} } \right),\) the contrast is decreased to a large extent as the result of catastrophe, which is an advantage of encryption when the pixel intensities will be finally scattered randomly. Specifically, this work uses pixel permutation based on the graph obtained from the image along with the SP-operations using \(GF\left( {2^{8} } \right)\) to achieve high levels of nonlinearity and intermixes dependencies. This leads to an encrypted image where contrast of neighboring pixels differs significantly to that of the original image. Ideally in the encryption context contrast level should be low and uneven so that in the encrypted image adjacent pixels don’t reveal any direct relation to the original image. Using both graph theory and finite field operations in this encryption technique, the aspect of pixel intensity is evenly spread throughout the color spectrum thereby eliminating any pre-existing pattern in the plaintext image. In particular, the encrypted image is usually more contrasted to the original but this contrast differs at random and rapidly from one pixel to another, which makes the encrypted image absolutely indistinguishable and highly secure. This disrupts the adversary’s pixel relationships and paves way to avert statistical and visual attacks because they cannot use local variations in intensity come up with any exploitable knowledge about the he original image. The proposed encryption hence offers high but varying levels of contrast that makes it suitable for image security transmission and storage particularly where security is paramount26,52. The contrast results with other approaches of the proposed work are summarized in Table 23.

Table 23 Contrast and energy of original and encrypted RGB images.

Energy in the context to the image encryption is defined as overall fluctuation of intensity which says how the pixel values are distributed throughout the image. It is one of the measures usually applied to determine security given by an encryption algorithm in as much as pixel intensities in an image will be appropriately shuffled to ensure the image is secure. For the RGB image encryption, a simple graph with eight vertices and \(GF\left( {2^{8} } \right)\) used as an element and the energy of the encrypted image is the parameter on which the effectiveness of the encryption depends. The encryption method focuses on graph-based scrambling and substitution-permutation that creates changes on pixel values of all the three primary channels which include red, green, and blue. These operations give rise to redistributions of the pixel intensities and the energy is spread all over the image. For that reason, the encrypted image has more energy than the original one and smoothest pixel values distribution denying original image’s inherent characteristics. Low contrast in the encrypted image suggests that it reduces the chance of meaningful and identifiable pattern or correlation of the adjacent pixels to the naked eye or any other probable encryption method, because high energy shows that the encryption method under consideration destroys any correlation that can exist in the neighboring pixels. Also, the nonlinearity arising from the use of finite fields such as the 2⁸ Galois field make the energy distribution random all over the image. This randomness for the distribution of energy is important for protecting the image, as it guarantees that random noise in the encrypted domain is imperceptible from the original, and immune to attacks that may target similarities in pixel intensity. The energy of the encrypted image will be high and the energy distribution will be relatively random, which significantly reduces the possibility of differential, statistical, and visual attacks; thereby making the encryption method secure for the transmission and storage of sensitive image data26,52. The energy results are summarized in the Table 23 below.

Homogeneity and standard deviation

Entropy is calculated by the grayscale pixel distribution in an image that is the level of resemblance of neighboring pixel intensities. As for RGB image encryption based on simple graph with 8 vertices and \(GF\left( {2^{8} } \right),\) homogeneity has a great effect on how much the encryption algorithm can hamper any spatial structures, or repetitive patterns, inherent in the original image. Encryption algorithm based on graph reconstruction to shuffle pixel locations and uses substitution-permutation operations in the finite field \(GF\left( {2^{8} } \right)\) to introduces non-linear transformations. These processes dramatically distort the relationships between nearest-neighbor pixels so that the encrypted image has low inter pixel repeatability. A general characteristic of natural image is that two adjacent pixels usually have similar gray level, resulting in provide high spatial homogeneity areas. However, the encryption scheme also seeks to reduce the usual patterns naturally making the pixel values of the image dispersed randomly. Consequently, the encrypted image appears significantly non-homogeneous with no relationship between the pixel intensity and its neighbors. It will be seen that this lack of homogeneity in the encrypted image is useful to protect the image against different forms of cryptographic attack, such as statistical analysis or visual inspection that looks for similar structures or patterns in the encrypted image. In this way, through the principle of \(GF\left( {2^{8} } \right)\) and the transformation of the graph-based, pixel value is randomized and non-duplicate manner and looked more like of a random pattern, therefore having visually senseless and un-identical from the original picture. This characteristic is critical for secure image encryption because attackers cannot predict any relation in pixel intensities and ensure high security in areas like shielded communication, data sending and receiving, and protected image preservation52. The homogeneity results of the proposed work are mentioned as follows Table 24.

Table 24 Homogeneity and standard deviation of original and encrypted RGB images.

Standard deviation is one of the most commonly used statistical measures that determined the extent of pixel variation in an image. In the analyses of RGB image encryption based on simple graph codes with 8 vertices and \(GF\left( {2^{8} } \right),\) standard deviation reveals the extent to which the pixel values in encrypted images differ from the mean intensity. To implement an adequate level of encryption, the required form of image manifestation seeks to attain a high standard deviation concerning the encrypted image in question, and this shows that the pixel intensities are highly dispersed and randomly distributed. The encryption process comprises graph based scrambling and substitution-permutation operations over the finite field \(GF\left( {2^{8} } \right),\) which makes the pixel relationship difficult to understand and introduces considerable amount of nonlinearity. This disruption makes sure, there is much difference in the pixel value of the encrypted image as compared with the original image; therefore, it has a high standard deviation. In a typical unencrypted image the pixel values are more or less grouped in a small variance or standard deviation. However, after the encryption, the pixel intensities in the RGB channels are distributed over the entire range of colors and there are greater differences between the subsequent pixels. The images’ higher standard deviation further substantiate the encryption method by dispersing pixel values making it difficult for an attacker to easily decipher it statistically or from pattern recognition techniques. This high variability provides a method wherein the encrypted image is nearly imperceptibly different from the original image and is able to withstand various types of cryptanalysis. The encryption scheme substantially improves the level of security for the image by maximizing the standard deviation for the encryption of the images such that any small differences between the original and the encrypted images are very difficult to reverse without the correct key. This characteristic is highly useful in the areas of applications where the data security is an issue, including the secure image transfer, digital watermarking and encrypted image storage52. The overall SD results of the proposed work has been summarized in Table 24.

SSIM analysis

The Structural Similarity Index Measure (SSIM) analysis is a powerful tool for evaluating the visual degradation and encryption strength in color image encryption schemes that integrate graph theory and Galois Field \(GF\left( {2^{8} } \right)\) operations. In such hybrid cryptographic frameworks, graph theory is typically employed to generate complex pixel permutation patterns using adjacency matrices derived from structured or random graphs, thereby disrupting spatial relationships in the image, while the arithmetic operations in \(GF\left( {2^{8} } \right)\) introduce strong pixel-level confusion and diffusion by performing modular computations over 8-bit finite field elements. This dual-domain approach enhances encryption by masking both pixel values and their positions, ensuring that the encrypted image is statistically and visually uncorrelated with the original. SSIM, which quantifies structural similarity based on luminance, contrast, and texture, serves as a benchmark for measuring the distortion introduced by the encryption process. A near-zero SSIM value between the original and encrypted images indicates effective encryption, confirming that the structural content has been thoroughly masked and the encrypted output is imperceptible to the human eye. Moreover, SSIM analysis aids in parameter tuning and comparative validation by helping researchers strike a balance between encryption robustness and potential reconstruction accuracy in reversible schemes. In summary, SSIM analysis not only validates the security strength of graph-theory and \(GF\left( {2^{8} } \right) -\) based color image encryption methods but also plays a critical role in the design and optimization of secure and perceptually effective encryption systems27,37. The overall SSIM results of the proposed work has been summarized in Table 25.

Table 25 SSIM analysis.

Speed analysis

Encryption and decryption speed analysis of the proposed algorithm, when implemented over a simple graph and \(GF\left( {2^{8} } \right)\), involves evaluating the computational efficiency of the algorithm in terms of time taken to encrypt and decrypt data structures, particularly when encoded over finite fields \(GF\left( {2^{8} } \right)\), on a system with an Intel(R) Core(TM) i5-1135G7 @ 2.40 GHz CPU and 8 GB of RAM. In this setup, the algorithm operates on simple graphs where node and edge labels are represented by elements of \(GF\left( {2^{8} } \right)\), and the encryption/decryption process typically involves operations like substitution-permutation, matrix transformations, or polynomial arithmetic, depending on the encryption scheme used. The performance analysis includes measuring the time taken for encrypting and decrypting a variety of graph-based data, such as adjacency matrices or graph traversal data, and benchmarking how the algorithm scales with the graph’s size and complexity. The Intel i5 processor, with its multi-core capabilities, is well-suited for parallelizable operations within the algorithm, but the limited clock speed and 8 GB of RAM impose certain constraints on the size of graphs that can be efficiently handled. Factors like the number of graph nodes, edges, and the specific cryptographic operations (e.g., finite field multiplications, modular arithmetic) determine the overall speed. Typically, encryption will involve iterating through graph edges and nodes, applying transformations using \(GF\left( {2^{8} } \right)\), while decryption reverses these transformations. Speed analysis would be performed by running multiple tests with varying graph sizes and observing the computational load, taking into account the system’s available memory and processing power. The goal is to optimize the algorithm for quick encryption/decryption, ensuring that it performs efficiently even for large-scale graphs, which is critical for practical applications in secure communications or cryptographic protocols37,54. Speed comparative analysis is given in Table 26.

Table 26 Speed comparison in seconds.

NIST test

The NIST test suite is a set of statistical tests intended for checking the random and security characteristics of cryptographic primitives and is suitable for estimating the effectiveness of RGB image encryption approaches. When applied to the RGB image encryption over a simple graph with 8 vertices and \(GF\left( {2^{8} } \right),\) these tests provide a detailed examination of the origin, security, and quality of the encrypted image in relation to its vulnerability to attacks. For instance, the frequency and block frequency tests check whether the pixel values are distributed uniformly, and thus the encrypted image is not preferred to have some specific values. The rank test tests the linear independence of rows in a matrix representation of the object under encryption, thereby providing assurance that object encryption has adequately dispersed the data. Furthermore, the runs test (with M = 10,000) investigates the absence of runs of consecutive bits, or to be precise, it is performed to verify that the encryption has removed any predictable series, and long runs of ones help make sufficiently certain that the encrypted image does not have repeating patterns of pixel intensities. In this case three sets of template matching tests are used, namely the overlapping and non-overlapping template matching tests which are used to detect periodicity or repeated sequence that may be used in cryptanalysis. These tests collectively ascertain that form of encryption used effectively destroys any innate pattern in the image thus giving it the highest form of security and randomness. Other tests like Spectral DFT, Apparent entropy, and Universal tests give more complicated mode of the randomness of the given image. The Spectral DFT test used in encrypting images eliminate periodic components which could be associated with the original image. The approximate entropy test estimates the dynamic behavior of the pixel values, with a view of eliminating any kind of sequence that might have been expected. The universal test offers an idea of the relative randomness of the image as a whole, making it immune to statistical attacks. Germane tests p-value (1 and 2) are meant for testing independent consecutive pixel values and independence of first and the second value of the sequence which should be absent. The forward cumulative sum and reverse are able to compute the randomness of the pixel value transitions in the forward fashion as well as in the backward fashion enhancing the encryption randomness in dispersing the patterns. Random walk and random walk variations test random walk of the cumulative sum and the number of visits per state showing that the transition in the encrypted image follow a random path. When used for the purpose of RGB image encryption over the simple graph with 8 vertices and \(GF\left( {2^{8} } \right),\) all these NIST tests collectively conform to the assurance that the proposed encryption algorithm is highly random, secure and resistant to most of the cryptographic attacks required for high-security applications in image encryption and secure communication techniques52,53,55. The proposed work on meeting the requirements suggested by the NIST is captured in Table 27 below.

Table 27 NIST analysis of Oakland encrypted image.

Conclusion and future direction

This study presents an image encryption framework that combines graph theory, Galois fields, and the substitution–permutation network (SPN) architecture to enhance multimedia security. Leveraging the adjacency matrix of a complete 8-vertex graph and the finite field GF(2⁸), the authors designed S-boxes via affine transformations and multiplicative inverses, ensuring strong nonlinear transformations. The proposed system demonstrated high entropy, low inter-pixel correlation, and resilience against differential and linear attacks, validating its robustness. Beyond these contributions, the work underscores two key limitations. First, the computational complexity—stemming from multi-stage transformations—poses challenges for real-time encryption, particularly in live video streaming and resource-limited embedded systems. Second, scalability to higher-resolution images or multi-frame sequences may further exacerbate performance constraints56,57,58,59,60,61,62,63.

Future research will address these limitations by exploring lightweight cryptographic primitives, hardware-accelerated implementations on FPGA/GPU platforms, and algorithmic optimizations to strike a balance between security strength and computational efficiency. Additionally, extending the framework to hybrid cryptosystems or integrating adaptive key management schemes may broaden its applicability in next-generation secure multimedia communication.

Tribute

The authors extend our deepest and most reverent gratitude to our esteemed and dearly departed mentor, Professor Dr.Tariq Shah, whose unparalleled erudition, sagacious counsel, and unwavering support indelibly shaped the trajectory of ouracademic and intellectual pursuits. His mentorship served not only as a beacon guiding our exploration of the intricate and abstractrealms of algebra, number theory, coding theory, cryptography, and cybersecurity, but also as a transformative influence on ourpersonal integrity and professional ethos. The legacy he bequeathed—a rare confluence of intellectual brilliance, moral rectitude,and compassionate guidance—continues to inspire and elevate our scholarly aspirations. May his noble soul find eternal peace andrepose.

figure c