Next Article in Journal
Correlation between Temperature and the Posture of Transmission Line Towers
Previous Article in Journal
Modified Heisenberg Commutation Relations and the Infinite-Square Well Potential: Some Simple Consequences
Previous Article in Special Issue
Exploring Ring Structures: Multiset Dimension Analysis in Compressed Zero-Divisor Graphs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Efficient Graph Algorithms in Securing Communication Networks

by
Syed Ahtsham Ul Haq Bokhary
1,*,
Athar Kharal
1,
Fathia M. Al Samman
2,
Mhassen. E. E. Dalam
3 and
Ameni Gargouri
4
1
Centre for Advanced Studies in Pure and Applied Mathematics, Bahauddin Zakariya University, Multan 60000, Pakistan
2
Department of Mathematics, College of Science, Northern Border University, Arar 91431, Saudi Arabia
3
Department of Mathematics, College of Sciences and Arts (Muhyil), King Khalid University, Muhyil 61421, Saudi Arabia
4
Mathematics Department, College of Humanities and Science in Al Aflaj, Prince Sattam bin Abdulaziz University, Al-Kharj 11912, Saudi Arabia
*
Author to whom correspondence should be addressed.
Symmetry 2024, 16(10), 1269; https://doi.org/10.3390/sym16101269 (registering DOI)
Submission received: 23 August 2024 / Revised: 16 September 2024 / Accepted: 23 September 2024 / Published: 26 September 2024
(This article belongs to the Special Issue Symmetry and Graph Theory, 2nd Edition)

Abstract

:
This paper presents three novel encryption and decryption schemes based on graph theory that aim to improve security and error resistance in communication networks. The novelty of this work lies in the application of complete bipartite graphs in two of the schemes and the Cartesian product of graphs in the third, representing a unique approach to cryptographic algorithm development. Unlike traditional cryptographic methods, these graph-based schemes use structural properties of graphs to achieve robust encryption, providing greater resistance to attacks and corruption. Each scheme is illustrated with detailed examples that show how the algorithms can be successfully implemented. The algorithms are written in standard mathematical notation, making them adaptable for machine implementation and scalable for real-world use. The schemes are also rigorously analyzed and compared in terms of their temporal and spatial complexities, using Big O notation. This comprehensive evaluation focuses on their effectiveness, providing valuable insights into their potential for secure communication in modern networks.

1. Introduction

Cryptography, an indispensable tool for secure communication and authentication, encompasses the construction and analysis of systems dedicated to clandestine information exchange. This field is meticulously categorized into symmetric key cryptography, public key cryptography, and hash functions. While symmetric key cryptography employs a single key for encryption and decryption, its counterpart, public key cryptography, utilizes distinct keys for these operations. Of note, symmetric key cryptography, coupled with block ciphering, stands out for its remarkable efficiency and resilience against intrusion, owing much to its foundation in number theory and algebra. Graph theory emerges as a cornerstone in cryptographic endeavors [1,2], facilitating innovative approaches such as utilizing stars, paths, and bipartite graphs for enhanced security. Particularly, bipartite graphs find utility in cryptosystems for seamless data transfer. This synergy between graph theory and cryptography extends to the realm of network security research, where graph methods are deployed to scrutinize cryptographic performance and construct resilient cryptosystems, leveraging graphs with maximal girths. Moreover, cryptography’s essence lies in safeguarding data integrity and confidentiality [3], a pursuit deeply ingrained in its transformative process from plain text to cipher text, intelligible solely to authorized recipients. The strategic use of special characters augments security, deterring potential hackers and intermediaries from deciphering encrypted information.
Graph theory-based encryption presents several advantages over traditional cryptographic methods, including enhanced security due to the intricate structures of underlying graphs, which make them more resistant to various attacks, and flexibility in accommodating diverse security needs tailored to specific application contexts. Moreover, graph-based algorithms can provide efficient encryption and decryption, particularly for large datasets. However, while graph theory’s versatility allows it to be applied across a range of cryptographic tasks, such as key generation and data encryption, there are notable disadvantages. These include the inherent complexity of implementing graph-based schemes, which can be computationally intensive, efficiency trade-offs between speed and security, and the challenges associated with managing keys in large-scale systems. In essence, cryptography stands as a bulwark against unauthorized access [4,5], fostering secure data exchange across diverse domains, while its integration with discrete mathematics and graph theory heralds a future brimming with novel cryptographic paradigms poised to navigate the evolving landscape of digital security.
The initial message is converted into a code format through a process known as encryption, and the reverse procedure is called decryption [6]. The original contents are shielded against interception by encryption. Plain text is the term for an undisclosed message. By using a designated key, the data known as plain text in any encryption scheme are encoded or encrypted to create a cipher text. Then, through decryption, this cipher text is transformed into a readable original message. A key is a piece of information that is used to encode original data, which are then decrypted to produce actual text. The authorized recipient can easily access the hidden message with the provided key, but an interceptor cannot. Modern cryptography primarily uses two types of schemes: public key cryptography and symmetric key cryptography [7]. Symmetric key cryptography uses one key for both encryption and decryption, whereas public key cryptography uses one key for encryption and another key for decryption. We consider a simple connected graph G = ( V G , E G ) with vertex set V = V ( G ) and edge set E ( G ) throughout this paper. For every vertex v that is contained in V ( G ) , the number of edges that intersect v is its degree, expressed as d e g ( v ) . The symbols Δ and δ , respectively, represent the maximum and minimum degree of the graph.
A graph that has its vertex set V partitionable into two disjoint subsets, V 1 and V 2 , such that x y is an edge if and only if x V 1 and y V 2 , is called a bipartite graph. K m n , where m and n are the cardinalities of the partite sets, represents a complete bipartite graph. It is easy to note that K m n has m + n vertices and m n edges.
Let G 1 ( V 1 , E 1 ) and G 2 ( V 2 . E 2 ) be two graphs with vertex sets V 1 and V 2 and edge sets E 1 and E 2 , respectively. The Cartesian product graph of G 1 and G 2 , denoted by G 1 G 2 , is a graph with vertex set V 1 × V 2 = { ( x , y ) : x V 1 , y V 2 } , and there is an edge between two vertices, say ( x 1 , x 2 ) and ( y 1 , y 2 ) , if one of the following conditions holds:
(i) Either x 1 = y 1 and x 2 y 2 E 2 ; (ii) Or x 2 = y 2 and x 1 y 1 E 1 .
Vertex labeling for a graph G is a function of V to a set of labels; a graph that has a defined function of this kind is referred to as a vertex-labeled graph. Similarly, edge labeling is a function from the edge set to the set of labels. A graph with edge labeling is known as an edge-labeled graph. A total labeled graph is defined as a graph that has vertex and edge labeling.

