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.
Algorithm
To find y from a given value
it takes the following steps:
- find the modular square root of . This step is quite easy, irrespectively of how big N when is a prime.
- solve a quadratic equation associated with the modular square root of . Most of Kunerth's examples in his original paper solve this equation by having C be a integer square and thus setting z to zero.
- Expand out the following equation to obtain the quadratic
- One can always make sure that the quadratic can be solved by adjusting the modulus N in the above equation. Thus
- will ensure a quadratic of .
- One can then adjust F to make sure that is a square. For large moduli, such as , can have their square roots computed quickly via this method.
- The parameters of the polynomial expansion are quite flexible, in that can be done, for instance. It is quite easy to choose X and Y such that is a square. The modular square root of can be taken this way.
- Expand out the following equation to obtain the quadratic
- Having solved the associated quadratic equation we now have the variables w and set v = r (if C in the quadratic is a natural square).
- Solve for variables and the following equation:
- Obtain a value for X via factorization of the following polynomial:
- obtaining an answer like
- Obtain the modular square root by the equation. Remember to set X such that the term above is zero. Thus X would be 37/9 or -1/25.
Example
To obtain first obtain .
Then expand the polynomial:
into
Since, in this case the C term is a square, we take and compute (in general, ).
- Solve for and the following equation
- getting the solution and . (There may be other pairs of solutions to this equation.)
- Then factor the following polynomial:
- obtaining
- Then obtain the modular square root via
- Verify that
In the case that has no answer, then can be used instead.
See also
References
- Adolf Kunerth, "Sitzungsberichte. Academie Der Wissenschaften" vol 75 ,II, 1877, pp. 7-58
- Adolf Kunerth, "Sitzungsberichte. Academie Der Wissenschaften" vol 82, II, 1880, pp. 342-375
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.