06.01.2015 Views

Cryptology - Unofficial St. Mary's College of California Web Site

Cryptology - Unofficial St. Mary's College of California Web Site

Cryptology - Unofficial St. Mary's College of California Web Site

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

62 CHAPTER 4. THE EUCLIDEAN ALGORITHM<br />

Before summarizing, let’s do a couple more examples.<br />

Examples:<br />

(1) Does 7 have a multiplicative inverse modulo 26 If so, what is it<br />

This is asking us to find gcd(7, 26). If the gcd is 1, then we may solve<br />

7x ≡ 1 (mod 26).<br />

q<br />

r<br />

c<br />

26<br />

0<br />

3<br />

7<br />

1<br />

1<br />

5<br />

−3<br />

2<br />

2<br />

4<br />

2<br />

1<br />

−11<br />

0<br />

Since gcd(7, 26) = 1, 7 and 26 are relatively prime and 7 does have a<br />

multiplicative inverse modulo 26. It is −11 or its positive version 15<br />

(since −11 ≡ 15 (mod 26)). Thus 7 may be used as the multiplicative<br />

enciphering key in a decimation or linear cipher, and 15 will be (part <strong>of</strong>)<br />

the deciphering key.<br />

(2) Does 8 have a multiplicative inverse modulo 26 If so, what is it<br />

q<br />

r<br />

c<br />

26<br />

0<br />

3<br />

8<br />

1<br />

4<br />

2<br />

−3<br />

0<br />

Since gcd(8, 26) = 2 is not 1, 8 and 26 are not relatively prime, and so<br />

there is no multiplicative inverse for 8. Hence 8 may not be used as the<br />

multiplicative enciphering key in a Decimation or Linear Cipher.<br />

(3) Find gcd(49, 13) and, if possible, solve 13x ≡ 1 (mod 49)<br />

q<br />

r<br />

c<br />

49<br />

0<br />

3<br />

13<br />

1<br />

1<br />

10<br />

−3<br />

3<br />

3<br />

4<br />

1<br />

1<br />

−12<br />

0<br />

gcd(49, 13) = 1 so they are relatively prime and since −12 ≡ 37 (mod 49),<br />

the inverse <strong>of</strong> 13 modulo 49 is 37.<br />

⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄<br />

Euclid’s Extended Algorithm is quite simple. Nonetheless it is very powerful.<br />

Let’s end this section by summarizing it and some <strong>of</strong> its consequences.<br />

Because we will mostly be using it for computing a deciphering key from a<br />

known enciphering key k and modulus n, we state it in terms <strong>of</strong> k and n.

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

Saved successfully!

Ooh no, something went wrong!