SlideShare una empresa de Scribd logo
1 de 38
CRYPTOGRAPHY
CONTENTS 
• Definition 
• Cryptography Issues 
• Cryptography Components 
• Cryptography Technique 
• Cryptography Categories 
• Symmetric key cryptography 
• Asymmetric key cryptography 
• Comparison of Symmetric and Asymmetric key cryptography 
• Famous Algorithms/Ciphers
DEFINITION
CRYPTOGRAPHY 
• A word with Greek origins, means “secret writing”. 
• The term to refer to the science and art of transforming 
messages to make them secure and immune to attacks. 
• Applications of cryptography includes ATM cards, computer 
passwords, and electronic commerce. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CRYPTOGRAPHY ISSUES
CRYPTOGRAPHY ISSUES 
• Confidentiality: Only sender, intended receiver should “understand” 
message contents. 
• End-Point Authentication: Sender and receiver want to confirm 
identity of each other. 
• Message Integrity: Sender and receiver want to ensure message not 
altered (in transit, or afterwards) without detection. 
• Message Nonrepudiation: Message nonrepudiation means that a 
sender must not be able to deny sending a message that he or she, 
in fact, did send. 
• Entity Authentication: In entity authentication (or user identification) 
the entity or user is verified prior to access to the system resources
CRYPTOGRAPHY COMPONENTS
PLAINTEXT AND CIPHERTEXT 
• The original message, before being transformed, is called 
plaintext. 
• After the message is transformed, it is called ciphertext. 
• An encryption algorithm transforms the plaintext into 
ciphertext; a decryption algorithm transforms the ciphertext 
back into plaintext. 
• Example: 
• Plaintext: HELLO 
• Ciphertext: KHOOR 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CIPHER 
• Encryption and Decryption algorithms are referred as ciphers. 
• Also used to refer to different categories of algorithms in 
cryptography. 
• Example (Traditional Substitution Ciphers): 
• Monoalphabetic cipher 
• Polyalphabetic cipher 
• Plaintext: HELLO 
• Ciphertext: ABNZF 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
KEY 
• A key is a number (or a set of numbers) that the cipher 
operates on, as an algorithm. 
• To encrypt a message, we need an encryption algorithm, an 
encryption key, and the plaintext. 
• To decrypt a message, we need a decryption algorithm, a 
decryption key, and the ciphertext. These reveal the original 
plaintext. 
• Types: 
• Shared key, Public key and Private key. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
USE OF KEY 
• Example: 
• Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3. 
• Plaintext: HELLO 
• Ciphertext: KHOOR
ALICE, BOB, AND EVE 
• Alice is the person who needs to send secure data. 
• Bob is the recipient of the data. 
• Eve is the person who somehow disturbs the communication 
between Alice and Bob. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CRYPTOGRAPHY TECHNIQUE
CRYPTOGRAPHY TECHNIQUE 
Plaintext Ciphertext Plaintext 
Alice Bob 
Eve 
Alice’s 
Encryption 
Key K1 
Bob’s 
Decryption 
Key K2 
If m = Plaintext, then 
• Ciphertext = K1(m) and 
• m = K2(K1(m))
CRYPTOGRAPHY CATEGORIES
CRYPTOGRAPHY CATEGORIES 
• We can divide all the cryptography algorithms (ciphers) into two 
groups: 
• Symmetric key (also called secret-key) cryptography 
algorithms and 
• Asymmetric key (also called public-key) cryptography 
algorithms. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
SYMMETRIC KEY CRYPTOGRAPHY 
• In symmetric-key cryptography, the same key is used by both 
parties. 
• The sender uses this key and an encryption algorithm to 
encrypt data; the receiver uses the same key and the 
corresponding decryption algorithm to decrypt the data. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
SYMMETRIC KEY CRYPTOGRAPHY 
TECHNIQUE 
Alice’s 
Encryption 
Key K 
Bob’s 
Decryption 
Key K 
Shared 
Secret 
Key K 
Plaintext Ciphertext Plaintext 
Alice Bob 
If m = Plaintext and K is the shared secret key, then 
• Ciphertext = K(m) and 
• m = K(K(m))
SYMMETRIC KEY CIPHERS 
Traditional 
Ciphers 
Modern 
Ciphers 
Substitution 
Ciphers 
Transpositio 
n 
Ciphers 
Mono-alphabetic 
Ciphers 
Poly-alphabetic 
Ciphers 
DES, AES, 
IDEA, CAST, 
RC4, RC5, 
etc. 
Simple 
Ciphers 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan 
Round 
Ciphers 
XOR, 
Rotation, S-box, 
P-box 
etc.
ASYMMETRIC KEY CRYPTOGRAPHY 
• In asymmetric or public-key cryptography, there are two keys: a 
private key and a public key. 
• The private key is kept by the receiver. 
• The public key is announced to the public. 
• If Alice wants to send a message to Bob, Alice uses the public key to 
encrypt the message. When the message is received by Bob, the 
private key is used to decrypt the message. 
• Some of the asymmetric algorithms are: 
• Diffie-Hellman, RSA, El Gamal, Elliptic Curve Cryptography (ECC), Man-in-the- 
Middle Attack etc. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
ASYMMETRIC KEY CRYPTOGRAPHY 
TECHNIQUE 
Bob’s 
Public 
Key K+ 
Bob’s 
Private 
Key K-If 
Plaintext Ciphertext Plaintext 
Alice Bob 
m = Plaintext, then 
• Ciphertext = K+(m) and 
• m = K-(K+(m)) 
To Public 
Used for encryption 
Used for decryption
COMPARISON OF SYMMETRIC AND 
ASYMMETRIC KEY CRYPTOGRAPHY
SYMMETRIC KEY 
CRYPTOGRAPHY 
• Only 1 shared key is involved. 
• The same key encrypts and 
decrypts the plaintext. 
• The shared key is kept secret 
between Alice and Bob. 
• Examples of Symmetric 
algorithms: 
• DES, 3DES, AES, IDEA, 
BLOWFISH, TWOFISH, RC4, RC5, 
SAFER etc. 
ASYMMETRIC KEY 
CRYPTOGRAPHY 
• Here 2 keys : a private and a 
public key are involved. 
• The Public key encrypts the 
plaintext while the private 
key decrypts it. 
• The private key is just kept 
secret by the Bob while the 
public key is made public. 
• Examples of Asymmetric 
algorithms: 
• Diffie-Hellman, RSA, El Gamal, 
Elliptic Curve Cryptography
FAMOUS ALGORITHMS/CIPHERS
MODERN ROUND CIPHERS 
• The ciphers of today are called round ciphers because they involve 
multiple rounds, where each round is a complex cipher made up of 
the simple ciphers. 
• The key used in each round is a subset or variation of the general key 
called the round key. 
• If the cipher has N rounds, a key generator produces N keys, K1, 
K2,...., KN, where K1 is used in round 1, K2 in round 2, and so on. 
• Modem symmetric-key ciphers: DES and AES are referred to as block 
ciphers because they divide the plaintext into blocks and use the 
same key to encrypt and decrypt the blocks. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
DES - DATA ENCRYPTION STANDARD 
• The algorithm encrypts a 64-bit plaintext block using a 64-bit 
key. 
• DES has two transposition blocks (P-boxes) and 16 complex 
round ciphers (they are repeated). 
• Although the 16 iteration round ciphers are conceptually the 
same, each uses a different key derived from the original key. 
• The initial and final permutations are keyless straight 
permutations that are the inverse of each other. The 
permutation takes a 64-bit input and permutes them according 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan 
to predefined values.
DES TECHNIQUE 
Initial Permutation 
Round 1 
Round 2 
Round 16 
Final Permutation 
Round 
Key 
Generator 
K1 
K2 
K16 
64-Bit Plaintext 
64-Bit Ciphertext 
64-Bit Key 
DES
AES - ADVANCED ENCRYPTION STANDARD 
• The Advanced Encryption Standard (AES) was designed because DES's 
key was too small. 
• AES is designed with three key sizes: 128, 192, or 256 bits. 
• Table shows the relationship between the data block, number of 
rounds, and key size. 
Size of Data Block Number of Rounds Key Size 
10 128 
128-Bits 12 192 
14 256 
• The structure and operation of the other configurations are similar. 
The difference lies in the key generation. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
AES TECHNIQUE 
Pre Round 
Transformation 
Round 1 
Round 2 
Round N 
(slightly different) 
Round 
Key 
Generator 
K1 
K2 
KN 
128-Bit Plaintext 
128-Bit Ciphertext 
Cipher Key 
(128-bits for N =10, 
192-bits for N =12 or 
256-bits for N =14) 
AES 
K0 
• Each round 
of AES, 
except for 
the last, is a 
cipher with 
four 
operations 
that are 
invertible. 
• The last 
round has 
only three 
operations.
RSA ALGORITHM 
• It uses two numbers, e and d, having a special relationship to 
each other, as the public and private keys. 
• Selecting Keys 
Bob use the following steps to select the private and public keys: 
1. Bob chooses two very large prime numbers p and q. 
2. Bob multiplies the above two primes to find n, the modulus for 
encryption and decryption. In other words, n = p X q. 
3. Bob calculates another number φ = (p -1) X (q - 1). 
4. Bob chooses a random integer e. He then calculates d so that d x e = 1 
mod φ. 
5. Bob announces e and n to the public; he keeps φ and d secret. 
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
RSA ALGORITHM 
• Encryption 
• Anyone who needs to send a message to Bob can use n and e. 
• For example, if Alice needs to send a message to Bob, she can change 
the message, usually a short one, to an integer. This is the plaintext. 
• She then calculates the ciphertext, using e and n, as c = pe (mod n). 
• Alice sends C, the ciphertext, to Bob. 
• Decryption 
• When Bob receives the ciphertext, he uses his private key d to decrypt 
the message: 
p = cd (mod n) Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CONCLUSION 
• By using of encryption techniques a fair unit of confidentiality, 
authentication, integrity, access control and availability of data 
is maintained. 
• Using cryptography Electronic Mail Security, Mail Security, IP 
Security, Web security can be achieved.
REFERENCE 
CHAPTER 30, CRYPTOGRAPHY 
DATA COMMUNICATIONS AND NETWORKING 
BY BEHROUZ A. FOROUZAN
THANK YOU
EXAMPLES
MONOALPHABETIC CIPHER 
• Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3. 
Key=3 means shift each character of plaintext by character at 
3 places ahead of it. Hence replacing H by K, E by H, L by O and 
O by R in the plaintext. 
• Plaintext: HELLO 
• Ciphertext: KHOOR
POLYALPHABETIC CIPHER 
• Use Polyalphabetic Cipher to encrypt “HELLO” with key = 3,2. 
Divide HELLO in group of 3 characters viz. HEL-LO and use 
key=3 to encrypt HEL and key=2 to encrypt LO. 
• Plaintext: HELLO 
• Ciphertext: KHONB
TRANSPOSITION CIPHER 
• Encrypt the message "HELLO MY DEAR" using the key: 
• Plaintext: 1234 
• Ciphertext: 2413 
In encryption, we move the character at position 2 to position 1, the 
character at position 4 to position 2, and so on. We first remove the 
spaces in the message. We then divide the text into blocks of four 
characters. We add a bogus character Z at the end of the third block. 
The result is HELL OMYD EARZ. We create a three-block ciphertext 
ELHLMDOYAZER. 
• Plaintext: HELLO MY DEAR 
• Ciphertext: ELHLMDOYAZER

