0% found this document useful (0 votes)
810 views32 pages

Encryption AND Decryption: Presented By:-Anchal Bhardwaj (0581522008) and Ruchi Jain (0161522008)

This document provides an overview of encryption and decryption techniques. It discusses symmetric encryption which uses the same key for encryption and decryption, including the DES algorithm. It also discusses asymmetric encryption such as RSA, which uses a public/private key pair to encrypt and decrypt messages securely between two parties without requiring a shared secret key. Examples of encryption and decryption are provided for the RSA algorithm.

Uploaded by

Malika Gogia
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
810 views32 pages

Encryption AND Decryption: Presented By:-Anchal Bhardwaj (0581522008) and Ruchi Jain (0161522008)

This document provides an overview of encryption and decryption techniques. It discusses symmetric encryption which uses the same key for encryption and decryption, including the DES algorithm. It also discusses asymmetric encryption such as RSA, which uses a public/private key pair to encrypt and decrypt messages securely between two parties without requiring a shared secret key. Examples of encryption and decryption are provided for the RSA algorithm.

Uploaded by

Malika Gogia
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

ENCRYPTION

AND
DECRYPTION
Presented By:-
Anchal Bhardwaj(0581522008)
And
Ruchi Jain(0161522008)
OUTLINE
 Introduction
 Encryption
 Decryption
 Algorithms
 Symmetric Encryption
DES Algorithm
 Asymmetric Encryption
RSA Algorithm
 Comparison
 Summary
 References
BACK NEXT
INTRODUCTION

 Cryptography is the science of information


security.
 The word is derived from the Greek kryptos,
meaning hidden.
 Cryptography components:-
Plain Text
Cipher Text
Encryption
Decryption

BACK HOME NEXT


 Plaintext : It is original intelligible message ,
before being transformed .The data are not
encrypted.
 Ciphertext : After the message is transformed .
The data are encrypted.
 Alice : Alice is the person who needs to send
secure data.
 Bob : Bob is the recipient of the data.
 Eve : Eve is the person who somehow disturbs
the communication between Alice and Bob.
BACK HOME NEXT
DATA FLOW DIAGRAM

PLAIN PLAIN
EVE TEXT
TEXT

ENCRYPTION DECRYPTION

SENDER CIPHER RECEIVER


TEXT

BACK HOME NEXT


ENCRYPTION
 It is the process in which plaintext or data is
converted into unintelligible form by means of
a reversible translation, based on a
translation table or algorithm .

Original Text Key Encrypted Text

+ =

Encryption
BACK HOME NEXT
DECRYPTION
 It is the proces in which encrypted text or data
(called ciphertext) is translated back into the
original text or data (called plaintext).

Encrypted Text Key Original Text

+ =
Decryption
BACK HOME NEXT
ALGORITHMS

 Symmetric Encryption(Conventional
Encryption)
 Asymmetric Encryption(Public-key
Encryption)

BACK HOME NEXT


Symmetric Encryption
 Same algorithm with same key(secret key) is
used for encryption and decryption.
 Sender and receiver must share the algorithm
and the key.

Secret key

Ciphertext
Plaintext Encryption Decryption Plaintext

BACK HOME NEXT


Secret-Key Problem?
 All keys need to be
replaced, if one key
is compromised.
 Not practical for th
e Internet environ
ment.
 On the other hand,
the encryption spee
d is fast.
 Suitable to encrypt
your personal data.

BACK HOME NEXT 10


Symmetric encryption alg
orithms
Algorithm Name Key Length (bits)
Blowfish Up to 448
DES 56
IDEA 128
RC2 Up to 2048
RC4 Up to 2048
RC5 Up to 2048
Triple DES 192
BACK HOME NEXT
DES Algorithm
 The data encryption standard (DES) was
developed in the 1970s by the NATIONAL
BUREAU OF STANDARDS (NBS) with the help of
the NATIONAL SECURITY AGENCY (NSA).
Most widely used encryption algorithm until
recently.
 Exhibits the classic Feistel Structure.
 Uses a 64-bit block and a 56-bit key.

BACK HOME NEXT


Asymmetric encryption
 One algorithm is used for encryption and
decryption with a pair of keys, one for
encryption and one for decryption.
 Sender and receiver must each have one of the
matched pair of keys(not the same one).

Public key Private key

Ciphertext
Plaintext Encryption Decryption Plaintext

BACK HOME NEXT


Public-Private Encryption
Public key
Public key stored in the directory

First, create public Public Key Directory


and private key

Private key

Public Key
Private key

Private key stored in


your personal computer

BACK HOME NEXT


Message Encryption
(User A sends message to User B)

Public Key Directory

User B’s Public Key

Encrypted
Text Text

Encryption

User A

BACK HOME NEXT


Decryption with your Priv
ate key
Encrypted Private key stored in
Text your personal computer

User B
User B’s
Private key
Decryption

Original Text

BACK HOME NEXT


Asymmetric algorithms

Algorithm Name Key Length (bits)


