Encryption and Decryption Algorithms in Symmetric Key Cryptography Using Graph Theory

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.


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 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.

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].

Weighted Graph -
A weighted graph is a graph in which each edge is given a numerical weight[6].  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.  Convert each character of the block into vertices and connect these vertices with weighted edges. See Figure 1 below.  The weights of the edges are given by using the encoding table.

PSYCHOLOGY AND
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.   Similarly, obtain the letter representation of the other vertices as well. Ignore the letters from special characters. 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,

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.