hermann on Thu, 23 Nov 2023 13:52:23 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Kunerth's algorithm (determine modular square root of a number) |
In thread "sqrt(x,n) for non-prime n?" ... https://pari.math.u-bordeaux.fr/archives/pari-users-2311/msg00035.htmlBill showed how PARI/GP issquare() computes modular square root for non-prime modulus:
? issquare(Mod(-1,125),&s) %1 = 1 ? s^2 %2 = Mod(124, 125) ? Kunerth's algorithm is described here: https://en.wikipedia.org/wiki/Kunerth%27s_algorithmAurel stated that being able to compute square root mod n allows to factor n.
So Kunerth's algorithm (from 1878) might be wrong. On the other hand several examples on Wiki page and talk pages worked.Yesterday I searched for the original two Kunerth articles from reference 1 of Wiki page.
I was surprised to find a hit on amazon: https://www.amazon.com/Kunerths-Modular-Square-Algorithm-Explained-ebook/dp/B09K3TCQR1/ref=sr_1_1I invested 1$ for 47 (small) pages ebook on Kunerth's algorihm, that can be read with browser.
The ebook contains many examples computed with Mathematica.I use Mathematica sometimes for stuff that I don't know how to do with PARI/GP,
like FindInstance for getting solutions to non-trivial equations.Like the ebook author I do that on Raspberry Pi computer, because Mathematica is
free to use there.Later Bill helped me to get German language pages 327-346 from 1878 in this comment:
https://math.stackexchange.com/questions/95443/how-to-compute-modular-square-roots-when-modulus-is-non-prime#comment9832085_252186I am German, so reading is not a problem (Kunerth was an Austrian scientist). Some funny words are used, mathematical language changed a bit in last 145 years ;-)
Regards, Hermann.