DSA Up to 448
El Gamal 56
RSA 128
Diffie-Hellman Up to 2048

BACK HOME NEXT


RSA Algorithm
 Published in the paper A Method for Obtaining
Digital Signatures and Public-Key Cryptosystems 

in 1977 by Ron Rivest, Adi Shamir and Len


Adleman.
 Most widely accepted and implemented general-
purpose approach to public-key encryption.
 Block cipher scheme in which the plaintext and
cipher text are integers between 0 and n-1 for
someHOME
BACK n(1024NEXT
bits).
Key Generation
 Choose two distinct prime numbers p and q.
For security purposes, the prime integers
p and q should be chosen uniformly at
random and should be of similar bit-length.
 Compute n = pq.
n is used as the modulus for both the public
and private keys.
 Compute φ(pq) = (p − 1)(q − 1). (φ is Euler's
totient function).
BACK HOME NEXT
CONTINUED…

 Choose a small integer e, such that


 1<e< φ(n).
 e is coprime to φ(n) i.e GCD(e,φ(n)).
 Determine d which satisfies the congruence
relation:-
 de=1(mod φ(n)), Where d< φ(n).
 Publish their public encryption key: PU={e,n}.
 Keep secret private decryption key: PR={d,n}.
BACK HOME NEXT
Encryption
M Plaintext, M<n
C Ciphertext
C=Me mod N

Decryption
M=Cd mod N

BACK HOME NEXT


RSA Example
 Select primes: p=7 and q=19.
 Compute n = p * q = 7 * 19 = 133.
 Compute ø(n)=(p–1)(q-1)=6×18=108.
 Select e such that GCD(e,108)=1
for e=2, GCD(2,108)=2 (no)
for e=3, GCD(3,108)=3 (no)
for e=4, GCD(4,108)=4 (no)
for e=5, GCD(5,108)=1 (yes!)
Thus, choosing e=5.
BACK HOME NEXT
CONTINUED…

 Determine d: de mod φ(n)=1 and d < φ(n).


this is equivalent to de=1+kφ(n).
where k is any integer.
for k=0, d=1/5 (no)
for k=1, d=109/5 (no)
for k=2, d=217/5 (no)
for k=3, d=325/5
=65 (yes!)
 Resulting keys:
Public Key Private Key
PU={e,n}={5,133}. PR={e,n}={65,133}.

BACK HOME NEXT


CONTINUED…

Given Message, M=88.


Encryption:-

C=Me mod N
=885 mod 133
=5277319168 mod 133
=65.
Decryption:-

M=Cd mod N
=6565 mod 133
BACK HOME NEXT
CONTINUED…

=65*(65)64 mod 133


=65* (652)32 mod 133
=65* (4225)32 mod 133
=65* (4225 mod 133)32 mod 133
= 65* (102)32 mod 133
= 65* (1022)16 mod 133
= 65* (10404 mod 133)16 mod 133
= 65* (30)16 mod 133
= 65* (900 mod 133)8 mod 133
=65* (102)8 mod 133
BACK HOME NEXT
CONTINUED…

= 65* (1022)4 mod 133


= 65* (10404 mod 133)4 mod 133
= 65* (30)4 mod 133
= 65* (900 mod 133)2 mod 133
= 65* (102)2 mod 133
= 65* 10404 mod 133
=676260 mod 133
=88 (Original Message)

BACK HOME NEXT


RSA Security
 Three approaches to attacking RSA:
– brute force key search (infeasible given size of
numbers)
– mathematical attacks (based on difficulty of c
omputing ø(N), by factoring modulus N)
– timing attacks (on running of decryption)
Advantages
 Increased security and convenience.
 Provide digital signatures that cannot be
repudiated.
 Best used in multi-user environment.

Disdvantages
 About 1000 times slower than DES.
 Computational cost is high.
Comparison
SYMMETRIC ENCRYPTION ASYMMETRIC ENCRYPTION
 Same algorithm with the  One algorithm is used for
same key is used for encryption and decryption with a
encryption and decryption. pair of keys, one for encryption
and other for decryption.
 Sender and receiver must share  Sender and receiver must each
the algorithm and the key. have one of the matched pair of
keys(not the same one).
 Key must be kept secret.  One of the two keys must be kept
secret.
 Faster as compared to asymmetric  About 1000 times slower than
encryption. symmetric encryption.
 Generally more secure and less  Less secure and computational cost
computationally less expensive . is relatively high.
 Best used for digital signatures and  Best used for Bulk data encryption .
for protecting DES keys.

BACK HOME NEXT


Summary
 Cryptography
 Encryption
 Decryption
 Algorithms
Symmetric encryption
DES
Asymmetric encryption
RSA
 Comparison
BACK HOME NEXT
References
“Cryptography and Network Security” by William
Stallings.
“Computer Networks” by Andrew S. Tanenbaum.
 Google.com.
 Wikipedia.com

BACK HOME NEXT


END
END SHOW
SHOW

You might also like