14.07.2013 Views

dissertacao.pdf

dissertacao.pdf

dissertacao.pdf

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.

Algorithm 3. The implementation of a RSA session with a n bit modulus:<br />

1. Generate two large different prime numbers p, q. This can be efficiently<br />

done by generating random positive integers of size n<br />

2<br />

and checking their<br />

primality (as described in chapter 2) until we have two primes[38].<br />

2. Compute N = pq and φ(N) = (p − 1)(q − 1).<br />

3. Choose e : (e, φ(N)) = 1 and compute d ∼ = e −1 (mod φ(N)). To choose e<br />

in such a conditions, all one has to do is to choose a prime e ′ > max{p, q}<br />

and reduce it modulo N [38]. To compute d we can then use the algorithm<br />

described in Chapter 1 for computing modular inverses.<br />

4. Make available for everyone the public key < e, N > and keep completely<br />

in secret the private key < p, q, d, N >.<br />

All of the parameters of the RSA will influence its security level and the<br />

running time of the operations used by RSA. We usually require the size of N<br />

to be large, usually 1024, 2048 or larger. Because we want that it will also be<br />

hard to factor, it is recommended to have p and q as large as possible given the<br />

size of the modulus. The usual procedure to ensure this is for a n-bits modulus<br />

is to generate p and q as n<br />

2 -bits primes, like described in step 1, which will be<br />

called balanced primes as they have the same bit size.<br />

In step 3 we can compute the exponents in reverse order: we usually chose<br />

to compute first the exponent for which we need some restraints. These can<br />

be for example e = 3 in order to reduce encryption costs or d > N 1<br />

4 , which<br />

prevents some attacks like shown in Section 3.<br />

1.7 RSA Safety<br />

The security of RSA depends on two of its trapdoor one way functions. The<br />

encryption function is one of them, and the problem of inverting it is called the<br />

RSA problem:<br />

Definition 13. (The RSA Problem) Given a cypher text c = m e (mod N)<br />

encrypted using the public key < e, N >, compute the plain text m knowing<br />

only < e, N >.<br />

This problem is, mathematically, to compute e-th roots modulo N. As it is<br />

an open question to know whether there is a polynomial time algorithm which<br />

15

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

Saved successfully!

Ooh no, something went wrong!