10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

5.3 Baby-steps, giant-steps 235<br />

calculation, by A. Joux and R. Lercier, where p is the 120-decimal-digit prime<br />

⌊10 119 π⌋ + 207819. They actually found two discrete logs in this field for the<br />

generator 2, namely the DL for t = ⌊10 119 e⌋ and the DL for t +1. Their<br />

method was based on the number field sieve.<br />

More recent advances in the world of parallel-rho methods include a<br />

cryptographic-DL treatment [van Oorschot and Wiener 1999] and an attempt<br />

at parallelization of actual Pollard-rho factoring (not DL) [Crandall 1999d].<br />

In this latter regard, see Exercises 5.24 and 5.25. For some recent advances in<br />

the DL version of the rho method, see [Pollard 2000] and [Teske 2001]. There<br />

is also a very accessible review article on the general DL problem [Odlyzko<br />

2000].<br />

5.3 Baby-steps, giant-steps<br />

Suppose G = 〈g〉 is a cyclic group of order not exceeding n, and suppose t ∈ G.<br />

We wish to find an integer l such that g l = t. We may restrict our search for l<br />

to the interval [0,n− 1]. Write l in base b, whereb = ⌈ √ n⌉. Thenl = l0 + l1b,<br />

where 0 ≤ l0,l1 ≤ b − 1. Note that g l1b = tg −l0 = th l0 ,whereh = g −1 .<br />

Thus, we can search for l0,l1 by computing the lists g 0 ,g b ,...,g (b−1)b<br />

and th 0 ,th 1 ,...,th b−1 and sorting them. Once they are sorted, one passes<br />

through one of the lists, finding where each element belongs in the sorted<br />

order of the second list, with a match then being readily apparent. (This idea<br />

is laid out in pseudocode in Algorithm 7.5.1.) If g ib = th j , then we may take<br />

l = j + ib, and we are through.<br />

Here is a more formal description:<br />

Algorithm 5.3.1 (Baby-steps, giant-steps for discrete logarithms). We<br />

are given a cyclic group G with generator g, an upper bound n for the order of G,<br />

and an element t ∈ G. This algorithm returns an integer l such that g l = t. (It<br />

is understood that we may represent group elements in some numerical fashion<br />

that allows a list of them to be sorted.)<br />

1. [Set limits]<br />

b = ⌈ √ n⌉;<br />

h = g −1 b ; // Via Algorithm 2.1.5, for example.<br />

2. [Construct lists]<br />

A = g i : i =0, 1,...,b− 1 ;<br />

B = th j : j =0, 1,...,b− 1 ;<br />

3. [Sort and find intersection]<br />

Sort the lists A, B;<br />

Find an intersection, say g i = th j ; // Via Algorithm 7.5.1.<br />

return l = i + jb;<br />

Note that the hypothesis of the algorithm guarantees that the lists A, B will<br />

indeed have a common element. Note, too, that it is not necessary to sort<br />

both lists. Suppose, say, that A is generated and sorted. As the elements of

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

Saved successfully!

Ooh no, something went wrong!