SlideShare a Scribd company logo
1 of 31
Download to read offline
Cipher Techniques
Rana Muhammad Saqib
Some Basic Terminology
• plaintext - original message
• cipherText - coded message
• cipher - algorithm for transforming plaintext to ciphertext
• key - info used in cipher known only to sender/receiver
• encipher (encrypt) - converting plaintext to ciphertext
• decipher (decrypt) - recovering cipherText from plaintext
• cryptography - study of encryption principles/methods
• cryptanalysis (code breaking) - study of principles/methods of deciphering
cipherText without knowing key
• cryptology - field of both cryptography and cryptanalysis
Conventional Encryption Principles
• An encryption scheme has five ingredients:
– Plaintext
– Encryption algorithm
– Secret Key
– Ciphertext
– Decryption algorithm
• Security depends on the secrecy of the key, not the secrecy of the
algorithm
Types of Cryptanalytic Attacks
• ciphertext only : only know algorithm / ciphertext, statistical, can
identify plaintext, or worse: the key
• known plaintext:
know/suspect plaintext & ciphertext to attack cipher
• chosen plaintext:
select plaintext and obtain ciphertext to attack cipher
• chosen ciphertext:
select ciphertext and obtain plaintext to attack cipher
• chosen text:
select either plaintext or ciphertext to en/decrypt to attack cipher
Brute Force Search
• always possible to simply try every key
• most basic attack, proportional to key size
• assume either know / recognize plaintext
Characteristics of Cryptographic Techniques
Classified along three independent dimensions:
• – The type of operations used for transforming plaintext to ciphertext
• – The number of keys used
symmetric (single key)
asymmetric (two-keys, or public-key encryption)
• – The way in which the plaintext is processed
Cryptography
• Symmetric
private key / single key
• Asymmetric
public-key / two - key
Symmetric Encryption
• or conventional / private-key / single-key
• sender and recipient share a common key
• all classical encryption algorithms are private-key
• was only type prior to invention of publickey in 1970’s
• and by far most widely used
Symmetric Cipher Model
Requirements
• two requirements for secure use of symmetric encryption:
– a strong encryption algorithm
– a secret key known only to sender / receiver
• mathematically have:
Y = EK(X) [= E(K, X) ]
X = DK(Y) [= D(K, Y) ]
• assume encryption algorithm is known
• implies a secure channel to distribute key
Symmetric cryptography
• Substitution techniques
1. Caesar Cipher
2. Monoalphabetic Cipher
3. Playfair Cipher
4. Vigenère Cipher
5. One time pad (vernam) Cipher
• Transposition Techniques
1. Rail Fence Cipher
2. Row transposition
(1) Caesar Cipher
• earliest known substitution cipher
• by Julius Caesar
• first attested use in military affairs
• replaces each letter by 3rd letter after
example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
• can define transformation as:
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
• mathematically give each letter a number
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
• then have Caesar cipher as:
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26)
(2)Monoalphabetic Cipher
• rather than just shifting the alphabet
• could shuffle (jumble) the letters arbitrarily
• each plaintext letter maps to a different random ciphertext letter
• hence key is 26 letters long
(3) Playfair Cipher
• not even the large number of keys in a monoalphabetic cipher
provides security
• one approach to improving security was to encrypt multiple letters
• the Playfair Cipher is an example
• invented by Charles Wheatstone in 1854, but named after his friend
Baron Playfair
Playfair Key Matrix
• a 5X5 matrix of letters based on a keyword
• fill in letters of keyword (minus duplicates)
• fill rest of matrix with other letters
• eg. using the keyword MONARCHY
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Encrypting and Decrypting
• plaintext is encrypted two letters at a time
1. if a pair is a repeated letter, insert filler like 'X’
(low probability of appearance in language)
2. if both letters fall in the same row, replace
each with letter to right (wrapping back to start from end)
3. if both letters fall in the same column, replace
each with the letter below it (again wrapping to top from bottom)
4. otherwise each letter is replaced by the letter
in the same row and in the column of the other letter of the pair
• Wireless Wi re le sx sz XG MK UL XA XT
(4) Vigenère Cipher
Example of Vigenère Cipher
(5) One time pad (vernam) Cipher
• if a truly random key as long as the message is used, the cipher will
be secure
• called a One-Time pad
• is unbreakable since ciphertext bears no statistical relationship to
the plaintext
• since for any plaintext & any ciphertext there exists a key mapping
one to other
• unconditional security! why look any further??
Example of One time pad (vernam) Cipher
Example of One time pad (vernam) Cipher
Transposition Ciphers
• Consider classical transposition or permutation ciphers
• these hide the message by rearranging the letter order
• without altering the actual letters used
• can recognise these since have the same frequency distribution as the
original text
(1) Rail Fence cipher
• write message letters out diagonally over a number of rows
• then read off cipher row by row
e.g.: meet me after the toga party
(2) Row Transposition Ciphers
• a more complex scheme
• write letters of message out in rows over a specified number of columns
• then reorder the columns according to some key before reading off the
rows
• If key in alphabetic so ordering ( a to z)
e.g.:
Plaintext: attack is post poned until two am
Key: 4 3 1 2 5 6 7
Thank you
BY RANA MUHAMMAD SAQIB

