SlideShare a Scribd company logo
1 of 30
Basic Concepts:- 
• Cryptography - the art or science encompassing 
the principles and methods of transforming an 
intelligible message into one that is 
unintelligible, and then retransforming that 
message back to its original form. 
• Plaintext - the original intelligible message. 
• Cipher Text - the transformed message.
• Cipher - an algorithm for transforming an 
intelligible message into one that is 
unintelligible by transposition and/or 
substitution methods 
• Key - some critical information used by the 
cipher, known only to the sender and receiver 
• Encipher (encode) - the process of converting 
plaintext to cipher text using a cipher and a key
• Decipher (decode) - the process of 
converting cipher text back into plaintext 
using a cipher and a key. 
• Cryptanalysis - the study of principles and 
methods of transforming an unintelligible 
message back into an intelligible message 
without knowledge of the key. Also called 
codebreaking.
Working :-
Example:-
Applications:- 
• ATM cards, 
• Computer passwords, 
• Electronic commerce, etc.
Categories:-
Symmetric-Key 
• 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.
Asymmetric-Key 
• 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. The 
public key that is used for encryption is 
different from the private key that is used for 
decryption. The public key is available to the 
public; the private key is available only to an 
individual.
Symmetric-Key Ciphers:- 
• Traditional Ciphers: These are character 
oriented ciphers.
Substitution Cipher:- 
• A substitution cipher substitutes one symbol 
with another. If the symbols in the plaintext 
are alphabetic characters, we replace one 
character with another. For example, we can 
replace character A with D, and character T 
with Z. If the symbols are digits (0 to9), we can 
replace 3 with 7, and 2 with 6. Substitution 
ciphers can be categorized as either 
monoalphabetic or polyalphabetic ciphers.
Monoalphabetic Cipher:- 
• In a monoalphabetic cipher, a character (or a 
symbol) in the plaintext is always changed to 
the same character (or symbol) in the ciphertext 
regardless of its position in the text. For 
example, if the algorithm says that character A 
in the plaintext is changed to character D, every 
character A is changed to character D. In other 
words, the relationship between characters in 
the plaintext and the ciphertext is a one-to-one 
relationship.
Polyalphabetic Cipher:- 
• In a polyalphabetic cipher, each occurrence 
of a character can have a different 
substitute. The relationship between a 
character in the plaintext to a character in 
the ciphertext is a one-to-many 
relationship. For example, character A 
could be changed to D in the beginning of 
the text, but it could be changed to N at 
the middle.
Example:- 
• The following shows a plaintext and its 
corresponding ciphertext. Is the cipher 
monoalphabetic? 
Plaintext: HELLO 
Ciphertext: KHOOR 
• The cipher is probably monoalphabetic 
because both occurrences of L's are 
encrypted as O's
• The following shows a plaintext and its 
corresponding ciphertext. Is the cipher 
monoalphabetic? 
Plaintext: HELLO 
Ciphertext: ABNZF 
• The cipher is not monoalphabetic because each 
occurrence of L is encrypted by a different 
character. The first L is encrypted as N; the 
second as Z.
Shift Cipher:- 
• The simplest monoalphabetic cipher is probably the 
shift cipher. In this cipher, the encryption 
algorithm is "shift key characters down," with key 
equal to some number. The decryption algorithm is 
"shift key characters up." For example, if the key is 
5, the encryption algorithm is "shift 5 characters 
down" (toward the end of the alphabet). The 
decryption algorithm is "shift 5 characters up" 
(toward the beginning of the alphabet). Of course, 
if we reach the end or beginning of the alphabet, 
we wrap around.
Example:- 
• Use the shift cipher with key = 15 to 
encrypt the message HELLO. 
• We encrypt one character at a time. Each 
character is shifted 15 characters down. 
Letter H is encrypted to W. Letter E is 
encrypted to T. The first L is encrypted to 
A. The second L is also encrypted to A. 
And 0 is encrypted to D. The cipher text is 
WTAAD.
• Use the shift cipher with key =15 to 
decrypt the message "WTAAD.“ 
• We decrypt one character at a time. Each 
character is shifted 15 characters up. 
Letter W is decrypted to H. Letter T is 
decrypted to E. The first A is decrypted to 
L. The second A is decrypted to L. And, 
finally, D is decrypted to O. The plaintext 
is HELLO
Transcomposition Cipher:- 
• In a transposition cipher, there is no 
substitution of characters; instead, their 
locations change. A character in the first 
position of the plaintext may appear in the 
tenth position of the ciphertext. A character in 
the eighth position may appear in the first 
position. In other words, a transposition cipher 
reorders the symbols in a block of symbols.
• Key in a transposition cipher is a mapping between 
the position of the symbols in the plaintext and cipher 
text. For example, the following shows the key using 
a block of four characters: 
Plaintext: 2 4 31 
Ciphertext: 1 2 3 4 
• In encryption, we move the character at position 2 to 
position 1, the character at position 4 to position 2, 
and so on. In decryption, we do the reverse
Example:- 
• Encrypt the message “DEAR" using the 
key: 
Plaintext: 2 4 31 
Ciphertext: 1 2 3 4 
• Solution: RDAE
Simple Modern Ciphers:- 
• The traditional ciphers we have studied so far 
are character-oriented. With the advent of the 
computer, ciphers need to be bit-oriented. This is 
so because the information to be encrypted is 
not just text; it can also consist of numbers, 
graphics, audio, and video data. It is 
convenient to convert these types of data into a 
stream of bits, encrypt the stream, and then 
send the encrypted stream.
XOR Cipher:- 
• An XOR operation needs two data inputs 
plaintext, as the first and a key as the second. 
In other words, one of the inputs is the block to 
be the encrypted, the other input is a key; the 
result is the encrypted block. Note that in an 
XOR cipher, the size of the key, the plaintext, 
and the ciphertext are all the same. XOR ciphers 
have a very interesting property: the encryption 
and decryption are the same.
Rotation Cipher:- 
• Another common cipher is the rotation cipher, in 
which the input bits are rotated to the left or right. 
The rotation cipher can be keyed or keyless. In keyed 
rotation, the value of the key defines the number of 
rotations; in keyless rotation the number of rotations 
is fixed.
Other Types:- 
• Modern Round Ciphers 
• Data Encryption Standard (DES) 
• Advanced Encryption Standard (AES) 
• Electronic Code Book 
• RSA (Rivest, Shamir and Adleman) 
• Diffie-Hellman
Cryptography

