HOME

TheInfoList



OR:

Schoof's algorithm is an efficient algorithm to count points on
elliptic curve In mathematics, an elliptic curve is a smooth, projective, algebraic curve of genus one, on which there is a specified point . An elliptic curve is defined over a field and describes points in , the Cartesian product of with itself. If ...
s over
finite fields In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
. The algorithm has applications in
elliptic curve cryptography Elliptic-curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. ECC allows smaller keys compared to non-EC cryptography (based on plain Galois fields) to provide e ...
where it is important to know the number of points to judge the difficulty of solving the
discrete logarithm problem In mathematics, for given real numbers ''a'' and ''b'', the logarithm log''b'' ''a'' is a number ''x'' such that . Analogously, in any group ''G'', powers ''b'k'' can be defined for all integers ''k'', and the discrete logarithm log''b ...
in the
group A group is a number of persons or things that are located, gathered, or classed together. Groups of people * Cultural group, a group whose members share the same cultural identity * Ethnic group, a group whose members share the same ethnic ide ...
of points on an elliptic curve. 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 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 s ...
. Before Schoof's algorithm, approaches to counting points on elliptic curves such as the naive and
baby-step giant-step In group theory, a branch of mathematics, the baby-step giant-step is a meet-in-the-middle algorithm for computing the discrete logarithm or order of an element in a finite abelian group by Daniel Shanks. The discrete log problem is of fundamenta ...
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 E be an
elliptic curve In mathematics, an elliptic curve is a smooth, projective, algebraic curve of genus one, on which there is a specified point . An elliptic curve is defined over a field and describes points in , the Cartesian product of with itself. If ...
defined over the finite field \mathbb_, where q=p^n for p a prime and n an integer \geq 1. Over a field of characteristic \neq 2, 3 an elliptic curve can be given by a (short) Weierstrass equation : y^2 = x^3 + Ax + B with A,B\in \mathbb_. The set of points defined over \mathbb_ consists of the solutions (a,b)\in\mathbb_^2 satisfying the curve equation and a
point at infinity In geometry, a point at infinity or ideal point is an idealized limiting point at the "end" of each line. In the case of an affine plane (including the Euclidean plane), there is one ideal point for each pencil of parallel lines of the plane. A ...
O. Using the group law on elliptic curves restricted to this set one can see that this set E(\mathbb_) forms an
abelian group In mathematics, an abelian group, also called a commutative group, is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written. That is, the group operation is com ...
, with O acting as the zero element. In order to count points on an elliptic curve, we compute the cardinality of E(\mathbb_). Schoof's approach to computing the cardinality \# E(\mathbb_) makes use of
Hasse's theorem on elliptic curves Hasse's theorem on elliptic curves, also referred to as the Hasse bound, provides an estimate of the number of points on an elliptic curve over a finite field, bounding the value both above and below. If ''N'' is the number of points on the ellipt ...
along with the
Chinese remainder theorem 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 the ...
and division polynomials.


Hasse's theorem

Hasse's theorem states that if E/\mathbb_ is an elliptic curve over the finite field \mathbb_, then \# E(\mathbb_q) satisfies : \mid q + 1 - \# E(\mathbb_) \mid \leq 2\sqrt. This powerful result, given by Hasse in 1934, simplifies our problem by narrowing down \# E(\mathbb_) to a finite (albeit large) set of possibilities. Defining t to be q + 1 - \# E(\mathbb_), and making use of this result, we now have that computing the value of t modulo N where N > 4\sqrt, is sufficient for determining t, and thus \# E(\mathbb_). While there is no efficient way to compute t \pmod N directly for general N, it is possible to compute t \pmod l for l a small prime, rather efficiently. We choose S=\ to be a set of distinct primes such that \prod l_i = N > 4\sqrt. Given t \pmod for all l_i\in S, the
Chinese remainder theorem 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 the ...
allows us to compute t \pmod N. In order to compute t \pmod l for a prime l \neq p, we make use of the theory of the Frobenius endomorphism \phi and division polynomials. Note that considering primes l \neq p 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 q=p since there are more efficient, so called p adic algorithms for small-characteristic fields.