Más contenido relacionado

La actualidad más candente

Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
Uday Meena
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
patisa
 

La actualidad más candente (20)

Kerberos
KerberosKerberos
Kerberos
 
IP Security
IP SecurityIP Security
IP Security
 
Key management
Key managementKey management
Key management
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
History of cryptography
History of cryptographyHistory of cryptography
History of cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Symmetric and asymmetric key
Symmetric and asymmetric keySymmetric and asymmetric key
Symmetric and asymmetric key
 
S/MIME
S/MIMES/MIME
S/MIME
 
Symmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographySymmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptography
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
Cryptography and Information Security
Cryptography and Information SecurityCryptography and Information Security
Cryptography and Information Security
 
RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
 
cryptography
cryptographycryptography
cryptography
 
2. Stream Ciphers
2. Stream Ciphers2. Stream Ciphers
2. Stream Ciphers
 
Cryptography
CryptographyCryptography
Cryptography
 

Destacado

Encryption presentation final
Encryption presentation finalEncryption presentation final
Encryption presentation final
adrigee12
 

Destacado (20)

Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography - 101
Cryptography - 101Cryptography - 101
Cryptography - 101
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
DES
DESDES
DES
 
Ch08
Ch08Ch08
Ch08
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cissp d5-cryptography v2012-mini coursev2
Cissp d5-cryptography v2012-mini coursev2Cissp d5-cryptography v2012-mini coursev2
Cissp d5-cryptography v2012-mini coursev2
 
