ArticlePDF Available

Encryption and Decryption Algorithms in Symmetric Key Cryptography Using Graph Theory

Authors:

Abstract and Figures

The present-day society depends heavily on digital technology where it is used in many applications such as banking and e-commerce transactions, computer passwords, etc. Therefore, it is important to protect information when storing and sharing them. Cryptography is the study of secret writing which applies complex math rules to convert the original message into an incomprehensible form. Graph theory is applied in the field of cryptography as graphs can be simply converted into matrices There are two approaches of cryptography; symmetric cryptography and asymmetric cryptography. This paper proposes a new connection between graph theory and symmetric cryptography to protect the information from the unauthorized parties. This proposed methodology uses a matrix as the secret key which adds more security to the cryptosystem. It converts the plaintext into several graphs and represents these graphs in their matrix form. Also, this generates several ciphertexts. The size of the resulting ciphertexts are larger than the plaintext size.
Content may be subject to copyright.
PSYCHOLOGY AND EDUCATION (2021) 58(1): 3420-3427 ISSN: 00333077
3420
www.psychologyandeducation.net
Encryption and Decryption Algorithms in Symmetric Key Cryptography
Using Graph Theory
P.A.S.D.Perera
Department of Mathematics, University of Kelaniya, Kelaniya, Sri Lanka. dhanalishalini@gmail.com
G.S.Wijesiri
Department of Mathematics, University of Kelaniya, Kelaniya, Sri Lanka. sujeew@kln.ac.lk
ABSTRACT
The present-day society depends heavily on digital technology where it is used in many applications such as banking and e-commerce
transactions, computer passwords, etc. Therefore, it is important to protect information when storing and sharing them. Cryptography
is the study of secret writing which applies complex math rules to convert the original message into an incomprehensible form. Graph
theory is applied in the field of cryptography as graphs can be simply converted into matrices There are two approaches of
cryptography; symmetric cryptography and asymmetric cryptography. This paper proposes a new connection between graph theory
and symmetric cryptography to protect the information from the unauthorized parties. This proposed methodology uses a matrix as the
secret key which adds more security to the cryptosystem. It converts the plaintext into several graphs and represents these graphs in
their matrix form. Also, this generates several ciphertexts. The size of the resulting ciphertexts are larger than the plaintext size.
Keywords:
Decryption, Encryption, Graph Theory, Symmetric Key Cryptography
Article Received: 18 October 2020, Revised: 3 November 2020, Accepted: 24 December 2020
I. Introduction
The field of cryptology is divided into two parts
namely, cryptography and cryptanalysis [5].
Cryptography is the art of converting the original
message into an incomprehensible form, with the
intention of hiding the meaning, so that only the
parties who are intended can read and process the
information. Cryptanalysis is the science of
breaking cryptosystems.
There are several components in a cryptosystem.
Sender and receiver are the one who sends the
message and the one who receives the message
respectively. Attacker is the one who tries to get the
message in an unauthorized way. The original
message sent by the sender is known as plaintext
and the secret message or the encrypted message is
known as ciphertext. The process of converting the
plaintext into ciphertext is called encryption while
the reverse process is called decryption.
Symmetric key and asymmetric key cryptography
are two main branches of cryptography. In
asymmetric key cryptography, the sender encrypts
the message using a key known as public key and
sends the encrypted message to the receiver. The
receiver then decrypts the ciphertext by using
another key called private key. Yet in symmetric
key cryptography, both the sender and the receiver
use the same key to encrypt as well as to decrypt the
message.
In [2], a new way of applying graph theory in
cryptography is discussed. The original message is
encrypted into a Euler Graph. This graph is then
converted into several matrices and sent to the
receiver. In [4], a modified version of Affine cipher
is proposed. In this algorithm, each character of the
plaintext is converted into a numeric value and
these numeric values are plotted into a graph. The
graph is then sent to the receiver. In [1,3], a new
PSYCHOLOGY AND EDUCATION (2021) 58(1): 3420-3427 ISSN: 00333077
3421
www.psychologyandeducation.net
encryption algorithm is proposed using graph theory
where the plaintext is divided into several blocks.
These blocks are then converted into graphs and
their graph representations are sent to the receiver.
This paper proposes a new algorithm to encrypt and
decrypt the message using graph theory in
symmetric key cryptography.
The rest of the paper is organized as follows. Some
mathematical preliminaries that are used in the
proposed algorithm are introduced in section II. The
proposed methodology is discussed in section III.
Finally, in section IV, conclusions are stated.
II. Theoretical Preliminaries
2.1 Graph
A graph G consists of a set of objects V={v1, v2, v3,
…} called vertices and another set E= {e1, e2, e3, …}
called edges. Usually, a graph is denoted as G= (V,
E)[7].
2.2 Complete Graph
A graph G is said to be complete if every vertex in G
is connected with every other vertex. A complete
graph with n vertices is denoted by Kn. Then Kn has
n(n-1)/2 edges[6].
2.3 Weighted Graph
A weighted graph is a graph in which each edge is
given a numerical weight[6].
2.4 Matrix Representation
Adjacency Matrix
The adjacency matrix of the graph G = (V, E) is a
n×n matrix D = (dij), where n is the number of
vertices in G, V ={v1,v2,v3,…} , E = {e1, e2, e3,…}.
dij is 1 if there is an edge between vi and vj and dij is
0 if there is no edge between vi and vj[7].
III. Proposed Methodology Table -1 Encoding Table
A
B
C
D
E
F
G
H
I
J
K
L
M
0
1
2
3
4
5
6
7
8
9
10
11
12
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
13
14
15
16
17
18
19
20
21
22
23
24
25
3.1 Steps of Encryption
1) Select a key (K) which is a square invertible
matrix.
2) Define the values for and satisfying the
conditions; and
where m=26.
3) Convert each character of the plaintext into
a numeric value , using the encoding
table(Table -1).
4) Obtain the letters , corresponding to the
value , using the encoding
table.
5) Obtain the numeric values where is the
ASCII value of .
6) Obtain the letters , corresponding to the
value , using the encoding
table. Here is the difference between
maximum and minimum indexes of the
encoding table.
7) Divide these letters into several blocks of
size n-1 If block size <n-1, add padding
characters to complete the block size.
8) Represent each character of the block as
vertices. Connect each vertex with a
weighted edge.
PSYCHOLOGY AND EDUCATION (2021) 58(1): 224-230 ISSN: 00333077
3422
www.psychologyandeducation.net
9) Make the graph complete by adding extra
edges with random weights greater than m.
10)Identify a special character for each block. If
it is the initial block, then the special
character is the letter corresponding to the
summation of elements in K. If it is not the
initial block, then the special character is the
last character of the previous block. Add
this special character to the beginning of the
block.
11)Construct the corresponding adjacency
matrix (M).
12)C = M×K and send C to the receiver.
3.2 Steps of Decryption
1) Receive several matrices as ciphertext. (C).
2) Calculate the matrix (M) where M =C×K-1
3) Draw the weighted graph whose adjacency
matrix is M.
4) Identify the special character of the initial
block by using K.
5) Convert all the vertices into letters using the
encoding table and the edge weights.
6) Convert all the characters (ignore the special
characters) into numeric values (s), using
the encoding table.
7) Let p = s+(m×q) where
8) Obtain the letters (y) whose ASCII value is
p+r.
9) Obtain the corresponding numeric value (x)
of y using the encoding table.
10) Obtain the letters corresponding to the value
a-1(x-b) which is the plaintext.
3.3 Example
Suppose the plaintext is “DECEMBER FIRST “.
Let a=17, b=23 and
. Hence exists.
From the encoding table,
From ,
Table -2 Encryption mechanism
D
E
C
E
M
B
E
R
F
I
R
S
T
3
4
2
4
12
1
4
17
5
8
17
18
19
22
13
5
13
19
14
13
0
4
3
0
17
8
W
N
F
N
T
O
N
A
E
D
A
R
I
87
78
70
78
84
79
78
65
69
68
65
82
73
10
1
19
1
7
2
1
14
18
17
14
5
22
K
B
T
B
H
C
B
O
S
R
O
F
W
Table- 2 shows the calculations that need to be done in order to obtain the first set of ciphertext.
Convert each character of the block into vertices and connect these vertices with weighted edges. See Figure 1
below.
PSYCHOLOGY AND EDUCATION (2021) 58(1): 3420-3427 ISSN: 00333077
3423
www.psychologyandeducation.net
Figure 1: Weighted graphs
The weights of the edges are given by using the
encoding table.
For example, the weight of the edge KB is
calculated as follows:
Weight KB = (index of B) - (index of K)
Make these graphs complete by adding extra edges
with random weights greater than m.
Next, identify the special character for each block.
Special characters of the other blocks are assigned
to be the last character of the previous block. Add
these special characters to the beginning of each
block. Figure 2 shows the complete weighted
graphs with the special characters.
Figure 2: Final graph
PSYCHOLOGY AND EDUCATION (2021) 58(1): 224-230 ISSN: 00333077
3424
www.psychologyandeducation.net
The adjacency matrices of the resulted graphs are multiplied with the key matrix . (Here is the index of
the block.)
To decrypt, multiply the received ciphertexts with
Now draw the graphs whose adjacency matrices are s. See Figure 3 below.
PSYCHOLOGY AND EDUCATION (2021) 58(1): 3420-3427 ISSN: 00333077
3425
www.psychologyandeducation.net
Figure 3:Final graph with extra edges
Ignore the edges having weights greater than . See figure 4.
Figure 4:Simplified graph
We Know,
i.e.
Next, convert all the other vertices into letters using the encoding table.
For example, can be converted into a letter as follows:
1st vertex≡-6+16=10
PSYCHOLOGY AND EDUCATION (2021) 58(1): 224-230 ISSN: 00333077
3426
www.psychologyandeducation.net
Similarly, obtain the letter representation of the other vertices as well. Ignore the letters from special characters.
Table -3 Decryption Mechanism
Ciphertext
K
B
T
B
H
C
B
O
S
R
O
F
W
A
B
C
s
10
1
19
1
7
2
1
14
18
17
14
5
22
0
1
2
p=s+(26×q)
62
53
45
53
59
54
53
40
44
43
40
57
48
52
53
54
p+25
87
78
70
78
84
79
78
65
69
68
65
82
73
77
78
79
y
W
N
F
N
T
O
N
A
E
D
A
R
I
M
N
O
x
22
13
5
13
19
14
13
0
4
3
0
17
8
12
13
14
17-1(x-23) mod 26
3
4
2
4
12
1
3
17
5
8
17
18
19
7
4
1
plaintext
D
E
C
E
M
B
E
R
F
I
R
S
T
A
B
C
The calculations to be done in order to obtain the
plaintext is in Table-3.
Ignore the last three characters as they are the
padding characters.
Therefore,
3.4 Discussion
The present society depends on digital tools in
almost every activity in their day-to-day life.
Therefore, protecting the information which are
being shared is the most pivotal task today.
There are many algorithms that have been
developed to safeguard the data from unauthorized
parties. An algorithm is claimed to provide a strong
protection if the ciphertext is held unrevealed even
if the attacker has all the information of the
algorithm. Therefore, the security of an algorithm
depends on several factors, such as how hard it is to
guess the secret key and how hard to guess the
plaintext even though the whole ciphertext is
obtained by the attacker.
The proposed methodology generates a ciphertext
where its size is larger than the plaintext size. Also,
this algorithm uses a matrix of order (n×n) as the
secret key, which makes it hard to guess the secret
key. The ciphertexts are obtained by applying
matrix multiplication. This adds more security to
the plaintext. Further, this methodology generates
several matrices as the ciphertext which makes the
algorithm strong against cryptanalysis as the
probability of receiving the whole ciphertext is low.
IV.CONCLUSION
The symmetric key cryptography is used to encrypt
large amounts of data as it is faster than asymmetric
cryptography. In this approach, sharing the shared
key via a secured channel is the most important
thing. This paper proposes a new methodology to
overcome this difficulty using graph theory. The
proposed methodology first converts the original
message into several graphs. And it further
transforms these graphs into matrices. Finally,
obtains the ciphertext by multiplying these matrices
with the secret key. This paper explains the
proposed encryption and decryption processes
further by providing an example as well.
REFERENCES
[1] Wael Mahmoud Al Etaiwi. Encryption
algorithm using graph theory. Journal of
Scientific Research & Reports,3(19):2519-
2527,2014.
[2] P. Amudha, A. C. Charles Sagayaraj, and A.C.
Shantha Sheela. An application of graph theory
in cryptography. International journal of Pure
PSYCHOLOGY AND EDUCATION (2021) 58(1): 3420-3427 ISSN: 00333077
3427
www.psychologyandeducation.net
and Applied Mathematics, 119(13):375-383,
2018.
[3] Safaa Hraiz and Wael Etaiwi. Symmetric
encryption algorithm using graph
representation. In 2017 8th International
Conference on Information Technology (ICIT),
pages 501-506. IEEE, 2017
[4] Manisha Kumari and V.B. Kirubanad. Data
encryption and decryption using graph plotting.
International Journal of Civil Engineering and
Technology (IJCIET) Volume,9:36-46, 2018.
[5] Christof Paar and Jan Pelzl. Understanding
cryptography: a textbook for students and
practitioners. Springer Science & Business
Media, 2009.
[6] Keijo Ruohonen, Graph Theory (2013).
[7] C. Vasudev. Graph theory with applications.
New Age International, 2006.
... Meenakshi et al. highlighted efficient domination and total magic labeling techniques for encryption and decryption [5]. Perera and Wijesiri discussed using matrices as secret keys in symmetric cryptography, enhancing data protection by converting plaintext into ciphertext [6]. ...
... The ordered list of 36 elements [6,4,4,4,4,4, 1, 2, 1, 1, 1, 1, 2, 2, 5, 2, 2, 2, 9,9,9,11,9,9,9,9,9,9,10,9,6,6,6,6,6,9] is our cipher. Decryption Chopping the received cipher list into chunks of size length of list = √ 36 = 6 each and stacking to get the matrix ...
... The ordered list of 36 elements [6,4,4,4,4,4, 1, 2, 1, 1, 1, 1, 2, 2, 5, 2, 2, 2, 9,9,9,11,9,9,9,9,9,9,10,9,6,6,6,6,6,9] is our cipher. Decryption Chopping the received cipher list into chunks of size length of list = √ 36 = 6 each and stacking to get the matrix ...
Preprint
Full-text available
This paper presents four novel schemes for secure data encryption utilizing mathematical transformations. The first scheme employs matrix manipulations and partitioning of numerical values derived from plain text characters, constructing a cipher through matrix additions. The second scheme introduces division operations and additional transformation layers for enhanced data obscurity. The third scheme incorporates tridiagonal matrices, creating a structured encryption process. The fourth scheme refines this approach with quotient-remainder operations and symmetric keys to construct a tridiagonal matrix cipher. Detailed algorithms for encryption and decryption are provided, with examples illustrating practical applications. This work contributes to mathematical cryptography by offering enhanced security methods for digital communication.
... A random graph is used to encode images by making the vertices public while keeping the edges secret. Afterward, the image contrast is adjusted [11]. A symmetric encryption algorithm transforms the original text into a series of graphs using a secret key, resulting in an increase in the size of the encrypted text compared to the original text [12], [13]. ...
Article
Full-text available
This work presents a new encryption technique that ensures safe communication through two distinct phases: utilizing monoalphabetic substitution ciphers that rely on agreed-upon character-swapping arrangements between authorized individuals and applying an alphabetical encryption table. In addition, the research utilizes the Kurskal technique to calculate the minimum spanning tree, which improves security by creating intricate encrypted text using a shared key based on ideas drawn from graph theory.
... 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. ...
Article
Full-text available
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.
... For protecting the information, in 2021, P. A. S. D. Perera, G. S . Wijesiri [22] introduced the connection between graph theory and symmetric cryptography. ...
Article
Full-text available
This work presents the employment of graph theory for cryptographic applications. A Cartesian product graph (CPG) is used to propose new symmetric encryption schemes. On proposed encryption schemes, the ciphertexts of the plaintexts are sent to the receiver entity as the CPGs. The CPG is created based on two graphs G and H that are generated depending on the random choices of the plaintext bits. These bits are used as vertices of graphs G and H. The purpose of using the CPG is to increase the security level of the symmetric encryption schemes in comparison with other encryption schemes. Two study cases of the proposed symmetric Cartesian product graphic encryption (SCPGE) schemes are presented as new experimental results. The security issues of the proposed SCPGE schemes are determined. The SCPGE schemes consider as new insights for more secure communications.
... For protecting the information, in 2021, P. A. S. D. Perera, G. S . Wijesiri [22] introduced the connection between graph theory and symmetric cryptography. ...
Conference Paper
This work presents the employment of graph theory for cryptographic applications. A Cartesian product graph (CPG) is used to propose new symmetric encryption schemes. On proposed encryption schemes, the ciphertexts of the plaintexts are sent to the receiver entity as the CPGs. The CPG is created based on two graphs G and H that are generated depending on the random choices of the plaintext bits. These bits are used as vertices of graphs G and H. The purpose of using the CPG is to increase the security level of the symmetric encryption schemes in comparison with other encryption schemes. Two study cases of the proposed symmetric Cartesian product graphic encryption (SCPGE) schemes are presented as new experimental results. The security issues of the proposed SCPGE schemes are determined. The SCPGE schemes consider as new insights for more secure communications.
... From the latter, a double vertex graph is constructed. We also mention the work [19], in which the original message is converted into several graphs. The ciphertext is obtained from the projection of the adjacency matrices representing the graphs into the secret key. ...
Article
Cryptography is one among the most important techniques used for securing the transmission of messages and the protection of data and Graph Theory is one of the techniques used to protect the data. Cryptography is especially used to make the text unintelligible and non-readable through the encrypt and decrypt process. In this paper, we use graph theory to encrypt and decrypt the message.
Article
Full-text available
In recent times, Cryptography has becomes a significant area for research due to the vast transfer of information including the need for maintaining secrecy. Various encryption techniques are developed and used for securing the transferred data between two or more sources to hide the messages being sent. This paper involves an encryption technique for encrypting the message with the use of Complete Graph and a Cycle to generate a Cipher text using 2 keys, one of them is formed by the use of Hamiltonian Circuit. The decryption algorithm is also provided for the same.
Article
Full-text available
In the recent years, with the increase of using Internet and other new telecommunication technologies, cryptography has become a key area to research and improve in order to transfer data securely between two or more entities, especially when the data transferred classified as a critical or important data. Even there are many encryption algorithms exist, the need of new non-standard encryption algorithms raise to prevent any traditional opportunity to sniff data. The proposed algorithm represents a new encryption algorithm to encrypt and decrypt data securely with the benefits of graph theory properties, the new symmetric encryption algorithm use the concepts of cycle graph, complete graph and minimum spanning tree to generate a complex cipher text using a shared key.
An application of graph theory in cryptography
  • P Amudha
  • A C Charles Sagayaraj
  • A C Sheela
P. Amudha, A. C. Charles Sagayaraj, and A.C. Shantha Sheela. An application of graph theory in cryptography. International journal of Pure