The Frobenius endomorphism

Given the elliptic curve E defined over \mathbb_ we consider points on E over \bar_, the
algebraic closure In mathematics, particularly abstract algebra, an algebraic closure of a field ''K'' is an algebraic extension of ''K'' that is algebraically closed. It is one of many closures in mathematics. Using Zorn's lemmaMcCarthy (1991) p.21Kaplansky ...
of \mathbb_; i.e. we allow points with coordinates in \bar_. The
Frobenius endomorphism In commutative algebra and field theory, the Frobenius endomorphism (after Ferdinand Georg Frobenius) is a special endomorphism of commutative rings with prime characteristic , an important class which includes finite fields. The endomorphi ...
of \bar_ over \mathbb_q extends to the elliptic curve by \phi : (x, y) \mapsto (x^, y^). This map is the identity on E(\mathbb_) and one can extend it to the point at infinity O, making it a group morphism from E(\bar) to itself. The Frobenius endomorphism satisfies a quadratic polynomial which is linked to the cardinality of E(\mathbb_) by the following theorem: Theorem: The Frobenius endomorphism given by \phi satisfies the characteristic equation : \phi ^2 - t\phi + q = 0, where t = q + 1 - \# E(\mathbb_q) Thus we have for all P=(x, y) \in E that (x^, y^ ) + q(x, y) = t(x^, y^), where + denotes addition on the elliptic curve and q(x,y) and t(x^,y^) denote scalar multiplication of (x,y) by q and of (x^,y^) by t. One could try to symbolically compute these points (x^, y^), (x^, y^) and q(x, y) as functions in the
coordinate ring In algebraic geometry, an affine variety, or affine algebraic variety, over an algebraically closed field is the zero-locus in the affine space of some finite family of polynomials of variables with coefficients in that generate a prime ide ...
\mathbb_ ,y(y^-x^-Ax-B) of E and then search for a value of t 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 l for various small primes l. Fixing an odd prime l, we now move on to solving the problem of determining t_, defined as t \pmod l, for a given prime l \neq 2, p. If a point (x, y) is in the l-
torsion subgroup In the theory of abelian groups, the torsion subgroup ''AT'' of an abelian group ''A'' is the subgroup of ''A'' consisting of all elements that have finite order (the torsion elements of ''A''). An abelian group ''A'' is called a torsion group (or ...
E \, then qP = \barP where \bar is the unique integer such that q \equiv \bar \pmod l and \mid \bar \mid< l/2. Note that \phi(O) = O and that for any integer r we have r\phi (P) = \phi (rP). Thus \phi (P) will have the same order as P. Thus for (x, y) belonging to E /math>, we also have t(x^, y^)= \bar(x^, y^) if t \equiv \bar \pmod l. Hence we have reduced our problem to solving the equation : (x^, y^) + \bar(x, y) \equiv \bar(x^, y^), where \bar and \bar have integer values in (l-1)/2,(l-1)/2/math>.


Computation modulo primes

The th division polynomial is such that its roots are precisely the coordinates of points of order . Thus, to restrict the computation of (x^, y^) + \bar(x, y) to the -torsion points means computing these expressions as functions in the coordinate ring of ''and'' modulo the th division polynomial. I.e. we are working in \mathbb_ ,y(y^-x^-Ax-B, \psi_). This means in particular that the degree of and defined via (X(x,y),Y(x,y)):=(x^, y^) + \bar(x, y) is at most 1 in and at most (l^2-3)/2 in . The scalar multiplication \bar(x, y) can be done either by double-and-add methods or by using the \barth division polynomial. The latter approach gives: : \bar (x,y) = (x_,y_) = \left( x - \frac , \frac \right) where \psi_ is the th division polynomial. Note that y_/y is a function in only and denote it by \theta(x). We must split the problem into two cases: the case in which (x^, y^) \neq \pm \bar(x, y), and the case in which (x^, y^) = \pm \bar(x, y). Note that these equalities are checked modulo \psi_l.


Case 1: (x^, y^) \neq \pm \bar(x, y)

By using the addition formula for the group E(\mathbb_) we obtain: : X(x,y) = \left( \frac \right) ^ - x^ - x_. Note that this computation fails in case the assumption of inequality was wrong. We are now able to use the -coordinate to narrow down the choice of \bar to two possibilities, namely the positive and negative case. Using the -coordinate one later determines which of the two cases holds. We first show that is a function in alone. Consider (y^ - y_)^=y^(y^-y_/y)^. Since q^-1 is even, by replacing y^ by x^3+Ax+B, we rewrite the expression as : (x^3+Ax+B)((x^3+Ax+B)^-\theta(x)) and have that : X(x)\equiv (x^3+Ax+B)((x^3+Ax+B)^-\theta(x))\bmod \psi_l(x). Here, it seems not right, we throw away x^-x_? Now if X \equiv x^ _ \bmod \psi_l(x) for one \bar\in ,(l-1)/2/math> then \bar satisfies : \phi ^(P) \mp \bar \phi(P) + \barP = O for all -torsion points . As mentioned earlier, using and y_^ we are now able to determine which of the two values of \bar (\bar or -\bar) works. This gives the value of t\equiv \bar\pmod l. Schoof's algorithm stores the values of \bar\pmod l in a variable t_l for each prime considered.


Case 2: (x^, y^) = \pm \bar(x, y)

We begin with the assumption that (x^, y^) = \bar(x, y). Since is an odd prime it cannot be that \bar(x, y)=-\bar(x, y) and thus \bar\neq 0. The characteristic equation yields that \bar \phi(P) = 2\bar P. And consequently that \bar^\bar \equiv (2q)^ \pmod l. This implies that is a square modulo . Let q \equiv w^ \pmod l. Compute w\phi(x,y) in \mathbb_ ,y(y^-x^-Ax-B, \psi_) and check whether \bar(x, y)=w\phi(x,y). If so, t_ is \pm 2w \pmod l depending on the y-coordinate. If turns out not to be a square modulo or if the equation does not hold for any of and -w, our assumption that (x^, y^) = +\bar(x, y) is false, thus (x^, y^) = - \bar(x, y). The characteristic equation gives t_l=0.


Additional case l = 2

If you recall, our initial considerations omit the case of l = 2. Since we assume to be odd, q + 1 - t \equiv t \pmod 2 and in particular, t_ \equiv 0 \pmod 2 if and only if E(\mathbb_) has an element of order 2. By definition of addition in the group, any element of order 2 must be of the form (x_, 0). Thus t_ \equiv 0 \pmod 2 if and only if the polynomial x^ + Ax + B has a root in \mathbb_, if and only if \gcd(x^-x, x^ + Ax + B)\neq 1.


The algorithm

Input: 1. An elliptic curve E = y^-x^-Ax-B. 2. An integer for a finite field F_q with q=p^, b \ge 1. Output: The number of points of over F_q. Choose a set of odd primes not containing . All computations in the loop below are performed else else if is a square modulo then else else Use the
Chinese Remainder Theorem 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 the ...
to compute modulo from the equations t \equiv t_ \pmod l, where l \in S. Output q+1-t.


Complexity

Most of the computation is taken by the evaluation of \phi(P) and \phi^(P), for each prime l, that is computing x^q, y^q, x^, y^ for each prime l. This involves exponentiation in the ring R = \mathbb_
, y The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
(y^2-x^3-Ax-B, \psi_l) and requires O(\log q) multiplications. Since the degree of \psi_l is \frac, each element in the ring is a polynomial of degree O(l^2). By the prime number theorem, there are around O(\log q) primes of size O(\log q), giving that l is O(\log q) and we obtain that O(l^2) = O(\log^2q). Thus each multiplication in the ring R requires O(\log^4 q) multiplications in \mathbb_ which in turn requires O(\log^2 q) bit operations. In total, the number of bit operations for each prime l is O(\log^7 q). Given that this computation needs to be carried out for each of the O(\log q) primes, the total complexity of Schoof's algorithm turns out to be O(\log^8 q). Using fast polynomial and integer arithmetic reduces this to \tilde(\log^5 q).


Improvements to Schoof's algorithm

In the 1990s,
Noam Elkies Noam David Elkies (born August 25, 1966) is a professor of mathematics at Harvard University. At the age of 26, he became the youngest professor to receive tenure at Harvard. He is also a pianist, chess national master and a chess composer. Ea ...
, followed by
A. O. L. Atkin Arthur Oliver Lonsdale Atkin (31 July 1925 – 28 December 2008), who published under the name A. O. L. Atkin, was a British mathematician. As an undergraduate during World War II, Atkin worked at Bletchley Park cracking German codes. He re ...
, devised improvements to Schoof's basic algorithm by restricting the set of primes S = \ considered before to primes of a certain kind. These came to be called Elkies primes and Atkin primes respectively. A prime l is called an Elkies prime if the characteristic equation: \phi^2-t\phi+ q = 0 splits over \mathbb_l, 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 In mathematics, a modular form is a (complex) analytic function on the upper half-plane satisfying a certain kind of functional equation with respect to the group action of the modular group, and also satisfying a growth condition. The theory of ...
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: O(l) rather than O(l^2). For efficient implementation, probabilistic root-finding algorithms are used, which makes this a
Las Vegas algorithm In computing, a Las Vegas algorithm is a randomized algorithm that always gives correct results; that is, it always produces the correct result or it informs about the failure. However, the runtime of a Las Vegas algorithm differs depending on the ...
rather than a deterministic algorithm. Under the heuristic assumption that approximately half of the primes up to an O(\log q) bound are Elkies primes, this yields an algorithm that is more efficient than Schoof's, with an expected running time of O(\log^6 q) using naive arithmetic, and \tilde(\log^4 q) 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 tp://ftp.computing.dcu.ie/pub/crypto/ source code The implementations are free (no terms, no conditions), and make use of th
MIRACL
library which is distributed under the
AGPLv3 The GNU Affero General Public License (GNU AGPL) is a free, copyleft license published by the Free Software Foundation in November 2007, and based on the GNU General Public License, version 3 and the Affero General Public License. The Free Sof ...
. * Schoof's algorithm tp://ftp.computing.dcu.ie/pub/crypto/schoof.cpp implementationfor E(\mathbb_p) with prime p. * Schoof's algorithm tp://ftp.computing.dcu.ie/pub/crypto/schoof2.cpp implementationfor E(\mathbb_).


See also

*
Elliptic curve cryptography Elliptic-curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. ECC allows smaller keys compared to non-EC cryptography (based on plain Galois fields) to provide e ...
*
Counting points on elliptic curves 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 s ...
* Division Polynomials *
Frobenius endomorphism In commutative algebra and field theory, the Frobenius endomorphism (after Ferdinand Georg Frobenius) is a special endomorphism of commutative rings with prime characteristic , an important class which includes finite fields. The endomorphi ...


References

* R. Schoof: Elliptic Curves over Finite Fields and the Computation of Square Roots mod p. Math. Comp., 44(170):483–494, 1985. Available at http://www.mat.uniroma2.it/~schoof/ctpts.pdf * R. Schoof: Counting Points on Elliptic Curves over Finite Fields. J. Theor. Nombres Bordeaux 7:219–254, 1995. Available at http://www.mat.uniroma2.it/~schoof/ctg.pdf * G. Musiker: Schoof's Algorithm for Counting Points on E(\mathbb_). Available at http://www.math.umn.edu/~musiker/schoof.pdf * V. Müller : Die Berechnung der Punktanzahl von elliptischen kurven über endlichen Primkörpern. Master's Thesis. Universität des Saarlandes, Saarbrücken, 1991. Available at http://lecturer.ukdw.ac.id/vmueller/publications.php * A. Enge: Elliptic Curves and their Applications to Cryptography: An Introduction. Kluwer Academic Publishers, Dordrecht, 1999. * L. C. Washington: Elliptic Curves: Number Theory and Cryptography. Chapman & Hall/CRC, New York, 2003. * N. Koblitz: A Course in Number Theory and Cryptography, Graduate Texts in Math. No. 114, Springer-Verlag, 1987. Second edition, 1994 {{Algebraic curves navbox Asymmetric-key algorithms Elliptic curve cryptography Elliptic curves Group theory Finite fields Number theory