Counting Points On Elliptic Curves
   HOME

TheInfoList



OR:

An important aspect in the study of
elliptic curves 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 t ...
is devising effective ways of counting points on the curve. There have been several approaches to do so, and the
algorithms In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
devised have proved to be useful tools in the study of various fields such as
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and integer-valued functions. German mathematician Carl Friedrich Gauss (1777–1855) said, "Mat ...
, and more recently in
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
and Digital Signature Authentication (See
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 ...
and
elliptic curve DSA In cryptography, the Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital Signature Algorithm (DSA) which uses elliptic-curve cryptography. Key and signature-size As with elliptic-curve cryptography in general, the ...
). While in number theory they have important consequences in the solving of
Diophantine equations In mathematics, a Diophantine equation is an equation, typically a polynomial equation in two or more unknowns with integer coefficients, such that the only solutions of interest are the integer ones. A linear Diophantine equation equates to a c ...
, with respect to cryptography, they enable us to make effective use of the difficulty of 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' ...
(DLP) for the group E(\mathbb_q), of elliptic curves over a
finite field 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, subtr ...
\mathbb_q, where ''q'' = ''p''''k'' and ''p'' is a prime. The DLP, as it has come to be known, is a widely used approach to
public key cryptography Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic al ...
, 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.


Approaches to counting points on elliptic curves

There are several approaches to the problem. Beginning with the naive approach, we trace the developments up to Schoof's definitive work on the subject, while also listing the improvements to Schoof's algorithm made by Elkies (1990) and Atkin (1992). Several algorithms make use of the fact that groups of the form E(\mathbb_q) are subject to an important theorem due to Hasse, that bounds the number of points to be considered. Hasse's theorem states that if ''E'' is an elliptic curve over the finite field \mathbb_q, then the cardinality of E(\mathbb_q) satisfies : , , E(\mathbb_q), - (q+1), \leq 2 \sqrt. \,


Naive approach

The naive approach to counting points, which is the least sophisticated, involves running through all the elements of the field \mathbb_q and testing which ones satisfy the Weierstrass form of the elliptic curve : y^2 = x^3 + Ax + B. \,


Example

Let ''E'' be the curve ''y''2 = ''x''3 + ''x'' + 1 over \mathbb_5. To count points on ''E'', we make a list of the possible values of ''x'', then of the
quadratic residues In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that: :x^2\equiv q \pmod. Otherwise, ''q'' is called a quadratic non ...
of x mod 5 (for lookup purpose only), then of ''x''3 + ''x'' + 1 mod 5, then of ''y'' of ''x''3 + ''x'' + 1 mod 5. This yields the points on ''E''. E.g. the last row is computed as follows: If you insert x = 4 in the equation ''x''3 + ''x'' + 1 mod 5 you get 4 as result (3rd column). This result can be achieved if y = 2, 3 (
Quadratic residues In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that: :x^2\equiv q \pmod. Otherwise, ''q'' is called a quadratic non ...
can be looked up in the 2nd column). So the points for the last row are (4, 2), (4, 3). Therefore, E(\mathbb_5) has cardinality of 9: the 8 points listed before and the point at infinity. This algorithm requires running time ''O''(''q''), because all the values of x \in \mathbb_q must be considered.


Baby-step giant-step

An improvement in running time is obtained using a different approach: we pick an element P=(x,y) \in E(\mathbb_q) by selecting random values of x until x^3 + Ax +B is a square in \mathbb_q and then computing the square root of this value in order to get y. Hasse's theorem tells us that , E(\mathbb_q), lies in the interval (q +1 - 2 \sqrt, q + 1 + 2 \sqrt). Thus, by Lagrange's theorem, finding a unique M lying in this interval and satisfying MP=O, results in finding the cardinality of E(\mathbb_q). The algorithm fails if there exist two distinct integers M and M' in the interval such that MP = M'P = O. In such a case it usually suffices to repeat the algorithm with another randomly chosen point in E(\mathbb_q). Trying all values of M in order to find the one that satisfies MP=O takes around 4 \sqrt steps. However, by applying the
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 ...
algorithm to E(\mathbb_q), we are able to speed this up to around 4 \sqrt /math> steps. The algorithm is as follows.


The algorithm

1. choose m integer, m > \sqrt /math> 2. FOR DO 3. P_j \leftarrow jP 4. ENDFOR 5. L \leftarrow 1 6. Q \leftarrow (q+1)P 7. REPEAT compute the points Q + k(2mP) 8. UNTIL \exists j: Q + k(2mP) = \pm P_j \\the x-coordinates are compared 9. M \leftarrow q + 1 + 2mk \mp j \\note MP=O 10. Factor M. Let p_1, \ldots, p_r be the distinct prime factors of M. 11. WHILE i \leq r DO 12. IF \fracP=O 13. THEN M \leftarrow \frac 14. ELSE i \leftarrow i+1 15. ENDIF 16. ENDWHILE 17. L \leftarrow \operatorname(L, M) \\note M is the order of the point P 18. WHILE L divides more than one integer N in (q+1-2\sqrt,q+1+2\sqrt) 19. DO choose a new point P and go to 1. 20. ENDWHILE 21. RETURN N \\it is the cardinality of E(\mathbb_q)


Notes to the algorithm

* In line 8. we assume the existence of a match. Indeed, the following lemma assures that such a match exists: ::Let a be an integer with , a, \leq 2m^2. There exist integers a_0 and a_1 with :: -m < a_0 \leq m \mbox -m \leq a_1 \leq m \mbox a = a_0 + 2ma_1. * Computing (j+1)P once jP has been computed can be done by adding P to jP instead of computing the complete scalar multiplication anew. The complete computation thus requires m additions. 2mP can be obtained with one doubling from mP. The computation of Q requires \log (q+1) doublings and w additions, where w is the number of nonzero digits in the binary representation of q+1; note that knowledge of the jP and 2mP allows us to reduce the number of doublings. Finally, to get from Q+k(2mP) to Q+(k+1)(2mP), simply add 2mP rather than recomputing everything. * We are assuming that we can factor M. If not, we can at least find all the small prime factors p_i and check that \frac \neq O for these. Then M will be a good candidate for the order of P. * The conclusion of step 17 can be proved using elementary group theory: since MP=O, the order of P divides M. If no proper divisor \bar of M realizes \barP=O, then M is the order of P. One drawback of this method is that there is a need for too much memory when the group becomes large. In order to address this, it might be more efficient to store only the x coordinates of the points jP (along with the corresponding integer j). However, this leads to an extra scalar multiplication in order to choose between -j and +j. There are other generic algorithms for computing the order of a group element that are more space efficient, such as
Pollard's rho algorithm Pollard's rho algorithm is an algorithm for integer factorization. It was invented by John Pollard in 1975. It uses only a small amount of space, and its expected running time is proportional to the square root of the smallest prime factor of the ...
and the Pollard kangaroo method. The Pollard kangaroo method allows one to search for a solution in a prescribed interval, yielding a running time of O(\sqrt , using O(\log^2) space.


Schoof's algorithm

A theoretical breakthrough for the problem of computing the cardinality of groups of the type E(\mathbb_q) was achieved by René Schoof, who, in 1985, published the first deterministic polynomial time algorithm. Central to Schoof's algorithm are the use of division polynomials and Hasse's theorem, along with the Chinese remainder theorem. Schoof's insight exploits the fact that, by Hasse's theorem, there is a finite range of possible values for , E(\mathbb_q), . It suffices to compute , E(\mathbb_q), modulo an integer N > 4\sqrt. This is achieved by computing , E(\mathbb_q), modulo primes \ell_1, \ldots, \ell_s whose product exceeds 4 \sqrt, and then applying the Chinese remainder theorem. The key to the algorithm is using the division polynomial \psi_ to efficiently compute , E(\mathbb_q), modulo \ell. The running time of Schoof's Algorithm is polynomial in n=\log, with an asymptotic complexity of O(n^2M(n^3)/\log)=O(n^), where M(n) denotes the complexity of integer multiplication. Its space complexity is O(n^3).


Schoof–Elkies–Atkin 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. Ear ...
, 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 receiv ...
devised improvements to Schoof's basic algorithm by making a distinction among the primes \ell_1, \ldots, \ell_s that are used. A prime \ell is called an Elkies prime if the characteristic equation of the Frobenius endomorphism, \phi^2-t\phi+ q = 0, splits over \mathbb_\ell. Otherwise \ell is called an Atkin prime. Elkies primes are the key to improving the asymptotic complexity of Schoof's algorithm. Information obtained from the Atkin primes permits a further improvement which is asymptotically negligible but can be quite important in practice. The modification of Schoof's algorithm to use Elkies and Atkin primes is known as the Schoof–Elkies–Atkin (SEA) algorithm. The status of a particular prime \ell depends on the elliptic curve E/\mathbb_q, and can be determined using the modular polynomial \Psi_\ell(X,Y). If the univariate polynomial \Psi_\ell(X,j(E)) has a root in \mathbb_q, where j(E) denotes the
j-invariant In mathematics, Felix Klein's -invariant or function, regarded as a function of a complex variable , is a modular function of weight zero for defined on the upper half-plane of complex numbers. It is the unique such function which is hol ...
of E, then \ell is an Elkies prime, and otherwise it is an Atkin prime. In the Elkies case, further computations involving modular polynomials are used to obtain a proper factor of the division polynomial \psi_\ell. The degree of this factor is O(\ell), whereas \psi_\ell has degree O(\ell^2). Unlike Schoof's algorithm, the SEA algorithm is typically implemented as a
probabilistic algorithm A randomized algorithm is an algorithm that employs a degree of randomness as part of its logic or procedure. The algorithm typically uses uniformly random bits as an auxiliary input to guide its behavior, in the hope of achieving good performan ...
(of the
Las Vegas Las Vegas (; Spanish for "The Meadows"), often known simply as Vegas, is the 25th-most populous city in the United States, the most populous city in the state of Nevada, and the county seat of Clark County. The city anchors the Las Vegas ...
type), so that root-finding and other operations can be performed more efficiently. Its computational complexity is dominated by the cost of computing the modular polynomials \Psi_\ell(X,Y), but as these do not depend on E, they may be computed once and reused. Under the heuristic assumption that there are sufficiently many small Elkies primes, and excluding the cost of computing modular polynomials, the asymptotic running time of the SEA algorithm is O(n^2 M(n^2)/\log) = O(n^), where n=\log. Its space complexity is O(n^3\log), but when precomputed modular polynomials are used this increases to O(n^4).


See also

*
Schoof's algorithm 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 t ...
*
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 ...
*
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 ...
*
Public key cryptography Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic al ...
* Schoof–Elkies–Atkin algorithm * Pollard rho * Pollard kangaroo *
Elliptic curve primality proving 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 ...


Bibliography

* I. Blake, G. Seroussi, and N. Smart: ''Elliptic Curves in Cryptography'', Cambridge University Press, 1999. * A. Enge: ''Elliptic Curves and their Applications to Cryptography: An Introduction''. Kluwer Academic Publishers, Dordrecht, 1999. * G. Musiker: Schoof's Algorithm for Counting Points on E(\mathbb_q). Available at http://www.math.umn.edu/~musiker/schoof.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 * L. C. Washington: Elliptic Curves: Number Theory and Cryptography. Chapman \& Hall/CRC, New York, 2003.


References

{{Algebraic curves navbox Elliptic curves