Enhanced Asymmetric Public Key Cryptography based on Diffie-Hellman and RSA Algorithm

Similar documents
Public Key Algorithms

Public Key Algorithms

Public-key encipherment concept

Chapter 9. Public Key Cryptography, RSA And Key Management

Overview. Public Key Algorithms I

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Public Key Cryptography

ASYMMETRIC CRYPTOGRAPHY

Topics. Number Theory Review. Public Key Cryptography

CSC 474/574 Information Systems Security

Lecture 6: Overview of Public-Key Cryptography and RSA

Public Key Algorithms

Network Security. Chapter 4 Public Key Cryptography. Public Key Cryptography (4) Public Key Cryptography

Chapter 3 Public Key Cryptography

LECTURE NOTES ON PUBLIC- KEY CRYPTOGRAPHY. (One-Way Functions and ElGamal System)

Public Key Cryptography and RSA

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)

Cryptography and Network Security. Sixth Edition by William Stallings

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

Lecture 2 Applied Cryptography (Part 2)

Key Exchange. Secure Software Systems

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Applied Cryptography and Computer Security CSE 664 Spring 2018

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

CS669 Network Security

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Chapter 9 Public Key Cryptography. WANG YANG

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

Channel Coding and Cryptography Part II: Introduction to Cryptography

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

Public Key Cryptography and the RSA Cryptosystem

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

