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
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
142<br />
chapter 10<br />
(a) 0, 2, 3, 4, 8, 10;<br />
(b) 1, 2, 2, 3, 4, 15;<br />
(c) 1, 2, 2, 4, 5, 13;<br />
(d) 2, 3, 3, 3, 4, 12;<br />
(e) 2, 3, 3, 3, 5, 11;<br />
(f) 2, 3, 4, 4, 7, 7.<br />
The <strong>the</strong>oretical ‘work factor’ for <strong>the</strong> Hagelin<br />
When a cryptanalyst is faced with messages on a totally unknown Hagelin<br />
how many possibilities are <strong>the</strong>re? This number is sometimes referred to as<br />
<strong>the</strong> work factor <strong>and</strong> represents <strong>the</strong> number of cases that would have to be<br />
tried if <strong>the</strong> cryptanalyst attempted a ‘brute force’ attack. For <strong>the</strong> type of<br />
Hagelin that we have been discussing so far (<strong>the</strong>re are o<strong>the</strong>r optional features<br />
which complicate things fur<strong>the</strong>r, as we shall see) <strong>the</strong>re are two relevant<br />
factors:<br />
(1) <strong>the</strong> number of possible cages;<br />
(2) <strong>the</strong> number of possible pin settings.<br />
Assuming that <strong>the</strong> cage uses 27 lugs, <strong>and</strong> that we allow wheels to have 0<br />
lugs, <strong>the</strong>re are over 200 000 ways of distributing <strong>the</strong>m between <strong>the</strong> six<br />
wheels, so we’ll take <strong>the</strong> first factor as 2�10 5 . The second factor can be<br />
written down at once. There are 131 pins <strong>and</strong> each pin can be in ei<strong>the</strong>r<br />
of two positions which means that <strong>the</strong>re are 2 131 possible pin settings.<br />
Since 2 131 is more than 2.5�10 39 <strong>the</strong> product of <strong>the</strong> two factors<br />
exceeds<br />
5�10 44 .<br />
Because <strong>the</strong> cryptanalyst can’t be sure that <strong>the</strong>re are 27 lugs being used he<br />
would have to be prepared to try o<strong>the</strong>r cages, such as those having only 26<br />
or 25, which would approximately treble <strong>the</strong> work factor. It is clear from<br />
<strong>the</strong>se numbers that a ‘brute force’ attack is out of <strong>the</strong> question. In fact<br />
cryptanalysts do not have to resort to ‘brute force’ attacks to solve <strong>the</strong><br />
Hagelin, although solving <strong>the</strong> machine from cipher messages alone is difficult<br />
<strong>and</strong> requires a lot of text.<br />
The situation is quite different if <strong>the</strong> cryptanalyst has managed to<br />
acquire a stretch of key <strong>and</strong> we shall see that given about 150 consecutive<br />
key values <strong>the</strong> solution is relatively easy. Once again <strong>the</strong>n we will see that<br />
‘brute force’ estimates can be very misleading when it is a question of<br />
assessing <strong>the</strong> difficulty of solving any cipher system. As we saw in Chapter