Paper Organization

This paper is organized as follows: Next, Section 2 presents some of the current literature. It also locates and orientates the present work within contemporary research in the field. Section 3 presents the main three schemes. Section 3.1 leverages the Cartesian product of graphs and Section 3.2 and Section 3.3 present the two schemes based upon complete bipartite graphs. Each scheme is followed by illustrative example(s) and respective algorithms. Section 4 discusses the obtained results and specifically addresses the aspects of algorithmic temporal and spatial complexity. Finally, Section 5 sums up the whole paper while also indicating some directions of our future work as well as some open problems.

2. Related Work

The exploration of graph theory’s applications in cryptography has garnered significant attention from researchers, as evidenced by numerous papers on the subject. Lalitha and Vasu [8] proposed a Python-based encoding and decoding method to convert plain text into cipher text and vice versa. Similarly, Amudha, Sagayaraj, and Sheela [9], along with Chowdhury, Ghosh, and Jana [10], delve into the utility of graph theory in cryptography, highlighting its potential in securing communications.
A focus on utilizing complete graphs and Hamiltonian paths emerges in the works of Mohan, Rajendran, and Rajesh [11], as well as Gurjar and Krishnaa [12]. These papers detail encryption techniques leveraging graph structures for enhanced security and computational efficiency.
Moreover, innovative approaches such as employing Turan graphs in cryptosystems, proposed by Beaula, Venugopal, and Praba in [13], showcase the complexity and robustness achieved through graph-based encryption methods.
Graph theory’s integration with image encryption is explored by Zhang et. al. [14], who devised algorithms for generating random Hamiltonian paths within digital images, enhancing security through pixel-bit shuffling and gray-level substitution.
Furthermore, Kumari, in [15], emphasizes the role of cryptography in securing network communications, introducing a modified affine cipher algorithm that encrypts data plotted onto graphs and converted into images, ensuring confidentiality in cloud storage environments.
The authors of [16] underscore the pivotal role of graph theory in modern cryptography, proposing efficient domination and total magic labeling techniques for encrypting and decrypting confidential information.
Lastly, Perera and Wijesiri [17] bridge the connection between graph theory and symmetric cryptography, presenting methodologies that utilize matrices as secret keys to convert plain text into cipher text, enhancing data protection against unauthorized access.

3. Main Work

In this work, complete graphs and Cartesian product graphs are used. These graphs can be useful in cryptographic algorithms due to their structural properties. Every pair of vertices in a complete graph is joined by an edge. To ensure redundancy and robustness in cryptographic techniques, particularly in network design and secure communication, this high degree of connectedness might be helpful. The Cartesian product of two graphs combines the vertex sets and edge sets in a structured way, leading to graphs with predictable properties. This can be useful for designing certain types of cryptographic protocols or systems where predictable structures are advantageous. The structure of these graphs is used in cryptographic algorithms to enhance the computational complexity.

3.1. Data Security Using Cartesian Product Graphs

This cryptographic algorithm uses a Cartesian product graph G = P n P n to encrypt plain text of length n. The plain text is first encoded using a standard table, after which the vertices of the graph are labeled with the encoded values. Vertex weights are calculated by adding the labels of the incident edges to the vertex itself. These weights are then organized into a matrix, which is flattened to create the encrypted message. To recover the original plain text, decryption requires reconstructing the matrix and reversing the weight calculations.

3.1.1. Encryption (CPG)

Let K be a plain text of length n and f is a total labeling. This scheme uses the standard encoding table (Table 1). The encryption scheme is stated as follows.
1.
Draw encryption Table 1 and let k 1 , , k n be the numbers corresponding to each letter.
2.
Construct the Cartesian product graph G = P n P n , where n is the length of the word. The vertex set of P n P n is
V ( G ) = { x i j : 1 i , j n }
and edge set
E ( G ) = { x i j x i + 1 j : 1 i , j n } { x i j x i j + 1 : 1 i , j n } ,
respectively.
3.
Label the vertices as follows: for k j < n
f ( x i j ) = k j if i = 1 0 if i 1
otherwise
f ( x i j ) = k j n + r j if i = 1 k j n if i 1 ,
where 0 r i n 1 is a remainder when k i is divided by n. The n × n square matrix B is constructed with entries f ( x i j ) . It is important to note that the matrix obtained can be singular.
4.
As follows, define edge labeling: f ( x i j x i j + 1 ) = i j = f ( x i j x i + 1 j ) . It is important to note that ( i + 1 ) j i j + j .
5.
Calculate the weight of each vertex by adding the label of the vertex and all the edges incident on that vertex, i.e.,
w t ( x i j ) = f ( x i j ) + x x i j E f ( x x i j ) = f ( x i j ) + f ( i j ) + g ( i j ) + h ( i j ) + k ( i j )
where
f ( i j ) = 0 if i = 1 ( i 1 ) j o t h e r w i s e g ( i j ) = 0 if j = 1 i ( j 1 ) o t h e r w i s e h ( i j ) = 0 if i = n i j o t h e r w i s e k ( i j ) = 0 if j = n i j o t h e r w i s e
Further explanation: To compute the weight of each vertex x i j , we add:
1. The label of the vertex: f ( x i j ) .
2. The weights of all edges incident on the vertex: This involves four terms based on the position of the vertex:
wt ( x i j ) = f ( x i j ) + f ( i j ) + g ( i j ) + h ( i j ) + k ( i j )
where:
  • f ( i j ) : Adds weight based on the edge to the vertex above x i j (zero if in the top row, i = 1 ).
  • g ( i j ) : Adds weight based on the edge to the vertex to the left of x i j (zero if in the first column, j = 1 ).
  • h ( i j ) : Adds weight based on the edge to the vertex below x i j (zero if in the bottom row, i = n ).
  • k ( i j ) : Adds weight based on the edge to the vertex to the right of x i j (zero if in the last column, j = n ).