RSA (material drawn from Avi Kak Lecture 12, Lecture Notes on "Computer and Network Security" Used in asymmetric crypto.

Hybrid Public Key Cryptosystem Combining RSA & DES Algorithms

RSA. Public Key CryptoSystem

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

*E. Madhusudhana Reddy & M.Padmavathamma Department of Computer Science, S.V.University, Tirupati

Introduction to Cryptography Lecture 7

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

CS 6324: Information Security More Info on Key Establishment: RSA, DH & QKD

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Public Key Encryption. Modified by: Dr. Ramzi Saifan

Introduction to Cryptography Lecture 7

A New Symmetric Key Algorithm for Modern Cryptography Rupesh Kumar 1 Sanjay Patel 2 Purushottam Patel 3 Rakesh Patel 4

Hardware Design and Software Simulation for Four Classical Cryptosystems

CS Network Security. Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA.

A nice outline of the RSA algorithm and implementation can be found at:

Computer Security 3/23/18

Encryption Details COMP620

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

Number Theory and RSA Public-Key Encryption

Lecture 6 - Cryptography

Introduction to cryptography

Key Management and Distribution

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption

An overview and Cryptographic Challenges of RSA Bhawana

Admin ENCRYPTION. Admin. Encryption 10/29/15. Assignment 6. 4 more assignments: Midterm next Thursday. What is it and why do we need it?

Cryptography. Cryptography is much more than. What is Cryptography, exactly? Why Cryptography? (cont d) Straight encoding and decoding

Keywords Security, Cryptanalysis, RSA algorithm, Timing Attack

Provable Partial Key Escrow

ISSN: (Online) Volume 3, Issue 5, May 2015 International Journal of Advance Research in Computer Science and Management Studies

The Beta Cryptosystem

PUBLIC KEY CRYPTO. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

Chapter 7 Public Key Cryptography and Digital Signatures

Protecting Information Assets - Week 11 - Cryptography, Public Key Encryption and Digital Signatures. MIS 5206 Protecting Information Assets

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

Assignment 9 / Cryptography

CS3235 Seventh set of lecture slides

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

Lecture 30. Cryptography. Symmetric Key Cryptography. Key Exchange. Advanced Encryption Standard (AES) DES. Security April 11, 2005

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

Diffie-Hellman Protocol as a Symmetric Cryptosystem

Public Key (asymmetric) Cryptography

RSA Public Key Encryption 1. Ivor Page 2

Some Stuff About Crypto

IMPORTANCE OF NUMBER THEORY IN CRYPTOGRAPHY

1. Diffie-Hellman Key Exchange

Public Key Cryptography

CS408 Cryptography & Internet Security

Public Key Cryptography, OpenPGP, and Enigmail. 31/5/ Geek Girls Carrffots GVA

10.1 Introduction 10.2 Asymmetric-Key Cryptography Asymmetric-Key Cryptography 10.3 RSA Cryptosystem

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

Study Guide to Mideterm Exam

LECTURE 4: Cryptography

1.264 Lecture 28. Cryptography: Asymmetric keys

Improved Delegation Of Computation Using Somewhat Homomorphic Encryption To Reduce Storage Space

Cryptographic Concepts

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

A PROPOSED AUTHENTICATION SCHEME USING THE CONCEPT OF MINDMETRICS

Cryptography and Network Security

ENCRYPTION USING LESTER HILL CIPHER ALGORITHM

L13. Reviews. Rocky K. C. Chang, April 10, 2015

CSE 127: Computer Security Cryptography. Kirill Levchenko

Crypto Basics. Recent block cipher: AES Public Key Cryptography Public key exchange: Diffie-Hellmann Homework suggestion

A Tour of Classical and Modern Cryptography

Transcription:

Enhanced Asymmetric Public Key Cryptography based on Diffie-Hellman and RSA Algorithm Princess Arleen S Zamora Gaduate Programs, Technological Institute of the Philippines Quezon City 1901, Philippines pazamora@sscmnl.edu.ph Bobby D Gerardo Institute of Information and Communications Technology West Visayas State University Lapaz, Iloilo City, Philippines bgerardo@wvsu.edu.ph Bartolome T Tanguilig III Graduate Programs Technological Institute of the Philippines Quezon City 1901, Philippines bttanguilig_3@yahoo.com Abstract Cryptography is one way on how to protect data. In this paper, you will see how Diffie-Hellman and RSA Asymmetric Public Key Cryptology works. The output of harmonizing these two algorithms is the Enhanced Asymmetric Public Key Cryptology that will be applied to Document Management System (DMS). Testing of the proposed algorithm is done by simulating its process. Used heap memory, class count, and CPU usage were measured to test the proposed algorithm. Keywords- RSA; DH; RSADH; Cryptology I. INTRODUCTION As data continuous to grow, protection of information is becoming very significant. Every computer system in an organization has its levels of users, and each user has its password for security. Data security can be strengthened by the use of cryptology. The researcher chooses to propose an enhancement in public key cryptology by harmonizing Diffie Hellman(DH) and Rivest, Shamir, Adleman (RSA) algorithm. The proposed algorithm will enhance security in the key exchange process of RSA and add encryption and decryption on the part of DH. The following objectives are expected to be achieved in this paper [1] to harmonize Diffie-Hellman algorithm and RSA security in key exchange process [2] to evaluate the RSADH method by demonstrating the key exchange, encryption and decryption of messages from the given processes; [3] test the performance of the proposed algorithm using used heap memory, class count, and CPU usage. II. REVIEW OF RELATED LITERATURE This section intends to review literature and studies related to Diffie-hellman and RSA cipher, synthesize, and use what applies to the topic. In 1976, Diffie and Hellman [1] proposed a scheme using exponentiation modulo q (a prime) as a public key exchange algorithm. According to their paper; New directions in cryptology, that the best known cryptographic problem is that of privacy: preventing the unauthorized extraction of information from communications over an insecure channel order to use cryptography to ensure privacy and the second problem is authentication: amenable to cryptographic solution which stands in the way of replacing contemporary business communications by teleprocessing system [1] Message authenticity is guaranteed by adding a secret key but also by attaching the date and time to each message and encrypting the entire sequence. Authentication is the heart of any system involving contracts and billing [1]. One-way authentication provides protection against third party attacks. DMS is a multiuser login account. Same as true with the given example by DH, the admin of the DMS needs to set-up his account and chooses his password. Every time the user needs to log in, it asks for a username and a secret password. The problem comes in if the system operators have legitimate reasons to access the password directory. That is the reason DH develops a new login procedure capable of judging the authenticity of the password. Steps are as follows [1]: 1) When the user first enters his password PW, the computer automatically and transparently saves f (PW) and stores this not as PW in the password directory. 2) For each login, the computer calculates f (X), where X is the proffered password, and compares f (X), where X is the proffered password and compares f (X) with the stored value f (PW). 3) If and only if they are equal, the user is accepted as being authentic. The above-mentioned steps are also true with public key cryptology. 1) When the user A sends message M to user B, he first deciphers it in his secret deciphering key and sends D A (M). 2) When user B receives the message, he can read and to make sure of its authenticity, he enciphers it using A s public enciphering key E A. 3) User B also saves D A (M) as a proof of the message that comes from A. 1

