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.6. PUTTING IT ALL TOGETHER 241<br />

12.6 Putting It All Together<br />

We summarize the steps we’ve taken and then do one final example.<br />

To compute a b (mod p) or a b (mod pq).<br />

1. Reduce the base a either modulo p or modulo pq.<br />

2. Reduce the exponent b either modulo p − 1 or modulo (p − 1)(q − 1).<br />

3. If the numbers involved are still too large for your calculator, build<br />

and complete the binary chart modulo p or modulo pq.<br />

4. If the final product contains too many or too large <strong>of</strong> numbers, groups<br />

them, multiply and reduce the groups, then multiply and reduce again<br />

to get the final answer.<br />

Example: Compute 1971 1149 %391. Hint: 391 = 17 · 23.<br />

(1) Reduce the base: 1971%391 = 20.<br />

(2) Reduce the exponent: (17 − 1)(23 − 1) = 352. 1149%352 = 93.<br />

(3) The binary chart:<br />

93 46.5 1 20 ≡ 20<br />

46 23 0 20 2 ≡ 9<br />

23 11.5 1 9 2 ≡ 81<br />

11 5.5 1 81 2 ≡ 305<br />

5 2.5 1 305 2 ≡ 358<br />

2 1 0 358 2 ≡ 307<br />

1 .5 1 307 2 ≡ 18<br />

(4) Group and multiply: 1971 1149 ≡ (20·81·305)·(358·18) ≡ 148 (mod 391).<br />

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

12.7 Exponential Problems (and answers)<br />

At the beginning this chapter we hinted at a new cryptosystem, one based on<br />

taking the power <strong>of</strong> the message. To use it we would choose as key an integer e<br />

and encipher our message m as m e (mod 26). There were, however, a number<br />

<strong>of</strong> difficulties with this idea. First, there was the question <strong>of</strong> decryption: what<br />

reverses raising to the e-th power in modular arithmetic Second, to prevent<br />

a possible enemy from simply trying all possible exponents we need to be able<br />

to choose arbitrarily large e’s. Finally, it is possible for this system to encipher<br />

different letters to the same cipherletter (both d and f become L if e = 3),<br />

making deciphering rather problematic.

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

Saved successfully!

Ooh no, something went wrong!