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.

210<br />

appendix<br />

(2) In using modular arithmetic it pays to remove <strong>the</strong> highest possible<br />

power of 2 from <strong>the</strong> exponent, <strong>the</strong>n find <strong>the</strong> remainder of <strong>the</strong> o<strong>the</strong>r (odd)<br />

factor of <strong>the</strong> exponent, <strong>and</strong> finally use repeated squaring to get to <strong>the</strong><br />

original exponent. So, for example, since 96�3�(32) if we form (59) 3<br />

(mod 97) <strong>and</strong> repeatedly square it five times, reducing (mod 97) at each<br />

stage, we will obtain <strong>the</strong> required result; <strong>the</strong> details are as follows:<br />

so<br />

so<br />

so<br />

so<br />

so<br />

59�59�3481�35�97�86,<br />

(59) 3 �86�59�5074�52�97�30�30 (mod 97),<br />

(59) 6 �(30) 2 �900�9�97�27�27 (mod 97),<br />

(59) 12 �(27) 2 �729�7�97�50�50 (mod 97),<br />

(59) 24 �(50) 2 �2500�25�97�75�75 (mod 97),<br />

(59) 48 �(75) 2 �5625�57�97�96�96 (mod 97)��1 (mod 97),<br />

<strong>and</strong> so, finally,<br />

(59) 96 �(�1) 2 �1 (mod 97),<br />

i.e. (59) 96 leaves remainder 1 when divided by 97, as asserted.<br />

M23 Proof of <strong>the</strong> Fermat–Euler Theorem<br />

It is helpful to begin with a proof of Fermat’s Little Theorem; <strong>the</strong> generalistion<br />

to <strong>the</strong> Fermat–Euler Theorem is <strong>the</strong>n almost obvious.<br />

Fermat’s Little Theorem asserts that<br />

If p is a prime <strong>and</strong> M is any integer not divisible by p <strong>the</strong>n<br />

M ( p�1) �1 (mod p).<br />

Proof<br />

A complete set of residues (‘remainders’) (mod p) of numbers not divisible<br />

by p is<br />

1, 2, 3, ..., ( p�1).

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

Saved successfully!

Ooh no, something went wrong!