SlideShare a Scribd company logo
1 of 26
Download to read offline
‫دهـــؤك‬ ‫يا‬ ‫ثوليتــــةكنيكى‬ ‫زانكـــويا‬
‫التقـــــنية‬ ‫دهــــــــــوك‬‫جامعــــــــة‬
Duhok Polytechnic University
College: Technical College of Informatics-Akre
Dept. : Computer Networks and Information Security
Course Name : Applied Cryptography
Class : Second Semester: Second
Lecturer : Dr.Shakir Fattah
Academic Title : Lecturer
Study year:2022-2023
Autokey Cipher
➢ An Autokey cipher is identical to the Vigenère cipher.
➢ keyword is constructed by appending the keyword to the
beginning of the actual plaintext message.
• For example, if your plain text message was:
This is a secret message
❖ And your keyword was "zebra", then your actual keyword would
be:
zebrathisisasecretmessage
- Enciphering and deciphering the message is performed using the
exact same method as the Vigenère Cipher
Information and Network Security
25 March 2023
25 March 2023 Information and Network Security
The Playfair cipher was the first practical
digraph substitution cipher. The scheme was
invented in 1854 by Charles Wheatstone but
was named after Lord Playfair who promoted
the use of the cipher. In playfair cipher
unlike traditional cipher we encrypt a pair of
alphabets(digraphs) instead of a single
alphabet.
Polygraphic Cipher
Polygraphic Cipher
1- Playfair Cipher:
➢ The Playfair cipher encrypts pairs of letters (multiple-letter).
➢ This is significantly harder to break.
➢ The Playfair algorithm is based on the use of a 5 × 5 matrix of
letters.
➢ The matrix in constructed by filling in the letters of keyword and
ignoring the duplicate.
➢ The letters I and J count as one letter.
Playfair Matrix
Information and Network Security
25 March 2023
• Using the key in playfair it is make the technique more
difficult and more secure as well.
• Using the keyword at the beginning of the grid and leaving out
the repeats.
• Add the alphabetic letter in order starting with letter A.
• figure show the playfair with the keyword.
• The keyword is JIM TRESEEL, we do not
have J we replaced with I.
Information and Network Security
25 March 2023
The rules for decoding using Playfair
1. If the letters in the pair are at the corners of a rectangle with at least
two rows and two columns, then the ciphertext has the letters at the
opposite corners of the rectangle. Choose the ciphertext letter that is
in the same row as the corresponding plaintext.
2. Otherwise, if the letters are in the same row, translate each of them
as the next letter on the left. If you fall off the beginning of the row,
wrap around to the end.
3. Otherwise, if the letters are in the same column, translate each of
them as the letter above. If you climb off the top of the column, wrap
around to the bottom.
4. Look at the resulting plaintext. Work out where the word
boundaries are, and where the cipher clerk at the other end has added
in extra Xs. This requires judgment, and is not completely
mechanical.
Information and Network Security
25 March 2023
25 March 2023 Information and Network Security
Encryption Technique
25 March 2023 Information and Network Security
For the encryption process let us consider the
following Question:
Q: Use the Playfair Cipher technique to encrypt for the following
detail:
Plaintext: instruments
Key: monarchy
25 March 2023 Information and Network Security
The Playfair Cipher Encryption Algorithm:
The Algorithm consists of 2 steps:
1. Generate the key Square(5×5):
•The key square is a 5×5 grid of alphabets that acts as the key
for encrypting the plaintext. Each of the 25 alphabets must be
unique and one letter of the alphabet (usually J) is omitted
from the table (as the table can hold only 25 alphabets). If the
plaintext contains J, then it is replaced by I.
•The initial alphabets in the key square are the unique
alphabets of the key in the order in which they appear
followed by the remaining letters of the alphabet in order.
25 March 2023 Information and Network Security
For example:
The key is "monarchy“. Thus the initial entries are
'm', 'o', 'n', 'a', 'r', 'c', 'h', 'y'
followed by remaining characters of a-z(except 'j') in that order.
2. Algorithm to encrypt the plain text: The plaintext is split into pairs
of two letters (digraphs). If there is an odd number of letters, a Z is
added to the last letter.
For example:
PlainText: "instruments"
After Split: 'in' 'st' 'ru' 'me' 'nt' 'sz'
25 March 2023 Information and Network Security
Rules for Encryption:
1.If both the letters are in the same column: Take the letter below each
one (going back to the top if at the bottom).
For example:
Diagraph: "me"
Encrypted Text: cl
Encryption:
m -> c
e -> l
25 March 2023 Information and Network Security
2.If both the letters are in the same row: Take the letter to the right of
each one (going back to the leftmost if at the rightmost position).
For example:
Diagraph: "st"
Encrypted Text: tl
Encryption:
s -> t
t -> l
25 March 2023 Information and Network Security
If neither of the above rules is true: Form a rectangle with the two
letters and take the letters on the horizontal opposite corner of the
rectangle.
For example:
Diagraph: "nt"
Encrypted Text: rq
Encryption:
n -> r
t -> q
25 March 2023 Information and Network Security
For example:
Plain Text: "instrumentsz"
Encrypted Text: gatlmzclrqtx
Encryption:
i -> g
n -> a
s -> t
t -> l
r -> m
u -> z
m -> c
e -> l
n -> r
t -> q
s -> t
z -> x
25 March 2023 Information and Network Security
Output:
Key text: Monarchy
Plain text: instruments
Cipher text: gatlmzclrqtx
25 March 2023 Information and Network Security
Decryption Technique
Decrypting the Playfair cipher is as simple as doing the same process in reverse. The
receiver has the same key and can create the same key table, and then decrypt any
messages made using that key.
25 March 2023 Information and Network Security
The Playfair Cipher Decryption Algorithm:
The Algorithm consists of 2 steps:
Generate the key Square(5×5) at the receiver’s end:
• The key square is a 5×5 grid of alphabets that acts as the key for
encrypting the plaintext. Each of the 25 alphabets must be unique
and one letter of the alphabet (usually J) is omitted from the table
(as the table can hold only 25 alphabets). If the plaintext contains
J, then it is replaced by I.
• The initial alphabets in the key square are the unique alphabets of
the key in the order in which they appear followed by the
remaining letters of the alphabet in order.
Note: For both encryption and decryption, the same key is to be
used.
25 March 2023 Information and Network Security
For example:
The key is "monarchy"
Thus the initial entires are
'm', 'o', 'n', 'a', 'r', 'c', 'h', 'y'
followed by remaining characters of
a-z(except 'j') in that order.
25 March 2023 Information and Network Security
Algorithm to decrypt the ciphertext: The ciphertext is split into
pairs of two letters (digraphs).
Note: The ciphertext always have even number of characters.
For example:
CipherText: "gatlmzclrqtx"
After Split: 'ga' 'tl' 'mz' 'cl' 'rq' 'tx'
25 March 2023 Information and Network Security
Rules for Decryption:
If both the letters are in the same column: Take the letter above each
one (going back to the bottom if at the top).
For example:
Diagraph: "cl"
Decrypted Text: me
Decryption:
c -> m
l -> e
25 March 2023 Information and Network Security
If both the letters are in the same row: Take the letter to the left of
each one (going back to the rightmost if at the leftmost position).
For example:
Diagraph: "tl"
Decrypted Text: st
Decryption:
t -> s
l -> t
25 March 2023 Information and Network Security
If neither of the above rules is true: Form a rectangle with the two
letters and take the letters on the horizontal opposite corner of the
rectangle.
For example:
Diagraph: "rq"
Decrypted Text: nt
Decryption:
r -> n
q -> t
25 March 2023 Information and Network Security
For example:
Plain Text: "gatlmzclrqtx"
Decrypted Text: instrumentsz
Decryption:
(red)-> (green)
ga -> in
tl -> st
mz -> ru
cl -> me
rq -> nt
tx -> sz
25 March 2023 Information and Network Security
Output:
Key text: Monarchy
Plain text: gatlmzclrqtx
Deciphered text: instrumentsz
25 March 2023 Information and Network Security
Advantages and Disadvantages
Advantages:
1. It is significantly harder to break since the frequency analysis
technique used to break simple substitution ciphers is difficult
but still can be used on (25*25) = 625 digraphs rather than 25
monographs which is difficult.
2. Frequency analysis thus requires more cipher text to crack the
encryption.
25 March 2023 Information and Network Security
Disadvantages:
1. An interesting weakness is the fact that a digraph in the
ciphertext (AB) and it’s reverse (BA) will have corresponding
plaintexts like UR and RU (and also ciphertext UR and RU
will correspond to plaintext AB and BA, i.e. the substitution is
self-inverse). That can easily be exploited with the aid of
frequency analysis, if the language of the plaintext is known.
2. Another disadvantage is that playfair cipher is a symmetric
cipher thus same key is used for both encryption and
decryption.

