Purpose: Solve a discrete logarithm when is known to lie in a bounded interval , in time and space. Also called the lambda method.
The Metaphor
Two kangaroos hop through the group, taking pseudo-random jump sizes determined only by their current position:
- the tame kangaroo starts at a known exponent (the top of the interval) and hops forward, laying a trap at its final position;
- the wild kangaroo starts at the unknown and hops with the same rule.
Because the jump function depends only on the group element, once the wild kangaroo lands on any point the tame one visited, their paths merge β the βΞ»β shape that names the method. Detecting the collision recovers .
Algorithm
- Choose a jump set (powers of 2 work well) with mean , and a hash jump index.
- Tame walk: start at , . Repeat times: , . Record the trap .
- Wild walk: start at , . Hop with the same rule. If , then
- If exceeds without a collision, restart with a different jump set.
Complexity
- Time: group operations
- Space: β this is the point. Baby-step giant-step is also time but needs memory.
Kangaroo vs Rho vs BSGS
| Method | Time | Space | Best for |
|---|---|---|---|
| Baby-step giant-step | small , when memory is free | ||
| Pollardβs rho for DLP | anywhere in the group | ||
| Kangaroo (lambda) | in a known interval |
When the interval is much smaller than the group, kangaroo is the clear winner β it pays for the interval width, not the group size.
Why It Works
Both walks are deterministic functions of the current group element, so once two walks coincide at any point they coincide forever. The tame walk covers about points ahead of ; the wild walk starts at most behind and takes steps of mean size , so it lands inside the tame walkβs footprint with constant probability by the birthday argument. Expected total hops is .
Variants / Use Cases
- Parallel / distinguished points (van Oorschot-Wiener) β run many kangaroos, record only points whose hash has trailing zeros; gives near-linear speedup across machines and is how large ECDLP records are set
- Pollardβs rho β the same random-walk idea applied to factorisation
- Pohlig-Hellman β use first if the group order is smooth; kangaroo then handles each large prime factor
- Discrete Logarithm β the topic page
- Bitcoin puzzle challenges β the best known public use of large-scale kangaroo searches