More Related Content

What's hot

Graph representation
Graph representationGraph representation
Graph representationTech_MX
 
Evolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An IntroductionEvolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An Introductionmartinp
 
Max flow problem and push relabel algorithem
Max flow problem and push relabel algorithemMax flow problem and push relabel algorithem
Max flow problem and push relabel algorithem8neutron8
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationAmrinder Arora
 
Affine Cypher Encryption - Decryption
Affine Cypher Encryption - DecryptionAffine Cypher Encryption - Decryption
Affine Cypher Encryption - DecryptionZakriya Ali Sabir
 
Selection in Evolutionary Algorithm
Selection in Evolutionary AlgorithmSelection in Evolutionary Algorithm
Selection in Evolutionary AlgorithmRiyad Parvez
 
Neural network
Neural networkNeural network
Neural networkSilicon
 
Knapsack problem using dynamic programming
Knapsack problem using dynamic programmingKnapsack problem using dynamic programming
Knapsack problem using dynamic programmingkhush_boo31
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and boundAbhishek Singh
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithmsRajendran
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy AlgorithmWaqar Akram
 
Counterpropagation NETWORK
Counterpropagation NETWORKCounterpropagation NETWORK
Counterpropagation NETWORKESCOM
 

What's hot (20)

Graph representation
Graph representationGraph representation
Graph representation
 
Evolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An IntroductionEvolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An Introduction
 
Algorithm big o
Algorithm big oAlgorithm big o
Algorithm big o
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Max flow problem and push relabel algorithem
Max flow problem and push relabel algorithemMax flow problem and push relabel algorithem
Max flow problem and push relabel algorithem
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic Notation
 
Backpropagation algo
Backpropagation  algoBackpropagation  algo
Backpropagation algo
 
