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.

178<br />

chapter 13<br />

so<br />

1�7�2�3<br />

but, from <strong>the</strong> second line above, 3�17�2�7 <strong>and</strong> so<br />

1�7�2�(17�2�7)�5�7�2�17<br />

but, from <strong>the</strong> first line above, 7�3016�177�17 <strong>and</strong> so<br />

or<br />

1�5�(3016�177�17)�2�17�5�3016�887�17<br />

887�17��1 (mod 3016).<br />

We need a value of d that, when multiplied by 17, leaves remainder �1<br />

when divided by 3016 <strong>and</strong> this is <strong>the</strong>refore �887, not �887. Now �887�<br />

2129 (mod 3016) so, finally, <strong>the</strong> decipherment key, d, is 2129.<br />

(Check: 2129�17�36 193�12�3016�1.)<br />

The encipherment <strong>and</strong> decipherment processes in <strong>the</strong> RSA<br />

system<br />

To encipher a message using <strong>the</strong> RSA method <strong>the</strong> would-be user must<br />

know <strong>the</strong> values of <strong>the</strong> modulus, n (�pq), <strong>and</strong> <strong>the</strong> encipherment key, e;<br />

<strong>the</strong>se are publicly available. Only <strong>the</strong> ‘owner’ of <strong>the</strong> system which is being<br />

used knows <strong>the</strong> values of p <strong>and</strong> q <strong>and</strong> <strong>the</strong> decipherment key, d.<br />

To encipher a message which is to be sent to <strong>the</strong> ‘owner’, <strong>and</strong> which he<br />

alone can decipher, <strong>the</strong> user must:<br />

(1) convert <strong>the</strong> letters of his message into numbers such as those given in<br />

Table 1.1, so that, for example A�00, B�01, ..., Z�25;<br />

(2) if <strong>the</strong> modulus n contains no more than D digits break <strong>the</strong> number<br />

version of <strong>the</strong> message into blocks of no more than D digits; denote<br />

<strong>the</strong>se blocks by B 1 , B 2 , ...;<br />

(3) encipher <strong>the</strong> blocks in order <strong>and</strong> independently by computing<br />

(4) (B I ) e (mod n), I�1, 2, ..., giving cipher blocks C 1 , C 2 , ...<br />

The cipher message is C 1 C 2 ... (a string of numbers, not letters).<br />

To decipher a message <strong>the</strong> procedure is exactly <strong>the</strong> same as for encipherment<br />

except that <strong>the</strong> blocks to be h<strong>and</strong>led now are <strong>the</strong> cipher blocks C I <strong>and</strong>

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

Saved successfully!

Ooh no, something went wrong!