300
Copyright © 2011-15. Vandana Publications. All Rights Reserved.
Volume-5, Issue-6, December-2015
International Journal of Engineering and Management Research
Page Number: 300-304
Improvement Over Public Key Cryptosystem RSA by Implementing New
Decryption Key Generation Algorithm
Manoj Agrawal1, B. L. Pal2, Rohit Maheshwari3
1
Student of M.Tech. (CSE), Mewar University, Chittorgarh, (Rajasthan), INDIA
2
Assistant Professor, CSE Department, Mewar University, Chittorgarh, (Rajasthan), INDIA
3
Assistant Professor, CSE Department, Mewar University, Chittorgarh, (Rajasthan), INDIA
ABSTRACT
The RSA encryption is a very fast operation, as the encryption exponent (e) is often chosen to be a small prime. However, the decryption procedure is very slow; due to the fact the decryption exponent is generally a very large integer. This fact remains a problem in many applications of the RSA algorithm.There are many cases when there is a need to improve the decryption key generation time. In this paper, we have introduced RSA cryptosystem and improvements in its decryption procedure to find the value of decryption key. There are already various methods which have been developed to reduce the decryption time such as CRT-RSA, Batch RSA, Re-balanced RSA, Multi Prime RSA, R-Prime RSA, etc. Our proposed work has been implemented by using MATLAB as the programming environment. We have tried for the speed improvement in the decryption key generation time of the public key cryptosystem RSA. We have also shown the graphical comparison of our new approach with the algorithm used in standard RSA cryptosystem.
Keywords- RSA, Cryptosystem, encryption, decryption, ciphertext, Public Key Cryptography, MRSA, SRSA.
I.
INTRODUCTION
This era has seen an astronomical increase in communications over the wired and wireless networks. Everyday thousands of transactions take place over the World Wide Web. Several of these transactions have critical data which need to be confidential, transactions that need to be validated, and users authenticated. These requirements need a rugged security framework to be in force. So there is a great need for privacy and security of transmitted data. Therefore, the methods of safeguarding information is becoming a major issue, for which the encryption and decryption systems have been created. Many hardware and software protocols have been
implemented to improve the security of information, but the only true method of securing data is to encrypt it.One of the necessary aspects for the communication to be secure is the field of cryptography.Today’s cryptography is extremely more complex than its predecessors [1].
Cryptographic may be divided into two classes: symmetric-key cryptography (also called secret-key cryptography) and asymmetric key cryptography (also called public-key cryptography). The original message, before being transformed, is called plaintext. After the messageis transformed, it is called ciphertext. An encryption algorithm transforms the plaintextinto ciphertext; a decryption algorithm transforms the ciphertext back into plaintext.The sender uses an encryption algorithm, and the receiver uses a decryptionalgorithm.
Another algorithm, which has become the basis for most public-key cryptography, was invented by three professors at MIT in 1978, R.L. Rivest, A. Shamir, L. Adleman (1978) [2]. Their invention was named after them and is now known as the RSA algorithm. This was one of the first algorithms (mathematical processes) to implement the concept of public-key cryptography. The actual concept of public-key cryptography was discovered by Whitfield Diffie and Martin Hellman just one year earlier.
II.
RSA CRYPTOSYSTEM
301
Copyright © 2011-15. Vandana Publications. All Rights Reserved.
Two points need to be borne in mind however, while dealing with the RSA system: there is no formal proof whatsoever –
• The factorization is intractable or is intractable in the special case needed for RSA system, and
• That factorization is needed for the cryptanalysis of RSA.
The RSA scheme is a block cipher in which the
plaintext and cipher text are integers between 0 and n - 1 for some n. A typical size for n is 1024 bits, or 309 decimal digits. That is, n is less than 21024
III.
LITERATURE REVIEW
.
The security of the RSA cryptosystem depends mainly on a mathematical problem i.e. the problem of factoring very large numbers. Full decryption of an RSA cipher text is thought to be infeasible on the assumption that this problem is difficult, i.e., no efficient algorithm exists for solving it. The addition of a secure padding scheme may be required for providing security against partial decryption. Factoring a number means finding its prime factors, Which are the prime numbers that need to be multiplied together in order to produce that number. No efficient factoring algorithm has been yet designed which can challenge the security of RSA cryptosystem. Though the techniques for factoring numbers are improving, but the speed depends on the size of the prime numbers, which means they still take significant time. Of course, the possibility is there that one day there will be an extraordinary leap in our ability to factor large numbers, but it is unlikely and offers a minimal threat to RSA, because the improvement over standard RSA is gradually improving day by day.
The decryption speed of the RSA algorithm is substantially slower than the encryption speed, due to the much longer decryption exponent. However, the more computationally demanding decryption is often performed by computationally-constrained devices with limited resources, such as a smart card. Hence, the need has been recognized to optimize the decryption algorithm, so as to increase the decryption speed. There are already various methods which have been developed to reduce the decryption time such as CRT-RSA, Batch RSA, Re-balanced RSA, Multi Prime RSA, R-Prime RSA, etc. Constructive work in this area of cryptography has provided some significant speed enhancements to the decryption process, most notably the use of the Chinese Remainder Theorem (CRT) in the decryption process by J.J. Quisquater (1995) [3].
In Batch RSA variant A. Fiat (1978) [4], if small public exponents are used for the same modulus N, the decryption of the two ciphertext can be done at the cost of one. According to this variant both decryption processes can be merged to enhance the speed of the decryption algorithm.
Multi-prime RSA technique T.Collins, D. Hopkins, S. Langford, and M. Sabin (1997) [5] was introduced by Collins who modified the RSA algorithm so that it consists of k primes p1, p2,……, pk
IV.
PROBLEM STATEMENT
instead of the traditional two primes p and q.
Multi-Power RSA algorithm T. Takagi (2009) [6] has generated a new variant cryptosystem by enhancing the speed of Multi Prime RSA decryption.
Cesar Alison M. Paixao (2009) [7] combined the two RSAvariants Rebalanced RSA and MPrime RSA methods to further enhance the decryption speed. The general idea of this scheme is to use the key generation algorithm of Rebalanced RSA (modified for k primes) together with the decryption algorithm of MPrime RSA.
Jhalani M., Singh P., Shrivastava G. (2012) [8] have generated a new variant cryptosystem by enhancing the speed of Multi Prime RSA decryption.
The RSA encryption is a very fast operation, as the encryption exponent (e) is often chosen to be a small prime. However, the decryption procedure is very slow; due to the fact the decryption exponent is generally a very large integer. This fact remains a problem in many applications of the RSA algorithm. So with the improvement in the modern technology there is a need to speed up the RSA decryption process.
V.
OJBECTIVE
The objective of this thesis is to improve the speed of RSA decryption procedure by implementing a new & a novel algorithm to find the value of decryption key that will further enhance the speed of the RSA decryption process.
VI.
WORKING OF RSA ALGORITHM
RSA has its origins from integer factorization problem. RSA mode of encryption has three main steps to complete a full message cycle. These steps are listed below:
Key Generation
The most important part of RSA algorithm is the generation of the right keys. This is so because when keys are not generated correctly, such keys are not strong enough to completely encrypt any message as it becomes relatively easier to decipher the message by the third party. Illustrated below are a set of rules to take into account when attempting to generate public and private keys for RSA encryption. Each entity generates a public key and acorresponding private key. To generate a strong pair of keys, each entity should take the following steps:
1. Generate two large random and distinct prime numbers
302
Copyright © 2011-15. Vandana Publications. All Rights Reserved.
2. Compute n = p * q
3. Compute ϕ (n ) = (p- 1)*(q- 1).
4. Selects a random integer e (encryption key) such that gcd (ϕ (n), e) = 1 where 1 < e < ϕ (n).
5. Select the private key (i.e. decryption key) d such that the following equation is true:
(d * e) mod ϕ(n) = 1 i.e. d ≡ e-1 mod ϕ(n)
In standard RSA, extended Euclidean algorithm is used to compute the decryption key d.
6. The public key is (n, e) and the private key is (n, d).
Both integers eand d are referred to as the
encryption exponent and decryption exponent
respectively and the value n is the modulus.
Plaintext Encryption
Party A must do the following: i. Obtain party B’s public key (n, e).
ii. Represent the message as an integer m & m must satisfy the condition 0 < m < (n – 1).
iii. Compute ciphertext c = me mod n. iv. Send the ciphertext c to party B.
Ciphertext Decryption
To decrypt party A’s message, party B uses his private key d. To recover plaintext m from the ciphertext c, party B only needs to do the following:
i. Use the decryption exponent d to recover m = cd
VII.
THE NEW PROPOSED
ALGORITHM
mod n. ii. Extract the plaintext from the message m.
This approach has been named as Modified RSA (MRSA) algorithm and through this we have tried to improve the speed of decryption procedure of Standard RSA (SRSA) algorithm in which extended Euclidean algorithm is used to calculate the value of decryption key. We have used an improved decryption key generation algorithm to generate the decryption key in contrast to extended Euclidean algorithm used in standard RSA algorithm to calculate the decryption key d.
Modified RSA (MRSA) Algorithm:
1. Input two large random and distinct prime numbers p
and q.
2. If p or q is not prime number then go to step 1. 3. If p = q then go to step 1.
4. Compute n ← p * q
5. Compute ϕ (n) ← (p- 1)*(q- 1).
6. Selects a random integer e (encryption key) such that: 1 < e < ϕ (n) & gcd (ϕ (n), e) = 1
6.1 Set s ← 2 //s is an integer variable used as a loop counter//
6.2 Set e ← 1 // e is the encryption key// 6.3 while s > 1 do
6.3.1 Set e = e + 1 6.3.2 Set s = gcd(ϕ (n), e) 6.4 end while
7. Select the private key (i.e. decryption key) d such that the following equation is true: (d * e) mod ϕ(n) = 1 7.1 Set x ← 1 // x is an integer variable used as a loop counter//
7.2 Set d ← 1 // d is the decryption key// 7.3 while x ≠ 0 do
7.3.1 Compute p ←ϕ (n)*d+1 7.3.2 if mod (p,e) = 0 then
7.3.2.1 Set d ← p/e 7.3.2.2 Set x ← 0
7.3.3 else
7.3.3.1 Set d ← d+1 7.3.4 end if
7.4 end while
8. The public key is (n, e) and the private key is (n, d).
9. Input M // M is the original message//
10. If M doesn’t lie in between 0 & (n-1) (i.e., 0 < M < (n – 1)), then go to step 9 else go to step 10.
11. Compute ciphertext C = Me mod n 12. Send the cipher text C to the receiver
13. Use the decryption exponent d to recover plain text using M = Cd mod n.
VIII. BLOCK DIAGRAM OF PROPOSED
ALGORITHM
The block diagram of proposed algorithm is drawn below:
Figure 1: Block diagram of Proposed Algorithm
IX.
FLOWCHART OF PROPOSED
ALGORITHM
303
Copyright © 2011-15. Vandana Publications. All Rights Reserved.
Figure 2: Flowchart of Proposed Algorithm
X.
RESULTS & ANALYSIS
Performance Evaluation Parameters
Performance measurement criteria are time taken by the algorithms to perform the encryption and decryption of the input text file that is encryption computation time and decryption computation time.
Encryption Computation Time
The encryption computation time is the time which is taken by the algorithms to produce the cipher text from the plain text. The encryption time can be used to calculate the encryption throughput of the algorithms.
Decryption Computation Time
The decryption computation time is the time taken by the algorithms to produce the plain text from the cipher text. The decryption time can be used to calculate the decryption throughput of the algorithms.
Encryption Key Generation Time
The encryption key generation time is the time taken by the algorithm to produce the encryption key to convert the plain text into cipher text.
Decryption Key Generation Time
The decryption key generation time is the time taken by the algorithm to produce the decryption key to recalculate the plain text from cipher text. Significant speed improvement can be achieved by using our proposed algorithm for the generation of decryption key.
Experimental Result & Analysis
Bar Graph – Iteration wise Time Comparison
The proposed system is implemented in MATLAB version R2013a (8.1.0.604). Following bar graph shows a execution time comparison between Standard RSA (SRSA) algorithm & our proposed
algorithm Modified RSA (MRSA). The bar graph is drawn by taking the execution time of 5-iterations. The X-axis is showing the number of iterations & Y- axis is showing the execution time in seconds.
Figure 3: Bar Graph(Execution Time Vs Iterations)
Execution Time Comparison with Modulus Size
Following line chart shows an execution time comparison between Standard RSA (SRSA) algorithm & Modified RSA (MRSA) algorithm. The line chart is drawn by taking the execution time of 5-iterations. The X-axis is showing the size of modulus n (i.e. n = p*q) & Y- axis is showing the execution time in seconds.
Figure 4: Line Chart(Comparison with modulus size n)
XI.
EXAMPLES TO CHECK
PERFORMANCE OF PROPOSED
304
Copyright © 2011-15. Vandana Publications. All Rights Reserved.
Now we will check performance of proposed algorithm by taking some examples of different length. We will test these examples in MATLAB environment & show the results through table & graph.
Following table shows the sample data tested in the MATLAB environment for different range of prime numbers:
Table 1: Random Sampling Data
In the above table, p & q are prime numbers, n is the product of primes p & q, e is the encryption key, d is the decryption key & ϕ (n) = (p-1)*(q-1).
Following figure shows another bar graph illustrating execution time comparison between Standard RSA (SRSA) algorithm & Modified RSA (MRSA) algorithm. We have taken 5 random sample data shown in the above table to obtain this result.
Figure 5: Random Sampling Result
Analysis & Finding
By above results, it is clear that our proposed approach provides better execution time when compared to standard RSA algorithm. Results prove that the proposed
algorithm is optimized compared to the algorithm used in the standard RSA algorithm in terms of processing time.
XII.
CONCLUSION & FUTURE SCOPE
In this paper we have studied the RSA public-key cryptosystem & examined its working, its ease of understanding & use. This paper had been under taken with the objective to develop better and faster decryption key generation algorithm so that overall decryption time could be reduced. We have designed and developed the proposed algorithm in MATLAB and analyzed the performance of our scheme with the algorithm used in the standard RSA algorithm. By the results we have produced using MATLAB, it is clear that our proposed approach provides better execution time when compared to standard RSA algorithm.
An efficient algorithm for calculating the plain text from cipher text during decryption process for a very large exponent still has to be found. The novel method represent a whole new family of potential improvements to RSA decryption key generation time. Design and development of suitable hardware solutions for the proposed algorithm evaluated in this dissertation is left as a possible research project. The present work deals with plain text being represented by numerical values. The work can also be improved to support not only numeric values but also other forms of message transmission like audio, video, text and images.
REFERENCES
[1] Dan Calloway, “Introduction to Cryptography and its role in Network Security Principles and Practices”, 2009, available at http://www.danc alloway.com/.
[2] R.L. Rivest, A. Shamir, L. Adleman, “A method for obtaining digital signatures and public-key
cryptosystems,” Communication ACM, vol. 21, pp. 120–
126, 1978.
[3] J.J. Quisquater, “A digital signature scheme with extended recovery.” preprint, 1995.
[4] A. Fiat. Batch RSA. "Advances in Cryptology", Crypto
'89, Vol. 435, 1989, pp.175- 185.
[5] T. Collins, D. Hopkins, S. Langford, and M. Sabin, “Public Key Cryptographic Apparatus and Method”, US Patent #5,848,159. January 1997.
[6] T. Takagi, "Fast RSA-Type Cryptosystem Modulo pk
[8] Jhalani M., Singh P., Shrivastava G. “Enhancement over the Variant of Public Key Cryptography Algorithm”, IJETAE, volume 2, issue 12, 2012, pp. 772-777.
q", Crypto, 1462 of LNCS. 1998, pp. 318-326.