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.

246 CHAPTER 12. RSA<br />

First, what about our old standby – frequency analysis If N consists <strong>of</strong><br />

around 600 decimal digits, then our ciphertext segments will also be about 600<br />

digits long. How many possible 600 digit segments are there Lots: 10 600 .<br />

Recall that a traditional estimate for the number <strong>of</strong> elementary particles in the<br />

universe is 10 80 . So even if we wanted to perform frequency analysis, there<br />

wouldn’t be enough room in the universe to write down our frequency count!<br />

So we must try another method to break a message. As usual, once we have<br />

tried the brute force method <strong>of</strong> frequency analysis, we then turn to the specifics<br />

<strong>of</strong> the system itself. Again, how to decrypt an RSA-enciphered message<br />

Well, we can look up our enemy’s e and N, since these are public information.<br />

We want M, the true message, we know the value <strong>of</strong> N and we know that<br />

E d %N = M. The only thing we don’t know is d. So we only need to discover<br />

d.<br />

Well, we know that e and d are chosen so that e·d ≡ 1 (mod (P −1)(Q−1)),<br />

and we know e. The only thing we don’t have is (P − 1)(Q − 1). So we only<br />

need to discover (P − 1)(Q − 1).<br />

Well, we know N, and we know that P · Q = N. Also,<br />

(P − 1)(Q − 1) = P · Q − P − Q + 1 = N − P − Q + 1.<br />

We know the N and 1 parts <strong>of</strong> this, but don’t know the P or Q. So we only<br />

need to discover P or Q.<br />

Well, N/P = Q and N/Q = P , so if we know either P or Q then we know<br />

the other and so know them both. But N has only two factors, P and Q. So<br />

we only need to factor N.<br />

Thus the entire security <strong>of</strong> the RSA system apparently comes down to the<br />

ease or difficulty <strong>of</strong> factoring N. If we can factor N we can easily decrypt any<br />

message enciphered modulo N. And the chain <strong>of</strong> “well”s above is meant to<br />

convince you that factor N is the only way to break RSA. 15 How hard can this<br />

be After all, we all spent several weeks in 5th or 7th grade talking about primes<br />

and factors and breaking down numbers into their prime factors. So why can’t<br />

smart people using fast machines just factor N In fact, why not just set up<br />

a really fast computer and do the obvious thing: see if 2 divides N, then see<br />

if 3 divides N, then see if 5 divides N, and so on, working your way along the<br />

primes until you find either P or Q<br />

Remember that N is about 600 digits long. An important theorem, called,<br />

logically enough, the Prime Number Theorem, says that less that N there are<br />

about N/ ln(N) primes. That means that to find up to P or Q, which means<br />

checking up to about 10 300 , we must check about 10 300 / ln(10 300 ) ≈ 10 298<br />

primes. But, again, there are only 10 80 particles in the whole universe! Imagine<br />

that I said I hid one specially marked atom somewhere in the universe and you<br />

15 Of course there are other ways to break any particular RSA system. Perhaps our enemy<br />

will make some grievous mistake in enciphering, like leaving part <strong>of</strong> the message unenciphered.<br />

Or will allow us to time his/her computer while it is deciphering as many messages as we wish.<br />

But, for most practical purposes, the security <strong>of</strong> RSA comes down to the factoring problem.

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

Saved successfully!

Ooh no, something went wrong!