Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have equation in form $a^x = p (\textrm{mod q})$, knowing $p, q, a$. I have to use Shank's algorithm (Baby-step giant-step).

I found some exercise and explanation on http://www.numbertheory.org/courses/MP313/lectures/lecture8/page4.gif and http://www.numbertheory.org/courses/MP313/lectures/lecture8/page5.jpg.

I do not understand a few things.

  • how to determine $Q$?
  • how can I get the table with Test $8\times 6^{-i}$?

Thanks for any advice and explanation.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.