More Related Content

What's hot

What's hot (20)

Cryptography
CryptographyCryptography
Cryptography
 
6. cryptography
6. cryptography6. cryptography
6. cryptography
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
User authentication
User authenticationUser authentication
User authentication
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Substitution techniques
Substitution techniquesSubstitution techniques
Substitution techniques
 
Transposition Cipher
Transposition CipherTransposition Cipher
Transposition Cipher
 
Cryptography
CryptographyCryptography
Cryptography
 
Different types of Symmetric key Cryptography
Different types of Symmetric key CryptographyDifferent types of Symmetric key Cryptography
Different types of Symmetric key Cryptography
 
Advanced cryptography and implementation
Advanced cryptography and implementationAdvanced cryptography and implementation
Advanced cryptography and implementation
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
 
Cryptography
CryptographyCryptography
Cryptography
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Classical Encryption Techniques
Classical Encryption TechniquesClassical Encryption Techniques
Classical Encryption Techniques
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
Network security cryptography ppt
Network security cryptography pptNetwork security cryptography ppt
Network security cryptography ppt
 

Similar to Cipher techniques

Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 
Pertemuan 7 cryptography
Pertemuan 7  cryptographyPertemuan 7  cryptography
Pertemuan 7 cryptographynewbie2019
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques Dr. Kapil Gupta
 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptographyG Prachi
 
Cryptography Introduction
Cryptography IntroductionCryptography Introduction
Cryptography Introductionindupps
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher SystemAsad Ali
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & SteganographyAnimesh Shaw
 
Information security powerpoint presentation
Information security powerpoint presentationInformation security powerpoint presentation
Information security powerpoint presentationMuneebZahid10
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701Amit Pathak
 
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.pptxRobertCarreonBula
 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryptionRashmi Burugupalli
 
Information and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesInformation and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesVaibhav Khanna
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.pptrajirajesh8
 

Similar to Cipher techniques (20)

Ch02
Ch02Ch02
Ch02
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 
UNIT 2.ppt
UNIT 2.pptUNIT 2.ppt
UNIT 2.ppt
 
Module-1.pptx
Module-1.pptxModule-1.pptx
Module-1.pptx
 
Pertemuan 7 cryptography
Pertemuan 7  cryptographyPertemuan 7  cryptography
Pertemuan 7 cryptography
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques
 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptography
 
Cryptography Introduction
Cryptography IntroductionCryptography Introduction
Cryptography Introduction
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher System
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
 
Information security powerpoint presentation
Information security powerpoint presentationInformation security powerpoint presentation
Information security powerpoint presentation
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network Security
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
 
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
 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryption
 
Classical Encryption
Classical EncryptionClassical Encryption
Classical Encryption
 
