> Square root is expensive
https://reddit.com/r/math/comments/tc7lur/computing_square_r...
https://reddit.com/r/math/comments/tc7lur/computing_square_r...
An example of a finite field is the numbers modulo a prime, like p = 2^127 - 1.
Now, please find the square root of x = 113338949109682836687814795709948365013 mod 2^127 - 1. That is, find some number y such that y * y mod (2^127 - 1) = x.
>>> x = 113338949109682836687814795709948365013
>>> n = 1
>>> y = 80490928931346377909947075573303248723 + 170141183460469231731687303715884105727 * n
>>> y**2 % (2**127 - 1) == x
True
EDIT: Looks like we got lucky here since 2^127 - 1 happens to be prime.Thanks!
> Anyway, the sqrt here is not in terms of a specific operation, but the asymptotic cost of a particular algorithm (as in, algorithm X takes sqrt N steps)
Yes, I am aware. I wanted to understand the side-tracked question anyway.