Each term f ( i j ) , g ( i j ) , h ( i j ) , k ( i j ) represents the weight of the respective incident edge, which is zero if the vertex is on a boundary where that edge does not exist.
6.
Create the matrix A by filling its entries with the weights of each vertex. In other words, A = ( w t ( x i j ) ) i j .
7.
The message is encrypted as follows:
w t ( x 11 ) , , w t ( x 1 n ) , w t ( x 21 ) , , w t ( x 2 n ) , , w t ( x n 1 ) , , w t ( x n n ) .
Table 1. Standard encoding table.
Table 1. Standard encoding table.
ABCDEFGHIJKLM
12345678910111213
NOPQRSTUVWXYZ
14151617181920212223232526
The encryption algorithm of this scheme is given as Algorithm 1.
Algorithm 1: CPG Encryption
Symmetry 16 01269 i001

3.1.2. Decryption (CPG)

1.
Message is received as an array of n 2 numbers.
2.
Construct the n × n matrix A = ( a ) i j by arranging the numbers in rows.
3.
Construct the matrix B = ( b ) i j , where the values of b i j are computed by using the following formula:
b i j = a i j i j i j if i = 1 j = 1 a i j ( i 1 ) j i ( j 1 ) if i = n j = n a i j i ( j 1 ) i j if i = 1 j = n a i j ( i 1 ) j i j if i = n j = 1 a i j i ( j 1 ) i j i j if i = 1 2 j ( n 1 ) a i j ( i 1 ) j i j i j if 2 i ( n 1 ) j = 1 a i j ( i 1 ) j i ( j 1 ) i j if i = n 2 j ( n 1 ) a i j i ( j 1 ) ( i 1 ) j i j if 2 i ( n 1 ) j = n a i j i ( j 1 ) ( i 1 ) j i j i j otherwise
Note may be taken here that the expression i j cannot be simplified as normal terms of an algebraic expression because these are positions determining the values.
4.
Add all the entries of the j t h column to have an entry k j = i = 1 n b i j .
5.
Find the letter from Table 1 corresponding to each number k i .
6.
The original plain text K is decrypted.
The decryption algorithm of this scheme is given as Algorithm 2.
Algorithm 2: CPG Decryption
Symmetry 16 01269 i002
Example 1. 
In this example, the CPG algorithm for encryption/decryption is applied on the letter “MATH". The example give the step by step explanation of the encryption/decryption algorithm. The text to be ciphered is "MATH", which by using the standard alphabetic positions, as indicated in Table 1, becomes 13 , 1 , 20 , 8 .
1. 
We have n = 4 , k 1 = 13 , k 2 = 1 , k 3 = 20 , k 4 = 8 .
2. 
Vertex labeling:
f ( x 11 ) = 4 , f ( x 21 ) = f ( x 31 ) = f ( x 41 ) = 3 f ( x 12 ) = 1 , f ( x 22 ) = f ( x 32 ) = f ( x 42 ) = 0 f ( x 13 ) = f ( x 23 ) = f ( x 33 ) = f ( x 43 ) = 5 f ( x 14 ) = f ( x 24 ) = f ( x 34 ) = f ( x 44 ) = 2
Hence, the required matrix B is constructed as
B = 4 1 5 2 3 0 5 2 3 0 5 2 3 0 5 2
3. 
Edge labeling:
f ( x 14 x 24 ) = 14 f ( x 14 x 24 ) = 24 f ( x 34 x 44 ) = 34 f ( x 11 x 12 ) = 11 f ( x 12 x 13 ) = 12 f ( x 13 x 14 ) = 13 f ( x 11 x 21 ) = 11 f ( x 21 x 31 ) = 21 f ( x 31 x 41 ) = 31 f ( x 21 x 22 ) = 21 f ( x 22 x 23 ) = 22 f ( x 23 x 24 ) = 23 f ( x 12 x 22 ) = 12 f ( x 22 x 32 ) = 22 f ( x 32 x 42 ) = 32
4. 
Vertex-wise weight calculations: The vertex and edge labeling of the graph P 4 P 4 is shown in Figure 1
w t ( x 11 ) = 11 + 22 + 4 = 26 w t ( x 21 ) = 11 + 21 + 21 + 3 = 56 w t ( x 12 ) = 11 + 1 + 12 + 12 = 36 w t ( x 22 ) = 12 + 0 + 22 + 22 + 21 = 77 w t ( x 13 ) = 12 + 5 + 13 + 13 = 43 w t ( x 23 ) = 13 + 5 + 22 + 23 + 23 = 86 w t ( x 14 ) = 13 + 2 + 14 = 29 w t ( x 24 ) = 23 + 14 + 2 + 24 = 63 w t ( x 31 ) = 21 + 31 + 3 + 31 = 86 w t ( x 41 ) = 31 + 3 + 41 = 75 w t ( x 32 ) = 31 + 22 + 0 + 32 + 32 = 117 w t ( x 42 ) = 41 + 42 + 32 + 0 = 115 w t ( x 33 ) = 32 + 23 + 33 + 33 + 5 = 126 w t ( x 43 ) = 42 + 33 + 43 + 5 = 123 w t ( x 34 ) = 24 + 33 + 2 + 34 = 93 w t ( x 44 ) = 43 + 34 + 2 = 79
Thus, the matrix A is obtained as
A = 26 36 43 29 56 77 86 63 86 117 126 93 75 115 123 79
5. 
Encrypted message:
26 , 36 , 43 , 29 , 56 , 77 , 86 , 63 , 86 , 117 , 126 , 93 , 75 , 115 , 123 , 79 is our encrypted message.
Decryption
1. 
The encrypted message 26 , 36 , 43 , 29 , 56 , 77 , 86 , 63 , 86 , 117 , 126 , 93 , 75 , 115 , 123 , 79 is received.
2. 
Construct matrix A from the encrypted message.
3. 
Using the formula in Equation (1), we calculate
b 11 = 26 11 11 = 4 b 21 = 56 11 21 21 = 3 b 12 = 36 11 12 12 = 1 b 22 = 77 21 12 22 22 = 0 b 13 = 43 12 13 13 = 5 b 23 = 86 22 13 23 23 = 5 b 14 = 29 13 14 = 2 b 24 = 63 23 14 24 = 2 b 31 = 36 21 31 31 = 3 b 41 = 75 31 41 = 3 b 32 = 117 31 22 32 32 = 0 b 42 = 115 32 41 42 = 0 b 33 = 126 32 23 33 33 = 5 b 43 = 123 33 42 43 = 5 b 34 = 93 33 24 34 = 2 b 44 = 79 34 43 = 2
4. 
Obtain the matrix
B = 4 1 5 2 3 0 5 2 3 0 5 2 3 0 5 2
5. 
Using column sums and the reverse of the encoding Table 1, we obtain
k 1 = b 11 + b 21 + b 31 + b 41 = 4 + 3 + 3 + 3 = 13 M k 2 = b 12 + b 22 + b 32 + b 42 = 1 + 0 + 0 + 0 = 1 A k 3 = b 13 + b 23 + b 33 + b 43 = 5 + 5 + 5 + 5 = 20 T k 4 = b 14 + b 24 + b 34 + b 44 = 2 + 2 + 2 + 2 = 8 H
and hence, the recovered text is M , A , T , H .

