Abstract
The algorithm of Tonelli and Shanks for computing square roots modulo a prime number is the most used, and probably the fastest among the known algorithms when averaged over all prime numbers. However, for some particular prime numbers, there are other algorithms which are considerably faster.
In this paper we compare the algorithm of Tonelli and Shanks with an algorithm based in quadratic field extensions due to Cipolla, and give an explicit condition on a prime number to decide which algorithm is faster. Finally, we show that there exists an infinite sequence of prime numbers for which the algorithm of Tonelli and Shanks is asymptotically worse.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Barban, M.B., Linnik, Y.V., Tshudakov, N.G.: On prime numbers in an arithmetic progression with a prime-power difference. Acta Arith. 9 (1964) 375–390
Bernstein, D.J.: Faster square roots in annoying finite fields, draft. Available from http://cr.yp.to/papers.html (2001)
Cipolla, M.: Un metodo per la risoluzione della congruenza di secondo grado. Rend. Accad. Sci. Fis. Mat. Napoli 9 (1903) 154–163
Heath-Brown, D.R.: Zero-free regions for Dirichlet L-functions, and the least prime in an arithmetic progression. Proc. London Math. Soc. (3) 64 (1992) 265–338
Lindhurst, S.: An analysis of Shanks’s algorithm for computing square roots in finite fields. In: Number theory (Ottawa, ON, 1996). Amer. Math. Soc., Providence, RI (1999) 231–242
Linnik, U.V.: On the least prime in an arithmetic progression. I. The basic theorem. Rec. Math. [Mat. Sbornik] N.S. 15(57) (1944) 139–178
Linnik, U.V.: On the least prime in an arithmetic progression. II. The Deuring-Heilbronn phenomenon. Rec. Math. [Mat. Sbornik] N.S. 15(57) (1944) 347–368
Shanks, D.: Five number-theoretic algorithms. In: Proceedings of the Second Manitoba Conference on Numerical Mathematics (Univ. Manitoba, Winnipeg, Man., 1972). Utilitas Math., Winnipeg, Man. (1973) 51–70. Congressus Numerantium, No. VII
Tonelli, A.: Bemerkung Ă¼ber die Auflösung quadratischer Congruenzen. Göttinger Nachrichten (1891) 344–346
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
TornarĂa, G. (2002). Square Roots Modulo p . In: Rajsbaum, S. (eds) LATIN 2002: Theoretical Informatics. LATIN 2002. Lecture Notes in Computer Science, vol 2286. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45995-2_38
Download citation
DOI: https://doi.org/10.1007/3-540-45995-2_38
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43400-9
Online ISBN: 978-3-540-45995-8
eBook Packages: Springer Book Archive