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.

12.5. COMPLICATION IV: THE LAST ONE 239<br />

large to multiply together all at once, simply group them into a families <strong>of</strong> two<br />

or three, multiply and reduce them, and then multiply and reduce the results.<br />

Example: Compute 372 · 361 · 19 · 281 · 107 · 81 · 239 · 301 (mod 401)<br />

372 · 361 · 19 · 281 · 107 · 81 · 239 · 301 (mod 401)<br />

≡ (372 · 361 · 19) · (281 · 107 · 81) · (239 · 301) (mod 401)<br />

≡ 386 · 154 · 160 (mod 401)<br />

≡ 122 (mod 401).<br />

⋄<br />

12.5 Complication IV: the last one<br />

The reason we are interested in computations like 133 172 %323 in the first place<br />

is that they form the heart <strong>of</strong> the most popular public key cryptography system<br />

in use today. The final complication is that the computations in this system<br />

are not <strong>of</strong> the form a b %p, where p is prime, but like a b %pq, where p and q are<br />

different primes. How does the change from a prime as the modulus to two<br />

prime affect what we’ve done so far<br />

We know that 12 6 ≡ 1 (mod 7) and 12 10 ≡ 1 (mod 11). How should we<br />

complete 12 □ ≡ 1 (mod 77) It turns out this is equivalent 6 to finding a value<br />

k so that 12 k ≡ 1 (mod 7) and 12 k ≡ 1 (mod 11). From Fermat’s theorem<br />

12 6 ≡ 1 (mod 7) and 12 10 ≡ 1 (mod 11). In fact, any exponent that is a<br />

multiple <strong>of</strong> 6 or 10, respectively, produces the same result: 12 6n ≡ ( 12 6) n<br />

≡<br />

1 n ≡ 1 (mod 7) and 12 10m ≡ ( 12 10) m<br />

≡ 1 m ≡ 1 (mod 11). The simplest such<br />

multiple 7 is the product, (7 − 1)(11 − 1) = 60 in this case. So 12 60 ≡ 1 (mod 7)<br />

and 12 60 ≡ 1 (mod 11), hence 12 60 ≡ 1 (mod 77).<br />

Now there is nothing special about 7 and 11. If p and q are distinct prime<br />

numbers, neither <strong>of</strong> which divides a, then a k ≡ 1 (mod p) and a k ≡ 1 (mod q)<br />

whenever k is a multiple <strong>of</strong> both p − 1 and q − 1. In particular, this is true when<br />

k = (p − 1)(q − 1). This gives us<br />

6 From Theorem 1 way back in Chapter 3, a ≡ b (mod pq) is the same as pq dividing a − b.<br />

But when p and q are relatively prime, this needs both p and q to divide a − b. That is, a ≡ b<br />

modulo both p and q.<br />

7 The smallest such multiple is the least common multiple, which we recall from Section<br />

8.4. For simplicity we will use the product.

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

Saved successfully!

Ooh no, something went wrong!