Preeti and Sharma proposed an improvement of Diffie- Hellman Algorithm. The enhancement was implemented in JAVA. Steps of the proposed algorithm [2] are as follows: 1) The user selects prime no. a (create two separate instances of Diffie-hellman object one for the sender and one for the receiver). 2) Sender enters a prime number. 3) Receiver also enters a prime number. 4) The sender sends p and g (safe prime number) to the receiver. 5) Then the receiver will check if p is safe or not. 6) Creates 256-bit key at sender at sender and receiver side finding the k function. 7) Performs encryption using a key at sender side or decryption at the receiver side. 8) Writes the generated key into a file for analysis purpose. The proposed differs from the DH algorithm on step number 6. Preeti and Sharma tested the two algorithms in terms of entropy, floating frequency, auto-correlation, n-gram, and periodicity. Hirose and Yoshida [3] proposed a two-party authenticated Diffie-hellman key agreement that provides forward secrecy. Interference and un-known key share are the two active attacks solved using KAP (key agreement protocol). Also, the same with other security algorithm, there is also limitations and disadvantages. One of its disadvantages is that each user needs to generate two random numbers from Zq in one execution. It also requires the user s slightly more modular exponentials than other protocol. The algorithm used by Hirose and Yoshida were analyzed and was used as a basis for the researcher to enhance the algorithm. Abdalla et al. [4] called their encryption scheme based on DH problem DHAES. It has a basic property to secure encryption (plain text attacks) and a solution for privacy under adaptive and non-adaptive ciphertext attacks. TABLE I. TABLE I. VISHAL GARG AND YISHU [6] PROPOSED ALGORITHM Sender Side 1) X a< q (user can select any random number less than q) 2) Y a = a xa mod q (Y a is a public key of sender) 3) K = Y b xa mod q (where Y b is a public key of receiver and K is a private key) 4) pow = 2 k 5) pow = pow + q Encrypt every letter of plain text using pow Receiver Side 1) X b< q (user can select any random number less than q) 2) Y b=a xb mod q (Y b is public key of receiver) 3) K = Y xb a mod q (where Y a is a public key of sender and K is a private key) 4) pow = 2 k 5) pow = pow + q Decrypt every letter of cipher text using pow Vishal Garg and Yishu [6] improve DH algorithm for network security enhancement by including pow = 2 k as step 4 (sender side) and use step 4 pow = 2 k and step 5 pow=pow = q on the receiver side. The proposed and classical DH use various parameters such as entropy, autocorrelation, etc. The reason why Rivest, Shamir, and Adleman [7] developed the method for obtaining a digital signature and public key cryptosystem is because they got motivated by the concept of Diffie-Hellman. Notably, the encryption does not increase the size of the message. Both sent messages and the ciphertext are integers ranging from 0 n-1. The author s encryption and decryption methods are: [7] 1) To encrypt the message M, use a public encryption key (e,n). a) First represent the message as an integer between 0 and n-1. (Here you break a long message into series of blocks and represent each as an integer.) Note that the purpose here is to get into the numeric form necessary for encryption. b) For the encryption part, encrypt the message by raising it to the e th power modulo n c-> ciphertext ; C E(M) M e (mod n), for message M 2) To decrypt the ciphertext, raise to another power d, then again modulo n D(C) C d (mod n), for ciphertext C. Below is the process of choosing the encryption and decryption method [6]: a) First compute n as the product of 2 large random prime p and q. Make n as public, but the factors p and q will be effectively hidden from everyone else due to difficulty factoring n. n=p*q. b) Pick the integer d to be a large and random integer and relatively prime to (p-1) (q-1) and check if it satisfies the greatest common divisor equals to 1, gcd (d, (p-1) *(q*1)) =1. c) Compute for e from p, q, and d to be multiplicative inverse of d, modulo(p-1) *(q-1), e*d 1 (mod (p 1) * (q 1)). Pointcheval-* [10] mentioned in his paper that to prove the security of the cryptographic protocol, we must first be precise on what protocol to achieve, under what kind of attack. What motivated him to do the study is in the complexity theory sense that if one can break the cryptographic protocol, one can also efficiently solve the underlying problems. The method he called reductionist security proof is the focus of his study. On his research, he gave an example on how to factor integer using RSA and discrete logarithm using Diffie-Hellman problems. From the journal entitled Comparative Study of Asymmetric Key Cryptographic Algorithms [11] the authors 2

