Announcements:
Please pass in Assignment 1 now. Assignment 2 posted (when due?)
DTTF/NB479: Dszquphsbqiz Day 5 Announcements: Please pass in - - PowerPoint PPT Presentation
DTTF/NB479: Dszquphsbqiz Day 5 Announcements: Please pass in Assignment 1 now. Assignment 2 posted (when due?) Questions? Roll Call Today: Vigenere ciphers Shift, Affine, and Substitution ciphers are related 1. How many possibilities
Please pass in Assignment 1 now. Assignment 2 posted (when due?)
Invented in 1553 by Bellaso A different type of complexity
The key and its length are unknown to Eve
Repeat the vector as many times as needed to get
Add this repeated vector to the plaintext.
19 7 4 17 4 2 4 13 19 3… 7 8 3 3 4 13 7 8 3 3 4 13 7 8 3 3 4 13 7 8 3 3 4 13 7 8 3 3 4 13 7 8 3 3 4 13 0 15 7 20 8 15 1121 22 6 8 811191718161720 1 17 8 25132416172322 2511 11017 7 5 aph uiplvw giiltrsqrub ri znyqrxw zlbkrhf
(quiz # now at top) 1 Key
1.
But here, e maps to H, I, L, … (spread out!)
2.
Known plaintext? Chosen plaintext? Chosen ciphertext? Ciphertext only? (most interesting)
2-3
5 10 15 20 25 30 0.02 0.04 0.06 0.08 0.1 0.12 0.14
4
We’ll see how to find it shortly
Parse out the characters at positions p = i (mod L)
These have all been shifted the same amount Do a frequency analysis to find shift
The most frequent letter should be e, given enough text. Can
verify to see how shift affects other letters.
This gives the first letter of the key Repeat for positions p = 1, p = 2, … p = L-1 Problem: involves some trial and error. For brute force to work, would need to brute force all
0.008 0.040 0.024 0.067 0.075 0.019 0.001 0.060 0.063 0.091 . 0.028 0.010 0.023 0.001 0.020 0.001);
0.001 0.020 0.001)
0.023 0.001 0.020)
i i iB
5-6
Parse out the characters at positions p = 0
The most frequent letter should be e, given enough text.
Can verify to see how shift affects other letters.
This gives the first letter of the key Repeat for positions p = 1, p = 2, … p = L-1
Parse out the characters at positions p = 0
W approximates A. Calculate Max occurs when we got the shift correct.
This gives the first letter of the key Repeat for positions p = 1, p = 2, … p = L-1 Demo
i
7-8
More robust than just using 1 letter (‘e’)… …but harder to compute by hand.
Get max when displace by correct key length So just look for the max number of matches!
displacement APHUIPLVWGIILTRSQRUBRIZNYQRXWZLBKRHFVN (0) NAPHUIPLVWGIILTRSQRUBRIZNYQRXWZLBKRHFV (1) 1 match VNAPHUIPLVWGIILTRSQRUBRIZNYQRXWZLBKRHF (2) 0 matches … KRHFVNAPHUIPLVWGIILTRSQRUBRIZNYQRXWZLB (6) 5 matches
…
A0 = (0.082 0.015 0.028 …
0.001 0.020 0.001)
A2 = (0.020 0.001 0.082 0.015 0.028 … 0.023 0.001)
You’ll do this on Homework 2: Week 3 programming test: use your program
http://www.spinelessbooks.com/gadsby/01.html