Given integer $p$ and $q$, where $gcd(p,q)=1$
and integer $r$ with realation: $$ (x\; \text{mod}\,p)\;\text{mod}\,q=r $$ How to find the solutions of $s$, which satisfy the relation below ? $$ (x\; \text{mod}\,q)\;\text{mod}\,p=s $$
This problem arise from the digital signature algortihm. If someone make a mistake on modulo order when calculate $r\equiv (\alpha^{K_E} \text{mod}\,p)\;\text{mod}\, q\ $, I want to know what is the effect on the result. I can find form the equations above, I can get $$ x= p\times a+q\times b+r$$ and $$ x= p\times a'+q \times b'+s $$ the two equation give me $$-r-s=p \times (a-a')+q\times(b-b') $$ It is a Diophantine equation with solution, but I stuck when to determine the range of the solution. For the same $x$ how to find the possible values of $s$? Thanks to amWhy for reminding me to add the details.