Information and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesInformation and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniques
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.ppt
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Cipher techniques

  • 2. Some Basic Terminology • plaintext - original message • cipherText - coded message • cipher - algorithm for transforming plaintext to ciphertext • key - info used in cipher known only to sender/receiver • encipher (encrypt) - converting plaintext to ciphertext • decipher (decrypt) - recovering cipherText from plaintext • cryptography - study of encryption principles/methods • cryptanalysis (code breaking) - study of principles/methods of deciphering cipherText without knowing key • cryptology - field of both cryptography and cryptanalysis
  • 3. Conventional Encryption Principles • An encryption scheme has five ingredients: – Plaintext – Encryption algorithm – Secret Key – Ciphertext – Decryption algorithm • Security depends on the secrecy of the key, not the secrecy of the algorithm
  • 4. Types of Cryptanalytic Attacks • ciphertext only : only know algorithm / ciphertext, statistical, can identify plaintext, or worse: the key • known plaintext: know/suspect plaintext & ciphertext to attack cipher • chosen plaintext: select plaintext and obtain ciphertext to attack cipher • chosen ciphertext: select ciphertext and obtain plaintext to attack cipher • chosen text: select either plaintext or ciphertext to en/decrypt to attack cipher
  • 5. Brute Force Search • always possible to simply try every key • most basic attack, proportional to key size • assume either know / recognize plaintext
  • 6. Characteristics of Cryptographic Techniques Classified along three independent dimensions: • – The type of operations used for transforming plaintext to ciphertext • – The number of keys used symmetric (single key) asymmetric (two-keys, or public-key encryption) • – The way in which the plaintext is processed
  • 7. Cryptography • Symmetric private key / single key • Asymmetric public-key / two - key
  • 8. Symmetric Encryption • or conventional / private-key / single-key • sender and recipient share a common key • all classical encryption algorithms are private-key • was only type prior to invention of publickey in 1970’s • and by far most widely used
  • 10. Requirements • two requirements for secure use of symmetric encryption: – a strong encryption algorithm – a secret key known only to sender / receiver • mathematically have: Y = EK(X) [= E(K, X) ] X = DK(Y) [= D(K, Y) ] • assume encryption algorithm is known • implies a secure channel to distribute key
  • 11. Symmetric cryptography • Substitution techniques 1. Caesar Cipher 2. Monoalphabetic Cipher 3. Playfair Cipher 4. Vigenère Cipher 5. One time pad (vernam) Cipher • Transposition Techniques 1. Rail Fence Cipher 2. Row transposition
  • 12. (1) Caesar Cipher • earliest known substitution cipher • by Julius Caesar • first attested use in military affairs • replaces each letter by 3rd letter after example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB
  • 13. • can define transformation as: a b c d e f g h i j k l m n o p q r s t u v w x y z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C • mathematically give each letter a number a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 • then have Caesar cipher as: c = E(p) = (p + k) mod (26) p = D(c) = (c – k) mod (26)
  • 14. (2)Monoalphabetic Cipher • rather than just shifting the alphabet • could shuffle (jumble) the letters arbitrarily • each plaintext letter maps to a different random ciphertext letter • hence key is 26 letters long
  • 15. (3) Playfair Cipher • not even the large number of keys in a monoalphabetic cipher provides security • one approach to improving security was to encrypt multiple letters • the Playfair Cipher is an example • invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair
  • 16. Playfair Key Matrix • a 5X5 matrix of letters based on a keyword • fill in letters of keyword (minus duplicates) • fill rest of matrix with other letters • eg. using the keyword MONARCHY M O N A R C H Y B D E F G I/J K L P Q S T U V W X Z
  • 17. Encrypting and Decrypting • plaintext is encrypted two letters at a time 1. if a pair is a repeated letter, insert filler like 'X’ (low probability of appearance in language) 2. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end) 3. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom) 4. otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the pair • Wireless Wi re le sx sz XG MK UL XA XT
  • 20.
  • 21.
  • 22. (5) One time pad (vernam) Cipher • if a truly random key as long as the message is used, the cipher will be secure • called a One-Time pad • is unbreakable since ciphertext bears no statistical relationship to the plaintext • since for any plaintext & any ciphertext there exists a key mapping one to other • unconditional security! why look any further??
  • 23. Example of One time pad (vernam) Cipher
  • 24. Example of One time pad (vernam) Cipher
  • 25.
  • 26. Transposition Ciphers • Consider classical transposition or permutation ciphers • these hide the message by rearranging the letter order • without altering the actual letters used • can recognise these since have the same frequency distribution as the original text
  • 27. (1) Rail Fence cipher • write message letters out diagonally over a number of rows • then read off cipher row by row e.g.: meet me after the toga party
  • 28.
  • 29. (2) Row Transposition Ciphers • a more complex scheme • write letters of message out in rows over a specified number of columns • then reorder the columns according to some key before reading off the rows • If key in alphabetic so ordering ( a to z) e.g.: Plaintext: attack is post poned until two am Key: 4 3 1 2 5 6 7
  • 30.
  • 31. Thank you BY RANA MUHAMMAD SAQIB