30.11.2012 Views

Code and ciphers: Julius Caesar, the Enigma and the internet

Code and ciphers: Julius Caesar, the Enigma and the internet

Code and ciphers: Julius Caesar, the Enigma and the internet

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.

18<br />

chapter 2<br />

which is written in ma<strong>the</strong>matics, for convenience, as 26!, called factorial<br />

26. This is an enormous number, bigger than 10 to <strong>the</strong> 26th power, (or<br />

10 26 as it is commonly written) so that even a computer capable of testing<br />

one thous<strong>and</strong> million (i.e. 10 9 ) alphabets every second would take several<br />

hundred million years to complete <strong>the</strong> task. Evidently, <strong>the</strong> method of<br />

trying all possibilities, which works satisfactorily with <strong>Julius</strong> <strong>Caesar</strong><br />

<strong>ciphers</strong>, where <strong>the</strong>re are only 25 of <strong>the</strong>m, is quite impracticable here.<br />

The practical method for solving this type of cipher is as follows.<br />

(1) Make a frequency count of <strong>the</strong> letters occurring in <strong>the</strong> cipher, i.e. count<br />

how many times A, B, C, ..., X, Y, Z occur.<br />

(2) Attempt to identify which cipher character represents ‘space’. This<br />

should be easy unless <strong>the</strong> cipher message is very short, since ‘space’ <strong>and</strong><br />

punctuation symbols account for between 15% <strong>and</strong> 20% of a typical<br />

text in English with ‘space’ itself accounting for most of this. It is<br />

highly likely that <strong>the</strong> most frequently occurring cipher letter<br />

represents ‘space’. Fur<strong>the</strong>rmore, if this assumption is correct, <strong>the</strong><br />

cipher letter which represents ‘space’ will appear after every few<br />

characters, with no really long gaps.<br />

(3) Having identified ‘space’, rewrite <strong>the</strong> text with <strong>the</strong> spaces replacing <strong>the</strong><br />

cipher character representing it. The text will now appear as a<br />

collection of separated ‘words’ which are of <strong>the</strong> same length <strong>and</strong><br />

structure as <strong>the</strong> plaintext words. So, for example, if a plaintext word<br />

has a repeated letter so will its cipher version.<br />

(4) Attempt to identify <strong>the</strong> cipher representations of some of <strong>the</strong> high<br />

frequency letters such as E, T, A, I, O <strong>and</strong> N which will toge<strong>the</strong>r<br />

typically account for over 40% of <strong>the</strong> entire text, with E being by far <strong>the</strong><br />

most common letter in most texts.<br />

A table of typical frequencies of letters in English is a great help at<br />

this point <strong>and</strong> such a table is given as Table 2.4; a second table, based<br />

upon a much larger sample, will be found in Chapter 7; ei<strong>the</strong>r will<br />

suffice for solving simple substitution <strong>ciphers</strong>. The tables should only<br />

be treated as guides; <strong>the</strong> higher letter frequencies are reasonably<br />

consistent from one sample to ano<strong>the</strong>r but low letter frequencies are of<br />

little value. In <strong>the</strong> table of English letter frequencies printed below, <strong>the</strong><br />

letters J, X <strong>and</strong> Z are shown as having frequencies of 1 in 1000 but in<br />

any particular sample of 1000 letters any one of <strong>the</strong>m may occur<br />

several times or not at all. Similar remarks apply to letter frequencies<br />

in most languages.<br />

(5) With some parts of words identified in this way look for short words<br />

with one or two letters still unknown, for example if we know T <strong>and</strong> E<br />

<strong>and</strong> see a three-letter word with an unknown letter between T <strong>and</strong> E

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

Saved successfully!

Ooh no, something went wrong!