The Baby-Step-Giant-Step algorithm is an algorithm introduced by Dan Shanks in 1969, which can be applied to solve the discrete logarithm problem in a cyclic group. Let G be a cyclic group with n elements, and let a 2 G be a generator of the group. It means that. = {a, a2, . . . , an = e}.