Cryptology - Unofficial St. Mary's College of California Web Site
Cryptology - Unofficial St. Mary's College of California Web Site
Cryptology - Unofficial St. Mary's College of California Web Site
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
160 CHAPTER 8. POLYALPHABETIC CIPHERS<br />
18. (a) Finish the computation <strong>of</strong> Φ for a text consisting <strong>of</strong> English with the<br />
normal distribution started in section 8.3. (Use Figure 1.3. So there<br />
are 8.2 A’s, 1.5 B’s, and N = 100.)<br />
(b) Compute the value <strong>of</strong> Φ, if the plaintext consisted <strong>of</strong> English with the<br />
normal distribution that was enciphered with a Caesar cipher with<br />
key B.<br />
(c) Compute the value <strong>of</strong> Φ, if the plaintext consisted <strong>of</strong> English with<br />
the normal distribution that was enciphered with a monoalphabetic<br />
cipher.<br />
(d) Compute Φ for the ciphertext that has all 26 letters occurring an<br />
equal number <strong>of</strong> times.<br />
19. In this exercise we work out the formula for Φ given in Equation 8.3.<br />
Assume we have a ciphertext <strong>of</strong> N letters enciphered with a Vigenère<br />
cipher with keylength k. As we did in Section 7.7, lets assume we’ve<br />
written the ciphertext in an array, so there are k rows, each containing all<br />
the ciphtertext letters that were enciphered with the same keyletter.<br />
Now Φ is the probability that two letters, chosen at random from the text,<br />
are the same. Either these letters were chosen from the same row, or from<br />
different rows.<br />
Same row: There are N total letters and k rows, so about N/k letters per<br />
row. Hence there are N k ( N k<br />
− 1)/2 ways to choose two from any particular<br />
row. There are k rows and so k N k ( N k<br />
− 1)/2 ways to choose two letters a<br />
row. Finally, the likelihood that two letters are the same in any <strong>of</strong> these<br />
rows is 0.0656. So the contribution here is<br />
.0656 ∗ k<br />
N<br />
k ( N k − 1) N(N − k)<br />
= .0656<br />
2<br />
2k<br />
Different rows: There are k(k − 1)/2 ways to pick to two rows. There are<br />
N/k letters in each row, so there are N/k ∗ N/k ways to pick one letter<br />
from each. Finally, we have no way <strong>of</strong> relating the keyletters from the<br />
different rows, so we can only approximate the likelihood that these two<br />
letters are the same with 1/26. So the contribution here is<br />
1<br />
26 ∗ N N k(k − 1)<br />
∗ = 1 N 2 (k − 1)<br />
k k 2 26 k<br />
Adding the two probabilities, and simplifying,