I'm solving an algorithm problem and it boils down to solving the congruency $$dp \equiv s \mod N$$ for the smalest value of $d$. Is there a way I can use number theory to solve this?
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.
Here's how it works:
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Your congruence will have a solution if and only if $\gcd(p,\ N)=g| s$ and there will be $g$ solutions modulo $N$.