SlideShare a Scribd company logo
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
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
ENCRYPTION DECRYPTION
PLAIN
TEXT
CIPHER
TEXT
PLAIN
TEXT
SENDER RECEIVER
EVE
DATA FLOW DIAGRAM
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 .
BACK HOME NEXT
Encrypted Text
Original Text
+
Key
=
Encryption
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 Original Text
Key
+ =
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
BACK HOME NEXT
Plaintex
t
Encryption Decryption Plaintext
Ciphertex
t
Secret-Key Problem?
 All keys need to
be replaced, if one
key is
compromised.
 Not practical for
the Internet
environment.
 On the other
hand, the
encryption speed
is fast.
 Suitable to
encrypt your
personal data.
10
BACK HOME NEXT
Symmetric encryption
algorithms
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).
BACK HOME NEXT
Public
key
Plaintex
t
Encryption Decryption
Ciphertex
t Plaintext
Private key
Public-Private Encryption
First, create public
and private key
Public key
Private key
Private key
Private key stored in
your personal computer
Public Key Directory
Public Key
Public key stored in the directory
BACK HOME NEXT
Message Encryption
(User A sends message to User B)
Public Key Directory
Text
User A
User B’s Public Key
Encryption
Encrypted
Text
BACK HOME NEXT
Decryption with your
Private key
Encrypted
Text
User B’s
Private key
Private key stored in
your personal computer
Decryption
Original Text
User B
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
BACK HOME NEXT
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
 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:
