12.07.2015 Views

Teachers' pack - National Cipher Challenge - University of ...

Teachers' pack - National Cipher Challenge - University of ...

Teachers' pack - National Cipher Challenge - University of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Frequency analysisA more methodical attack is frequency analysis. One counts the number <strong>of</strong>occurrences <strong>of</strong> each character in the cipher text and compares it with an expectedfrequency for the standard English alphabet. In the cipher text above a character countgives us the following table <strong>of</strong> occurrences:a b c d e f g h i j k l m7 0 12 0 26 3 0 32 6 9 11 20 18n o p q r s t u v w x y z16 5 55 0 14 17 2 17 35 4 4 11 4Compare this to a table <strong>of</strong> expected frequencies, taken from Simon Singh’s “TheCode Book”:a b c d e f g h i j k l m8.2 1.5 2.8 4.3 12.7 2.2 2.0 6.1 7.0 0.2 0.8 4.0 2.4n o p q r s t u v w x y z6.7 7.5 1.9 0.1 6.0 6.3 9.1 2.8 1.0 2.4 0.2 2.0 0.1Using this and information about common one, two and three letter words we haveenough to begin to tackle the cipher.Disguising the word structureThe chink in the armour <strong>of</strong> our ciphers so far has been the preservation <strong>of</strong> wordstructure. This allows one to spot common words. In order to avoid such weaknesscryptographers usually remove punctuation and block the characters together ingroups <strong>of</strong> four or five, so our previous cipher text looks likeVEPHY XHLVH TPMOA WFJYF LTHRF NEPSH JNEHA PVFLV EFUZHCFUVE HVFVF UPHUC VMKPK MSFUP VEPIP CZMSY MSIPC NESHUPHLYE PLRPV EPRFN EPSHJ NEHAP VVEFU FUFKN MSVHL VAPRHWUPFO VEPUP LYPSE HUVMI PPNVE PRFNE PSHJN EHAPV MLHNFPRPMO NHNPS VEPPL PKCRH LRHNV WSPVE PNHNP SYFUR MXPSVEPIPC HLYSP HYHLC RMKKW LFRHV FMLUV EHVEH XPAPP LPLRSCNVPY ZFVEF VEMZP XPSFO VEPIP CRHLA PRMKK FVVPY VMKPKMSCFV FUJPU UJFIP JCVMO HJJFL VMPLP KCEHL YUUsually the length <strong>of</strong> the text groups doesn’t matter, however, in analysing a Vigenèrecipher (see below) a carelessly chosen block length may make the length <strong>of</strong> thekeyword more apparent, since it can reveal the repetitions more easily.13

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

Saved successfully!

Ooh no, something went wrong!