0% found this document useful (0 votes)
57 views3 pages

Diffie-Hellman Based Hill Cipher Key Generation On End-To-End Encryption Key Share

This document discusses using the Diffie-Hellman algorithm to generate keys for the Hill Cipher encryption algorithm. It begins with background on cryptography, the Hill Cipher algorithm, and the Diffie-Hellman key exchange protocol. It then proposes using Diffie-Hellman to secretly generate components that will form the actual Hill Cipher encryption key. The study finds that keys can be successfully generated this way for a 2x2 Hill Cipher matrix, though some generated values do not have the appropriate determinant.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views3 pages

Diffie-Hellman Based Hill Cipher Key Generation On End-To-End Encryption Key Share

This document discusses using the Diffie-Hellman algorithm to generate keys for the Hill Cipher encryption algorithm. It begins with background on cryptography, the Hill Cipher algorithm, and the Diffie-Hellman key exchange protocol. It then proposes using Diffie-Hellman to secretly generate components that will form the actual Hill Cipher encryption key. The study finds that keys can be successfully generated this way for a 2x2 Hill Cipher matrix, though some generated values do not have the appropriate determinant.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Volume 7, Issue 11, November – 2022 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165

Diffie-Hellman Based Hill Cipher Key Generation on


End-to-end Encryption Key Share
Andysah Putera Utama Siahaan
Faculty of Science and Technology
Universitas Pembangunan Panca Budi, Medan, Indonesia

Abstract:- Data leakage is a frequent occurrence due to technique used by the Diffie-Hellman algorithm is that keys
security system vulnerabilities. The key is the most can be exchanged in a secret way using mathematical
valuable object in the encryption and decryption process. calculations.
The Hill Cipher algorithm also has a key in the form of
several decimal numbers placed in a square matrix. This II. LITERATURE REVIEW
key exchange will result in system security vulnerabilities.
This study uses the Diffie-Hellman technique in key A. Cryptography
exchange where the key sent by the sender to the recipient Cryptography is the art of writing messages in the form
is in the form of a number which is the component that of ciphers or arranged in the form of characters that cannot be
forms the actual key value. The results of the study stated understood. Cryptography has two processes, namely
that the key generation using the Diffie-Hellman algorithm encryption, and decryption. Encryption is the process of
was successfully used by the Hill Cipher algorithm even transforming plaintext into ciphertext so that the message can
though in the generation process it produced several values no longer be understood while decryption is the process of
that did not have the appropriate determinant. returning the ciphertext to plaintext so that it can be read and
understood again in its form and content [4].
Keywords:- Hill Cipher, Diffie-Hellman, End-to-end,
Encryption, Decryption B. Hill Cipher
Hill cipher is a cryptographic algorithm that is
I. INTRODUCTION polygraphic substitution based on linear algebra. Hill cipher
uses modulo operation to perform encryption and decryption
Computer security is very important to note. In sending processes depending on the limitation of the number of
data, there is the main thing that must be considered, namely characters used. Hill Cipher algorithm is often used for the use
the security of the data. Sending data over the internet can of modulo 26 according to the number of letters from A to Z.
cause data leaks. Sending data that does not have security will Each letter will be replaced with an index of 0 to 25. In
cause harm to the sender and recipient of the message. Data performing encryption, each block of n letters will be formed
leaks often cause great losses, especially if the data sent has a in a square matrix of 2 x 2 or 3 x 3 or n × n and will then be
very important meaning. multiplied by the value of each generated key. To decrypt the
message, each block is multiplied by the reciprocal of the
Data transmission can be done using cryptographic matrix used for encryption [5].
techniques [1]. There are many algorithms that can be used to
transmit data. One of the algorithms that can be used in data C. Diffie-Hellman
transmission is the Hill Cipher algorithm. This algorithm is a The Diffie-Hellman algorithm is one of the
classic algorithm that uses a square matrix in the encryption cryptographies for exchanging decimal numbers without
and decryption process. The Hill Cipher algorithm encryption having to give the lift to each sender and recipient. Both the
process requires four values for the 2 x 2 matrix and nine sender and the recipient will perform a mathematical
values for the 4 x 4 matrix. Each value will be used for the calculation whose results are public and private. Values that
encryption process and the inverse of that value will be used are public will be returned to the sender or recipient to search
for the decryption process. for the next value. The last calculation will get the same value
between sender and receiver. This value will be used as a key
The vulnerability of the Hill Cipher algorithm is that if in the encryption and decryption process [6].
the key is distributed to the recipient, it will have the potential
to cause data leakage so that the key distribution process is one Diffie–Hellman key exchange is a method of generating
way that is not recommended. and exchanging keys used for secure cryptographic techniques
over public networks or the internet. This technique was one
The Diffie-Hellman algorithm is an algorithm that can be of the first public key protocols devised by Ralph Merkle and
used to exchange keys without providing real numbers or named after Whitfield Diffie and Martin Hellman [7].
without having to distribute the original key between the
sender and recipient of the message [2]. The technique used by
the Diffie-Hellman algorithm is similar to the Three-pass
Protocol technique. It performs the encryption and decryption
process without having to exchange keys at all [3], while the

