06.01.2015 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

142 CHAPTER 8. POLYALPHABETIC CIPHERS<br />

“Before Friedman, cryptology eked out an existence as a study unto itself,<br />

as an isolated phenomenon, neither borrowing from nor contributing to<br />

other bodies <strong>of</strong> knowledge. ... It dwelt a recluse in the world <strong>of</strong> science.<br />

Friedman let cryptology out <strong>of</strong> this lonely wilderness.” David Kahn [Kahn,<br />

pg 383]<br />

8.3 The Friedman Test<br />

We have finished the preliminary work and can now start to exploit our formulas<br />

to understand Φ. First, how large and how small can the values <strong>of</strong> Φ be<br />

From Formula 8.3, Φ is large when M.R. is large. And M.R. will be large<br />

when the frequency count is rougher. And the frequency count is roughest<br />

for monoalphabetic ciphers. Our standard monoalphabetic frequencies counts<br />

come from Figure 1.3. Using these numbers and Formula 8.2 (with N = 100<br />

since the numbers are percentages) gives Φ = 0.065601 for monoalphabetically<br />

enciphered ciphertexts. (See exercise 8.18.)<br />

On the other hand, M.R. is always positive, and its smallest value is 0, when<br />

all the numbers are the same. So from Formula 8.3, the smallest value <strong>of</strong> Φ is<br />

0 + 1 26 ≈ .03846.<br />

Do these values agree with our experimental data Adding Φ to Figure 8.1,<br />

we have<br />

length A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Φ<br />

one 13 1 7 10 20 4 3 4 14 0 1 9 5 19 21 3 0 11 4 16 5 1 3 1 8 0 0.0655738<br />

three 3 6 6 7 15 10 8 4 6 7 4 5 3 10 13 17 9 4 6 9 11 6 2 2 5 5 0.0442563<br />

five 5 4 5 8 10 5 12 7 7 7 3 5 10 7 12 10 7 12 8 4 8 9 7 6 3 2 0.0392122<br />

ten 10 5 7 5 7 5 6 4 6 5 4 10 6 11 13 4 6 13 6 7 9 6 10 7 3 8 0.0387318<br />

twenty 10 11 9 10 11 7 8 5 7 8 5 8 6 6 6 5 5 6 4 3 8 6 7 9 7 6 0.0364499<br />

A keylength <strong>of</strong> 1 has a Φ value <strong>of</strong> near .065, and as the keys get longer, the<br />

value <strong>of</strong> Φ rapidly decreases to about 0.038.<br />

Friedman did not stop here, however, but continued until he found a direct<br />

relationship between the keylength and Φ. We won’t do that here (see exercise<br />

8.19), but Friedman was able to show that<br />

Φ ≈<br />

.065(N − k) + .038N(k − 1)<br />

,<br />

k(N − 1)<br />

where k is the keylength and the values .065 and .038 are those we found above.<br />

Friedman then solved directly for k, giving us Friedman’s test.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!