When can baby-step giant-step algorithm not be used to solve a DLP?

112 Views Asked by At

I'm trying to understand when there is a solution to the general DLP: given a, b, and n find x such that a^x == b (mod n). General in the sense that n can be any positive integer.

One algorithm is the baby-step giant-step algorithm. However this requires the calculation of a^-m which does not always exist.

My questions are:

  1. Under what conditions on a, b and n can BSGS be used?
  2. Are there sub-linear time algorithms that solve DLP under more general conditions?