Professional Documents
Culture Documents
An Algorithm To Enhance Security in RSA: July 2013
An Algorithm To Enhance Security in RSA: July 2013
net/publication/271557093
CITATIONS READS
15 116
4 authors, including:
SEE PROFILE
All content following this page was uploaded by Durai Raj Vincent P M on 12 December 2018.
[5], [6]
. To prevent this from happening, in our algorithm we try
Abstract— In symmetric key cryptography the sender as well as to eliminate the distribution of 'n' in both the keys. Instead, we
the receiver possess a common key. Asymmetric key cryptography apply a mathematical transformation over 'n' to get a
involves generation of two distinct keys which are used for replacement for 'n' using which one cannot trace back to the
encryption and decryption correspondingly. The sender converts
the original message to cipher text using the public key while the
factors of 'n' that are 'p' and 'q'. This improves the security of
receiver can decipher this using his private key. This is also called the RSA algorithm [7] by a greater extent.
Public Key Cryptography. For every public key there can exist
only one private key that can decipher the encrypted text. Security II. RSA CRYPTOSYSTEM
of RSA Algorithm can be compromised using mathematical
attack, by guessing the factors of a large number. It may also be
RSA is an asymmetric key cryptosystem relies on the
compromised if one can guess the private key. In accordance with assumption that it is difficult to find the factors of large integers.
the mathematical attack, we propose a secure algorithm in this It involves distribution of public and private key to sender and
paper. In this algorithm, we try to eliminate the distribution of n receiver to encrypt and decrypt the message respectively. RSA
which is the large number whose factors if found compromises the is a three step process that involves Key generation, Message
RSA algorithm. We also present a comparative analysis of the encryption and message decryption. The algorithm is as
proposed algorithm with the RSA algorithm.
follows:
Index Terms— RSA, Security, Encryption, Complexity, Public
key, Private key A. Key generation
i. Generate two distinct random prime numbers p and q.
I. INTRODUCTION ii. Calculate n = p x q. Its length is the key length which
is usually expressed in bits.
The asymmetric key cryptosystem [1], [2] involves the use of two iii. Calculate φ(n) = (p - 1) x (q - 1) where φ is the Euler's
distinct but related keys namely, the public key and the private totient function.
key. Plaintext is converted to cipher text using the public key. iv. Calculate e based on the following conditions:
This process is known as encryption which is performed by the 1 < e < φ(n)
sender. On the other hand, deciphering of the cipher text is
GCD(e, φ(n)) = 1 i.e., e and φ(n) are co-
performed by making use of the private key. This process is
prime.
known as decryption and is performed by the receiver. Only the
e must have a short bit-length and small
receiver possesses the knowledge of the private key. In order to
Hamming weight [2].
maintain the confidentiality of the private key, the public key is
v. Find d which satisfies the relation (e x d) Mod (n) = 1
disclosed to the public. The public key is used for authentication
to ensure that the message is coming from the intended sender.
Now, the Public Key comprises e and n i.e., (e, n). The
Public key cryptosystem also ensures confidentiality. Only the
Private Key comprises of d and n i.e., (d, n).
receiver’s private key can decipher the cipher text originating
from the sender. Communication of messages can be done in a
secure manner since knowledge of the public key is not B. Message Encryption
sufficient to decrypt the cipher text. The sender uses the following method to encipher the
Due to the above advantages, in our proposed algorithm we message M:
follow the asymmetric key cryptography technique. In this • Cipher text C = Me Mod (n) where C is the cypher text
scheme, there is a mathematical relation between the two keys. generated after encryption.
Owing to this fact, it is likely that the system may be
compromised if someone discovers the relation between the
keys and successfully derives the private key. In RSA [3], [4] both C. Message Decryption
the keys comprise of the large number ‘n’, which can be The receiver uses the following method to decipher the
factored into 'p' and 'q'. The public key is known to all. It is easy cipher text C:
to derive the private key if someone can guess the factors of 'n' • The original message M = Cd Mod(n).
GCD( X, N) = 1.
If A < B then consider X such that:
D. RSA Example N–B<X<N
GCD (X, N) = 1.
Consider the following example:
i. Generation of the keys vi. Find k2 such that k1 x k2 Mod (X) = 1
Say, p = 5 and q = 7
n=pxq Now, the Public Key consists of (k1, X) and the Private Key
=35 is (k2, X).
φ(n) = (p-1) x (q-1)
=4x6 B. Message Encryption
=24 The sender enciphers the plain text message PT using the
GCD (e, 24) = 1 and 1 < e < 35 method below.
e=5 • Encipher the message PT using public key (k1, X) by CT
= PTk1 Mod(X) where CT is the cypher text generated after
e x d Mod (φ(n)) = 1
encryption.
5 x d Mod (24) = 1
d=5
Public Key = (5, 35) C. Message Decryption
Private Key = (5, 35) The receiver deciphers the cipher text as follows:
• Decipher the cipher text CT by using the private key (k2,
ii. Message Encryption X) by PT = √(CTk2 Mod(X)).
Consider the message 3.
C = 35 Mod(35)
= 243 Mod(35) D. Modified RSA Example
= 33
Consider the following example:
iii. Message Decryption i. Generation of the keys
M = 335 Mod(35) Say, A = 5 and B = 7
= 39135393 Mod(35) N=5x7
=3 =35.
φ(N) = (A-1) x (B-1)
=4x6
III. OUR SCHEME (MODIFIED RSA) =24.
The modified algorithm introduces 2 more steps to eliminate GCD (k1, φ(N)) = 1 and √N < k1 < N.
n from the key so that one cannot trace back to the factors p and GCD (k1, 24) = 1 and √35 < k1 < 35
q by mathematical factorization of n. So, RSA can be made k1 = 5
more secure to some extent [8], [9]. This algorithm also contains
three parts: Key generation inside which n is eliminated, Now, we compute X (To replace N)
Message encryption and Message decryption. Since B is greater,
N – B < X < N and GCD(X, N) = 1.
A. Key generation 28 < X < 35 and GCD (X, 35) = 1.
i. Generate two distinct random prime numbers A and B. X = 29
ii. Calculate N = A x B. Its length is the key length which
is usually expressed in bits. k1 x k2 Mod (X) = 1
iii. Calculate φ(N) = (A - 1) x (B - 1) where φ is the Euler's 5 x k2 Mod (29) = 1
totient function. k2 = 6
iv. Calculate k1 based on the following conditions [10]: Public Key = (k1, N) = (5, 29)
√N < k1 < φ(N) Private Key = (k2, N) = (6, 29)
GCD (k1, φ(N)) = 1 i.e., k1 and φ(N) are co-
prime. ii. Message Encryption
k1 must have a short bit-length and small Consider the message 3.
Hamming weight. CT = PTk1 Mod(X)
v. Compute X (To replace N) = 35 Mod (29)
If A > B then consider X such that: = 243 Mod (29)
= 11
N–A<X<N
A B Message
Key Encryption Total
generation Decryption Time Time
time (in (in Ticks) (in Ticks)
Ticks)
5 7 2 14383 21980 36363
7 11 3 11837 22217 34054
11 13 5 20606 42581 63187
Fig. 2. Time Complexity of Modified RSA Algorithm.
Fig. 5. Total time complexity comparison between RSA and Modified RSA.
V. CONCLUSION
VI. REFERENCES
[1] W. Diffie and M. E. Hellman, New directions in cryptography, IEEE
Trans. Inform. Theory, Nov. 1976,22: 644-654.
[2] Atul Kahate, “Cryptography and Network Security”, ISBN-10:0-
07-064823-9, Tata McGraw-Hill Publishing Company Limited,
India, Second Edition, pages 38-62,152-165,205-240.
[3] R. Rivest, A. Shamir, L. Adleman, "A Method for Obtaining Digital
for Signatures and Public-Key Cryptosystems", Communications of
the ACM, vol. 21 (2), pp. 120-126, 1978.
[4] William Stallings, “Cryptography and Network Security”, ISBN 81-
7758-011-6, Pearson Education, Third Edition, pages 42-62,121-
144,253-297.
[5] Sattar J Aboud, “An Efficient Method for Attack RSA Scheme”,
978-1-4244-4457-1/09/$25.00 IEEE, 2009.
Fig. 4. Encryption and decryption time comparison between RSA and Modified
RSA. [6] Thomsan D. Bruce D. Arjen L. and Mark M., “On the Factoring of
RSA-120”, (169), pp. 166-174, 1994.
The encryption and decryption of message has the time [7] Ravi Shankar Dhakar, Amit Kumar Gupta, Prashant Sharma,
“Modified RSA Encryption Algorithm (MREA)”, Second
difference due to change in the decryption algorithm. The latter International Conference on Advanced Computing &
one being more complex takes more time. Communication Technologies, 2012.
[8] B R Ambedkar, Ashwani Gupta, Pratiksha Gautam, SS Bedi, “An
Efficient Method to Factorize the RSA Public Key Encryption”,
International Conference on Communication Systems and Network
Technologies, 2011.
[9] Hung-Min Sun, Mu-En Wu, Wei-Chi Ting, and M. Jason Hinek,
“Dual RSA and Its Security Analysis”, IEEE Transactions on
Information Theory, Vol. 53, No. 8, Aug. 2007.
[10] Sattar J Aboud, Mohammad A AL-Fayoumi, Mustafa Al-Fayoumi
and Haidar S Jabbar, “An Efficient RSA Public Key Encryption
Scheme", Fifth International Conference on Information
Technology: New Generations, 2008.