Vous êtes sur la page 1sur 15

A Comparison Between Encryption

And Decryption Algorithms


Submitted by
Name: ROOMI PATTNAIK
Regd. No. 1241012010

Department of Computer Science & Engineering


ITER, SOA UNIVERSITY, BHUBANESWAR

Types of Cryptography
In

private key cryptography or symmetric


key crytography , only one key is used for
encryption and decryption which is
shared among sender and receiver.

In

public key cryptography or asymmetric


key , a user has a pair of cryptographic
keysa public key and a private key. The
private key is kept secret, while the public
key may be widely distributed.

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

Alice gives her public key ( n & e ) to Bob and


keeps her private key secret. Bob wants to send
message M to Alice.
First he turns M into a number smaller than n
by using an agreed-upon reversible protocol
known as a padding scheme. He then computes
the ciphertext c corresponding to: c=(m^e)
mod n
This can be done quickly using the method
of exponentiation by squaring. Bob then sends c
to Alice.

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.

for example: to encrypt m=123,we calculate c=(123^17)


mod 3233=855
to decrypt c =855, we calculate
m=(855^2753)mod 3233=123

DES(Data Encryption Standard)


It is a symmertic key algorithm i.e. one key is used
To accomplish encryption, it uses two main techniques
known as substitution and permutation.
Substitution is mapping of one value to another
whereas permutation is a reordering of the bit positions
for each of the inputs.
Used a number of times in iterations called rounds.
A non-linearity is also introduced into the encryption
so that decryption will be computationally infeasible
without the secret key. (by S-boxes)
The only issue is the shared key with may be
breached by intruders.

Working of DES Algorithm


The sequence of events that occur during an encryption
operation.:
1. Initial permutation on the entire 64 bit block of data. It
is then split into two 32 bit sub-blocks, Li and Ri which are
then passed into what is known as a round , of which there
are 16. (ie i th round)
2. Round uses Feistel block cipher developed by the IBM
cryptanalyst Horst Feistel.It does bit-shuffling, non-linear
substitutions and EX-OR operations.
3. At the end of the 16th round, the 32 bit Li and Ri output
quantities are swapped to create what is known as the preoutput.
4. This [R16, L16] concatenation is permuted using a
function which is the exact inverse of the initial
permutation.
5. The output of this final permutation is the 64 bit
ciphertext.

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

Comparing DES and RSA


In the table next, a comparative study between DES and
RSA is presented in to fourteen factors, which are
Key Size,
Block Size,
Ciphering & Deciphering key,
Algorithm,
Encryption,
Decryption,
Power Consumption,
Security,
Inherent Vulnerabilities,
Key used,
Rounds,
Stimulation Speed,
Hardware & Software Implementation and
Ciphering & Deciphering Algorithm.

FACTORS

DES

RSA

1977

1978

Key Size

56 bits

>1024 bits

Block Size

64 bits

Minimum 512 bits

Ciphering &
deciphering key

Same

Different

Algorithm

Symmetric Algorithm

Asymmetric Algorithm

Encryption

Moderate

Slower

Decryption

Moderate

Slower

Low

High

Not Secure Enough

Least Secure

Developed in year

Power Consumption
Security
Inherent
Vulnerabilities
Key Used
Rounds
Hardware & Software
Implementation
Ciphering &
Deciphering

Brute Forced, Linear and Brute Forced and Oracle


differential cryptanalysis
attack
Same key used

Different key used

16(Sixteen)

1(one)

Better in hardware than


in software

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.