Affine Cypher Encryption - Decryption
Affine Cypher Encryption - DecryptionAffine Cypher Encryption - Decryption
Affine Cypher Encryption - Decryption
 
Selection in Evolutionary Algorithm
Selection in Evolutionary AlgorithmSelection in Evolutionary Algorithm
Selection in Evolutionary Algorithm
 
Neural network
Neural networkNeural network
Neural network
 
Knapsack problem using dynamic programming
Knapsack problem using dynamic programmingKnapsack problem using dynamic programming
Knapsack problem using dynamic programming
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and bound
 
Mc culloch pitts neuron
Mc culloch pitts neuronMc culloch pitts neuron
Mc culloch pitts neuron
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
 
Counterpropagation NETWORK
Counterpropagation NETWORKCounterpropagation NETWORK
Counterpropagation NETWORK
 

Similar to Cryptography

basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryptionRashmi Burugupalli
 
Symmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographySymmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographyMONIRUL ISLAM
 
Classical cyphers python programming
Classical cyphers python programmingClassical cyphers python programming
Classical cyphers python programmingShaishavShah8
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.nagwaAboElenein
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherMona Rajput
 
Computer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfComputer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfParshantYadav13
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.pptGhamdan5
 
the art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptthe art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptjamkhan10
 
This is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptThis is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptvimalguptaofficial
 
Crytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptCrytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptMuhammadShajid1
 
Best book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptBest book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptnicolausalex722
 

Similar to Cryptography (20)

Cryptography
CryptographyCryptography
Cryptography
 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryption
 
Symmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographySymmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptography
 
Classical cyphers python programming
Classical cyphers python programmingClassical cyphers python programming
Classical cyphers python programming
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
 
Unit – III.pptx
Unit – III.pptxUnit – III.pptx
Unit – III.pptx
 
cryptography.ppt
cryptography.pptcryptography.ppt
cryptography.ppt
 
Computer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfComputer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdf
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
the art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptthe art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.ppt
 
This is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptThis is the presentation ofcryptography.ppt
This is the presentation ofcryptography.ppt
 
7 cryptography
7 cryptography7 cryptography
7 cryptography
 
Crytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptCrytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.ppt
 
Best book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptBest book for the cryptography doctor.ppt
Best book for the cryptography doctor.ppt
 

