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.

2, <strong>the</strong>re are 26! possible simple substitution <strong>ciphers</strong> <strong>and</strong> <strong>the</strong> brute force<br />

work factor is about 10 25 but such systems can be solved by h<strong>and</strong> in less<br />

than an hour, given 200 letters of cipher. Many types of cipher, including<br />

<strong>the</strong> Hagelin, are vulnerable to attacks involving ma<strong>the</strong>matical or statistical<br />

weaknesses in <strong>the</strong> cipher itself or in its mode of operation, as in <strong>the</strong><br />

<strong>Enigma</strong>. A cipher where <strong>the</strong>re are no known weaknesses or ‘trapdoors’,<br />

which enable <strong>the</strong> cryptanalyst to break <strong>the</strong> system by a special route,<br />

would be formidable indeed. It is claimed that a modern system, <strong>the</strong> DES<br />

(Data Encryption St<strong>and</strong>ard), is such a system. A brief description of this is<br />

given in Chapter 13.<br />

Solving <strong>the</strong> Hagelin from a stretch of key<br />

The Hagelin cipher machine 143<br />

Recovery of <strong>the</strong> cage <strong>and</strong> pin patterns of a non-overlapped Hagelin is<br />

straightforward if we have more than 131 consecutive key values, as is<br />

shown below. ‘How, though,’ you might ask ‘do we obtain 131 consecutive<br />

key values?’ The answer is: ‘By finding <strong>the</strong> plaintext of a message of<br />

length 131 characters or more.’ This might be achieved in a number of<br />

ways including:<br />

(1) finding that <strong>the</strong> same message has been sent in ano<strong>the</strong>r cipher that is<br />

readable;<br />

(2) finding that two or more Hagelin messages are in depth which may be<br />

readable by <strong>the</strong> method of crib-dragging as explained in Chapter 7;<br />

(3) by <strong>the</strong> cipher operator making a mistake <strong>and</strong> having to retransmit <strong>the</strong><br />

message on a slightly different set-up.<br />

(4) by cl<strong>and</strong>estine means, e.g. by an agent obtaining <strong>the</strong> plaintext of a<br />

message.<br />

To illustrate <strong>the</strong> method of solution when a sufficiently long stretch of<br />

key has been obtained we look at <strong>the</strong> key that would be generated by a<br />

‘mini-Hagelin’ with only three wheels. The corresponding attack for a<br />

full scale Hagelin undoubtedly involves more work but <strong>the</strong> method is <strong>the</strong><br />

same <strong>and</strong> is based upon <strong>the</strong> fact that <strong>the</strong> key is <strong>the</strong> sum (mod 26) of <strong>the</strong><br />

contributions of six wheels which move regularly <strong>and</strong> so, by subtracting<br />

<strong>the</strong> key stream from itself, suitably shifted, we can remove <strong>the</strong> contributions<br />

of any five of <strong>the</strong>se wheels <strong>and</strong> so discover <strong>the</strong> ‘kick’ on <strong>the</strong> sixth<br />

wheel. Thus, if we generate a key by adding toge<strong>the</strong>r <strong>the</strong> contributions of<br />

two mini-wheels, one of length 7 <strong>and</strong> with a kick of 5 <strong>and</strong> <strong>the</strong> o<strong>the</strong>r of<br />

length 9 <strong>and</strong> with a kick of 3 we might have

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

Saved successfully!

Ooh no, something went wrong!