14.4 THE BABY-STEP, GIANT-STEP ALGORITHM
The baby-step, giant-step algorithm (Shank's Algorithm) [Shanks, 1962] makes a time/memory tradeoff to solve the DLP in the cyclic group of order n.
Suppose q is a generator of and m = ; the exponent x of y = qx has a representation x = im + j where 0 ≤ i, j < m. Write yq−im = qj and construct a table of size O() whose entries (j, qj) are sorted according to the second term. The cost of the sort is O( log ) = O( log n) comparisons.
Proposition 14.4 (Shank's Baby-Step, Giant-Step Algorithm):
Initialization: Compute q−m and set γ = y.
For i = 0 to m − 1 ...
Get Computer Security and Cryptography now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.