Lecture 6
Lecture 6
2
Security of the Playfair Cipher
3
Security of the Playfair Cipher
4
Polyalphabetic Ciphers
• Another approach to improving security is to use multiple
cipher alphabets
• 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
5
Vigenère Cipher
• Simplest polyalphabetic substitution cipher is the Vigenère Cipher
• Effectively multiple Caesar ciphers
• Key is multiple letters long K = k1 k2 ... kd
• ith letter specifies ith alphabet to use
6
Vigenère Cipher
• Use each alphabet in turn
• Repeat from start after d letters in message
• Decryption simply works in reverse
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
• e.g. using keyword deceptive
key: deceptivedeceptivedeceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
9
Modern Vigenère Tableau
10
Formula for Vigenère Cipher
Practice
• For this example, let us use the phrase ALL IS WELL and the keyword
Decryption
One-Time Pad
• 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
• The key must be at least as long as the plaintext
• The key must never be reused
• The key must be kept completely secret to the outside world yet
shared by both parties
• The key must have a uniform distribution that is independent of
the plaintext
14
• The Ceaser Cipher is a great example of a cipher that is not perfectly
secure or practically secure. As we demonstrated earlier, when given access to
the ciphertext of a Caesar cipher, an attacker can see the positions and patterns
of characters in the plaintext.
15
16
Example(One Time Pad)
• Input: HELLO
• Key: MONEY
• Output: TSYPM
• Part 1: Plain text to Ciphertext
• Plain text — H E L L O (7 4 11 11 14 )
• Key — M O N E Y (12 14 13 4 24 )
• Plain text + key 19 18 24 15 38
• Cipher Text (T S Y P M)
• Part 2: Ciphertext to Message
Cipher Text - Key
19 18 24 15 12 – 12 14 13 4 24
Plain Text 7 4 11 11 14
HELLO
17
Issue:
• How to get cipher text letter if the plain text letter and
key letter after adding become greater then # 26?
Solution:
• We have to find solution by following formula:
• Dividend / Divisor = Quotient
• In this case 38 is the Dividend, 26 is the Divisor, and the answer is
called the Quotient which is 12.
• 38 ÷ 26 = 12
Practice
1
15
24