SlideShare a Scribd company logo
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
Cipher techniques
Cipher techniques
(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
Cipher techniques
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
Cipher techniques
(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
Cipher techniques
Thank you
BY RANA MUHAMMAD SAQIB

More Related Content

PPTX
Principles of public key cryptography and its Uses
PPTX
Key Management and Distribution
PPTX
Cryptography
PPTX
Cryptography
PPTX
PPTX
Cryptographic algorithms
PPT
Cipher techniques
PDF
18CS2005 Cryptography and Network Security
Principles of public key cryptography and its Uses
Key Management and Distribution
Cryptography
Cryptography
Cryptographic algorithms
Cipher techniques
18CS2005 Cryptography and Network Security

What's hot (20)

PPT
DES (Data Encryption Standard) pressentation
PPT
Classical Encryption Techniques
PPTX
RSA Algorithm
PPTX
Classical encryption techniques
PPT
Intruders
PPTX
Public Key Cryptosystem
PPTX
Substitution techniques
PPT
6. cryptography
PPTX
Kerberos
PPTX
Information and network security 13 playfair cipher
PPTX
Cryptography.ppt
PPTX
Kerberos
PDF
Transposition cipher
PPTX
Public Key Cryptography
PPTX
Cryptography
PPTX
Cryptanalysis 101
PPTX
Key management
PPTX
Transposition cipher techniques
PPTX
cryptography
PDF
symmetric key encryption algorithms
DES (Data Encryption Standard) pressentation
Classical Encryption Techniques
RSA Algorithm
Classical encryption techniques
Intruders
Public Key Cryptosystem
Substitution techniques
6. cryptography
Kerberos
Information and network security 13 playfair cipher
Cryptography.ppt
Kerberos
Transposition cipher
Public Key Cryptography
Cryptography
Cryptanalysis 101
Key management
Transposition cipher techniques
cryptography
symmetric key encryption algorithms
Ad

Similar to Cipher techniques (20)

PPT
overview of cryptographic techniques
PPT
Cryptography - Symmetric Encryption Ciphers
PPT
PPT
CNS Subject ppt - Unit 1 covers about cryptography and network security subject
PPT
ch02.ppt
PPT
Classical Encryption Techniques in Network Security
PPT
Cns 13f-lec03- Classical Encryption Techniques
PPT
UNIT 2.ppt
PDF
Pertemuan 7 cryptography
PPTX
Symmetric Encryption Techniques
PPTX
Classical$ nn Encryption Techniques.pptx
PPT
Elementary cryptography
PPTX
Cryptography Introduction
PPT
History of Cipher System
PPTX
Cryptography & Steganography
PPTX
Information security powerpoint presentation
PPTX
Cryptography and network security Nit701
PDF
basic encryption and decryption
PPTX
IANSunit 1_cryptography_2.pptxv xvxvxvxv
overview of cryptographic techniques
Cryptography - Symmetric Encryption Ciphers
CNS Subject ppt - Unit 1 covers about cryptography and network security subject
ch02.ppt
Classical Encryption Techniques in Network Security
Cns 13f-lec03- Classical Encryption Techniques
UNIT 2.ppt
Pertemuan 7 cryptography
Symmetric Encryption Techniques
Classical$ nn Encryption Techniques.pptx
Elementary cryptography
Cryptography Introduction
History of Cipher System
Cryptography & Steganography
Information security powerpoint presentation
Cryptography and network security Nit701
basic encryption and decryption
IANSunit 1_cryptography_2.pptxv xvxvxvxv
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Cloud computing and distributed systems.
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”

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
  • 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
  • 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
  • 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
  • 31. Thank you BY RANA MUHAMMAD SAQIB