3.2. Data Security Using Complete Bipartite Graphs—I

This cryptographic algorithm uses a complete bipartite graph to encode plain text P of length n. The plain text characters are first converted to numerical values by using the Pythagorean table (Table 2) and vertex and edge labeling. To represent each character, a bipartite graph K 1 , n is created with one vertex representing the character and n vertices in the other set. Vertex and edge labels are assigned based on the character’s numerical value and graph positions. The edge weights are used to construct a matrix, which is then multiplied by a symmetric key matrix to yield a new matrix. The final encrypted message is a sequence derived from the remainders of the matrix when divided by n 2 . Decryption involves reversing these steps to recover the original plain text using two symmetric keys and solving linear equations.
Valuable contributions in this area may also be seenin [4,18]. Table 2 displays the Pythagorean numbers corresponding to the letters and Table 3 illustrates how the numbers are connected to the letters in order to allow for uniqueness in vertex labeling of a graph.

3.2.1. Encryption (CBG-I)

Let P be plain text of length n consisting of letters and f is a total labeling. The encryption scheme is stated as follows.
1.
Draw encryption Table 2.
2.
Let h 1 , , h n be the numbers corresponding to each letter using Table 3.
3.
Construct n copies of the complete bipartite graph K , n . Let V 1 , i = { a i } V 2 , i = { b i , j : 1 j n } be the two partite sets in the i t h copy of K 1 , n .
4.
Label the vertices as follows:
f ( a i ) = h i , where 1 i n .
f ( b i j ) = h i n + r i if j = 1 h i n if j 1 ,
5.
Label the edges as follows:
f ( a i b j ) = i j , where 1 i , j n . Note may be taken here that the expression i j cannot be simplified as normal terms of an algebraic expression as these are positions determining the values.
6.
Calculate the weight of each edge to construct the matrix M = ( m ) i j , where
m i j = h i + i j + f ( b i j )
7.
Fix the symmetric key K 1 = ( k ) i j , where
k i j = 0 if 1 j n and j < i < n j i + 1 otherwise ,
Thus, K 1 is an upper triangular n × n non-singular matrix.
8.
Find matrix N = M × K 1 .
9.
Divide each entry of the matrix N by n 2 to obtain
n i j = n 2 q i j + r i j
10.
K 2 = n 2 is the fixed symmetric key.
11.
Construct the matrix K 3 = ( q ) i j and R = ( r ) i j .
12.
For the plain text P, the cipher will be the array of n 2 numbers:
r 11 , , r 1 n , r 21 , , r 2 n , , r n 1 , , r n n

3.2.2. Decryption (CBG-I)

1.
Message is received as an array of n 2 numbers with two keys as matrices K 1 = ( k ) i j and K 3 = ( q ) i j and the fixed key K 2 = n 2 . It is important to note that K 1 and K 2 are fixed and K 3 varies.
2.
Find the matrix N = ( n ) i j , where n i j = n 2 q i j + r i j .
3.
Find K 1 1 and use it to obtain the matrix M = ( m ) i j = N K 1 1 .
4.
Corresponding to each entry m i j , construct the following linear equations:
m i j = x i + y i j + i j x i = y i 1 + y i 2 + + y i n y i 2 = y i 3 + + y i n
5.
By solving the above equations, the values of y i j are
y i j = 2 m i 2 m i 1 i 1 2 n + 1 if j 1 y i 2 + m i 1 m i 2 + 1 if j = 1 ,
Note may be taken here that the expression i 1 cannot be simplified as normal terms of an algebraic expression because these are positions determining the values.
6.
Obtain h i by adding all y i j , i.e., h i = i = 1 n y i j .
7.
Find the letter from Table 3 corresponding to each number h i .
8.
The original plain text P is decrypted.
For CBG-I, the encryption and decryption algorithms are given as Algorithms 3 and 4, respectively.
Algorithm 3: CBG-I Encryption
Symmetry 16 01269 i003
Algorithm 4: CBG-I Decryption
Symmetry 16 01269 i004
The following example explains the encryption and decryption algorithms.
Example 2. 
The text is "MAY", which, when coded using Table 3, is 42 , 11 , 73 , and the calculations are
b 11 = 42 3 = 14 b 21 = 11 3 + 2 = 5 b 31 = 73 3 + 1 = 25 b 12 = 14 b 22 = 11 3 = 3 b 32 = 24 b 13 = 14 b 23 = 11 3 = 3 b 33 = 24
Considering Figure 2, we have
M = 42 + 11 + 14 42 + 12 + 14 42 + 13 + 14 11 + 21 + 5 11 + 22 + 3 11 + 23 + 3 73 + 31 + 25 73 + 32 + 24 73 + 33 + 24
= 67 68 69 37 36 37 129 129 130
N = M K 1 , where K 1 = 1 2 3 0 1 2 0 0 1 . Divide each entry by n 2 = K 2 . Find K 3 and R from n i j = q i j n 2 + r i j . R is the cipher.
K 3 = 4 1 3 5 0 3 6 1 4
R = [ 4 , 5 , 6 , 1 , 0 , 1 , 3 , 3 , 4 ] is the cipher.
Decryption:
1. 
R = [ 4 , 5 , 6 , 1 , 0 , 1 , 3 , 3 , 4 ] is the received message with key [ K 1 , K 2 , K 3 ] .
2. 
Obtain the matrix
N = 67 202 406 37 110 220 129 387 775
and
M = 67 68 69 37 36 37 129 129 130
3. 
Find b i j = 2 m 12 m i 1 13 n + 1 .
b 13 = b 12 = 2 ( 68 ) 67 13 4 = 56 4 = 14 b 11 = b 12 + 67 68 + 1 = 14 1 + 1 = 14 b 22 = 2 m 22 m 21 23 4 = 2 ( 36 ) 37 23 4 = 3 b 21 = b 22 36 + 37 + 1 = 3 + 2 = 5 b 32 = 1 4 ( 2 ( 129 ) 129 31 2 ) = 24 b 31 = 24 + 129 129 + 1 = 25
a 1 = b 11 + b 12 + b 13 = 14 + 14 + 14 = 42 M a 2 = b 21 + b 22 + b 23 = 5 + 3 + 3 = 11 A a 3 = b 31 + b 32 + b 33 = 25 + 24 + 24 = 73 Y
Figure 2. Labeling of vertices and edges of the graph obtained from CBG-I for the word MAY.
Figure 2. Labeling of vertices and edges of the graph obtained from CBG-I for the word MAY.
Symmetry 16 01269 g002

