A Comparison Between Encryption and Decryption'
A Comparison Between Encryption and Decryption'
Types of Cryptography
In
In
R.S.A
by Rivest, Shamir & Adleman of MIT in 1977
RSA is an algorithm used by modern computers
to encrypt and decrypt messages.It is an
asymmetric cryptographic algorithm.
It is based on the fact that finding the factors of
a integer is hardand exponentiation in a finite
field over integers modulo a prime .
RSA Algorithm
The keys for the RSA algorithm are generated the
following way:
1. Choose two different large random prime numbers
p and q
2. Calculate n=p*q
n is the modulus for the public key and the private
keys
3. Calculate the totient: (n) = (p 1)(q 1)
4. Choose an integer e such that 1 < e < (n), and
e is coprime to (n) ie: and share no factors
other than 1; gcd(e, (n) ) = 1.
e is released as the public key exponent
5. Compute to satisfy the congruence relation
de 1 mod((n) ) ie: d 1+k (n) for some
integer k . d is kept as the private key exponent.
Encrypting Messages
Decrypting Messages
Alice can recover m from c by using her
private key exponent d via computing
m= (c^d) mod n
Given m, she can recover the original
message M by reversing the padding
scheme
NOTE: Both of the calculations in
encryption and decryption can be
computed efficiently using the square-andmultiply algorithm for modular
exponentiation.
A Working Example
Here is an example of RSA encryption and decryption.
1.Choose two random prime numbers : p=61 q=53
2.Compute n=pq ; 61*53=3233
3.Compute the totient (n) = (p 1)(q 1) ;60*52=3120
4.Choose e>1 coprime to 3120; ie e=17.
5.Choose d to satisfy de 1 mod((n) ) ; d=2753 ie
17*2753= 46801 =1+ 15*3120
The public key is(n=3233,e=17).For a padded message
m,the encryption fuction is c=(m^e)mod n = (m^17)mod
3233
The private key is(n=3233,d=2753).The decryption
function is m=(c^d)mod n= (c^2753)mod 3233.
Input=64-bit Plain
Text
and Secret
key.
Li= Left Part
Ri=Right Part
Ki=Subkey K(56/48bit)
f= Feistel block
cipher
Output=64-bit
Cipher
Text
FACTORS
DES
RSA
1977
1978
Key Size
56 bits
>1024 bits
Block Size
64 bits
Ciphering &
deciphering key
Same
Different
Algorithm
Symmetric Algorithm
Asymmetric Algorithm
Encryption
Moderate
Slower
Decryption
Moderate
Slower
Low
High
Least Secure
Developed in year
Power Consumption
Security
Inherent
Vulnerabilities
Key Used
Rounds
Hardware & Software
Implementation
Ciphering &
Deciphering
16(Sixteen)
1(one)
Not Efficient
Different
Same
Conclusion
Encryption algorithm plays very important role in
communication security.
The presentation surveyed the performance of
existing encryption techniques like DES and RSA
algorithms.
Based on the text files used and the experimental
result it was concluded that RSA consumes longest
encryption time.
We also observed that Decryption of dES algorithm is
better than RSAalgorithm.
From the simulation result, we evaluated that DES
algorithm is much better than RSA .
Our future work will focus on compared and analysed
existing cryptographic algorithm like AES, DES and
RSA. It will include experiments on image and audio
data and focus will be to improve encryption time and
decryption time.
References
http://www.facweb.iitkgp.ernet.in/~sourav/DES.pdf
https://globaljournals.org/GJCST_Volume13/4-A-Stud
y-of-Encryption-Algorithms.pdf
http://www.cryptographyworld.com/des.html
https://simple.wikipedia.org/wiki/RSA_(algorithm)
https://en.wikipedia.org/wiki/Data_Encryption_Stand
ard
https://images.google.com
THANK YOU.