IJISRT22NOV523 www.ijisrt.com 847


Volume 7, Issue 11, November – 2022 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
Table 1. Diffie-Hellman Schematic This study has several stages that will be passed in
Sender Receiver determining the numbers to be used in the Hill Cipher
N G algorithm. The flow of the research can be seen in Figure 1.
X Y This flow explains that data preparation is done by taking a
X
A = G Mod N Y
B = G Mod N random decimal value to be tested and processed using the
Diffie-Hellman algorithm. The key results obtained will be
K = BX Mod N K = AY Mod N
tested using the Hill Cipher algorithm whether the value has
obtained the appropriate determinant value. This process is
Key generation using the Diffie-Hellman algorithm can
repeated 4 times to get the Hill Cipher key with a 2 x 2 matrix.
be seen in table 1. The sender determines the value of N, the
Key validation is done by determining whether the generated
receiver determines the value of G as a public number which
key has the appropriate determinant and has an inverse key.
will then be exchanged. The sender determines the value of X
and the receiver determines the value of Y which is private.
B. Research Type
The values of X and Y will be held by the sender and receiver
This research is quantitative where this research uses
respectively. The sender and receiver will determine the values
discrete data and continuum data, such as the data obtained in
of A and B based on the modulo exponential calculation. The
the form of numbers generated by a computer randomly. This
final calculation of the exponential modulo will produce a
data is used as test data from the calculation of the Diffie-
value of K where this number will be the same for the sender
Hellman algorithm in looking at the key exchange process and
and receiver.
the encryption and decryption process on the Hill Cipher
algorithm.
III. RESEARCH METHODOLOGY
C. Data Collection Technique
This research has several parts that were carried out to
The data used in this study uses random decimal
get the results. There are several important parts that will be
numbers. The number is limited from 0 to 255 according to the
explained related to the stages of research.
number of characters in the ASCII table. This is so that no
value of the process results will exceed the capacity that has
A. Research Flowchart
been determined by the ASCII table.
Start IV. RESULTS AND DISCUSSION

Problem Statement
A. Results
Testing is done by trying to generate four numbers that
will be used by the Hill Cipher algorithm. The matrix used is 2
x 2.
Literature Review

Table 2. Hill Cipher Key (Generation 1)