3.3. Data Security Using Complete Bipartite Graphs—II

This cryptographic algorithm encodes a plain text message by converting each character to a numerical value from a predefined table. Each value is divided by 10, resulting in two arrays: one containing the quotient and another containing the remainder. A bipartite graph K n , n is created, with vertices and edges labeled based on their values. The encryption is carried out by calculating the weights of specific vertices and creating a cipher text from these weights. To decrypt, the receiver applies a formula to recover the remainders, and then, reconstructs the original numbers. The encryption table is used to find the corresponding characters, allowing the original plain text to be recovered. The detailed algorithm is stated below.

3.3.1. Encryption (CBG-II)

Let the plain text be K 1 , K 2 , , K n , where K i are the letters and n is the length of the plain text. Further, suppose that f is a total labeling. The encryption algorithm is as follows:
1.
Draw the encryption Table 2.
2.
Write the value of K i according to the table.
3.
Let a i be the values corresponding to each letter K i from Table 3.
4.
Divide each a i by 10 and let a i = 10 q i + r i .
5.
Construct the arrays Q = [ q 1 , q 2 , , q n ] and R = [ r 1 , r 2 , , r n ] .
6.
Construct the graph K n , n with partite sets V 1 = { b 1 , b 2 , , b n } and V 2 = { c 1 , c 2 , , c n } .
7.
Label the vertices and edges as follows:
For 1 i n
f ( b i ) = i , f ( c i ) = r i
f ( b j c i ) = j r i , 1 j n
8.
Compute the weight of each vertex c i by adding labels of all the edges incident on c i , i.e.,
w ( c i ) = f ( b i c i )
9.
Construct
C = ( w ( c 1 ) , w ( c 2 ) , , w ( c n ) )

3.3.2. Decryption (CBG-II)

Let w 1 , w 2 , , w n be the received cipher, where each w i 0 ( m o d n ) ; the decryption method is as follows:
1.
Find r i from the following formula:
r i = w i 5 n ( n + 1 ) n
2.
Obtain the array R = [ r 1 , r 2 , , r n ] .
3.
Find a i by using the key Q = [ q 1 , q 2 , , q n ] from the formula
a i = 10 q i + r i
4.
Find the letter from Table 3 corresponding to each number a i .
5.
The plain text K 1 , K 2 , , K n has been deciphered.
The algorithms for the encryption and decryption of CBG-II are given as Algorithms 5 and 6, respectively.
Algorithm 5: CBG-II Encryption
Symmetry 16 01269 i005
Algorithm 6: CBG-II Decryption
Symmetry 16 01269 i006
The following two examples explain this encryption/decryption scheme.
Example 3. 
Using Table 3, the text "KEY" becomes
a 1 = 22 , a 2 = 51 , a 3 = 73
Using a i = 10 q i + r i , we have
Q = [ 2 , 5 , 7 ] R = [ 2 , 1 , 3 ]
Consider a complete bipartite graph K 3 , 3 with vertex sets V 1 = { b 1 , , b 3 } and V 2 = { c 1 , , c 3 } and labeling as
f ( b i ) = i f ( c i ) = r i f ( b i c i ) = 10 · j + r i
The weights of the V 2 set of vertices of K 3 , 3 (shown in Figure 3) are calculated as
w t ( c 1 ) = 12 + 22 + 32 = 66 w t ( c 2 ) = 11 + 21 + 31 = 63 w t ( c 3 ) = 13 + 23 + 33 = 69
C = [ w t ( c 1 ) , , w t ( c 13 ) ] = [ 66 , 63 , 69 ]
Decipher
r i = w i 5 n ( n + 1 ) 15 r 1 = 66 5 · 3 · 4 3 = 2 r 3 = 63 5 · 3 · 4 3 = 1 r 3 = 69 5 · 3 · 4 3 = 3
which gives the deciphered array as 2 , 1 , 3 and the public key is Q = [ 2 , 5 , 7 ] . By using the formula
a i = 10 q i + r i
one obtains
[ 22 , 51 , 73 ] K E Y
Example 4. 
Using Table 3, the text "METAMATHEMATICS" becomes
a 1 = 42 , a 2 = 51 , a 3 = 23 , a 4 = 11 , a 5 = 42 , a 6 = 11 , a 7 = 23 , a 8 = 81 a 9 = 51 , a 10 = 42 , a 11 = 11 , a 12 = 23 , a 13 = 91 , a 14 = 31 , a 15 = 13
Using a i = 10 q i + r i , we have
Q = [ 4 , 5 , 2 , 1 , 4 , 1 , 2 , 8 , 5 , 4 , 1 , 2 , 9 , 3 , 1 ] R = [ 2 , 1 , 3 , 1 , 2 , 1 , 3 , 1 , 1 , 2 , 1 , 3 , 1 , 1 , 3 ]
Consider a complete bipartite graph K 13 , 13 with vertex sets V 1 = { b 1 , , b 13 } and V 2 = { c 1 , , c 13 } and labeling as
f ( b i ) = i f ( c i ) = r i f ( b i c i ) = 10 · j + r i
The weights of the V 2 set of vertices of K 13 , 13 are calculated as
w t ( c 1 ) = 12 + 22 + 32 + 42 + 52 + 62 + 72 + 82 + 92 + 102 + 112 + 122 + 132 + 142 + 152 = 1230 w t ( c 2 ) = 11 + 21 + 31 + 41 + 51 + 61 + 71 + 81 + 91 + 101 + 111 + 121 + 131 + 141 + 151 = 1215 w t ( c 15 ) = 13 + 23 + 33 + 43 + 53 + 63 + 73 + 83 + 93 + 103 + 113 + 123 + 133 + 143 + 153 = 1245
C = [ w t ( c 1 ) , , w t ( c 15 ) ] = [ 1230 , 1215 , 1245 , 1215 , 1230 , 1215 , 1245 , 1215 , 1215 , 1230 , 1215 , 1245 , 1215 , 1215 , 1245 ]
Decipher
r i = w i 5 n ( n + 1 ) 15 r 1 = 1230 5 · 15 · 16 15 = 2 r 15 = 1245 5 · 15 · 16 15 = 3
which gives the deciphered array as 2 , 1 , 3 , 1 , 2 , 1 , 3 , 1 , 1 , 2 , 1 , 3 , 1 , 1 , 3 and the public key is Q = [ 4 , 5 , 2 , 1 , 4 , 1 , 2 , 8 , 5 , 4 , 1 , 2 , 9 , 3 , 1 ] . By using the formula
a i = 10 q i + r i
one obtains
[ 42 , 51 , 23 , 11 , 42 , 11 , 23 , 81 , 51 , 42 , 11 , 23 , 91 , 31 , 13 ] M E T A M A T H E M A T I C S