Cryptography

  • 1.
  • 2. Basic Concepts:- • Cryptography - the art or science encompassing the principles and methods of transforming an intelligible message into one that is unintelligible, and then retransforming that message back to its original form. • Plaintext - the original intelligible message. • Cipher Text - the transformed message.
  • 3. • Cipher - an algorithm for transforming an intelligible message into one that is unintelligible by transposition and/or substitution methods • Key - some critical information used by the cipher, known only to the sender and receiver • Encipher (encode) - the process of converting plaintext to cipher text using a cipher and a key
  • 4. • Decipher (decode) - the process of converting cipher text back into plaintext using a cipher and a key. • Cryptanalysis - the study of principles and methods of transforming an unintelligible message back into an intelligible message without knowledge of the key. Also called codebreaking.
  • 7. Applications:- • ATM cards, • Computer passwords, • Electronic commerce, etc.
  • 9. Symmetric-Key • 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.
  • 10.
  • 11. Asymmetric-Key • 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. The public key that is used for encryption is different from the private key that is used for decryption. The public key is available to the public; the private key is available only to an individual.
  • 12.
  • 13. Symmetric-Key Ciphers:- • Traditional Ciphers: These are character oriented ciphers.
  • 14. Substitution Cipher:- • A substitution cipher substitutes one symbol with another. If the symbols in the plaintext are alphabetic characters, we replace one character with another. For example, we can replace character A with D, and character T with Z. If the symbols are digits (0 to9), we can replace 3 with 7, and 2 with 6. Substitution ciphers can be categorized as either monoalphabetic or polyalphabetic ciphers.
  • 15. Monoalphabetic Cipher:- • In a monoalphabetic cipher, a character (or a symbol) in the plaintext is always changed to the same character (or symbol) in the ciphertext regardless of its position in the text. For example, if the algorithm says that character A in the plaintext is changed to character D, every character A is changed to character D. In other words, the relationship between characters in the plaintext and the ciphertext is a one-to-one relationship.
  • 16. Polyalphabetic Cipher:- • In a polyalphabetic cipher, each occurrence of a character can have a different substitute. The relationship between a character in the plaintext to a character in the ciphertext is a one-to-many relationship. For example, character A could be changed to D in the beginning of the text, but it could be changed to N at the middle.
  • 17. Example:- • The following shows a plaintext and its corresponding ciphertext. Is the cipher monoalphabetic? Plaintext: HELLO Ciphertext: KHOOR • The cipher is probably monoalphabetic because both occurrences of L's are encrypted as O's
  • 18. • The following shows a plaintext and its corresponding ciphertext. Is the cipher monoalphabetic? Plaintext: HELLO Ciphertext: ABNZF • The cipher is not monoalphabetic because each occurrence of L is encrypted by a different character. The first L is encrypted as N; the second as Z.
  • 19. Shift Cipher:- • The simplest monoalphabetic cipher is probably the shift cipher. In this cipher, the encryption algorithm is "shift key characters down," with key equal to some number. The decryption algorithm is "shift key characters up." For example, if the key is 5, the encryption algorithm is "shift 5 characters down" (toward the end of the alphabet). The decryption algorithm is "shift 5 characters up" (toward the beginning of the alphabet). Of course, if we reach the end or beginning of the alphabet, we wrap around.
  • 20. Example:- • Use the shift cipher with key = 15 to encrypt the message HELLO. • We encrypt one character at a time. Each character is shifted 15 characters down. Letter H is encrypted to W. Letter E is encrypted to T. The first L is encrypted to A. The second L is also encrypted to A. And 0 is encrypted to D. The cipher text is WTAAD.
  • 21. • Use the shift cipher with key =15 to decrypt the message "WTAAD.“ • We decrypt one character at a time. Each character is shifted 15 characters up. Letter W is decrypted to H. Letter T is decrypted to E. The first A is decrypted to L. The second A is decrypted to L. And, finally, D is decrypted to O. The plaintext is HELLO
  • 22. Transcomposition Cipher:- • In a transposition cipher, there is no substitution of characters; instead, their locations change. A character in the first position of the plaintext may appear in the tenth position of the ciphertext. A character in the eighth position may appear in the first position. In other words, a transposition cipher reorders the symbols in a block of symbols.
  • 23. • Key in a transposition cipher is a mapping between the position of the symbols in the plaintext and cipher text. For example, the following shows the key using a block of four characters: Plaintext: 2 4 31 Ciphertext: 1 2 3 4 • In encryption, we move the character at position 2 to position 1, the character at position 4 to position 2, and so on. In decryption, we do the reverse
  • 24. Example:- • Encrypt the message “DEAR" using the key: Plaintext: 2 4 31 Ciphertext: 1 2 3 4 • Solution: RDAE
  • 25. Simple Modern Ciphers:- • The traditional ciphers we have studied so far are character-oriented. With the advent of the computer, ciphers need to be bit-oriented. This is so because the information to be encrypted is not just text; it can also consist of numbers, graphics, audio, and video data. It is convenient to convert these types of data into a stream of bits, encrypt the stream, and then send the encrypted stream.
  • 26. XOR Cipher:- • An XOR operation needs two data inputs plaintext, as the first and a key as the second. In other words, one of the inputs is the block to be the encrypted, the other input is a key; the result is the encrypted block. Note that in an XOR cipher, the size of the key, the plaintext, and the ciphertext are all the same. XOR ciphers have a very interesting property: the encryption and decryption are the same.
  • 27.
  • 28. Rotation Cipher:- • Another common cipher is the rotation cipher, in which the input bits are rotated to the left or right. The rotation cipher can be keyed or keyless. In keyed rotation, the value of the key defines the number of rotations; in keyless rotation the number of rotations is fixed.
  • 29. Other Types:- • Modern Round Ciphers • Data Encryption Standard (DES) • Advanced Encryption Standard (AES) • Electronic Code Book • RSA (Rivest, Shamir and Adleman) • Diffie-Hellman