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.

The Hagelin cipher machine 145<br />

Example 10.4<br />

The following stretch of key has been recovered from a mini-Hagelin with<br />

three wheels of lengths 5, 8 <strong>and</strong> 9. Recover <strong>the</strong> kicks <strong>and</strong> pin patterns.<br />

6 4 3 6 8 6 4 5 1 8 4 1 8 6 8 1 6 3 9 0 4 6 8 6 0.<br />

Solution<br />

We may apply <strong>the</strong> differencing operations in any order. If we begin with<br />

interval 5 <strong>and</strong> <strong>the</strong>n use interval 8 we will eliminate <strong>the</strong> contributions of<br />

<strong>the</strong> 5- <strong>and</strong> 8-wheels <strong>and</strong> should obtain a stream of numbers all of which<br />

are multiples (positive, negative or zero) of <strong>the</strong> kick on <strong>the</strong> 9-wheel. So:<br />

Key 64368645�18�4�1868�1�6�3�9�04�68�6�0<br />

Shift 5 6 4 3�68�6�4518�4�1�8�6�81�63�9�0<br />

�5 002�50�2�3350�3�5�5�3�83�05�3�0<br />

Shift 8 0 0�2�5�0�2�33�50�3�5<br />

�8�5 50�5 10�5�5�50�55�0�5<br />

The kick on <strong>the</strong> 9-wheel is obviously 5; note that <strong>the</strong> pattern begins to<br />

repeat after 9 places. Note also that <strong>the</strong> doubly differenced key has one<br />

value equal to twice <strong>the</strong> kick; this is a particular case of <strong>the</strong> following:<br />

‘When <strong>the</strong> key stream is differenced N times a value of up to �2 (N�1)<br />

times <strong>the</strong> kick may occur’ (for an explanation see M19).<br />

We now find <strong>the</strong> kick on <strong>the</strong> 8-wheel. This involves differencing at<br />

interval 5 <strong>and</strong> interval 9, in ei<strong>the</strong>r order. Since we already have <strong>the</strong> key differenced<br />

at interval 5 (i.e. �5 above) we need only difference that at interval<br />

9:<br />

�5 002�5 0�2 �3 350�3 5�5 3�8 �3 �0 5�3 �0<br />

Shift 9 0 �0 2�5 0�2 �3 �3 5�0 �3<br />

�9�5 0 �3 3�0 3�6 �6 �3 0�3 �3<br />

The pattern begins to repeat after 8 places, as it should, <strong>and</strong> <strong>the</strong> kick on<br />

<strong>the</strong> 8-wheel is obviously 3.<br />

Similarly, by differencing <strong>the</strong> original key stream at interval 8 <strong>and</strong><br />

<strong>the</strong>n at interval 9 we obtain<br />

�9�8 0 1 �2 1 0 0 1 �2<br />

The pattern begins to repeat after 5 places <strong>and</strong> <strong>the</strong> kick on <strong>the</strong> 5-wheel is<br />

obviously 1.<br />

We now have to find <strong>the</strong> patterns on <strong>the</strong> three wheels. We do this<br />

by looking at <strong>the</strong> key values <strong>and</strong> seeing how <strong>the</strong>y might arise from

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

Saved successfully!

Ooh no, something went wrong!