Kunerth's algorithm is an algorithm for computing the modular square root of a given number.[1] [2] The algorithm does not require the factorization of the modulus, and relies on modular operations that is often easy when the given number is prime.
To find y from a given value
B=y2\bmod{N},
r\equiv\sqrt{\pmN}\pmod{B}
B
w2=A ⋅ z2+B ⋅ z+C
Expand out the following equation to obtain the quadratic
((B ⋅ z+r)2\pmN)/B=w2.
One can always make sure that the quadratic can be solved by adjusting the modulus N in the above equation. Thus
((B ⋅ z+r)2+(B ⋅ F+N))/B=w2
will ensure a quadratic of
A ⋅ z2+D ⋅ z+C+F
One can then adjust F to make sure that
C+F
\sqrt{67}\bmod{67F+RSA260}
The parameters of the polynomial expansion are quite flexible, in that
((67z+r)2+X ⋅ RSA260)/(67y)
(r2+X ⋅ RSA260)/(67y)
\sqrt{67y}\bmod{RSA260}
\alpha
\beta
\alpha=w(v+w\beta),
\alpha2 ⋅ x2+(2\alpha\beta-N)x+(\beta2-(y2\bmod{N}))
obtaining an answer like
(-37+9x)(1+25x)
y\equiv\alphaX+\beta\pmod{N}.
To obtain
\sqrt{41}\bmod{856},
\sqrt{-856}\equiv13\pmod{41}
Then expand the polynomial:
((41z+13)2+856)/41=w2
25+26z+41z2
w=5
v=13
v=41 ⋅ z+13
Solve for
\alpha
\beta
\alpha==w(v+w\beta)
getting the solution
\alpha=15
\beta=-2
Then factor the following polynomial:
\alpha2x2+(2\alpha\beta-856)x+(\beta2-41)
obtaining
(-37+9x)(1+25x)
Then obtain the modular square root via
15 ⋅ (37 ⋅ 9-1)+(-2)\equiv345\pmod{856}.
Verify that
3452\equiv41\pmod{856}.
In the case that
\sqrt{-856}\bmod{41}
r\equiv\sqrt{-856}\pmod{b ⋅ 856+41}