4. Discussion

The complexity of algorithms, error resistance (in both transmission, and subsequently, the decryption), and key sizes are a few of the sterling metrics to measure the strengths and weaknesses of cryptography systems. The algorithms presented herein were implemented using Computer Algebra System Mathematica 12.0 on an Intel(R) Core(TM) i7-7500U CPU with a clock speed of 2.7 GHz.

4.1. Statistical Analysis

A statistical analysis has also been carried out for these schemes, the results of which are given in Table 4.
The entropy of the plain text is a measure of the uncertainty or randomness of the original data. Generally speaking, higher entropy indicates greater unpredictability in the data. We may evaluate the degree to which the encryption process adds uncertainty by comparing the entropies of the plain text and cipher text. In Table 4, the average entropies of the plain text, cipher text, and key are computed. The results show that the average entropy ratios are 2.545 , 3.3872 , and 0.3448 for the encryption algorithm for the CPG, CBG-I, and CBG-II schemes, respectively. The analysis reveals that both the CPG and CBG-I encryption schemes generate cipher text with significantly higher entropy than the plain text, indicating strong security and effective obfuscation of the message. Although CBG-II shows a lower entropy ratio, the incorporation of a robust key compensates for this, ensuring sufficient security. Overall, these encryption schemes demonstrate varying levels of protection, with key strength playing a critical role in enhancing security.
The complexity analysis results are given in the next section.

4.2. Time Complexity

For CPG encryption, we observe the growth of execution time with input size. Based on the data (Table 5) and corresponding Figure 4, the execution time seems to grow faster than linearly but not as fast as quadratically. Hence, the complexity lies between linear and quadratic, potentially O ( n l o g ( n ) ) or even higher depending on the particular implementation. The major time consuming loop is at lines 10–14 of Algorithm 1 as it contains two FOR loops and four IF–THEN statements. Similar considerations determine the complexity of CBG-I (Algorithm 3) to be of order O ( n ) and CBG-II (Algorithm 5) of order O ( 1 ) . While comparing the decryption times [3], CBG-I decryption has the most time-expensive statement at lines 4–10 of Algorithm 4, as it comprises three assignments and one IF–THEN statement, which amount to a time complexity of order O ( n 2 ) . Comparatively speaking, CBG-I’s decryption is most expensive followed by CPG of order O ( n ) and CBG-II of order O ( 1 ) . Table 6 summarizes the whole discussion.
A pictorial representation of the time-usage data is shown in Figure 4.

4.3. Space Complexity

Considering the data (Table 7) and the charts (Figure 5), once again CBG-II consumed much less memory. Its space complexity is of order O ( 1 ) . Considering the main loops and decisions involved, the space complexity results are summed up in Table 8.
Space complexity is visualized in Figure 5.
It is clear from the above complexity data and results that CBG-II is a clear winner in terms of efficiency, followed by CPG and CBG-I. CBG-I, despite being strong in terms of error resistance, is the worst performer, as its decryption module takes a long time and uses a large amount of memory. Key size consideration for these schemes remains of little importance as the keys are symmetric and public in most cases. It may be noted that these schemes have ensured error resistance by repeating certain information in the weight matrices. So, if there is an error, chances are good that it can be recognized and rectified with a high probability of success. While considering the future potential directions, these algorithms may be coupled or extended with compression of matrix schemes. We are currently developing a few such schemes and shall report on them subsequently.

5. Conclusions and Future Directions

