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.

Multiply each of <strong>the</strong>se by M:<br />

M, 2M, 3M, ......, ( p�1)M.<br />

No two of <strong>the</strong>se numbers produce <strong>the</strong> same residue (mod p) for if, say,<br />

aM�bM (mod p)<br />

<strong>the</strong>n M(a�b) is divisible by p; but M is not divisible by p <strong>and</strong> a <strong>and</strong> b are<br />

both less than p. Hence <strong>the</strong> ( p�1) multiples of M are all different (mod p);<br />

<strong>the</strong>y must <strong>the</strong>refore be<br />

1, 2, 3, ..., ( p�1)<br />

in some order. So<br />

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

Since ( p�1)! has no factor in common with p we can divide it out of both<br />

sides to give<br />

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

which proves Fermat’s Little Theorem.<br />

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

We are now dealing with a composite modulus N. The proof follows along<br />

<strong>the</strong> same lines as above but now, instead of using all of <strong>the</strong> residues (mod<br />

p) we now consider only those residues which have no factor in common<br />

with N. If we denote <strong>the</strong>se residues by<br />

a 1 , a 2 , ..., a k<br />

<strong>the</strong>n k��(N), where �(N) is Euler’s function, which was defined in M11. If<br />

we multiply each of <strong>the</strong> k residues by M <strong>the</strong>n, as before, <strong>the</strong>y are all different<br />

since if<br />

M(a r )�M(a s ) (mod N)<br />

<strong>the</strong>n M(a r �a s ) is divisible by N, but this is impossible since M has no factor<br />

in common with N <strong>and</strong> (a r �a s ) is less than N. We have <strong>the</strong>refore proved<br />

that<br />

if M has no factors in common with N <strong>the</strong>n<br />

M �(N) �1 (mod N)<br />

which is <strong>the</strong> Fermat–Euler Theorem.<br />

Ma<strong>the</strong>matical aspects 211

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

Saved successfully!

Ooh no, something went wrong!