CONTINUED…
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
Given Message, M=88.
Encryption:-
Decryption:-
CONTINUED…
C=Me
mod N
=885
mod 133
=5277319168 mod 133
=65.
M=Cd
mod N
=6565
mod 133
BACK HOME NEXT
=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
CONTINUED…
BACK HOME NEXT
= 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)
CONTINUED…
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
computing ø(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.
SYMMETRIC ENCRYPTION ASYMMETRIC ENCRYPTION
 Same algorithm with the
same key is used for
encryption and decryption.
 One algorithm is used for
encryption and decryption with a
pair of keys, one for encryption
and other for decryption.
 Sender and receiver must share
the algorithm and the key.
 Sender and receiver must each
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
encryption.
 About 1000 times slower than
symmetric encryption.
 Generally more secure and less
computationally less expensive .
 Less secure and computational
cost is relatively high.
 Best used for digital signatures
and
 Best used for Bulk data encryption
.
BACK HOME NEXT
Comparison
Summar
y
 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 SHOW

More Related Content

PDF
Ch12 Encryption
PPTX
Cryptography and network security
PPTX
Cryptography and network security
PPT
PPTX
Public key algorithm
PPT
Kleptography
PPT
Introduction to cryptography
PDF
Analysis of Cryptographic Algorithms
Ch12 Encryption
Cryptography and network security
Cryptography and network security
Public key algorithm
Kleptography
Introduction to cryptography
Analysis of Cryptographic Algorithms

Similar to encryption and decryption ,and its types (20)

PPT
What is Encryption
PPT
Network security
PDF
D017433134
PPT
Encryption
PDF
Public-Key Cryptography.pdfWrite the result of the following operation with t...
PPTX
OS ppt Modified.pptx
PPT
PUBLIC KEY & RSA.ppt
PDF
Chaotic Rivest-Shamir-Adlerman Algorithm with Data Encryption Standard Schedu...
PDF
F010243136
PPT
Cupdf.com public key-cryptography-569692953829a
PPTX
Cryptography
PPT
Unit --3.ppt
PPT
Elementry Cryptography
PPTX
RSA-Algorithm-in-Modular-Arithmetic11 (1) (1).pptx
PPT
PDF
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
PPT
Rsa diffi-network security-itt
PDF
UNIT 3.2 Classical and Modern Encryption Techniques.pdf
PPTX
Hybrid encryption ppt
PPTX
What is Encryption
Network security
D017433134
Encryption
Public-Key Cryptography.pdfWrite the result of the following operation with t...
OS ppt Modified.pptx
PUBLIC KEY & RSA.ppt
Chaotic Rivest-Shamir-Adlerman Algorithm with Data Encryption Standard Schedu...
F010243136
Cupdf.com public key-cryptography-569692953829a
Cryptography
Unit --3.ppt
Elementry Cryptography
RSA-Algorithm-in-Modular-Arithmetic11 (1) (1).pptx
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
Rsa diffi-network security-itt
UNIT 3.2 Classical and Modern Encryption Techniques.pdf
Hybrid encryption ppt
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Cell Structure & Organelles in detailed.
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
master seminar digital applications in india
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Cell Structure & Organelles in detailed.
GDM (1) (1).pptx small presentation for students
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPH.pptx obstetrics and gynecology in nursing
Final Presentation General Medicine 03-08-2024.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
102 student loan defaulters named and shamed – Is someone you know on the list?
master seminar digital applications in india
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
RMMM.pdf make it easy to upload and study
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Computing-Curriculum for Schools in Ghana
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Ad

encryption and decryption ,and its types

  • 2. OUTLINE  Introduction  Encryption  Decryption  Algorithms  Symmetric Encryption DES Algorithm  Asymmetric Encryption RSA Algorithm  Comparison  Summary BACK NEXT
  • 3. 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
  • 4.  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
  • 6. 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 . BACK HOME NEXT Encrypted Text Original Text + Key = Encryption
  • 7. 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 Original Text Key + = Decryption BACK HOME NEXT
  • 8. ALGORITHMS  Symmetric Encryption(Conventional Encryption)  Asymmetric Encryption(Public-key Encryption) BACK HOME NEXT
  • 9. 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 BACK HOME NEXT Plaintex t Encryption Decryption Plaintext Ciphertex t
  • 10. Secret-Key Problem?  All keys need to be replaced, if one key is compromised.  Not practical for the Internet environment.  On the other hand, the encryption speed is fast.  Suitable to encrypt your personal data. 10 BACK HOME NEXT
  • 11. Symmetric encryption algorithms 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
  • 12. 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
  • 13. 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). BACK HOME NEXT Public key Plaintex t Encryption Decryption Ciphertex t Plaintext Private key
  • 14. Public-Private Encryption First, create public and private key Public key Private key Private key Private key stored in your personal computer Public Key Directory Public Key Public key stored in the directory BACK HOME NEXT
  • 15. Message Encryption (User A sends message to User B) Public Key Directory Text User A User B’s Public Key Encryption Encrypted Text BACK HOME NEXT
  • 16. Decryption with your Private key Encrypted Text User B’s Private key Private key stored in your personal computer Decryption Original Text User B BACK HOME NEXT
  • 17. Asymmetric algorithms Algorithm Name Key Length (bits) DSA Up to 448 El Gamal 56 RSA 128 Diffie-Hellman Up to 2048 BACK HOME NEXT
  • 18. 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 BACK HOME NEXT
  • 19. 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
  • 20.  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: CONTINUED… BACK HOME NEXT
  • 21. Encryption M Plaintext, M<n C Ciphertext C=Me mod N Decryption M=Cd mod N BACK HOME NEXT
  • 22. 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
  • 23. 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
  • 24. Given Message, M=88. Encryption:- Decryption:- CONTINUED… C=Me mod N =885 mod 133 =5277319168 mod 133 =65. M=Cd mod N =6565 mod 133 BACK HOME NEXT
  • 25. =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 CONTINUED… BACK HOME NEXT
  • 26. = 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) CONTINUED… BACK HOME NEXT
  • 27. RSA Security  Three approaches to attacking RSA: – brute force key search (infeasible given size of numbers) – mathematical attacks (based on difficulty of computing ø(N), by factoring modulus N) – timing attacks (on running of decryption)
  • 28. 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.
  • 29. SYMMETRIC ENCRYPTION ASYMMETRIC ENCRYPTION  Same algorithm with the same key is used for encryption and decryption.  One algorithm is used for encryption and decryption with a pair of keys, one for encryption and other for decryption.  Sender and receiver must share the algorithm and the key.  Sender and receiver must each 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 encryption.  About 1000 times slower than symmetric encryption.  Generally more secure and less computationally less expensive .  Less secure and computational cost is relatively high.  Best used for digital signatures and  Best used for Bulk data encryption . BACK HOME NEXT Comparison
  • 30. Summar y  Cryptography  Encryption  Decryption  Algorithms Symmetric encryption DES Asymmetric encryption RSA  Comparison BACK HOME NEXT
  • 31. References “Cryptography and Network Security” by William Stallings. “Computer Networks” by Andrew S. Tanenbaum.  Google.com.  Wikipedia.com BACK HOME NEXT