BSGS
https://en.wikipedia.org/wiki/Discrete_logarithm
https://en.wikipedia.org/wiki/Baby-step_giant-step
BSGS
≡