SlideShare a Scribd company logo
CRYPTOGRAPHY
MADE BY
JENISH PATEL
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.
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
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
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.
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.
CRYPTOGRAPHY TECHNIQUE
CRYPTOGRAPHY TECHNIQUE
Alice Bob
Eve
Plaintext PlaintextCiphertext
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.
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.
SYMMETRIC KEY CRYPTOGRAPHY
TECHNIQUE
Alice Bob
Alice’s
Encryption
Key K
Bob’s
Decryption
Key K
Plaintext PlaintextCiphertext
If m = Plaintext and K is the shared secret key, then
• Ciphertext = K(m) and
• m = K(K(m))
Shared
Secret
Key K
SYMMETRIC KEY CIPHERS
Traditional
Ciphers
Substitution
Cipher
Monoalphabetic
Ciphers
Polyalphabetic
Cipher
Transposition
Cipher
Modern Cipher
Simple Ciphers
XOR, Rotation
etc.
Round Ciphers
DES, AES, IDEA
etc.
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
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.
ASYMMETRIC KEY CRYPTOGRAPHY
TECHNIQUE
Alice Bob
CiphertextPlaintext Plaintext
Bob’s
Public
Key K+
Bob’s
Private
Key K-
If 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,
SOME 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.
DES - DATA ENCRYPTION STANDARD
• The algorithm encrypts a 64-bit plaintext block using a 64-bit
key.
• DES has two transposition blocks 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. The permutation takes a 64-bit input and
permutes them according to predefined values.
DES TECHNIQUE
Initial Permutation
Final Permutation
Round 1
Round 2
Round 16
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.
• The structure and operation of the other configurations are similar.
The difference lies in the key generation.
Size of Data Block Number of Rounds Key Size
10 128
128-Bits 12 192
14 256
AES TECHNIQUE
Pre Round
Transformation
Round N
(slightly different)
Round 1
Round 2
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
RSA ALGORITHM
• RSA named for its inventors Rivest, Shamir & Adleman.
• 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.
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)
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
• DATA COMMUNICATIONS AND NETWORKING
BY
BEHROUZ A. FOROUZAN
• WWW.GOOGLE.COM
Cryptography

More Related Content

PPTX
Cryptography
PPT
Cryptography
PPTX
Cryptography and Network Security
PDF
Introduction to Cryptography
PPTX
Cryptography
PPTX
Cryptography
PPTX
Cryptography
PPTX
Cryptography.ppt
Cryptography
Cryptography
Cryptography and Network Security
Introduction to Cryptography
Cryptography
Cryptography
Cryptography
Cryptography.ppt

What's hot (20)

PPTX
Cryptography
PPT
Cryptography
PPTX
Cryptography
PPTX
hill cipher
PPT
Fundamentals of cryptography
PPT
6. cryptography
PPTX
cryptography
PPTX
Cryptography and Information Security
PPT
Message Authentication Code & HMAC
PPTX
Cryptography
PPTX
Cryptography
PPT
12 symmetric key cryptography
PPT
PUBLIC KEY ENCRYPTION
PPTX
Topic1 substitution transposition-techniques
PPTX
Public Key Cryptosystem
PPT
Cryptography
PDF
Cs8792 cns - unit iv
PPT
RSA Algorithm - Public Key Cryptography
PPTX
Cryptography and network security
Cryptography
Cryptography
Cryptography
hill cipher
Fundamentals of cryptography
6. cryptography
cryptography
Cryptography and Information Security
Message Authentication Code & HMAC
Cryptography
Cryptography
12 symmetric key cryptography
PUBLIC KEY ENCRYPTION
Topic1 substitution transposition-techniques
Public Key Cryptosystem
Cryptography
Cs8792 cns - unit iv
RSA Algorithm - Public Key Cryptography
Cryptography and network security
Ad

Viewers also liked (7)

PPTX
Network Security
PDF
Network Security Presentation
PPT
Network Security
PPTX
Cryptography
PPT
Network security
PPT
Network Security Threats and Solutions
PPTX
Cryptography.ppt
Network Security
Network Security Presentation
Network Security
Cryptography
Network security
Network Security Threats and Solutions
Cryptography.ppt
Ad

Similar to Cryptography (20)

