2
$\begingroup$

I am stuck on this problem for quite a while now and wasn't able to find my answer in any of the other questions asked on this forum. Given a number 6504 and a modulus 17741 with its factors p=113 and q=157. I want to compute its 4 square roots. This is what I have so far:

I got 18 and -25 out of the extended euclidean algorithm. So I can calculate Wp and Wq

(wp)$W_{113}= 18*157=2826$
(wq)$w_{157}=-25* 113= -2825$

$b1=6504 = 63 \mod 113$
$b2=6504 \mod 157= 67$

$s1=7$ is largest odd factor in (113-1) and
$s2=39$ is largest odd factor in (157-1)

with the formula $b^{\large\frac{s+1}{2}}$ we can compute the roots in the subgroups:
$63^4 = 83 \mod 113$
$-63^4 = 30 \mod 113$
$67^{20} = 99 \mod 157$
$-67^{20} = 58 \mod 157$

So my subgroups are supposed to be (83,30) and (99,58) so now I can compute the roots: $wp*17+wq*58$
$wp*17+wq*99$
$wp*96+wq*58$
$wp*96+wq*99$

However these this doesn't result into valid roots. When I bruteforce the roots I find (17, 96) and (58, 99) so my first subgroup is incorrect, but my second is correct. Both of the factors are $1 \mod 4$. So my question is what am I doing wrong and how do I get the correct subgroup of (17,96).

Thank you in advance for your response.

0 Answers 0