How to solve $x^y = a \mod{b}$

78 Views Asked by At

Given $x^{37} = a \mod{b}$ where $a$ is some large integer and $b$ is some large prime, how would you solve for $x$? In my case, I tried to reduce $x^{37}$ using Fermat's Little Theorem to reduce the power of $37$ but was unable to reduce it any further due to the size of $b$. I'm stuck in a corner now and can't seem to find my way out.

1

There are 1 best solutions below

0
On BEST ANSWER

To solve such power residue modulo a prime, there is many ways to go, such as,

first, it is to exhaust all possible residues$\pmod p$, which is applicable when $b$ is small.

then, you can try to find its primitive roots$\pmod p$, say $c$, then consider powers $(\lt \phi (p)=p-1)$ of $c^{37}$.

lastly, consider the generalisation of Shanks Algorithm