More Related Content

Similar to Algorithm in information secuirty.pdf

Similar to Algorithm in information secuirty.pdf (20)

cryptography_priceton_university_fall_2007.ppt
cryptography_priceton_university_fall_2007.pptcryptography_priceton_university_fall_2007.ppt
cryptography_priceton_university_fall_2007.ppt
 
Cns 1
Cns 1Cns 1
Cns 1
 
Symmetric Key Generation Algorithm in Linear Block Cipher Over LU Decompositi...
Symmetric Key Generation Algorithm in Linear Block Cipher Over LU Decompositi...Symmetric Key Generation Algorithm in Linear Block Cipher Over LU Decompositi...
Symmetric Key Generation Algorithm in Linear Block Cipher Over LU Decompositi...
 
Network Security-UNIT -II(Classical Encription) -Sridevi.M-II-M.Sc.,Computer ...
Network Security-UNIT -II(Classical Encription) -Sridevi.M-II-M.Sc.,Computer ...Network Security-UNIT -II(Classical Encription) -Sridevi.M-II-M.Sc.,Computer ...
Network Security-UNIT -II(Classical Encription) -Sridevi.M-II-M.Sc.,Computer ...
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.ppt
 
Shad_Cryptography_PracticalFile_IT_4th_Year (1).docx
Shad_Cryptography_PracticalFile_IT_4th_Year (1).docxShad_Cryptography_PracticalFile_IT_4th_Year (1).docx
Shad_Cryptography_PracticalFile_IT_4th_Year (1).docx
 
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
Symmetric Key based Encryption and Decryption using Lissajous Curve Equations
Symmetric Key based Encryption and Decryption using Lissajous Curve EquationsSymmetric Key based Encryption and Decryption using Lissajous Curve Equations
Symmetric Key based Encryption and Decryption using Lissajous Curve Equations
 
Symmetric Key based Encryption and Decryption using Lissajous Curve Equations
Symmetric Key based Encryption and Decryption using Lissajous Curve EquationsSymmetric Key based Encryption and Decryption using Lissajous Curve Equations
Symmetric Key based Encryption and Decryption using Lissajous Curve Equations
 
Classical crypto techniques
Classical crypto techniques Classical crypto techniques
Classical crypto techniques
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Cryptography (Revised Edition)
Cryptography (Revised Edition)Cryptography (Revised Edition)
Cryptography (Revised Edition)
 
substitution and transposition techniques_ppt.pptx
substitution and transposition techniques_ppt.pptxsubstitution and transposition techniques_ppt.pptx
substitution and transposition techniques_ppt.pptx
 
IS_Classical-Encryption-Techniques_5.pdf
IS_Classical-Encryption-Techniques_5.pdfIS_Classical-Encryption-Techniques_5.pdf
IS_Classical-Encryption-Techniques_5.pdf
 
Encrypted message transmitter on public network
Encrypted message transmitter on public networkEncrypted message transmitter on public network
Encrypted message transmitter on public network
 
M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)
 
Ppt ns
Ppt nsPpt ns
Ppt ns
 
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_GaberSimple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
 
sabith.pptx
sabith.pptxsabith.pptx
sabith.pptx
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

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
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
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
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