Security
SecuritySecurity
Security
 
Infomration & network security
Infomration & network securityInfomration & network security
Infomration & network security
 
Cryptography Intro
Cryptography IntroCryptography Intro
Cryptography Intro
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Ch11 Basic Cryptography
Ch11 Basic CryptographyCh11 Basic Cryptography
Ch11 Basic Cryptography
 
Network Security
Network SecurityNetwork Security
Network Security
 
Network security
Network securityNetwork security
Network security
 
Encryption presentation final
Encryption presentation finalEncryption presentation final
Encryption presentation final
 
Visual Cryptography
Visual CryptographyVisual Cryptography
Visual Cryptography
 

Similar a Cryptography

aacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxaacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptx
ImXaib
 

Similar a Cryptography (20)

Cryptography
CryptographyCryptography
Cryptography
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
 
CNS - Unit - 4 - Public Key Cryptosystem
CNS - Unit - 4 - Public Key Cryptosystem CNS - Unit - 4 - Public Key Cryptosystem
CNS - Unit - 4 - Public Key Cryptosystem
 
Crypt
CryptCrypt
Crypt
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
 
Fundamentals of Information Encryption
Fundamentals of Information EncryptionFundamentals of Information Encryption
Fundamentals of Information Encryption
 
3. The Data Encryption Standard (DES) and Alternatives
3. The Data Encryption Standard (DES) and Alternatives3. The Data Encryption Standard (DES) and Alternatives
3. The Data Encryption Standard (DES) and Alternatives
 
