What is the fastest method to solve a quadratic equation
ax2+bx+c=0(modpN)
where p is prime?
Answer
I'd start by multiplying by the inverse of a, to make your lead coefficient 1: x2+Bx+C≡0. Then you can complete the square, replacing your coefficient B with B−pN if that helps you see how to understand B2.
This will tell you what number has to be a quadratic residue, and you can work on finding its square root. For that, you probably want to find the square root mod p first, and then use Hensel's lifting lemma until you get to pN.
Does that answer your question, or do you need more details on any of those steps?
No comments:
Post a Comment