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.

If we generate <strong>the</strong> same sequence (mod 100) it begins<br />

00 01 01 02 04 07 13 24 44 81 49 74 ...<br />

<strong>and</strong> is found to repeat after 1240 terms.<br />

It is possible to modify <strong>the</strong> Fibonacci sequence so that <strong>the</strong> odd–even<br />

ratio is somewhat reduced, making it slightly better for encryption. A<br />

modest step in this direction is shown by<br />

Example 6.4<br />

Generate 20 terms of <strong>the</strong> Fibonacci sequence (mod 100) starting with 13<br />

<strong>and</strong> 21 as <strong>the</strong> first 2 terms <strong>the</strong>n interchange <strong>the</strong> second <strong>and</strong> third digits in<br />

each group of four to give 20 terms of a two-digit key stream.<br />

Solution<br />

The first 20 terms of <strong>the</strong> Fibonacci Sequence (mod 100) starting with 13<br />

<strong>and</strong> 21 are<br />

13 21 34 55 89 44 33 77 10 87 97 84 81 65 46 11 57 68 25 93<br />

We interchange <strong>the</strong> second <strong>and</strong> third digits in each group of four –<br />

12 31 35 45 84 94 37 37 18 07 98 74 86 15 41 61 56 78 29 53<br />

– <strong>and</strong> this is <strong>the</strong> resultant key. The bias of odd: even numbers has now been<br />

reduced (from 2 : 1 to about 7 : 5) <strong>and</strong> <strong>the</strong> key, though still unsatisfactory, is<br />

stronger for that.<br />

Problem 6.2<br />

A two-digit code represents <strong>the</strong> letters of <strong>the</strong> alphabet as follows:<br />

A�17, B�20, C�23, ..., Z�92,<br />

each number being 3 more than <strong>the</strong> one before it. A message is <strong>the</strong>n enciphered<br />

using this code <strong>and</strong> <strong>the</strong> additive key (12 31 35...) obtained in <strong>the</strong><br />

example above, <strong>the</strong> addition being digit by digit with no carrying. The<br />

resultant cipher text is<br />

86 69 42 19 60 35 08 13 76 48 23 02 50 91.<br />

Decrypt <strong>the</strong> message.<br />

<strong>Code</strong>s 71

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

Saved successfully!

Ooh no, something went wrong!