claimed that Integer Factorization schemes are based on the fact that it is difficult to factor large integers. And this is one of the processes of RSA. This journal also presented Diffie- Hellman key exchange algorithm and RSA key generation and encryption and decryption. The authors review the five commonly used asymmetric key cryptology algorithms: RSA, Diffie-Hellman, ElGamal, DSA, and ECC. They concluded that RSA needs to grow to 2048 bits. They also mentioned that most practical protocols are hybrid protocols which incorporate both symmetric and public key algorithms. In 2014, Kuppuswammy and Al-Khalidi [12] proposed a hybrid encryption system using a new public key algorithm and private key algorithm. They addressed the concerns of user s privacy, authentication, and accuracy. The integration security is from the four different sources like user, application security, resources and hardware. The hybrid encryption system is a combination of RSA and AES and is an efficient technique to ensure the security of the data being transmitted. Over different text sizes, 128 bits, 256 bits, 512 bits, 1024 and 2048, Meelu and Meelu [13] tried RSA encryption and decryption process. They also mentioned that the code can be used to encrypt a word file, picture file, binary file, and text file. III. THE PROPOSED KEY EXCHANGE Enhancement is done by harmonizing Diffie-Hellman algorithm and RSA security in the key exchange process. The keys agreed upon will be used to unlock the encrypted message and the key generated will be used for encrypting and decrypting the message of a file. In this research paper, the author will use the Diffie-Hellman algorithm to encrypt and decrypt password for a certain file. If somebody tries to hack the file, even if he opens the file, he still needs to decrypt the message. Only the sender and the recipient knows the generated key. The process may take long, but the security of the file /message will be strengthened. A. Diffie-Hellman Key Exchange Algorithm[5] 1) User i chooses a random integer X i and the user j a random integer X j. Then the user i picks a random number X i from the integer set {1, 2,..., q 1}. The user i keeps X i secret, but sends Y i α Xi (mod q), (1) to the user j. Similarly, the user j chooses a random integer X j and sends Y j α Xj (mod q), (2) to the user i. 2) Both users i and j can now compute: K ij α XiXj (mod q), (3) (4) and use K ij as their common key. 3) The user i computes K ij by raising Y j to the power X i : K ij Y j Xi (mod q) (α Xj ) Xi (mod q) α XjXi α XiXj (mod q) and the user j computes K ij in a similar fashion: K ij Y i Xj (mod q), (α Xi ) Xj α XiXj (mod q). B. RSA Key Exchange Algorithm, Encryption and Decryption Algorithm RSA cryptosystems security depends on the problem of factoring large numbers. It was named after its inventor Rivest, Schamir, and Adleman (1977). The steps [7] are as follows: 1) Choose two very large prime p and q. 2) Compute for the value of n: n= pq. (1) 3) Then choose an encryption key e such that e and Φ (n) are coprime. Using Euler s totient function gcd (e, Φ(n)) =1, such that: Φ(n) = (p-1) (q-1). (2) 4) Using the Euclidean algorithm, the private key d for decryption using this formula: d = e -1 (mod Φ (n)) or ed 1 (mod Φ(n)). (3) 5) To encrypt the message m, ciphertext c corresponds to the block in the given formula below: c m e (mod n). (4) The decryption key d and the modulo n are also prime numbers and a private key while e and n are called public keys. 6) To decrypt a ciphertext: m c d (mod n). (5) It also proves that c d m ed m (mod n) because ed 1 (mod Φ (n)). C. The Enhanced Algorithm Based on the gathered research, the problem mentioned with RSA is the speed, because the security of RSA relies on factoring two (2) very large numbers. DH security is based on exponential key exchange. To solve the problem, the author will combine DH [5] and RSA [7]. Since there are two cryptographic algorithms to use, we can now have a small 3

