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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

What about sequences of higher order? A sequence of order 12, for<br />

example, might have a period as long as 2 12 �1, which is 4095. Does any<br />

linear recurrence of order 12 generate such a maximal binary sequence ?<br />

As a result of some elegant <strong>and</strong> advanced ma<strong>the</strong>matics a formula is<br />

known which tells us exactly how many binary linear recurrences of order<br />

k will produce a sequence of maximum period. In <strong>the</strong> case of recurrences<br />

of order 12 <strong>the</strong> formula tells us that 144 binary linear recurrences of order<br />

12 will produce binary sequences of period 4095. (The fact that 144�<br />

12 � 12 is a fluke!) The remaining 3952 will fail to do so. The ma<strong>the</strong>matical<br />

analysis does not lead directly to <strong>the</strong>se 144, which must be found by a<br />

process somewhat akin to finding prime numbers. Alternatively, using a<br />

computer, <strong>the</strong> 4095 possible recurrences can be tested <strong>and</strong> any which<br />

repeat before 4095 terms have been generated can be rejected. When this<br />

is done <strong>the</strong> first successful sequence found is<br />

U n �U (n�6) �U (n�8) �U (n�11) �U (n�12) .<br />

It is <strong>the</strong> ‘first’ in <strong>the</strong> sense that, writing 0 <strong>and</strong> 1 for <strong>the</strong> multipliers of <strong>the</strong><br />

12 terms on <strong>the</strong> right-h<strong>and</strong> side of <strong>the</strong> linear recurrence, this sequence has<br />

<strong>the</strong> 12-bit representation<br />

000001010011<br />

which, interpreted as an integer written in binary form, is<br />

64�16�2�1�83.<br />

Producing r<strong>and</strong>om numbers <strong>and</strong> letters 103<br />

No sequence with such an integer representation below 83 produces <strong>the</strong><br />

maximum period of 4095. For some of <strong>the</strong> ma<strong>the</strong>matics behind all this<br />

see M11.<br />

By choosing a sufficiently high order <strong>and</strong> finding a linear recurrence<br />

that gives <strong>the</strong> maximum period we can produce a key stream that would<br />

seem to provide a pseudo-r<strong>and</strong>om binary stream which we could use as a<br />

key for encryption. It can be shown, for example, that 356 960 linear<br />

recurrences of order 23 will generate maximal key streams, which are<br />

more than 8 000 000 long (M11). Since <strong>the</strong> initial starting values also<br />

provide over 8 000 000 possibilities one might think that such a key<br />

would present a formidable problem to <strong>the</strong> cryptanalyst <strong>and</strong>, initially, it<br />

would. Unfortunately for <strong>the</strong> cryptographers key which has been generated<br />

in this way has a fatal flaw: given a fairly modest amount of <strong>the</strong> key<br />

<strong>the</strong> linear recurrence by which it has been generated <strong>and</strong> <strong>the</strong> initial values<br />

can be recovered This is a consequence of <strong>the</strong> following.

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

Saved successfully!

Ooh no, something went wrong!