Sender Receiver
Data Preparation
N 253 49 G
X 10 83 Y
Diffe-Hellman A 100 246 B
K 243 243 K
N 198 45 G
Determinant Test X 180 82 Y
A 45 45 B
K 45 45 K
N
D = Odd? N 92 204 G
Y
X 23 14 Y
A 20 4 B
Hill Cipher Key K 4 4 K
N 201 240 G
X 121 128 Y
Validation A 171 33 B
K 96 96 K
End
Key generation results using the Diffie-Hellman
243 45]
technique generate 𝐾 = [ . The search for the
Fig 1. Research Flowchart 4 96
determinant is carried out based on the key that has been

IJISRT22NOV523 www.ijisrt.com
848
Volume 7, Issue 11, November – 2022 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
generated is 𝐷 = (243 ∗ 96) − (4 ∗ 45) = 23148 . The V. CONCLUSION
resulting determinant is an even value so it cannot be used for
the Hill Cipher algorithm decryption process because it does Hill Cipher key generation using the Diffie-Hellman
not have the correct inverse key. algorithm is very helpful for the sender and recipient of the
message in avoiding key exchange. Diffie-Hellman is able to
Table 3. Hill Cipher Key (Generation 2) reduce the potential for data leaks that can occur due to keys
Sender Receiver distributed directly through the internet network.
N 196 37 G
REFERENCES
X 181 209 Y
A 121 53 B [1]. D. Kurnia, H. Dafitri, A. P. U. Siahaan, Sugianto, and
K 81 81 K Mardiana, “RSA 32-bit Implementation Technique,” Int.
N 158 182 G J. Recent Trends Eng. Res., vol. 3, no. 7, pp. 279–284,
X 33 49 Y Jul. 2017, doi: 10.23883/IJRTER.2017.3359.UXAIW.
[2]. A. Kamsyakawuni, Fanani, A. Husnan, and A. Riski,
A 78 24 B
“Pengamanan Citra dengan Algoritma Diffie-Hellman
K 78 78 K dan Algoritma Simplified Data Encryption Standard (S-
N 170 205 G DES),” J. Ilm. Mat. dan Pendidik. Mat., vol. 10, no. 2,
X 117 233 Y pp. 63–80, 2018.
A 35 35 B [3]. A. P. U. Siahaan, “Three-Pass Protocol Concept in Hill
Cipher Encryption Technique,” Int. J. Sci. Res., vol. 5,
K 35 35 K no. 7, pp. 1149–1152, 2016.
N 72 101 G [4]. A. I. Permana, T. Tulus, and Z. Situmorang,
X 172 200 Y “Combination of One Time Pad Cryptography Algorithm
A 25 49 B with Generate Random Keys and Vigenere Cipher with
EM2B KEY,” in International Conference on
K 49 49 K
Management, Business, Applied Science, Engineering
and Sustainability Development, 2020, doi:
The results of key generation using the Diffie-Hellman
10.4108/eai.3-8-2019.2290723.
81 78]
technique in the second experiment is 𝐾 = [ The [5]. J. R. Paragas, A. M. Sison, and R. P. Medina, “A New
35 49
search for the determinant is carried out based on the key that Variant of Hill Cipher Algorithm using Modified S-
has been generated is 𝐷 = (81 ∗ 49) − (78 ∗ 35) = 1239 . Box,” Int. J. Sci. Technol. Res., vol. 8, no. 10, pp. 615–
The resulting determinant is odd so that it can be used for the 619, 2019.
decryption process of the Hill Cipher algorithm because it has [6]. Purwadi, H. Jaya, and A. Calam, “Aplikasi Kriptografi
the correct inverse key. The inverse key obtained is 𝐾𝑖 = Asimetris dengan Metode Diffie-Hellman dan Algoritma
55 158 ElGamal untuk Keamanan Teks,” J. Ilm. Saintikom, vol.
[ ] 13, no. 3, pp. 183–196, 2014.
107 23
[7]. W. Diffie and M. E. Hellman, “New Directions in
B. Discussion Cryptography,” IEEE Trans. Inf. Theory., vol. 22, no. 6,
In determining the key to be used by the Hill Cipher pp. 644–654, 1976.
algorithm, it takes several tries to get an odd-valued
determinant. There are four items that are determined during
the Diffie-Hellman algorithm process, namely N, G, X and B,
the results of the exponential modulo process will produce the
same value of K between the sender and receiver. This K value
will then be entered into each part of the Hill Cipher matrix. If
the four values do not produce the appropriate determinant,
then the key generation process will be repeated from the
beginning and determine the four values to be entered into the
Hill Cipher matrix.

IJISRT22NOV523 www.ijisrt.com 849

You might also like