11.07.2014 Views

Cryptanalysis of RSA Factorization - Library(ISI Kolkata) - Indian ...

Cryptanalysis of RSA Factorization - Library(ISI Kolkata) - Indian ...

Cryptanalysis of RSA Factorization - Library(ISI Kolkata) - Indian ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2: Mathematical Preliminaries 18<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

Input: Two positive integers a,b<br />

Output: gcd(a,b), the GCD <strong>of</strong> the two input integers<br />

Initialize r 0 = a, r 1 = b and m = 1;<br />

while r m ≠ 0 do<br />

q m ← ⌊ r m−1<br />

r m<br />

⌋;<br />

r m+1 ← r m−1 −q m r m ;<br />

m = m+1 ;<br />

end<br />

m=m-1 ;<br />

Return r m ;<br />

Algorithm 3: The Euclidean Algorithm [126].<br />

Let us present a simple pro<strong>of</strong> that the Euclidean algorithm is efficient, that is,<br />

it runs in time polynomial in the size <strong>of</strong> the inputs. Note that we can list down<br />

the steps <strong>of</strong> the Euclidean algorithm as follows (with a = r 0 , b = r 1 ).<br />

r 0 = q 1 r 1 +r 2 with 0 < r 2 < r 1 ,<br />

r 1 = q 2 r 2 +r 3 with 0 < r 3 < r 2 ,<br />

.<br />

r m−2 = q m−1 r m−1 +r m with 0 < r m < r m−1 ,<br />

r m−1 = q m r m +0 as r m+1 = 0.<br />

Thus, we have a = r 0 > b = r 1 > r 2 > r 3 > ··· > r m−1 > r m = gcd(a,b)<br />

from the algorithm. Again, we know that q i ≥ 1 for each i = 1,...,m, and thus<br />

r 0 ≥ r 1 +r 2 > 2r 2 , r 2 ≥ r 3 +r 4 > 2r 4 , and so on. This produces the relation<br />

b =<br />

{<br />

r 1 > 2r 3 > 4r 5 > ··· > 2 m−1 r m<br />

r 1 > r 2 > 2r 4 > 4r 6 > ··· > 2 m−2 r m<br />

if m is odd,<br />

if m is even,<br />

which, in turn, gives m < log 2 b+2. Notice that m is the number <strong>of</strong> steps the loop<br />

in the Euclidean algorithm runs, and hence, the time complexity <strong>of</strong> the algorithm<br />

to find gcd(a,b) comes as O(logb) divisions. Each <strong>of</strong> these divisions takes at most<br />

O(log 2 a) operations where a ≥ b. Hence, the time complexity <strong>of</strong> finding gcd(a,b)<br />

amounts to O(log 2 a · logb), that is O(log 3 a). If we perform a more rigorous<br />

analysis, the computational complexity to find the GCD <strong>of</strong> two integers, each <strong>of</strong><br />

size l N , can be proved to be O(l 2 N ) [126], and one needs to iterate this step a few<br />

times to obtain a suitable e.

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

Saved successfully!

Ooh no, something went wrong!