In conclusion, cryptography stands as an indispensable tool in fortifying the security landscape of the digital era. This research contributes to the advancement of cryptographic protocols [19,20,21] through the utilization of encryption and decryption techniques rooted in graph theory. Leveraging Cartesian product graphs and complete bipartite graphs exemplifies the potential for bolstering data confidentiality and integrity within communication systems. Rigorous assessment of time and space complexities corroborates the efficacy of these cryptographic algorithms, thereby laying the groundwork for fortified and secure digital communication channels.
Although data transmission errors are inevitable, the algorithms developed herein demonstrate significant error mitigation capabilities. For example, in Schemes 1 and 3, the data are encrypted in the form of an array of n 2 numbers. In the decryption process, the entries in each column of the final matrix must be equal except possibly the first entry. If the entries are not equal, the receiver identifies the error. Thus, there is a high probability that the receiver identifies the discrepancies in the received data by using a receiver-driven matrix construction process, which allows self-correction mechanisms to correct any errors. By improving the robustness and dependability of cryptographic schemes, this inherent error-reducing feature advances the state of the art in secure data communication protocols.
Future research should look into several exciting directions for improving these algorithms.
  • Investigate how to improve the encryption and decryption processes for larger datasets. This includes looking into more efficient algorithms or data structures that could reduce computation time and resource usage, making these cryptographic methods suitable for real-world applications with large amounts of data.
  • Integration with modern cryptographic systems: Assess the algorithms’ compatibility and security when combined with current cryptographic frameworks and systems. Research could focus on how these methods compare to established standards such as AES or RSA, as well as their potential for hybrid cryptographic systems that combine the strengths of multiple techniques.
  • Investigate these cryptographic algorithms’ resilience to potential future quantum computing threats. This includes determining how well the algorithms perform against quantum algorithms, which have the potential to break traditional cryptographic methods. Research could concentrate on adapting these algorithms to be quantum-resistant or developing new cryptographic techniques that ensure security in the face of emerging quantum technologies.

Author Contributions

Conceptualization, S.A.U.H.B. and A.K.; methodology, S.A.U.H.B. and A.K.; software, S.A.U.H.B. and A.K.; validation, S.A.U.H.B., A.K. and F.M.A.S.; formal analysis, S.A.U.H.B. and A.K.; investigation, S.A.U.H.B. and A.K.; resources, F.M.A.S., M.E.E.D. and A.G.; writing—original draft preparation, S.A.U.H.B. and A.K.; writing—review and editing, S.A.U.H.B., F.M.A.S., M.E.E.D., A.G. and A.K.; supervision, S.A.U.H.B.; project administration, S.A.U.H.B.; funding acquisition, F.M.A.S., M.E.E.D. and A.G. All authors have read and agreed to the published version of the manuscript.

Funding

The authors extend their appreciation to the Deanship of Research and Graduate Studies at King Khalid University for funding this work through Large Research Project under grant number RGP2/126/45. The authors also express their appreciation to the Deanship of Scientific Research at Northern Border University, Arar, Saudi Arabia for funding this research work through project number “NBU-FFR-2024-1324-05”. And this study is supported via funding from Prince Sattam bin Abdulaziz University project number (PSAU/2024/R/1445).

Data Availability Statement

The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request.

Acknowledgments

The authors want to acknowledge the valuable contributions made by the editor and the five anonymous reviewers.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Xue, Y.; Chen, L.; Mu, Y.; Zeng, L.; Rezaeibagha, F.; Deng, R.H. Structured encryption for knowledge graphs. Inf. Sci. 2022, 605, 43–70. [Google Scholar] [CrossRef]
  2. Neamah, A.A.; Shukur, A.A. A Novel Conservative Chaotic System Involved in Hyperbolic Functions and Its Application to Design an Efficient Colour Image Encryption Scheme. Symmetry 2023, 15, 1511. [Google Scholar] [CrossRef]
  3. Heru, E.K.; Faisal; Pranoto, H. File Encryption Application using Menezes-Vanstone Elliptic Curve Cryptography Based on Python. Procedia Comput. Sci. 2023, 227, 651–658. [Google Scholar] [CrossRef]
  4. Zhang, H.; Lin, L.; Xu, L.; Wang, X. Graph partition based privacy-preserving scheme in social networks. J. Netw. Comput. Appl. 2021, 195, 103214. [Google Scholar] [CrossRef]
  5. Senturk, I.; Gursoy, N.K. An Algorithmic Observation of Directed Graphs on Lattices. J. Int. Math. Virtual Inst. 2022, 12, 17–32. [Google Scholar] [CrossRef]
  6. Rosen, K.H. Elementary Number Theory and its Applications, 5th ed.; Addison-Wesley: Boston, MA, USA, 2005. [Google Scholar]
  7. Stinson, D.R. Cryptography: Theory and Practice, 4th ed.; Chapman and Hall/CRC: Boca Raton, FL, USA, 2018. [Google Scholar]
  8. Lalitha, M.; Vasu, S. A Study On Graph Theory in Cryptography Using Python. J. Eng. Technol. Innov. Res. 2023, 10. [Google Scholar]
  9. Amudha, P.; Sagayaraj, A.C.C.; Sheela, A.C.S. An Application of Graph Theory in Cryptography. Int. J. Pure Appl. Math. 2018, 119, 375–383. [Google Scholar]
  10. Chowdhury, S.; Ghosh, P.; Jana, M. An Approach of Graph Theory for Solving Cryptographic Problem. BKGC Sch. 2020, 1, 64–68. [Google Scholar]
  11. Mohan, P.; Rajendran, K.; Rajesh, A. An Encryption Technique Using a Complete Graph with a Self-Invertible Matrix. J. Algebr. Stat. 2022, 13, 1821–1826. [Google Scholar]
  12. Gurjar, D.K.; Krishnaa, A. Complete Graph and Hamiltonian Cycle in Encryption and Decryption. Int. J. Math. Trends Technol. 2021, 67, 62–71. [Google Scholar] [CrossRef]
  13. Beaula, C.; Venugopal, P.; Praba, B. Block Encryption and Decryption of a Sentence Using Decomposition of the Turan Graph. J. Math. 2023, 2023, 7588535. [Google Scholar] [CrossRef]
  14. Zhang, W.; Wang, S.; Han, W.; Yu, H.; Zhu, Z. An Image Encryption Algorithm Based on Random Hamiltonian Path. Entropy 2020, 22, 73. [Google Scholar] [CrossRef] [PubMed]
  15. Kumari, M.; Kirubanad, V. Data Encryption And Decryption Using Graph Plotting. Int. J. Civ. Eng. Technol. 2018, 9, 36–46. [Google Scholar]
  16. Meenakshi, A.; Kannan, A.; Cep, R.; Elangovan, M. Efficient Graph Network Using Total Magic Labeling and Its Applications. Mathematics 2023, 11, 4132. [Google Scholar] [CrossRef]
  17. Perera, P.A.S.D.; Wijesiri, G.S. Encryption and Decryption Algorithms in Symmetric Key Cryptography Using Graph Theory. Psychol. Educ. J. 2021, 58, 3420–3427. [Google Scholar] [CrossRef]
  18. Wu, Y.; Chen, L. Structured encryption for triangle counting on graph data. Future Gener. Comput. Syst. 2023, 145, 200–210. [Google Scholar] [CrossRef]
  19. Huang, Z.; Lai, J.; Chen, W.; Li, T.; Xiang, Y. Data security against receiver corruptions: SOA security for receivers from simulatable DEMs. Inf. Sci. 2019, 471, 201–215. [Google Scholar] [CrossRef]
  20. Das, R.; Khan, A.; Arya, R.; Ilkhom, B.; Bakhtiyor, A.; Safoyev, N.; Khudoykulov, Z. SSKA: Secure symmetric encryption exploiting Kuznyechik algorithm for trustworthy communication. Int. J. Syst. Assur. Eng. Manag. 2024, 15, 2391–2400. [Google Scholar] [CrossRef]
  21. Gursoy, A.; Gursoy, N.K.; Oner, T.; Senturk, I. An alternative construction of graphs by associating with algorithmic approach on MV-algebras. Soft Comput. 2021, 25, 13201–13212. [Google Scholar] [CrossRef]
