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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

232 CHAPTER 12. RSA<br />

At this point in discussing a new cipher there are always two questions we<br />

ask: “How to decipher” and, “What is the security” Answering the first, if<br />

you think about it for a bit, will be difficult. To undo cubing we must take the<br />

cube root, But what we want to take the cube root <strong>of</strong> is not the ciphernumber<br />

but the cube <strong>of</strong> the plainnumber. So we have the problem <strong>of</strong> trying to determine<br />

the cubed plainnumber from the ciphernumber.<br />

As for the security, just as always adding 3 or always multiplying by 3 is<br />

insecure, always raising to the 3rd power is insecure. We should choose as our<br />

key some integer to take powers with. And large integers would have to be<br />

a possibility if we are to prevent the enemy from simply trying each possible<br />

power. But this leads to a new problem: what letter does the power 33 encipher<br />

S to<br />

19 33 = 1580770532156861979997149793605296459437459<br />

consists <strong>of</strong> 42 digits, and so is far too big for a calculator to handle. Similarly,<br />

19 125 has 159 digits, and 125 is not a very large number. Or how can we<br />

determine the remainder when 26 divides 19 392 , a number <strong>of</strong> over 500 digits!<br />

There is a third, more devious, problem. 1 3 = 1 so a is enciphered to A,<br />

but 3 3 = 27 ≡ 1 (mod 26) so c is also enciphered to A. Similarly, d and f both<br />

become L. Why is this, and how can we prevent this<br />

Despite these difficulties, the idea <strong>of</strong> developing a cryptosystem around the<br />

raising <strong>of</strong> numbers to powers is a very good one. It will lead us to one <strong>of</strong> the<br />

most popular cryptosystem <strong>of</strong> all time. But before we get there we need to<br />

surmount the difficulties we’ve just discussed.<br />

12.1 Fermat’s Theorem<br />

Our first need is to learn how to compute values like 133 719 %101. As you know,<br />

the “mod” just is shorthand for “find the remainder when divided by”, so in<br />

some sense we are not learning anything new. All one has to do is to compute<br />

133 719 , divide by 101, and find the remainder. However, 133 719 is galactically<br />

far too large for you calculator to directly compute. 1 How then to do this<br />

Some help is provided by a 360 year-old theorem.<br />

Theorem 3 Fermat’s Little Theorem 2 (1640). If p is a prime number and<br />

p does not divide a, then a p−1 ≡ 1 (mod p).<br />

1 It has over 1500 digits in it. For comparison, the traditional estimate for the number <strong>of</strong><br />

elementary particles in the universe is 10 80 , i.e., a number <strong>of</strong> 80 digits.<br />

2 Pierre (de) Fermat, 1601-1665, was one <strong>of</strong> the last truly great amateur mathematicians.<br />

During the day he was a lawyer/councilor for his local parliament. At night he read famous<br />

math books and added his thoughts and comments to the margins. It took over 350 years<br />

before one <strong>of</strong> these notes, Fermat’s Last Theorem, was determined to actually be true. Another,<br />

Fermat’s Little Theorem (to differentiate it from the Last Theorem) is what interests<br />

us here.

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

Saved successfully!

Ooh no, something went wrong!