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.

key, d, we use <strong>the</strong> Euclidean Algorithm which is explained in M25, but <strong>the</strong><br />

method is illustrated by <strong>the</strong> following:<br />

so<br />

72�2�29�14,<br />

29�2�14�1,<br />

1�29�2�14,<br />

but we have seen, in <strong>the</strong> first line above, that 14�72�2�29 <strong>and</strong> so<br />

or<br />

1�29�2�(72�2�29)�5�29�2�72, that is:<br />

5�29�2�72�1,<br />

5�29�1 (mod 72)<br />

(i.e. 145�144�1) which means that d, <strong>the</strong> decipherment key, is 5.<br />

This may seem confusing, but <strong>the</strong> method is to use <strong>the</strong> Euclidean<br />

Algorithm to find <strong>the</strong> highest common factor of <strong>the</strong> encipherment key, e,<br />

<strong>and</strong> <strong>the</strong> number ( p�1)(q�1). Since e <strong>and</strong> ( p�1)(q�1) have no common<br />

factor <strong>the</strong> highest common factor is 1. If we now ‘work backwards’<br />

through <strong>the</strong> Euclidean Algorithm from <strong>the</strong> last line to <strong>the</strong> first, replacing<br />

<strong>the</strong> last number on <strong>the</strong> right of each identity by <strong>the</strong> o<strong>the</strong>r numbers<br />

involved, we will eventually obtain <strong>the</strong> decipherment key, d, as given by<br />

<strong>the</strong> congruence in (3) above. A formal description, <strong>and</strong> an alternative<br />

approach, are described in M25.<br />

Example 13.2 (A slightly more realistic case, which we shall<br />

use below)<br />

Find <strong>the</strong> decipherment key, d, when n�3127 <strong>and</strong> <strong>the</strong> encipherment key, e,<br />

is 17.<br />

Solution<br />

We note that n�3127�53�59 <strong>and</strong> 53 <strong>and</strong> 59 are both primes. It follows<br />

that n is a valid modulus for <strong>the</strong> RSA <strong>and</strong> that (p�1)(q�1)�(52)(58)�<br />

3016. Fur<strong>the</strong>rmore since 17 has no factor in common with 3127 or with<br />

3016 it is a valid encipherment key. Proceeding as before, that is, as in <strong>the</strong><br />

Euclidean Algorithm:<br />

3016�177�17�7,<br />

1117�2�7�3,<br />

1117�2�3�1,<br />

Encipherment <strong>and</strong> <strong>the</strong> <strong>internet</strong> 177

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

Saved successfully!

Ooh no, something went wrong!