Module-1.pptx
Module-1.pptxModule-1.pptx
Module-1.pptx
 
3 Basics of Cryptography Basics of Cryptography
3 Basics of Cryptography  Basics of Cryptography3 Basics of Cryptography  Basics of Cryptography
3 Basics of Cryptography Basics of Cryptography
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System Security
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
 
Cryptography
CryptographyCryptography
Cryptography
 
Applying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto libraryApplying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto library
 
Security - ch3.pptx
Security - ch3.pptxSecurity - ch3.pptx
Security - ch3.pptx
 
Cryptography & Network Security.ppt-1.pdf
Cryptography & Network Security.ppt-1.pdfCryptography & Network Security.ppt-1.pdf
Cryptography & Network Security.ppt-1.pdf
 
aacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxaacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptx
 
Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
 
Cryptography
CryptographyCryptography
Cryptography
 

Último

Último (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

Cryptography

  • 2. CONTENTS • Definition • Cryptography Issues • Cryptography Components • Cryptography Technique • Cryptography Categories • Symmetric key cryptography • Asymmetric key cryptography • Comparison of Symmetric and Asymmetric key cryptography • Famous Algorithms/Ciphers
  • 4. CRYPTOGRAPHY • A word with Greek origins, means “secret writing”. • The term to refer to the science and art of transforming messages to make them secure and immune to attacks. • Applications of cryptography includes ATM cards, computer passwords, and electronic commerce. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 6. CRYPTOGRAPHY ISSUES • Confidentiality: Only sender, intended receiver should “understand” message contents. • End-Point Authentication: Sender and receiver want to confirm identity of each other. • Message Integrity: Sender and receiver want to ensure message not altered (in transit, or afterwards) without detection. • Message Nonrepudiation: Message nonrepudiation means that a sender must not be able to deny sending a message that he or she, in fact, did send. • Entity Authentication: In entity authentication (or user identification) the entity or user is verified prior to access to the system resources
  • 8. PLAINTEXT AND CIPHERTEXT • The original message, before being transformed, is called plaintext. • After the message is transformed, it is called ciphertext. • An encryption algorithm transforms the plaintext into ciphertext; a decryption algorithm transforms the ciphertext back into plaintext. • Example: • Plaintext: HELLO • Ciphertext: KHOOR Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 9. CIPHER • Encryption and Decryption algorithms are referred as ciphers. • Also used to refer to different categories of algorithms in cryptography. • Example (Traditional Substitution Ciphers): • Monoalphabetic cipher • Polyalphabetic cipher • Plaintext: HELLO • Ciphertext: ABNZF Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 10. KEY • A key is a number (or a set of numbers) that the cipher operates on, as an algorithm. • To encrypt a message, we need an encryption algorithm, an encryption key, and the plaintext. • To decrypt a message, we need a decryption algorithm, a decryption key, and the ciphertext. These reveal the original plaintext. • Types: • Shared key, Public key and Private key. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 11. USE OF KEY • Example: • Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3. • Plaintext: HELLO • Ciphertext: KHOOR
  • 12. ALICE, BOB, AND EVE • Alice is the person who needs to send secure data. • Bob is the recipient of the data. • Eve is the person who somehow disturbs the communication between Alice and Bob. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 14. CRYPTOGRAPHY TECHNIQUE Plaintext Ciphertext Plaintext Alice Bob Eve Alice’s Encryption Key K1 Bob’s Decryption Key K2 If m = Plaintext, then • Ciphertext = K1(m) and • m = K2(K1(m))
  • 16. CRYPTOGRAPHY CATEGORIES • We can divide all the cryptography algorithms (ciphers) into two groups: • Symmetric key (also called secret-key) cryptography algorithms and • Asymmetric key (also called public-key) cryptography algorithms. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 17. SYMMETRIC KEY CRYPTOGRAPHY • In symmetric-key cryptography, the same key is used by both parties. • The sender uses this key and an encryption algorithm to encrypt data; the receiver uses the same key and the corresponding decryption algorithm to decrypt the data. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 18. SYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE Alice’s Encryption Key K Bob’s Decryption Key K Shared Secret Key K Plaintext Ciphertext Plaintext Alice Bob If m = Plaintext and K is the shared secret key, then • Ciphertext = K(m) and • m = K(K(m))
  • 19. SYMMETRIC KEY CIPHERS Traditional Ciphers Modern Ciphers Substitution Ciphers Transpositio n Ciphers Mono-alphabetic Ciphers Poly-alphabetic Ciphers DES, AES, IDEA, CAST, RC4, RC5, etc. Simple Ciphers Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan Round Ciphers XOR, Rotation, S-box, P-box etc.
  • 20. ASYMMETRIC KEY CRYPTOGRAPHY • In asymmetric or public-key cryptography, there are two keys: a private key and a public key. • The private key is kept by the receiver. • The public key is announced to the public. • If Alice wants to send a message to Bob, Alice uses the public key to encrypt the message. When the message is received by Bob, the private key is used to decrypt the message. • Some of the asymmetric algorithms are: • Diffie-Hellman, RSA, El Gamal, Elliptic Curve Cryptography (ECC), Man-in-the- Middle Attack etc. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 21. ASYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE Bob’s Public Key K+ Bob’s Private Key K-If Plaintext Ciphertext Plaintext Alice Bob m = Plaintext, then • Ciphertext = K+(m) and • m = K-(K+(m)) To Public Used for encryption Used for decryption
  • 22. COMPARISON OF SYMMETRIC AND ASYMMETRIC KEY CRYPTOGRAPHY
  • 23. SYMMETRIC KEY CRYPTOGRAPHY • Only 1 shared key is involved. • The same key encrypts and decrypts the plaintext. • The shared key is kept secret between Alice and Bob. • Examples of Symmetric algorithms: • DES, 3DES, AES, IDEA, BLOWFISH, TWOFISH, RC4, RC5, SAFER etc. ASYMMETRIC KEY CRYPTOGRAPHY • Here 2 keys : a private and a public key are involved. • The Public key encrypts the plaintext while the private key decrypts it. • The private key is just kept secret by the Bob while the public key is made public. • Examples of Asymmetric algorithms: • Diffie-Hellman, RSA, El Gamal, Elliptic Curve Cryptography
  • 25. MODERN ROUND CIPHERS • The ciphers of today are called round ciphers because they involve multiple rounds, where each round is a complex cipher made up of the simple ciphers. • The key used in each round is a subset or variation of the general key called the round key. • If the cipher has N rounds, a key generator produces N keys, K1, K2,...., KN, where K1 is used in round 1, K2 in round 2, and so on. • Modem symmetric-key ciphers: DES and AES are referred to as block ciphers because they divide the plaintext into blocks and use the same key to encrypt and decrypt the blocks. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 26. DES - DATA ENCRYPTION STANDARD • The algorithm encrypts a 64-bit plaintext block using a 64-bit key. • DES has two transposition blocks (P-boxes) and 16 complex round ciphers (they are repeated). • Although the 16 iteration round ciphers are conceptually the same, each uses a different key derived from the original key. • The initial and final permutations are keyless straight permutations that are the inverse of each other. The permutation takes a 64-bit input and permutes them according Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan to predefined values.
  • 27. DES TECHNIQUE Initial Permutation Round 1 Round 2 Round 16 Final Permutation Round Key Generator K1 K2 K16 64-Bit Plaintext 64-Bit Ciphertext 64-Bit Key DES
  • 28. AES - ADVANCED ENCRYPTION STANDARD • The Advanced Encryption Standard (AES) was designed because DES's key was too small. • AES is designed with three key sizes: 128, 192, or 256 bits. • Table shows the relationship between the data block, number of rounds, and key size. Size of Data Block Number of Rounds Key Size 10 128 128-Bits 12 192 14 256 • The structure and operation of the other configurations are similar. The difference lies in the key generation. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 29. AES TECHNIQUE Pre Round Transformation Round 1 Round 2 Round N (slightly different) Round Key Generator K1 K2 KN 128-Bit Plaintext 128-Bit Ciphertext Cipher Key (128-bits for N =10, 192-bits for N =12 or 256-bits for N =14) AES K0 • Each round of AES, except for the last, is a cipher with four operations that are invertible. • The last round has only three operations.
  • 30. RSA ALGORITHM • It uses two numbers, e and d, having a special relationship to each other, as the public and private keys. • Selecting Keys Bob use the following steps to select the private and public keys: 1. Bob chooses two very large prime numbers p and q. 2. Bob multiplies the above two primes to find n, the modulus for encryption and decryption. In other words, n = p X q. 3. Bob calculates another number φ = (p -1) X (q - 1). 4. Bob chooses a random integer e. He then calculates d so that d x e = 1 mod φ. 5. Bob announces e and n to the public; he keeps φ and d secret. Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 31. RSA ALGORITHM • Encryption • Anyone who needs to send a message to Bob can use n and e. • For example, if Alice needs to send a message to Bob, she can change the message, usually a short one, to an integer. This is the plaintext. • She then calculates the ciphertext, using e and n, as c = pe (mod n). • Alice sends C, the ciphertext, to Bob. • Decryption • When Bob receives the ciphertext, he uses his private key d to decrypt the message: p = cd (mod n) Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
  • 32. CONCLUSION • By using of encryption techniques a fair unit of confidentiality, authentication, integrity, access control and availability of data is maintained. • Using cryptography Electronic Mail Security, Mail Security, IP Security, Web security can be achieved.
  • 33. REFERENCE CHAPTER 30, CRYPTOGRAPHY DATA COMMUNICATIONS AND NETWORKING BY BEHROUZ A. FOROUZAN
  • 36. MONOALPHABETIC CIPHER • Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3. Key=3 means shift each character of plaintext by character at 3 places ahead of it. Hence replacing H by K, E by H, L by O and O by R in the plaintext. • Plaintext: HELLO • Ciphertext: KHOOR
  • 37. POLYALPHABETIC CIPHER • Use Polyalphabetic Cipher to encrypt “HELLO” with key = 3,2. Divide HELLO in group of 3 characters viz. HEL-LO and use key=3 to encrypt HEL and key=2 to encrypt LO. • Plaintext: HELLO • Ciphertext: KHONB
  • 38. TRANSPOSITION CIPHER • Encrypt the message "HELLO MY DEAR" using the key: • Plaintext: 1234 • Ciphertext: 2413 In encryption, we move the character at position 2 to position 1, the character at position 4 to position 2, and so on. We first remove the spaces in the message. We then divide the text into blocks of four characters. We add a bogus character Z at the end of the third block. The result is HELL OMYD EARZ. We create a three-block ciphertext ELHLMDOYAZER. • Plaintext: HELLO MY DEAR • Ciphertext: ELHLMDOYAZER