This document summarizes a student project that modified the RSA encryption algorithm to improve its performance. The standard RSA algorithm uses large prime numbers for encryption keys. The modified algorithm divides the key size in half for sizes over 512 bits, finds two primes of that size, multiplies them and adds 2 until prime, and generates keys from this. For sizes under 512 bits it uses the standard algorithm. Testing showed the modification reduced computation time for large key sizes over 512 bits compared to the standard RSA algorithm.
2. RSA (Ron Rivest, Adi Shamir and Leonard Adleman) is a
public-key cryptosystem. RSA is an asymmetric key
cryptography technique as it uses a public key which can be
used by anyone to encrypt the message and a private key,
which can be seen only by the receiver and is used to decrypt
the message. RSA uses the concept of prime numbers and the
difficulty of factoring their product.
3. The RSA algorithm can be thought of a three stage algorithm
which includes-Key generation, Encryption operation and
finally the Decryption operation.
1. Key Generation:
Choose two distinct prime numbers-p and q
Comput n=pq, where n is used as the modulus for both the
public and private key.
Compute φ(n)=(p-1)(q-1) where φ(n) is the Euler’s Totient
Function.
Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) =
1; i.e., e and φ(n) are coprime. e is the public exponent.
Choose d as- d⋅e ≡ 1 (mod φ(n)), d is the private exponent.
Public Key- (e,n)
Private Key-(d,n)
4. 2. Encryption:
Cipher text of the message is generated as-
c=m^e mod(n)
3. Decryption:
The original message from the cipher text is generated
as-
m=c^d mod(n)
5. One major limitation of RSA algorithm is speed. Due to
factoring of large prime numbers, RSA is slower than any
secret key cryptosystems available.
Using small prime numbers makes it easier for the attacker to
factorize N, which in turn will make it easier for him to derive
the public and private key.
Using close prime numbers. This makes it easier for the
attacker to find out the value of p and q as the prime numbers
used can be found in the vicinity of square root of n.
6. The aim of the project is to modify the existing RSA
algorithm to enhance the performance of the
algorithm.
7. The algorithm works for 5 bit sizes- 128,256,512,1024 and
2048. In the modified version, if the bit size is greater than or
equal to 512, the algorithm divides the bit size by 2 and finds
two prime numbers of that bit size. The two prime numbers
are then multiplied and 2 is added to the product till it
becomes a prime number. After this the public and private
keys are generated and the encryption and decryption of the
message is done. If the bit size is less than 512, i.e 128 or 256
then the conventional RSA algorithm is followed as the
modified version increased the computation time than the
conventional one.
8.
9. The table shows the time
taken by convention RSA first
and then the modified version.
It can be concluded from the
values obtained that the
modification technique was
successful in reducing the
computation time of the RSA
algorithm.
11. The modified algorithm was successful in reducing the
computation time of the RSA algorithm, as can be seen in the
graph. The modified version was successful in reducing the
computation time for bit size greater than and equal to 512, but
for bit size less than 512 it was proving to be even more slow
than the conventional algorithm. Thus the algorithm uses the
modified version for bit size >= 512 and uses the convention
algorithm for bit size less than 512 bits.