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.

Since some cages are obviously very ‘bad’ (that is, weak from <strong>the</strong> cryptographer’s<br />

point of view) this raises <strong>the</strong> questions:<br />

(1) How many possible cages are <strong>the</strong>re?<br />

(2) How many of <strong>the</strong>se are ‘good’ cages?<br />

The Hagelin cipher machine 141<br />

We can find <strong>the</strong> number of distinct possible cages exactly since <strong>the</strong><br />

number is given by<br />

number of possible cages�<strong>the</strong> number of representations of 27 as<br />

<strong>the</strong> sum of six non-negative integers<br />

<strong>and</strong> although <strong>the</strong>re is no simple formula for calculating this number we<br />

can use a nice ma<strong>the</strong>matical identity <strong>and</strong> a computer to discover that <strong>the</strong><br />

number is 811. If we insist that each wheel must have at least 1 lug opposite<br />

to it, because a wheel with no lugs opposite it might as well not be<br />

<strong>the</strong>re, <strong>the</strong> number reduces to 331. The same technique reveals that if we<br />

only use 26 or 25 lugs in <strong>the</strong> cage <strong>the</strong> number of possibilities, allowing 0<br />

lugs opposite one or more wheels, reduces to 709 <strong>and</strong> 612 respectively, or<br />

to 282 <strong>and</strong> 235 when we disallow 0 lugs. We must remember however<br />

that since <strong>the</strong> six numbers of a cage may be permuted <strong>and</strong> so generate different<br />

key streams, although <strong>the</strong>se streams will have similar statistical<br />

features, <strong>the</strong> number of possible cages that <strong>the</strong> cryptanalyst must consider<br />

is substantially larger. Thus, in <strong>the</strong> case of 27 lugs <strong>the</strong>re are 201 376<br />

possibilities, not 811; for fur<strong>the</strong>r details see M18.<br />

How many of <strong>the</strong>se 331 distinct possible cages are ‘good’? Clearly it<br />

depends upon what we mean by ‘good’. If we take it to mean<br />

a ‘good’ cage is one that generates all possible keys in <strong>the</strong> range 0 to<br />

25<br />

<strong>the</strong>n we can use a computer to find how many of <strong>the</strong> 331 do this. The<br />

answer is 113. Permuting <strong>the</strong> cage makes no difference to its quality: a<br />

‘good’ cage remains ‘good’ <strong>and</strong> a ‘bad’ cage remains ‘bad’. If we allow 0<br />

lugs <strong>the</strong> 881 possible cages yield only 120 ‘good’ cages; in o<strong>the</strong>r words,<br />

only 7 cages with a wheel with 0 lugs produce all 26 possible key values<br />

(mod 26). Of course even a ‘good’ cage may be ruined by highly asymmetric<br />

pin settings, such as 90% active, 10% inactive.<br />

Problem 10.2<br />

Determine which of <strong>the</strong> following 6 cages generate all key values, 0 to 25<br />

(mod 26). For those cages which fail to do this find which key values are<br />

missing.

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

Saved successfully!

Ooh no, something went wrong!