Figure 1. Labeling of vertices and edges of the graph obtained from Algorithm 1 for the word MATH.
Figure 1. Labeling of vertices and edges of the graph obtained from Algorithm 1 for the word MATH.
Symmetry 16 01269 g001
Figure 3. Labeling of vertices and edges of the graph obtained from Algorithm 3 for the word Key.
Figure 3. Labeling of vertices and edges of the graph obtained from Algorithm 3 for the word Key.
Symmetry 16 01269 g003
Figure 4. Time complexity plots.
Figure 4. Time complexity plots.
Symmetry 16 01269 g004
Figure 5. Space complexity plots.
Figure 5. Space complexity plots.
Symmetry 16 01269 g005
Table 2. Pythagorean numbers corresponding to each letter.
Table 2. Pythagorean numbers corresponding to each letter.
123456789
1ABCDEFGHI
2JKLMNOPQR
3STUVWXYZ
Table 3. Adjusted table used in encryption/decryption scheme.
Table 3. Adjusted table used in encryption/decryption scheme.
ABCDEFGHIJKLM
11213141516171819112223242
NOPQRSTUVWXYZ
52627282921323334353637383
Table 4. Entropy analysis of the encryption schemes for the plain text of length between 100 and 1000.
Table 4. Entropy analysis of the encryption schemes for the plain text of length between 100 and 1000.
EncryptionEntropy of Plain TextEntropy of Cipher TextEntropy RatioEntropy of Key
CPG4.556611.963777782.545255556NA
CBG-I15.450458334.35813.3872489839.407766667
CBG-II1.571794.5586766670.3448539543.097433333
Table 5. Time usage data.
Table 5. Time usage data.
EncryptionDecryption
nCPGCBG-ICBG-IICPGCBG-ICBG-II
4000.016000
2400000.0150
800.0150.12500.0470.4690
1600.0780.4370.0160.1563.6560
4801.04712.2820.0471.3999.6560
10004.547125.4680.2198.0311253.5470
Table 6. Time complexity comparison: CBG-II is clear winner in terms of both encryption and decryption.
Table 6. Time complexity comparison: CBG-II is clear winner in terms of both encryption and decryption.
AlgorithmComplexityMajor Responsible Part
CBG-II Encryption O ( 1 ) Lines 5–11: 1 loop, zero decisions and 1 assignment
CBG-II Decryption O ( 1 ) Lines 2–5: Only 2 assignments
CPG Encryption O ( n l o g ( n ) ) Lines 10–14: 2 FOR loops, 4 decisions
CPG Decryption O ( n ) Lines 4–25: 2 FOR loops, 9 decisions
CBG-I Encryption O ( n ) Lines 10–15: 1 FOR loop, 1 decision
CBG-I Decryption O ( n 2 ) Lines 4–10: 3 assignments, 1 decision, populating of B matrix
Table 7. Memory usage data.
Table 7. Memory usage data.
EncryptionDecryption
nCPGCBG-ICBG-IICPGCBG-ICBG-II
427,976365,128165,92016,432588,248148,896
24379,024732,656227,952247,7922,106,592150,624
803,609,59210,096,760527,7762,400,14435,762,872156,000
160139,99,58471,819,0561,238,1609,327,504246,394,448163,680
480123,039,2561,777,324,3527,456,74482,502,5445,921,769,112194,016
1000527,699,57616,081,460,43229,198,304354,140,80852,601,997,776244,032
Table 8. Space complexity comparison: CBG-II uses considerably less memory resources, followed by CPG, while CBG-I is the most expensive algorithm.
Table 8. Space complexity comparison: CBG-II uses considerably less memory resources, followed by CPG, while CBG-I is the most expensive algorithm.
Algorithm NameComplexityMajor Responsible Part
CBG-II Encryption O ( 1 ) Lines 5–11: 1 loop, zero decisions, and 1 assignment
CBG-II Decryption O ( n ) Lines 2–5: Only 2 assignments
CPG Encryption O ( n ) Lines 10–14: 2 FOR loops, 4 decisions
CPG Decryption O ( n 2 ) Lines 4–25: 2 FOR loops, 9 decisions
CBG-I Encryption O ( n ) Lines 10–15: 1 FOR loop, 1 decision
CBG-I Decryption O ( n 3 ) Populating of matrix B
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Bokhary, S.A.U.H.; Kharal, A.; Samman, F.M.A.; Dalam, M.E.E.; Gargouri, A. Efficient Graph Algorithms in Securing Communication Networks. Symmetry 2024, 16, 1269. https://doi.org/10.3390/sym16101269

AMA Style

Bokhary SAUH, Kharal A, Samman FMA, Dalam MEE, Gargouri A. Efficient Graph Algorithms in Securing Communication Networks. Symmetry. 2024; 16(10):1269. https://doi.org/10.3390/sym16101269

Chicago/Turabian Style

Bokhary, Syed Ahtsham Ul Haq, Athar Kharal, Fathia M. Al Samman, Mhassen. E. E. Dalam, and Ameni Gargouri. 2024. "Efficient Graph Algorithms in Securing Communication Networks" Symmetry 16, no. 10: 1269. https://doi.org/10.3390/sym16101269

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop