Schoof's algorithm

Last updated

Schoof's algorithm is an efficient algorithm to count points on elliptic curves over finite fields. The algorithm has applications in elliptic curve cryptography where it is important to know the number of points to judge the difficulty of solving the discrete logarithm problem in the group of points on an elliptic curve.

Contents

The algorithm was published by René Schoof in 1985 and it was a theoretical breakthrough, as it was the first deterministic polynomial time algorithm for counting points on elliptic curves. Before Schoof's algorithm, approaches to counting points on elliptic curves such as the naive and baby-step giant-step algorithms were, for the most part, tedious and had an exponential running time.

This article explains Schoof's approach, laying emphasis on the mathematical ideas underlying the structure of the algorithm.

Introduction

Let be an elliptic curve defined over the finite field , where for a prime and an integer . Over a field of characteristic an elliptic curve can be given by a (short) Weierstrass equation

with . The set of points defined over consists of the solutions satisfying the curve equation and a point at infinity . Using the group law on elliptic curves restricted to this set one can see that this set forms an abelian group, with acting as the zero element. In order to count points on an elliptic curve, we compute the cardinality of . Schoof's approach to computing the cardinality makes use of Hasse's theorem on elliptic curves along with the Chinese remainder theorem and division polynomials.

Hasse's theorem

Hasse's theorem states that if is an elliptic curve over the finite field , then satisfies

This powerful result, given by Hasse in 1934, simplifies our problem by narrowing down to a finite (albeit large) set of possibilities. Defining to be , and making use of this result, we now have that computing the value of modulo where , is sufficient for determining , and thus . While there is no efficient way to compute directly for general , it is possible to compute for a small prime, rather efficiently. We choose to be a set of distinct primes such that . Given for all , the Chinese remainder theorem allows us to compute .

In order to compute for a prime , we make use of the theory of the Frobenius endomorphism and division polynomials. Note that considering primes is no loss since we can always pick a bigger prime to take its place to ensure the product is big enough. In any case Schoof's algorithm is most frequently used in addressing the case since there are more efficient, so called adic algorithms for small-characteristic fields.

The Frobenius endomorphism

Given the elliptic curve defined over we consider points on over , the algebraic closure of ; i.e. we allow points with coordinates in . The Frobenius endomorphism of over extends to the elliptic curve by .

This map is the identity on and one can extend it to the point at infinity , making it a group morphism from to itself.

The Frobenius endomorphism satisfies a quadratic polynomial which is linked to the cardinality of by the following theorem:

Theorem: The Frobenius endomorphism given by satisfies the characteristic equation

where

Thus we have for all that , where + denotes addition on the elliptic curve and and denote scalar multiplication of by and of by .

One could try to symbolically compute these points , and as functions in the coordinate ring of and then search for a value of which satisfies the equation. However, the degrees get very large and this approach is impractical.

Schoof's idea was to carry out this computation restricted to points of order for various small primes . Fixing an odd prime , we now move on to solving the problem of determining , defined as , for a given prime . If a point is in the -torsion subgroup , then where is the unique integer such that and . Note that and that for any integer we have . Thus will have the same order as . Thus for belonging to , we also have if . Hence we have reduced our problem to solving the equation

where and have integer values in .

Computation modulo primes

The lth division polynomial is such that its roots are precisely the x coordinates of points of order l. Thus, to restrict the computation of to the l-torsion points means computing these expressions as functions in the coordinate ring of Eand modulo the lth division polynomial. I.e. we are working in . This means in particular that the degree of X and Y defined via is at most 1 in y and at most in x.

The scalar multiplication can be done either by double-and-add methods or by using the th division polynomial. The latter approach gives:

where is the nth division polynomial. Note that is a function in x only and denote it by .

We must split the problem into two cases: the case in which , and the case in which . Note that these equalities are checked modulo .

Case 1:

By using the addition formula for the group we obtain:

Note that this computation fails in case the assumption of inequality was wrong.

We are now able to use the x-coordinate to narrow down the choice of to two possibilities, namely the positive and negative case. Using the y-coordinate one later determines which of the two cases holds.

We first show that X is a function in x alone. Consider . Since is even, by replacing by , we rewrite the expression as

and have that

Here, it seems not right, we throw away ?

Now if for one then satisfies

for all l-torsion points P.

As mentioned earlier, using Y and we are now able to determine which of the two values of ( or ) works. This gives the value of . Schoof's algorithm stores the values of in a variable for each prime l considered.

Case 2:

We begin with the assumption that . Since l is an odd prime it cannot be that and thus . The characteristic equation yields that . And consequently that . This implies that q is a square modulo l. Let . Compute in and check whether . If so, is depending on the y-coordinate.

If q turns out not to be a square modulo l or if the equation does not hold for any of w and , our assumption that is false, thus . The characteristic equation gives .

Additional case

If you recall, our initial considerations omit the case of . Since we assume q to be odd, and in particular, if and only if has an element of order 2. By definition of addition in the group, any element of order 2 must be of the form . Thus if and only if the polynomial has a root in , if and only if .

The algorithm

    Input:         1. An elliptic curve .         2. An integer q for a finite field  with .     Output:         The number of points of E over .     Choose a set of odd primes S not containing psuch that Putif, else.Compute the division polynomial .      All computations in the loop below are performed in the ring Fordo:Let be the unique integersuch that   and .Compute ,  and .ifthenCompute .fordo:ifthenifthen;else.else ifq is a square modulo lthencompute w with compute ifthenelse ifthenelseelse     Use the Chinese Remainder Theorem to compute t modulo N         from the equations , where .     Output .

Complexity

Most of the computation is taken by the evaluation of and , for each prime , that is computing , , , for each prime . This involves exponentiation in the ring and requires multiplications. Since the degree of is , each element in the ring is a polynomial of degree . By the prime number theorem, there are around primes of size , giving that is and we obtain that . Thus each multiplication in the ring requires multiplications in which in turn requires bit operations. In total, the number of bit operations for each prime is . Given that this computation needs to be carried out for each of the primes, the total complexity of Schoof's algorithm turns out to be . Using fast polynomial and integer arithmetic reduces this to .

Improvements to Schoof's algorithm

In the 1990s, Noam Elkies, followed by A. O. L. Atkin, devised improvements to Schoof's basic algorithm by restricting the set of primes considered before to primes of a certain kind. These came to be called Elkies primes and Atkin primes respectively. A prime is called an Elkies prime if the characteristic equation: splits over , while an Atkin prime is a prime that is not an Elkies prime. Atkin showed how to combine information obtained from the Atkin primes with the information obtained from Elkies primes to produce an efficient algorithm, which came to be known as the Schoof–Elkies–Atkin algorithm. The first problem to address is to determine whether a given prime is Elkies or Atkin. In order to do so, we make use of modular polynomials, which come from the study of modular forms and an interpretation of elliptic curves over the complex numbers as lattices. Once we have determined which case we are in, instead of using division polynomials, we are able to work with a polynomial that has lower degree than the corresponding division polynomial: rather than . For efficient implementation, probabilistic root-finding algorithms are used, which makes this a Las Vegas algorithm rather than a deterministic algorithm. Under the heuristic assumption that approximately half of the primes up to an bound are Elkies primes, this yields an algorithm that is more efficient than Schoof's, with an expected running time of using naive arithmetic, and using fast arithmetic. Although this heuristic assumption is known to hold for most elliptic curves, it is not known to hold in every case, even under the GRH.

Implementations

Several algorithms were implemented in C++ by Mike Scott and are available with source code. The implementations are free (no terms, no conditions), and make use of the MIRACL library which is distributed under the AGPLv3.

See also

Related Research Articles

<span class="mw-page-title-main">Chinese remainder theorem</span> Theorem for solving simultaneous congruences

In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer n by several integers, then one can determine uniquely the remainder of the division of n by the product of these integers, under the condition that the divisors are pairwise coprime.

Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor. It is one of the few known quantum algorithms with compelling potential applications and strong evidence of superpolynomial speedup compared to best known classical (non-quantum) algorithms. On the other hand, factoring numbers of practical significance requires far more qubits than available in the near future. Another concern is that noise in quantum circuits may undermine results, requiring additional qubits for quantum error correction.

In analytic number theory and related branches of mathematics, a complex-valued arithmetic function is a Dirichlet character of modulus if for all integers and :

  1. that is, is completely multiplicative.
  2. ; that is, is periodic with period .
<span class="mw-page-title-main">Trapdoor function</span> One-way cryptographic tool

In theoretical computer science and cryptography, a trapdoor function is a function that is easy to compute in one direction, yet difficult to compute in the opposite direction without special information, called the "trapdoor". Trapdoor functions are a special case of one-way functions and are widely used in public-key cryptography.

In mathematics, the Lucas–Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Édouard Lucas in 1878 and subsequently proved by Derrick Henry Lehmer in 1930.

The AKS primality test is a deterministic primality-proving algorithm created and published by Manindra Agrawal, Neeraj Kayal, and Nitin Saxena, computer scientists at the Indian Institute of Technology Kanpur, on August 6, 2002, in an article titled "PRIMES is in P". The algorithm was the first one which is able to determine in polynomial time, whether a given number is prime or composite and this without relying on mathematical conjectures such as the generalized Riemann hypothesis. The proof is also notable for not relying on the field of analysis. In 2006 the authors received both the Gödel Prize and Fulkerson Prize for their work.

