Designs, Codes and Cryptography

, Volume 31, Issue 3, pp 301–312

On the Computation of Square Roots in Finite Fields

  • Siguna Müller


In this paper, two improvements for computing square roots in finite fields are presented. Firstly, we give a simple extension of a method by O. Atkin, which requires two exponentiations in FMq, when q≡9 mod 16. Our second method gives a major improvement to the Cipolla–Lehmer algorithm, which is both easier to implement and also much faster. While our method is independent of the power of 2 in q−1, its expected running time is equivalent to 1.33 as many multiplications as exponentiation via square and multiply. Several numerical examples are given that show the speed-up of the proposed methods, compared to the routines employed by Mathematica, Maple, respectively Magma.

finite fields square roots efficient computation complexity 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A. O. L. Atkin, Probabilistic primality testing, Summary by F. Morain, INRIA Res. Rep. 1779, (1992) pp. 159–163.Google Scholar
  2. 2.
    A. O. L. Atkin and F. Morain, Elliptic curves and primality proving, Math. Comp., Vol. 61 (1993) pp. 29–68.Google Scholar
  3. 3.
    E. Bach and K. Huber, Note on taking square-roots modulo N, IEEE Trans. Inf. Theory, Vol. 45, No. 2 (1999) pp. 807–809.Google Scholar
  4. 4.
    E. Bach and J. Shallit, Algorithmic Number Theory, Efficient Algorithms, Vol. 1, MIT Press Cambridge, MA (1996).Google Scholar
  5. 5.
    E. R. Berlekamp, Factoring polynomials over large finite fields, Math. Comp., Vol. 24 (1970) pp. 713–735.Google Scholar
  6. 6.
    D. Bressoud and S. Wagon, Computational Number Theory, Springer (2000).Google Scholar
  7. 7.
    M. Cipolla, Un metodo per la risolutione della congruenza di secondo grado, Rendiconto dell'Accademia Scienze Fisiche e Matematiche, Napoli, Ser. 3, Vol. IX (1903) pp. 154–163.Google Scholar
  8. 8.
    R. Crandall and C. Pomerance, Prime Numbers. A Computational Perspective, Springer (2001).Google Scholar
  9. 9.
    H. Dubner and W. Keller, Factors of generalized fermat numbers, Math. Comp., Vol. 64, No. 209 (1995) pp. 397–405.Google Scholar
  10. 10.
    D. Gordon, A survey of fast exponentiation methods, Journal of Algorithms, Vol. 27 (1998) pp. 129–146.Google Scholar
  11. 11.
    N. Koblitz, A Course in Number Theory and Cryptography, Springer, New York (1994).Google Scholar
  12. 12.
    D. H. Lehmer, Computer technology applied to the theory of numbers, In Studies in Number Theory, Prentice-Hall, Englewood Cliffs, NJ (1969) pp. 117–151.Google Scholar
  13. 13.
    S. Lindhurst, An analysis of Shanks's algorithm for computing square roots in finite fields, CRM Proceedings and Lecture Notes, Vol. 19 (1999) pp. 231–242.Google Scholar
  14. 14.
    A. Menezes, P. C. van Oorschot and S. Vanstone, Handbook of Applied Cryptography, CRC (1997).Google Scholar
  15. 15.
    S. M. Meyer and J. Sorenson, Efficient algorithms for computing the Jacobi symbol, Algorithmic Number Theory, ANTS II, Proceedings (ed. Henri Cohen), LNCS 1122 (1996) pp. 225–239.Google Scholar
  16. 16.
    S. Müller, On probable prime testing and the computation of square roots mod n, Algorithmic Number Theory, ANTS IV, Proceedings (ed. Wieb Bosma), LNCS 1838 (2000) pp. 423–437.Google Scholar
  17. 17.
    S. Müller, On the rank of appearance and the number of zeros of the Lucas sequences over Fq, Finite Fields and Applications (eds. H. Niederreiter and A. Enge), Springer (2001) pp. 390–408.Google Scholar
  18. 18.
    W. B. Müller and R. Nöbauer, Cryptanalysis of the Dickson-scheme, Advances in Cryptology, EUROCRYPT'85, 50–61, Springer, Berlin (1986).Google Scholar
  19. 19.
    C. Pomerance, Analysis and comparison of some integer factoring algorithms. In Computational Methods in Number Theory, Part I (eds. H. Lenstra Jr and R. Tijdeman), Vol. 154 of Math. Centre Tracts, Math. Centrum (1982) pp. 89–139.Google Scholar
  20. 20.
    M. O. Rabin, Probabilistic algorithms in finite fields, SIAM J. Comput., Vol. 9 (1980) pp. 273–280.Google Scholar
  21. 21.
    H. Postl, Fast evaluation of Dickson Polynomials, Contrib. to General Algebra, Vol. 6 (1988) pp. 223–225.Google Scholar
  22. 22.
    H. Riesel, Prime Numbers and Computer Methods for Factorization, Birkhäuser (1994).Google Scholar
  23. 23.
    R. Schoof, Elliptic curves over finite fields and the computation of square roots mod p, Math. Comp., Vol. 44, No. 170 (1985) pp. 483–494.Google Scholar
  24. 24.
    D. Shanks, Five number-theoretic algorithms, In Proc. 2nd Manitoba Conf. Numer. Math., Manitoba, Canada (1972) pp. 51–70.Google Scholar
  25. 25.
    A. Tonelli, Bemerkung über die Auflösung quadratischer Congruenzen, Göttinger Nachrichten (1891) pp. 344–346.Google Scholar
  26. 26.
    H. C. Williams, Édouard Lucas and Primality Testing, John Wiley & Sons (1998).Google Scholar

Copyright information

© Kluwer Academic Publishers 2004

Authors and Affiliations

  • Siguna Müller
    • 1
  1. 1.Department of Mathematics and StatisticsUniversity of CalgaryCalgaryCanada

Personalised recommendations