Efficient Algorithms for Computing the Jacobi Symbol

We present two new algorithms for computing the Jacobi Symbol: the right-shift and left-shiftk-ary algorithms. For inputs of at mostnbits in length, both algorithms takeO(n2/logn) time andO(n) space. This is asymptotically faster than the traditional algorithm, which is based in Euclid's algorithm for computing greatest common divisors. In practice, we found our new algorithms to be about twice as fast for inputs of 100 to 1000 decimal digits in length. We also present parallel versions of both algorithms for the CRCW PRAM. One version takesO?(n/ loglogn) time usingO(n1+?) processors, giving the first sublinear parallel algorithms for this problem. The other version takes polylog time using a subexponential number of processors.

[1]  N. Koblitz A Course in Number Theory and Cryptography , 1987 .

[2]  Jeffrey Shallit,et al.  A binary algorithm for the Jacobi symbol , 1993, SIGS.

[3]  Jonathan P. Sorenson,et al.  Efficient Algorithms for Computing the Jacobi Symbol , 1996, ANTS.

[4]  Volker Strassen,et al.  A Fast Monte-Carlo Test for Primality , 1977, SIAM J. Comput..

[5]  Renate Scheidler,et al.  A public-key cryptosystem utilizing cyclotomic fields , 1995, Des. Codes Cryptogr..

[6]  Jeffrey Shallit,et al.  On the Worst Case of Three Algorithms for Computing the Jacobi Symbol , 1990, J. Symb. Comput..

[7]  Michael Rosen,et al.  A classical introduction to modern number theory , 1982, Graduate texts in mathematics.

[8]  E. Wright,et al.  An Introduction to the Theory of Numbers , 1939 .

[9]  John H. Reif,et al.  Synthesis of Parallel Algorithms , 1993 .

[10]  Eric Bach,et al.  Realistic analysis of some randomized algorithms , 1987, J. Comput. Syst. Sci..

[11]  Hugh C. Williams,et al.  An M³ Public-Key Encryption Scheme , 1985, CRYPTO.

[12]  Jonathan P. Sorenson,et al.  An analysis of Lehmer's Euclidean GCD algorithm , 1995, ISSAC '95.

[13]  Kevin S. Mccurley,et al.  Odds and ends from cryptology and computational number theory , 1990 .

[14]  Faith Ellen,et al.  The parallel complexity of exponentiating polynomials over finite fields , 1985, STOC '85.

[15]  N. Ankeny The least quadratic non residue , 1952 .

[16]  E. Bach Explicit bounds for primality testing and related problems , 1990 .

[17]  Hugh C. Williams,et al.  A modification of the RSA public-key encryption procedure (Corresp.) , 1980, IEEE Trans. Inf. Theory.

[18]  Eric Bach A note on square roots in finite fields , 1990, IEEE Trans. Inf. Theory.

[19]  M. Rabin,et al.  Randomized algorithms in number theory , 1985 .

[20]  Kireeti Kompella,et al.  Using smoothness to achieve parallelism , 1988, STOC '88.

[21]  Stephen R. Tate,et al.  Optimal size integer division circuits , 1989, STOC '89.

[22]  Stephen A. Cook,et al.  Log Depth Circuits for Division and Related Problems , 1984, SIAM J. Comput..

[23]  Kenneth Weber,et al.  The accelerated integer GCD algorithm , 1995, TOMS.

[24]  René C. Peralta,et al.  A simple and fast probabilistic algorithm for computing square roots modulo a prime number , 1986, IEEE Trans. Inf. Theory.

[25]  George E. Collins,et al.  The Jacobi symbol algorithm , 1982, SIGS.

[26]  Gary L. Miller,et al.  Sublinear Parallel Algorithm for Computing the Greatest Common Divisor of Two Integers , 1984, FOCS.

[27]  Jeffrey Shallit,et al.  Analysis of a left-shift binary GCD algorithm , 1994, ANTS.

[28]  Tudor Jebelean,et al.  A generalization of the binary GCD algorithm , 1993, ISSAC '93.

[29]  H. James Hoover,et al.  Limits to Parallel Computation: P-Completeness Theory , 1995 .

[30]  Richard M. Karp,et al.  Parallel Algorithms for Shared-Memory Machines , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[31]  Richard J. Lipton,et al.  Unbounded fan-in circuits and associative functions , 1983, J. Comput. Syst. Sci..

[32]  Richard Cole,et al.  Faster Optimal Parallel Prefix Sums and List Ranking , 2011, Inf. Comput..

[33]  J. Davenport Editor , 1960 .

[34]  R. Bellman,et al.  Proceedings of Symposia in Applied Mathematics. , 1961 .

[35]  Jonathan P. Sorenson Two Fast GCD Algorithms , 1994, J. Algorithms.