際際滷

際際滷Share a Scribd company logo
GANDHINAGAR INSTITUTE OF
TECHNOLOGY
Department of Computer Engineering
Playfair and polyalphabetic cipher
Group ID: CE_A3_03
Students Name with Enrollment No: Gabani Pruthvi
(140120107044)
Name of Faculty: Prof. Sonali Virparia
Information and network security(2170709)
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 (sans duplicates)
 fill rest of matrix with other letters
 eg. using the keyword MONARCHY
MONAR
CHYBD
EFGIK
LPQST
UVWXZ
Encrypting and Decrypting
 plaintext encrypted two letters at a time:
1. if a pair is a repeated letter, insert a filler like 'X', eg.
"balloon" encrypts as "ba lx lo on"
2. if both letters fall in the same row, replace each with letter
to right (wrapping back to start from end), eg. ar"
encrypts as "RM"
3. if both letters fall in the same column, replace each with
the letter below it (again wrapping to top from bottom),
eg. mu" encrypts to "CM"
4. otherwise each letter is replaced by the one in its row in
the column of the other letter of the pair, eg. hs" encrypts
to "BP", and ea" to "IM" or "JM" (as desired)
Polyalphabetic Ciphers
 another approach to improving security is to use
multiple cipher alphabets
 called polyalphabetic substitution ciphers
 makes cryptanalysis harder with more alphabets to
guess and flatter frequency distribution
 use a key to select which alphabet is used for each
letter of the message
 use each alphabet in turn
 repeat from start after end of key is reached
140120107044 ins ala.ppt
Example
 write the plaintext out
 write the keyword repeated above it
 use each key letter as a caesar cipher key
 encrypt the corresponding plaintext letter
 eg using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Thank you

More Related Content

140120107044 ins ala.ppt

  • 1. GANDHINAGAR INSTITUTE OF TECHNOLOGY Department of Computer Engineering Playfair and polyalphabetic cipher Group ID: CE_A3_03 Students Name with Enrollment No: Gabani Pruthvi (140120107044) Name of Faculty: Prof. Sonali Virparia Information and network security(2170709)
  • 2. 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
  • 3. Playfair Key Matrix a 5X5 matrix of letters based on a keyword fill in letters of keyword (sans duplicates) fill rest of matrix with other letters eg. using the keyword MONARCHY MONAR CHYBD EFGIK LPQST UVWXZ
  • 4. Encrypting and Decrypting plaintext encrypted two letters at a time: 1. if a pair is a repeated letter, insert a filler like 'X', eg. "balloon" encrypts as "ba lx lo on" 2. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end), eg. ar" encrypts as "RM" 3. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom), eg. mu" encrypts to "CM" 4. otherwise each letter is replaced by the one in its row in the column of the other letter of the pair, eg. hs" encrypts to "BP", and ea" to "IM" or "JM" (as desired)
  • 5. Polyalphabetic Ciphers another approach to improving security is to use multiple cipher alphabets called polyalphabetic substitution ciphers makes cryptanalysis harder with more alphabets to guess and flatter frequency distribution use a key to select which alphabet is used for each letter of the message use each alphabet in turn repeat from start after end of key is reached
  • 7. Example write the plaintext out write the keyword repeated above it use each key letter as a caesar cipher key encrypt the corresponding plaintext letter eg using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