The quadratic sieve algorithm (QS) is an integer factorization algorithm and, in practice, the second-fastest method known. It is still the fastest for integers under 100 decimal digits or so, and is considerably simpler than the number field sieve. It is a general-purpose factorization algorithm, meaning that its running time depends solely on the size of the integer to be factored, and not on special structure or properties. It was invented by Carl Pomerance in 1981 as an improvement to Schroeppel's linear sieve.

In computational number theory, the index calculus algorithm is a probabilistic algorithm for computing discrete logarithms. Dedicated to the discrete logarithm in where is a prime, index calculus leads to a family of algorithms adapted to finite fields and to some families of elliptic curves. The algorithm collects relations among the discrete logarithms of small primes, computes them by a linear algebra procedure and finally expresses the desired discrete logarithm with respect to the discrete logarithms of small primes.

In number theory, the law of quadratic reciprocity, like the Pythagorean theorem, has lent itself to an unusually large number of proofs. Several hundred proofs of the law of quadratic reciprocity have been published.

The Tonelli–Shanks algorithm is used in modular arithmetic to solve for r in a congruence of the form r2n, where p is a prime: that is, to find a square root of n modulo p.

The Schoof–Elkies–Atkin algorithm (SEA) is an algorithm used for finding the order of or calculating the number of points on an elliptic curve over a finite field. Its primary application is in elliptic curve cryptography. The algorithm is an extension of Schoof's algorithm by Noam Elkies and A. O. L. Atkin to significantly improve its efficiency.

In computational algebra, the Cantor–Zassenhaus algorithm is a method for factoring polynomials over finite fields.

The Benaloh Cryptosystem is an extension of the Goldwasser-Micali cryptosystem (GM) created in 1985 by Josh (Cohen) Benaloh. The main improvement of the Benaloh Cryptosystem over GM is that longer blocks of data can be encrypted at once, whereas in GM each bit is encrypted individually.

CEILIDH is a public key cryptosystem based on the discrete logarithm problem in algebraic torus. This idea was first introduced by Alice Silverberg and Karl Rubin in 2003; Silverberg named CEILIDH after her cat. The main advantage of the system is the reduced size of the keys for the same security over basic schemes.

An important aspect in the study of elliptic curves is devising effective ways of counting points on the curve. There have been several approaches to do so, and the algorithms devised have proved to be useful tools in the study of various fields such as number theory, and more recently in cryptography and Digital Signature Authentication. While in number theory they have important consequences in the solving of Diophantine equations, with respect to cryptography, they enable us to make effective use of the difficulty of the discrete logarithm problem (DLP) for the group , of elliptic curves over a finite field , where q = pk and p is a prime. The DLP, as it has come to be known, is a widely used approach to public key cryptography, and the difficulty in solving this problem determines the level of security of the cryptosystem. This article covers algorithms to count points on elliptic curves over fields of large characteristic, in particular p > 3. For curves over fields of small characteristic more efficient algorithms based on p-adic methods exist.

In mathematics the division polynomials provide a way to calculate multiples of points on elliptic curves and to study the fields generated by torsion points. They play a central role in the study of counting points on elliptic curves in Schoof's algorithm.

In mathematics the Function Field Sieve is one of the most efficient algorithms to solve the Discrete Logarithm Problem (DLP) in a finite field. It has heuristic subexponential complexity. Leonard Adleman developed it in 1994 and then elaborated it together with M. D. Huang in 1999. Previous work includes the work of D. Coppersmith about the DLP in fields of characteristic two.

In mathematics, elliptic curve primality testing techniques, or elliptic curve primality proving (ECPP), are among the quickest and most widely used methods in primality proving. It is an idea put forward by Shafi Goldwasser and Joe Kilian in 1986 and turned into an algorithm by A. O. L. Atkin the same year. The algorithm was altered and improved by several collaborators subsequently, and notably by Atkin and François Morain, in 1993. The concept of using elliptic curves in factorization had been developed by H. W. Lenstra in 1985, and the implications for its use in primality testing followed quickly.

In cryptography, FourQ is an elliptic curve developed by Microsoft Research. It is designed for key agreements schemes and digital signatures (Schnorr), and offers about 128 bits of security. It is equipped with a reference implementation made by the authors of the original paper. The open source implementation is called FourQlib and runs on Windows and Linux and is available for x86, x64, and ARM. It is licensed under the MIT License and the source code is available on GitHub.

<span class="mw-page-title-main">Berlekamp–Rabin algorithm</span> Method in number theory

In number theory, Berlekamp's root finding algorithm, also called the Berlekamp–Rabin algorithm, is the probabilistic method of finding roots of polynomials over the field with elements. The method was discovered by Elwyn Berlekamp in 1970 as an auxiliary to the algorithm for polynomial factorization over finite fields. The algorithm was later modified by Rabin for arbitrary finite fields in 1979. The method was also independently discovered before Berlekamp by other researchers.

References