Algorithm in information secuirty.pdf

  • 1. ‫دهـــؤك‬ ‫يا‬ ‫ثوليتــــةكنيكى‬ ‫زانكـــويا‬ ‫التقـــــنية‬ ‫دهــــــــــوك‬‫جامعــــــــة‬ Duhok Polytechnic University College: Technical College of Informatics-Akre Dept. : Computer Networks and Information Security Course Name : Applied Cryptography Class : Second Semester: Second Lecturer : Dr.Shakir Fattah Academic Title : Lecturer Study year:2022-2023
  • 2. Autokey Cipher ➢ An Autokey cipher is identical to the Vigenère cipher. ➢ keyword is constructed by appending the keyword to the beginning of the actual plaintext message. • For example, if your plain text message was: This is a secret message ❖ And your keyword was "zebra", then your actual keyword would be: zebrathisisasecretmessage - Enciphering and deciphering the message is performed using the exact same method as the Vigenère Cipher Information and Network Security 25 March 2023
  • 3. 25 March 2023 Information and Network Security The Playfair cipher was the first practical digraph substitution cipher. The scheme was invented in 1854 by Charles Wheatstone but was named after Lord Playfair who promoted the use of the cipher. In playfair cipher unlike traditional cipher we encrypt a pair of alphabets(digraphs) instead of a single alphabet. Polygraphic Cipher
  • 4. Polygraphic Cipher 1- Playfair Cipher: ➢ The Playfair cipher encrypts pairs of letters (multiple-letter). ➢ This is significantly harder to break. ➢ The Playfair algorithm is based on the use of a 5 × 5 matrix of letters. ➢ The matrix in constructed by filling in the letters of keyword and ignoring the duplicate. ➢ The letters I and J count as one letter. Playfair Matrix Information and Network Security 25 March 2023
  • 5. • Using the key in playfair it is make the technique more difficult and more secure as well. • Using the keyword at the beginning of the grid and leaving out the repeats. • Add the alphabetic letter in order starting with letter A. • figure show the playfair with the keyword. • The keyword is JIM TRESEEL, we do not have J we replaced with I. Information and Network Security 25 March 2023
  • 6. The rules for decoding using Playfair 1. If the letters in the pair are at the corners of a rectangle with at least two rows and two columns, then the ciphertext has the letters at the opposite corners of the rectangle. Choose the ciphertext letter that is in the same row as the corresponding plaintext. 2. Otherwise, if the letters are in the same row, translate each of them as the next letter on the left. If you fall off the beginning of the row, wrap around to the end. 3. Otherwise, if the letters are in the same column, translate each of them as the letter above. If you climb off the top of the column, wrap around to the bottom. 4. Look at the resulting plaintext. Work out where the word boundaries are, and where the cipher clerk at the other end has added in extra Xs. This requires judgment, and is not completely mechanical. Information and Network Security 25 March 2023
  • 7. 25 March 2023 Information and Network Security Encryption Technique
  • 8. 25 March 2023 Information and Network Security For the encryption process let us consider the following Question: Q: Use the Playfair Cipher technique to encrypt for the following detail: Plaintext: instruments Key: monarchy
  • 9. 25 March 2023 Information and Network Security The Playfair Cipher Encryption Algorithm: The Algorithm consists of 2 steps: 1. Generate the key Square(5×5): •The key square is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the table (as the table can hold only 25 alphabets). If the plaintext contains J, then it is replaced by I. •The initial alphabets in the key square are the unique alphabets of the key in the order in which they appear followed by the remaining letters of the alphabet in order.
  • 10. 25 March 2023 Information and Network Security For example: The key is "monarchy“. Thus the initial entries are 'm', 'o', 'n', 'a', 'r', 'c', 'h', 'y' followed by remaining characters of a-z(except 'j') in that order. 2. Algorithm to encrypt the plain text: The plaintext is split into pairs of two letters (digraphs). If there is an odd number of letters, a Z is added to the last letter. For example: PlainText: "instruments" After Split: 'in' 'st' 'ru' 'me' 'nt' 'sz'
  • 11. 25 March 2023 Information and Network Security Rules for Encryption: 1.If both the letters are in the same column: Take the letter below each one (going back to the top if at the bottom). For example: Diagraph: "me" Encrypted Text: cl Encryption: m -> c e -> l
  • 12. 25 March 2023 Information and Network Security 2.If both the letters are in the same row: Take the letter to the right of each one (going back to the leftmost if at the rightmost position). For example: Diagraph: "st" Encrypted Text: tl Encryption: s -> t t -> l
  • 13. 25 March 2023 Information and Network Security If neither of the above rules is true: Form a rectangle with the two letters and take the letters on the horizontal opposite corner of the rectangle. For example: Diagraph: "nt" Encrypted Text: rq Encryption: n -> r t -> q
  • 14. 25 March 2023 Information and Network Security For example: Plain Text: "instrumentsz" Encrypted Text: gatlmzclrqtx Encryption: i -> g n -> a s -> t t -> l r -> m u -> z m -> c e -> l n -> r t -> q s -> t z -> x
  • 15. 25 March 2023 Information and Network Security Output: Key text: Monarchy Plain text: instruments Cipher text: gatlmzclrqtx
  • 16. 25 March 2023 Information and Network Security Decryption Technique Decrypting the Playfair cipher is as simple as doing the same process in reverse. The receiver has the same key and can create the same key table, and then decrypt any messages made using that key.
  • 17. 25 March 2023 Information and Network Security The Playfair Cipher Decryption Algorithm: The Algorithm consists of 2 steps: Generate the key Square(5×5) at the receiver’s end: • The key square is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the table (as the table can hold only 25 alphabets). If the plaintext contains J, then it is replaced by I. • The initial alphabets in the key square are the unique alphabets of the key in the order in which they appear followed by the remaining letters of the alphabet in order. Note: For both encryption and decryption, the same key is to be used.
  • 18. 25 March 2023 Information and Network Security For example: The key is "monarchy" Thus the initial entires are 'm', 'o', 'n', 'a', 'r', 'c', 'h', 'y' followed by remaining characters of a-z(except 'j') in that order.
  • 19. 25 March 2023 Information and Network Security Algorithm to decrypt the ciphertext: The ciphertext is split into pairs of two letters (digraphs). Note: The ciphertext always have even number of characters. For example: CipherText: "gatlmzclrqtx" After Split: 'ga' 'tl' 'mz' 'cl' 'rq' 'tx'
  • 20. 25 March 2023 Information and Network Security Rules for Decryption: If both the letters are in the same column: Take the letter above each one (going back to the bottom if at the top). For example: Diagraph: "cl" Decrypted Text: me Decryption: c -> m l -> e
  • 21. 25 March 2023 Information and Network Security If both the letters are in the same row: Take the letter to the left of each one (going back to the rightmost if at the leftmost position). For example: Diagraph: "tl" Decrypted Text: st Decryption: t -> s l -> t
  • 22. 25 March 2023 Information and Network Security If neither of the above rules is true: Form a rectangle with the two letters and take the letters on the horizontal opposite corner of the rectangle. For example: Diagraph: "rq" Decrypted Text: nt Decryption: r -> n q -> t
  • 23. 25 March 2023 Information and Network Security For example: Plain Text: "gatlmzclrqtx" Decrypted Text: instrumentsz Decryption: (red)-> (green) ga -> in tl -> st mz -> ru cl -> me rq -> nt tx -> sz
  • 24. 25 March 2023 Information and Network Security Output: Key text: Monarchy Plain text: gatlmzclrqtx Deciphered text: instrumentsz
  • 25. 25 March 2023 Information and Network Security Advantages and Disadvantages Advantages: 1. It is significantly harder to break since the frequency analysis technique used to break simple substitution ciphers is difficult but still can be used on (25*25) = 625 digraphs rather than 25 monographs which is difficult. 2. Frequency analysis thus requires more cipher text to crack the encryption.
  • 26. 25 March 2023 Information and Network Security Disadvantages: 1. An interesting weakness is the fact that a digraph in the ciphertext (AB) and it’s reverse (BA) will have corresponding plaintexts like UR and RU (and also ciphertext UR and RU will correspond to plaintext AB and BA, i.e. the substitution is self-inverse). That can easily be exploited with the aid of frequency analysis, if the language of the plaintext is known. 2. Another disadvantage is that playfair cipher is a symmetric cipher thus same key is used for both encryption and decryption.