Diffie-Hellman Based Hill Cipher Key Generation On End-To-End Encryption Key Share
Diffie-Hellman Based Hill Cipher Key Generation On End-To-End Encryption Key Share
ISSN No:-2456-2165
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
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
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.