ANovel Crypto System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/366985524

A Novel Cryptosystem Using Multipartite Graphs

Article in Proceedings of the International Conference on Business Excellence · January 2023

CITATIONS READS

0 264

3 authors:

Chinthaka Weerarathna A.A.I Perera


University of Peradeniya University of Pradeniya, Sri Lanka
7 PUBLICATIONS 5 CITATIONS 66 PUBLICATIONS 102 CITATIONS

SEE PROFILE SEE PROFILE

Rajitha Ranasinghe
University of Peradeniya
46 PUBLICATIONS 30 CITATIONS

SEE PROFILE

All content following this page was uploaded by Chinthaka Weerarathna on 10 January 2023.

The user has requested enhancement of the downloaded file.


A Novel Cryptosystem Using Multipartite Graphs
M.D.M.C.P. Weerarathna1, A.A.I Perera2, P.G.R.S. Ranasinghe3

1,2,3
Department of Mathematics, University of Peradeniya, Peradeniya, 20400, Sri Lanka
chinthakaw@sci.pdn.ac.lk
aaip@sci.pdn.ac.lk
rajithamath@sci.pdn.ac.lk

intriguing problems involved in other subject


areas such as Computer Science, Biology,
ABSTRACT Chemistry, Economics, etc. In the present study,
Graph theory has a special role in mathematics, some ideas of Graph Theory and Number Theory
both in the abstract and in the applied sense. are used to develop a Cryptography algorithm
Therefore, over the years it has attracted (Hraiz, and Etaiwi, 2017).
mathematicians in diverse disciplines with wide
range of applications such as in Computer Cryptography is the method of protecting
Science, Engineering, Biology, etc. One such information by converting into unreadable
area of application is the use of Graph theoretic format when the message sends to other parties.
concepts in implementing Cryptography This unreadable format is called the ciphertext
algorithms. The introduction of the notion of a and the original message is called the plaintext.
graph dated back to 1736 when Leonhard Euler The method of transforming plaintext to
answered the famous Königsberg Bridge ciphertext is called encryption and recovering the
Problem in the negative. A graph 𝐺 is a union of plaintext from the ciphertext is called decryption.
finite non-empty set of elements called vertices The notion of cryptography originates from the
𝑉(𝐺)and a set of unordered pair of elements of era of Julius Caesar. He used this concept for
𝑉(𝐺) called edges,𝐸(𝐺). Cryptography is the art military purposes. Nowadays, this knowledge is
of securing information so that only the intended used in various applications such as computer
party received the information. The process of and mobile passwords, Emails, Web encryption,
converting a given message (plaintext) to a storing data, etc. (Rosen, 2011).
secure form (ciphertext) is called encryption
while the reverse process is called decryption. In There are two main types of cryptosystems;
the present study, we encrypt a given message symmetric and asymmetric. In the former, the
into multipartite graphs to form the ciphertext sender and the receiver use the same key to
using the proposed encryption algorithm and it is encrypt and to decrypt the message. But in the
converted into plaintext by using the decryption latter, the sender encrypts the message using a
algorithm. As a future work, we are planning to key known as public key and no need to keep it
introduce an encryption and decryption as a secret key and send it to the receiver.
algorithm by using graph factorizations. However, when the receiver gets the encrypted
message, it needs to be decrypted using another
1. INTRODUCTION key called the private key and it must be kept as
a secret key.
Graph Theory is a very important subject area
which is used to solve many real-world In this study, we encrypt the message into
phenomena. A graph is a structure that consists multipartite graphs. In the next section we
of vertices and edges. A simple graph 𝐺 is a pair explain the method of the algorithm in detail and
(𝑉(𝐺), 𝐸(𝐺)); 𝑉(𝐺) is a non-empty finite set of discuss it using a simple example.
elements called vertices and 𝐸(𝐺) is a set of
unorded pair of distinct elements of 𝑉(𝐺) called
edges. Graph Theory is useful in solving

590
ANNUAL INTERNATIONAL CONFERENCE ON BUSINESS INNOVATION (ICOBI) 2022

2. MATERIALS AND METHODS • Finally, encrypt the message "𝑚" to


"𝑚′ " using 𝑚′ ≡ 𝑚𝑒 (mod 𝑛).
In this section, we discuss our algorithm which is
based on two main steps; encryption, and
decryption. Firstly, we will explain the general Step 02: According to the 𝑚′ values, the
procedure of our method and after that illustrate corresponding positions of the English letters are
it with a simple example. chosen using Table 2.

Step 03: Now, the ciphertext obtained using the