prime number to make the processing faster and at the same time to tighten the security of the file/message, the agreed upon prime number will be used to encrypt and decrypt the message. The author will call this enhancement, RSADH. The process of key exchange will be as follows: 1) User i and user j choose a random integer number the two prime numbers p and q. 2) User i and user j choose their respective secret number I and J but send: User i x = q I mod p and sends to user j, (1) User j x = q J mod p and sends to user i. (2) 3) Compute for the Session Key User j k = i x ^J mod p (3) User i k =j x ^ I mod p (4) 4) The file maybe unlocked but the message is still unreadable. To encrypt the message User i and User j use p and q and get for the n and Φ. n=pq, (5) Φ = (p-1) (q-1). (6) a. Specify alphabet to the characters 5) User i and j choose an encryption key e, and the decryption d using the extended Euler Greatest Common Divisor Algorithm e * d mod Φ = 1. 6) Message is encrypted by raising it to the power e and dividing it by n. Encryption is per letter. Use the formula: IV. SIMULATION AND TESTING RESULTS The simulation of the process is done with the use of Cryptool. Algorithm was coded using Java and run the analysis using JVM monitor. TABLE II. TABLE II. KEY EXCHANGE PROCESS, ENCRYPTION, AND DECRYPTION PROCESS OF DIFFIE-HELLMAN, RSA, AND PROPOSED ALGORITHM APKC Process DH RSA Proposed Algorithm (RSADH) User i 22171 22171 22171 User j 57347 57347 57347 User i Secret 20365-20365 User j Secret 10236-10236 Shared Key A 18844-18844 Shared Key B 4520 4520 Session Key 17846 17846 n - 1271440337 1271440337 Φ - 1271360820 1271360820 e - 7 7 d - 544868923 544868923 Plaintext coded in numbers of base 10-1234567 1234567 Encryption to Cipher text Ciphertext coded in numbers of base 10-0437635365 0437635365-1234567 1234567 The proposed algorithm used heap memory during runtime approximately increases every one minute. c 1 = m e 1(mod n) (7) 7) The ciphertext is decrypted by raising it to the power d and dividing it by n. Decryption is per letter. Use the formula: m 1 = c d 1(mod n). (8) Translate the deciphered integers into a specific alphabet. Figure 1. Figure 1. Used Heap Memory of the Proposed Algorithm The figure below shows the class being loaded during runtime of the proposed system increases as the program is calling it. 4

V. CONCLUSION This paper shows that Diffie-Hellman and RSA Security can be combined to make a more secured algorithm. By having two prime input for p and q, and use this input to get the e and d to strengthen the security of the file. The proposed algorithm adds security in a key exchange process of RSA using some steps of Diffie-Hellman. If ever the file will be unlocked, the message cannot be read because it is encrypted. The proposed algorithm will be used in securing file for document management system. Figure 2. Loaded Class Count of the Proposed Algorithm Figure 3 shows that the CPU usage of the proposed system in less than 95 ms is less than five percent (5%). Testing was done using Intel Core i7 (16 GB RAM). Figure 3. CPU Usage of the Proposed Algorithm REFERENCES [1] W. Diffie and M. Hellman, New Directions in Cryptography, IEEE Trans. Inform Theory, 1997. [2] Preeti and B. Sharma, Enhancement in Security by improving Diffie- Hellman Algorithm, International Journal for Advance Research in Engineering and Technology, Vol 2, Issue VI, 2014. [3] S. Hirose and S. Yoshida, An authenticated Diffie-Hellman Key Agreement Protocol Secure Against Active Attacks, Springer, Volume 1431, 1998, 2006, pp 135-148. [4] Abdalla, Bellare, Rogaway, DHAES: An Encryption Scheme based on the Diffie-Hellman Problem, IEEE, 1998. [5] M.Y. Lee, Internet Security: Cryptographic Principles and Protocols, John Wiley and Sons, Ltd, 2003, p161-165. [6] V. Garg and Rishu, Improved Diffie-Hellman Algorithm for Network Security Enhancement, International J. Computer Technology and Applications, Vol 3 (4) I327-I3 [7] R.L Rivest, A. Shamir and L. Adleman, A Method for Obtaining Digital Signatures and Public Key Cryptosystems, 1978. [8] M. Ginsburg, Intranet Document Management Systems as Knowledge Ecologies, Proceedings of the 33rd Hawaii International Conference on System Sciences, IEEE, 2000. [9] M.Y. Lee, Internet Security: Cryptographic Principles and Protocols, John Wiley and Sons, Ltd, 2003, p165-169. [10] D. Pointcheval, Asymmetric Cryptology and Practical Security, Journal of Telecommunications and Information Technology. Vol 4, 2002, Page 41-56. [11] Arya, Aswal, and Kumar, International Journal of Computer Science and Communication Networks. Vol 5 Page 17-21. [12] P. Kuppuswammy and S. Al-Khalidi, Hybrid Encryption/Decryption Technique Using New Public Key and Symmetric Key Algorithm, MIS Review Vol 19 No2, 2014, Pages 1-13. [13] P. Meelu and R. Meelu, Implementation of Public Key Cryptographic System: RSA, International Journal of Information Technology and Knowledge Management, July- December 2012, Vol 5. No.2, Pages 239-242. 5