Skip to main content

Square Roots Modulo p

  • Conference paper
  • First Online:
LATIN 2002: Theoretical Informatics (LATIN 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2286))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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

    Article  MathSciNet  Google Scholar 

  2. Bernstein, D.J.: Faster square roots in annoying finite fields, draft. Available from http://cr.yp.to/papers.html (2001)

  3. Cipolla, M.: Un metodo per la risoluzione della congruenza di secondo grado. Rend. Accad. Sci. Fis. Mat. Napoli 9 (1903) 154–163

    MATH  Google Scholar 

  4. 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

    Article  MathSciNet  Google Scholar 

  5. 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

    Google Scholar 

  6. 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

    MathSciNet  MATH  Google Scholar 

  7. 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

    MathSciNet  MATH  Google Scholar 

  8. 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

    Google Scholar 

  9. Tonelli, A.: Bemerkung Ă¼ber die Auflösung quadratischer Congruenzen. Göttinger Nachrichten (1891) 344–346

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics