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.
8.1. COINCIDENCES 137<br />
(being born on Saturday or being born on Sunday) and a total <strong>of</strong> seven days <strong>of</strong><br />
the week that I could have been born on.<br />
How does this work for us To make the explanation clear, let’s write #A to<br />
mean the number <strong>of</strong> A’s in the ciphertext. So #B represents the number <strong>of</strong> B’s,<br />
#C is the number <strong>of</strong> C’s, and so on. How many ways are there to choose two<br />
different A’s from the ciphertext There are #A ways to pick one A, and then<br />
#A−1 ways to pick a different A. (Minus 1 because we’ve already picked one, so<br />
there are one fewer to choose from.) So there are #A(#A−1) ways to pick two<br />
A’s. Likewise #B(#B−1) ways to pick two B’s, and #C(#C−1) ways to pick two<br />
C’s. Doing this for all the letters in the ciphertext gives us<br />
#A(#A − 1) + #B(#B − 1) + · · · + #Z(#Z − 1)<br />
ways <strong>of</strong> having a coincidence. To see how likely a coincidence is we must divide<br />
by the number <strong>of</strong> ways <strong>of</strong> choosing any two letters. If the total number <strong>of</strong> letters<br />
in our ciphertext is N, then this number is N(N − 1). 1<br />
Putting the pieces together, we 2 have reinvented Friedman’s famed Index<br />
<strong>of</strong> Coincidence. Designated Φ (“phi”), this is the likelihood that two letters,<br />
picked randomly from a ciphertext, are the same. As we’ve just determined, the<br />
formula for Φ is<br />
Φ =<br />
#A(#A − 1) + #B(#B − 1) + · · · + #Z(#Z − 1)<br />
, (8.1)<br />
N(N − 1)<br />
where #A is the number <strong>of</strong> A’s in the ciphertext, #B is the number <strong>of</strong> B’s in the<br />
ciphertext, etc., and N = #A + #B + · · · + #Z is the total number <strong>of</strong> letters in<br />
the ciphertext.<br />
Friedman was, justifiably, quite proud <strong>of</strong> his Index. In the introduction<br />
to The Index <strong>of</strong> Coincidence and Its Applications in Cryptography Riverbank<br />
Publications No 22., 1920 he wrote “when such a treatment is possible, it is<br />
one <strong>of</strong> the most useful and trustworthy methods in cryptography.” 3 However,<br />
from our development, it is not quite clear what Φ tells us, or how to use it.<br />
Clearly Φ measures, somehow, the frequency <strong>of</strong> coincidences in a polyalphabetic<br />
cipher. But what does Φ = 0.045 mean To find out, we need to think about<br />
the frequency counts in a different way.<br />
1 (Actually, from n objects there are n(n − 1)/2 ways <strong>of</strong> choosing two <strong>of</strong> them: we must<br />
divide by 2 because it doesn’t matter which one is chosen first and which is chosen second. So<br />
the denominator and each term in the numerator should have included a “/2”. Fortunately,<br />
all the two’s cancel out.)<br />
2 Our presentation <strong>of</strong> these ideas borrows liberally from that <strong>of</strong> Abraham Sinkov’s book<br />
Elementary Cryptanalysis. Sinkov (1907–1998) was one <strong>of</strong> the first three people hired by<br />
Friedman to work in the Army’s Signal Intelligence Service. He headed the Communications<br />
Intelligence Organization during World War II, the group largely in charge <strong>of</strong> intercepting and<br />
breaking Japanese messages. His book was published in 1966 and is quite influential.<br />
3 Kahn [Kahn, pg 376] tells the story that General Cartier <strong>of</strong> the French indexCartier,<br />
General Cryptographic section saw Riverbank No. 22 and “thought so highly <strong>of</strong> it that he<br />
had it translated and published forthwith – false-dating in “1921” to make it appear as if the<br />
French work had come first!”