PPTX
Cryptography
PPTX
Cryptography
PPTX
IANSunit 1_cryptography_2.pptxv xvxvxvxv
PPTX
Cryptography cryptography CryptographyCryptography
PPT
Cryptography cse,ru
PPTX
Cryptography
PPTX
Chapter 3.0.pptx and image processing of security
PDF
Fundamentals of Cryptography: Securing Data in the Digital Age
PPT
Chapter 2 part 1.ppt
PPTX
Information system security Unit 2.pptx
PPTX
Cryptography .pptx
PPTX
Cryptography
DOCX
Seminar report on symmetric key
PPTX
Security - ch3.pptx
PDF
Basic Cryptography.pdf
PPTX
Symmetric and asymmetric key cryptography
PPT
Stallings Kurose and Ross
PPS
Criptography
Cryptography
Cryptography
IANSunit 1_cryptography_2.pptxv xvxvxvxv
Cryptography cryptography CryptographyCryptography
Cryptography cse,ru
Cryptography
Chapter 3.0.pptx and image processing of security
Fundamentals of Cryptography: Securing Data in the Digital Age
Chapter 2 part 1.ppt
Information system security Unit 2.pptx
Cryptography .pptx
Cryptography
Seminar report on symmetric key
Security - ch3.pptx
Basic Cryptography.pdf
Symmetric and asymmetric key cryptography
Stallings Kurose and Ross
Criptography

Recently uploaded (20)

PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Well-logging-methods_new................
PPTX
Construction Project Organization Group 2.pptx
PDF
Digital Logic Computer Design lecture notes
PDF
composite construction of structures.pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
Geodesy 1.pptx...............................................
PPT
Mechanical Engineering MATERIALS Selection
PPTX
web development for engineering and engineering
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Operating System & Kernel Study Guide-1 - converted.pdf
Internet of Things (IOT) - A guide to understanding
CYBER-CRIMES AND SECURITY A guide to understanding
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Lecture Notes Electrical Wiring System Components
Structs to JSON How Go Powers REST APIs.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Well-logging-methods_new................
Construction Project Organization Group 2.pptx
Digital Logic Computer Design lecture notes
composite construction of structures.pdf
573137875-Attendance-Management-System-original
Geodesy 1.pptx...............................................
Mechanical Engineering MATERIALS Selection
web development for engineering and engineering
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd

Cryptography

  • 2. 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.
  • 4. 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
  • 5. 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
  • 6. 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.
  • 7. USE OF KEY • Example: • Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3. • Plaintext: HELLO • Ciphertext: KHOOR
  • 8. 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.
  • 10. CRYPTOGRAPHY TECHNIQUE Alice Bob Eve Plaintext PlaintextCiphertext Alice’s Encryption Key K1 Bob’s Decryption Key K2 If m = Plaintext, then • Ciphertext = K1(m) and • m = K2(K1(m))
  • 12. 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.
  • 13. 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.
  • 14. SYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE Alice Bob Alice’s Encryption Key K Bob’s Decryption Key K Plaintext PlaintextCiphertext If m = Plaintext and K is the shared secret key, then • Ciphertext = K(m) and • m = K(K(m)) Shared Secret Key K
  • 16. 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
  • 17. 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
  • 18. 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
  • 19. 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.
  • 20. ASYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE Alice Bob CiphertextPlaintext Plaintext Bob’s Public Key K+ Bob’s Private Key K- If m = Plaintext, then • Ciphertext = K+(m) and • m = K-(K+(m)) To Public Used for encryption Used for decryption
  • 21. COMPARISON OF SYMMETRIC AND ASYMMETRIC KEY CRYPTOGRAPHY
  • 22. 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,
  • 24. 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.
  • 25. DES - DATA ENCRYPTION STANDARD • The algorithm encrypts a 64-bit plaintext block using a 64-bit key. • DES has two transposition blocks 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. The permutation takes a 64-bit input and permutes them according to predefined values.
  • 26. DES TECHNIQUE Initial Permutation Final Permutation Round 1 Round 2 Round 16 Round Key Generator K1 K2 K16 64-Bit Plaintext 64-Bit Ciphertext 64-Bit Key DES
  • 27. 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. • The structure and operation of the other configurations are similar. The difference lies in the key generation. Size of Data Block Number of Rounds Key Size 10 128 128-Bits 12 192 14 256
  • 28. AES TECHNIQUE Pre Round Transformation Round N (slightly different) Round 1 Round 2 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
  • 29. RSA ALGORITHM • RSA named for its inventors Rivest, Shamir & Adleman. • 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.
  • 30. 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)
  • 31. 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.
  • 32. REFERENCE • DATA COMMUNICATIONS AND NETWORKING BY BEHROUZ A. FOROUZAN • WWW.GOOGLE.COM