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.

122 CHAPTER 7.<br />

VIGENÈRE CIPHERS<br />

Kasiski’s Test:<br />

1. Look for repetitions in the ciphertext <strong>of</strong> two, three, or more letters.<br />

Determine the distances (= position <strong>of</strong> first letter in second appearance<br />

minus position <strong>of</strong> first letter in first appearance) between the<br />

beginnings <strong>of</strong> these repetitions. This is doing a Kasiski Examination.<br />

2. Find the largest number that divides most <strong>of</strong> your distances in step<br />

1 by first factoring those distances. This number should give a good<br />

idea <strong>of</strong> the length <strong>of</strong> the keyword. We call this length the keylength.<br />

Be aware that longer repetitions are more significant than shorter<br />

ones, so repeated triples are more meaningful than repeated pairs,<br />

and 4 letter strings are even more significant. Also, repetitions can<br />

arise that do not come from a repeat in the text. So the keylength<br />

will not necessarily divide all <strong>of</strong> the repetition distances.<br />

3. Write the ciphertext in columns, with the number <strong>of</strong> letters per column<br />

being equal to the keylength. This will result in a keylength<br />

number <strong>of</strong> rows, with each row being simply a Caesar cipher. This is<br />

building up a depth.<br />

4. Use frequency analysis on each row to determine the keyletter for<br />

each, and put the keyletters together to find the keyword. Then<br />

decipher the message.<br />

Example: Determine the keylength <strong>of</strong> the following ciphertext using Kasiski’s<br />

method. To ease the counting, there are 50 letters to a line. (This<br />

example is stolen from [Kahn], page 209)<br />

ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM<br />

EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE<br />

EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD<br />

LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM<br />

OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE<br />

EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS<br />

We start by listing the repetitions, their starting positions, the distance between<br />

the starting positions, and the factorization <strong>of</strong> that distance in Figure 7.3.<br />

What factors appear in (almost) every distance All the distances are divisible<br />

by 2, most are divisible by 2 × 3, and many by 2 × 2. The key length is<br />

probably either 6 or 4. (The factors 5, 7, 19, and 137 appear only once each,<br />

and 11 only twice, and can be ignored.) If the keylength is 4 then the long<br />

repetition LEEBMMTG would have to be ignored, while if the keylength is 6 we<br />

only need ignore the short repeat STY. The keylength is most likely 6. 14 ⋄<br />

14 key = SIGNAL, “If signals are to be displayed in the presence <strong>of</strong> an enemy, they must be

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

Saved successfully!

Ooh no, something went wrong!