2.1. Encryption Algorithm
above table is encrypted by adopting the
Step 01: Use the following algorithm following method. Construct a set 𝑃𝑙 by
(similar to RSA algorithm) to encode the considering the first "𝑙" primes such that,
message.
• Let 𝑛 = 𝑝 ∙ 𝑞, where 𝑝 and 𝑞 are 26
𝑙=⌈ + 𝑘⌉,
distinct primes; for example, take 𝑛 = 𝑘
26, 𝑝 = 2, and 𝑞 = 13. where
• Select an integer 𝑒 such that, 𝑥 ; 0 < 𝑥 < 13,
gcd(𝑒, (𝑝 − 1)(𝑞 − 1)) = 1. 𝑘={ 𝑥
⌈ ⌉ ; 13 ≤ 𝑥 ≤ 45.
4
i.e., gcd(𝑒, 12) = 1.
with 𝑥 being a fixed value according to the

A B C D E F G H I J K L M
3 5 7 11 17 19 23 29 31 37 41 43 47
3 5 7 11 17 19 23 3 5 11 15 17 21
N O P Q R S T U V W X Y Z
53 59 61 67 71 73 79 83 89 97 101 103 107
1 7 9 15 19 21 1 5 11 19 23 25 3
Table 1. The first encoding tablelength
using of a word.
prime numbers.

• Next use the Table 1 to convert the


letters of the English alphabet to Step 04: Next, construct a new table with the size
numerical values. The third row and the (𝑙 − 𝑘) × 𝑘. The English letters are partitioned
sixth row represent the numerical values for the first 𝑘 𝑡ℎ positions and assign the first 𝑘 𝑡ℎ
of the English alphabet letters under prime numbers horizontally for these partition
modulo 26. According to these two columns and assign the (𝑘 + 1)𝑡ℎ , … , 𝑙 𝑡ℎ position
rows there are some alphabet letters prime numbers vertically using the set 𝑃𝑙 .
which have the same numerical values
and when the message is decrypted Step 05: Now, find the value of each letter using
using the table, we have to select the the constructed table with integers 𝑖 and 𝑗 such
corresponding numerical value for the that 𝑎𝑟 = 𝑖𝑗, where 𝑖 is the value of the row
correct letter by infection method. position and 𝑗 is the value of the column position.
After that, multiplying 𝑖 ∙ 𝑗 (𝑎𝑟 ) and construct the
Let 𝑚 be the position of the letter according to path graph by assigning 𝑎𝑟 values for vertices
the Table 1 chosen to satisfy gcd(𝑚, 𝑛) = according to the sequence of letters.
gcd(𝑚, 26) = 1. Therefore, 𝑚 ≠ 2 or 13.
• Now, compute "𝑑" such that,
𝑑𝑒 ≡ 1(mod(𝑝 − 1)(𝑞 − 1)).
i.e., 𝑑𝑒 ≡ 1(mod 12)

591
ANNUAL INTERNATIONAL CONFERENCE ON BUSINESS INNOVATION (ICOBI) 2022

A B C D E F G H I J K L M
1 2 3 4 5 6 7 8 9 10 11 12 13
N O P Q R S T U V W X Y Z
14 15 16 17 18 19 20 21 22 23 24 25 26
Table 2. The second encoding table.
• Now,
Step 06: Construct vertex sets for the multipartite (𝑚′ )𝑑 ≡ 𝑚1+12𝑗 (mod 26)
𝑡ℎ
graphs such that 𝑣𝑘 ={𝑘 position of the digit of ⟹ (𝑚′ )𝑑 ≡ 𝑚 ∙ 𝑚12𝑗 (mod 26)
𝑎𝑟 by starting right side}. Then the edge set of • By Euler’s theorem,
the multipartite graph becomes 𝐺(𝑣𝑘 , 𝑣𝑘−1 ). 𝑚𝜙(𝑛) ≡ 1(mod 26)
(since gcd(𝑚, 26) = 1)
Step 07: Finally, assign random numbers (in Here, 𝜙(𝑛) = (𝑝 − 1)(𝑞 − 1) = 12
increasing order) to the edges as the
corresponding weight and if edges are connected i.e., 𝑚12 ≡ 1(mod 26)
by vertices in each partite set, the same weight is
used to label those edges. Then send the final • Therefore,
weighted graph with the secret key (𝑑, 𝑘) to the (𝑚′ )𝑑 ≡ 𝑚 ∙ 𝑚12𝑗 (mod 26)
receiver.
⟹ (𝑚′ )𝑑 ≡ 𝑚 ∙ (𝑚12 )𝑘 (mod 26)
⟹ (𝑚′ )𝑑 ≡ 𝑚 (mod 26)
2.2. Decryption Algorithm
⟹ 𝑚 ≡ (𝑚′ )𝑑 (mod 26)
Step 01: Arrange the weights 𝑤𝑖 of the edges in
ascending order: Step 07: Finally, select the suitable letters from
Table 1 described in the first step in the
𝑊 = {𝑤1 , 𝑤2 , … , 𝑤𝑛 }. encryption algorithm.

Step 02: Using these weights, find the values of 3. RESULTS AND DISCUSSION
𝑎𝑟 ’s and draw a path graph by assigning 𝑎𝑟
In the present study, a developed encryption
values to its vertices according to the order.
algorithm is introduced using the techniques of
Number Theory and Graph Theory. The method
Step 03: Find the prime factorization for each
is illustrated using the plaintext “GRAPH”.
vertex label.
First, the encryption algorithm is described as
follows:
Step 04: Find the required alphabets using the
table described in Step 05 in encryption
3.1. Encryption Method
algorithm.
Let, 𝑛 = 26, 𝑝 = 2, 𝑞 = 13, and 𝑒 = 23
Step 05: Next, find the 𝑚′ value from the table satisfying gcd(𝑒, 12) = gcd(23,12) = 1.
described in Step 02 of the encryption algorithm. From Table 1, we obtain the following values for
the English letters:
Step 06: Use the following method to decrypt 𝑚′ 𝑚1 = 𝐺 = 23 , gcd(𝑚1 , 26) = 1
to 𝑚. 𝑚2 = 𝑅 = 71 = 19 , gcd(𝑚2 , 26) = 1
• Since 𝑚′ ≡ 𝑚𝑒 (mod 26), we have 𝑚3 = 𝐴 = 3 , gcd(𝑚3 , 26) = 1
(𝑚′ )𝑑 ≡ (𝑚𝑒 )𝑑 (mod 26) 𝑚4 = 𝑃 = 61 = 9 , gcd(𝑚4 , 26) = 1
i.e.,(𝑚′ )𝑑 ≡ 𝑚𝑒𝑑 (mod 26). 𝑚5 = 𝐻 = 29 = 3 , gcd(𝑚5 , 26) = 1
• Since 𝑑𝑒 ≡ 1(mod 12), we can write Now, let us find 𝑚′ .
𝑑𝑒 = 1 + 12𝑗, for some integer 𝑗. 𝑚1 ′ ≡ 𝑚1 𝑒 (mod 26) ≡ 2323 (mod 26)
≡ 17(mod 26)

592
ANNUAL INTERNATIONAL CONFERENCE ON BUSINESS INNOVATION (ICOBI) 2022

𝑚2 ′ ≡ 𝑚2 𝑒 (mod 26) ≡ 1923 (mod 26) 2 3 5 7 11


≡ 11(mod 26)
13 A B C D E
𝑚3 ′ ≡ 𝑚3 𝑒 (mod 26) ≡ 323 (mod 26)
≡ 9(mod 26) 17 F G H I J
𝑚4 ′ ≡ 𝑚4 𝑒 (mod 26) ≡ 923 (mod 26) 19 K L M N O
≡ 3(mod 26)
23 P Q R S T
𝑚5 ′ ≡ 𝑚5 𝑒 (mod 26) ≡ 323 (mod 26)
≡ 9(mod 26) 29 U V W X Y
31 Z
Let us compute the value "𝑑" .
Find the vertex sets for 𝑘 = 1,2,3 such that
𝑑𝑒 ≡ 1(mod 12)
𝑣1 = {5 , 8, 9} , 𝑣2 = {1 , 3, 6} , 𝑣3 = {1}.
23𝑑 ≡ 1(mod 12)
𝑑 ≡ (23)−1 (mod 12)
Finally, the following multipartite graph can be
Note that,
obtained as a ciphertext with the secret key
1 1 1
𝜙(12) = 12 (1 − ) (1 − ) (1 − ) = 2. (𝑑, 𝑘) = (11,5) for the message “GRAPH”.
2 2 3 Weights are assigned randomly for its edges.
Therefore,
𝑑 ≡ (23)−1 (mod 12) ≡ 23(2−1) (mod 12) 5
≡ 23(mod 12)
≡ 11(mod 12)
8
∴ 𝑑 = 11 8
1

According to the Table 2, the new word is 9


“QKICI” 6
7, 9
Now, let us convert this message into the
respective multipartite graph using the following 7, 9 5
method.

In the above word, 𝑥 = 5(< 13), 𝑘 = 5, 1 3 6


26
𝑙 = ⌈ + 5⌉ = 11 and (𝑙 − 𝑘) = 11 − 5 = 6 Figure 2. The ciphertext for the word “GRAPH”.
5

Then, 𝑃𝑙 = {2,3,5,7,11,13,17,19,23,29,31}
3.2. Decryption Method
According to the above table, According to the ciphertext, the weighted set 𝑊
𝑎1 = 23 ∙ 3 = 69 , 𝑎2 = 19 ∙ 2 = 38 , 𝑎3 = 17 ∙ is, 𝑊 = {5,6,7,8,9}.
7 = 119 , 𝑎4 = 13 ∙ 5 = 65 , 𝑎5 = 17 ∙ 7 = 119
Now, using the received graph, let us find the
Then the path graph for the above word is shown path graph according to the weights.
in the following diagram.
69 38 119 65 119
69 38 119 65 119

Figure 3. The obtained path graph using


Figure 1. The obtained path graph according
weights of the ciphertext.
to the encryption method.

Prime factors of the above vertex labeling are,


69 = 23 ∙ 3 , 38 = 19 ∙ 2 , 119 = 17 ∙ 7 ,
65 = 13 ∙ 5 , 119 = 17 ∙ 7.

593
ANNUAL INTERNATIONAL CONFERENCE ON BUSINESS INNOVATION (ICOBI) 2022

4. CONCLUSION(S)
Using Table 3, the following word can be
Cryptography is used to secure data transmission
obtained.
in the presence of adversaries. Encryption
“Q K I C I”
algorithms are used to transform any given
message from readable format to unreadable
Now, from Table 2, the values of 𝑚′ are obtained
format and the reverse procedure is called
as follows,
decryption. In this work, we have introduced
symmetric key encryption and decryption
𝑚1 ′ = 17, 𝑚2 ′ = 11, 𝑚3 ′ = 9, 𝑚4 ′ = 3, 𝑚5 ′ =
algorithm by using graph theory concepts to
9.
obtain a ciphertext. Two different methods were
used to construct multipartite graphs as a
Then, decrypt the message using the following
ciphertext. First, the plaintext was converted into
formula:
an unreadable format using a method similar to
𝑚 ≡ (𝑚′ )𝑑 (mod 26). the RSA algorithm. After that, using prime
factorization, the previous ciphertext was
Since 𝑑 = 11 (using secret key), transformed to a multipartite graph and it is the
final ciphertext that needs to be sent to the
𝑚 ≡ (𝑚′ )11 (mod 26) receiver with the secret key pair(𝑑, 𝑘). In future,
we are trying to find an encryption algorithm
𝑚1 = (17)11 (mod 26) ≡ 23(mod 26) using graph factorizations.
𝑚2 = (11)11 (mod 26) ≡ 19(mod 26)
𝑚3 = (9)11 (mod 26) ≡ 3(mod 26) REFERENCES
𝑚4 = (3)11 (mod 26) ≡ 9(mod 26)
𝑚5 = (9)11 (mod 26) ≡ 3(mod 26) Athukorala, P., Chathurangi, M., & Ranasinghe,
R. (2022). A variant of RSA using continued
Finally, using Table 1, the following letters can fractions.Journal of Discrete Mathematical
be obtained. After that by choosing the correct Sciences and Cryptography, 25(1), 127-134.
letters, the plaintext can be obtained. Hraiz, S. & Etaiwi, W. (2017). Symmetric
Encryption Algorithm Using Graph
23 = G, X / 19 = F, R, W / 3 = A, H, Z / 9 = P Representation. International Conference on
/ 3 = A, H, Z Information Technology, 501-506.
Ni, B., Qazi, R., Rehman, S. U., & Farid, G.
Therefore, the secret message is “GRAPH”. (2021). Some Graph-Based Encryption
Schemes. Hindawi Journal of Mathematics,
The proposed algorithm is constructed by using 1-8.
two different methods to obtain a multipartite Paar, C., & Pelzl, J., (2009). Understanding
graph as the ciphertext with the use of the well- cryptography: a textbook for students and
celebrated RSA algorithm. Hence, it is hard to practitioners. Springer Science & Business
find the secret key of this encryption algorithm Media.
which ensures the security. In addition, the Rivest, R.L., Shamir, A., & Adleman, L. (1978).
existing algorithm we refer to in literature A Method for Obtaining Digital Signatures
introduces encryption and decryption algorithm and Public-Key Cryptosystems.
using simple bipartite graphs to find ciphertext Communications of the ACM, Volume 21,
but in our study, the ciphertext is in more Issue 2, Pp 120–126.
challenging form since it represents using Rosen, Kenneth H. (6th Eds.) (2011). Cryptology,
multipartite graphs. The use of graphs may result Elementary number theory and its
in taking more memory space. applications. Pp 291-345. Pearson
Education, Inc.

594

View publication stats

You might also like