Suppose you know that gˣ = h inside some group of order n — a modular arithmetic group, an elliptic curve, or a similar algebraic structure. Finding x is the discrete logarithm problem. Calculating gˣ from x is fast; running it backwards, finding x from h, is believed to be hard.
How hard? Naive exhaustion checks , , , … until a match appears, taking up to n steps. For the group sizes used in modern cryptography — elements or more — that is astronomical.
In 1971 Daniel Shanks described a meet-in-the-middle strategy that reduces the cost to time and space. The insight is to write x = i·m + j, where m = ⌈√n⌉, and split the search: precompute gʲ for all small j (the baby steps), then march through for increasing i (the giant steps) and look for a collision in the precomputed table. One giant step jumps m positions at once, so only √n giant steps are ever needed.
The result is a proven exact algorithm: if a solution exists, baby-step giant-step finds it in group operations and space. The algorithm is complete — it never misses an answer. Its status is solved (Shanks, 1971): the complexity bound is tight and proven.
Comments
Loading comments...