Content deleted Content added
m Do general fixes and cleanup. - using AWB (9774) |
m revision for accuracy and clarity →Case 1: (x^{q^{2}}, y^{q^{2}}) \neq \pm \bar{q}(x, y) |
||
(45 intermediate revisions by 29 users not shown) | |||
Line 1:
{{Short description|Efficient algorithm to count points on elliptic curves}}
'''Schoof's algorithm''' is an efficient algorithm to count points on [[elliptic 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.
Line 6 ⟶ 7:
==Introduction==
Let <math>E</math> be an [[elliptic curve]] defined over the finite field <math>\mathbb{F}
: <math>
y^2 = x^3 + Ax + B
</math>
with <math>A,B\in \mathbb{F}_{q}</math>. The set of points defined over <math>\mathbb{F}_{q}</math> consists of the solutions <math>(a,b)\in\mathbb{F}_{q}^2</math> satisfying the curve equation and a [[point at infinity]] <math>O</math>. Using the [[Elliptic curve#The group law|group law]] on elliptic curves restricted to this set one can see that this set <math>E(\mathbb{F}_{q})</math> forms an [[abelian group]], with <math>O</math> acting as the zero element.
In order to count points on an elliptic curve, we compute the cardinality of <math>E(\mathbb{F}_{q})</math>.
Schoof's approach to computing the cardinality <math>\
==Hasse's theorem==
{{main|Hasse's theorem on elliptic curves}}
Hasse's theorem states that if <math>E/\mathbb{F}_{q}</math> is an elliptic curve over the finite field <math>\mathbb{F}_{q}</math>, then <math>\
: <math>
\mid q + 1 - \
</math>
This powerful result, given by Hasse in 1934, simplifies our problem by narrowing down <math>\
In order to compute <math>t \pmod l</math> for a prime <math>l \neq p</math>, we make use of the theory of the Frobenius endomorphism <math>\phi</math> and [[division polynomials]]. Note that considering primes <math>l \neq p</math> 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 <math>q=p</math> since there are more efficient, so called <math>p</math> adic algorithms for small
==The Frobenius endomorphism==
Given the elliptic curve <math>E</math> defined over <math>\mathbb{F}_{q}</math> we consider points on <math>E</math> over <math>\
This map is the identity on <math>E(\mathbb{F}_{q})</math> and one can extend it to the point at infinity <math>O</math>, making it a [[group morphism]] from <math>E(\bar{\mathbb{F}}_{q
The Frobenius endomorphism satisfies a quadratic polynomial which is linked to the cardinality of <math>E(\mathbb{F}_{q})</math> by the following theorem:
Line 35 ⟶ 36:
'''Theorem:''' The Frobenius endomorphism given by <math>\phi</math> satisfies the characteristic equation
: <math> \phi ^2 - t\phi + q = 0,</math> where <math> t = q + 1 - \
Thus we have for all <math>P=(x, y) \in E</math> that <math>(x^{q^{2}}, y^{q^{2}} ) + q(x, y) = t(x^{q}, y^{q})</math>, where + denotes addition on the elliptic curve and <math>q(x,y)</math> and <math>t(x^{q},y^{q})</math>
Line 41 ⟶ 42:
One could try to symbolically compute these points <math>(x^{q^{2}}, y^{q^{2}})</math>, <math>(x^{q}, y^{q})</math> and <math>q(x, y)</math> as functions in the [[Imaginary hyperelliptic curve#Coordinate ring|coordinate ring]] <math>\mathbb{F}_{q}[x,y]/(y^{2}-x^{3}-Ax-B)</math> of <math>E</math>
and
Schoof's idea was to carry out this computation restricted to points of order <math>l</math> for various small primes <math>l</math>.
Fixing an odd prime <math>l</math>, we now move on to solving the problem of determining <math>t_{l}</math>, defined as <math>t \pmod l</math>, for a given prime <math>l \neq 2, p</math>.
If a point <math>(x, y)</math> is in the <math>l</math>-[[torsion subgroup]] <math>E[l]=\{P\in E(\bar{\mathbb{F}_{q}}) \mid lP=O \}</math>, then <math>qP = \bar{q}P</math> where <math>\bar{q}</math> is the unique integer such that <math>q \equiv \bar{q} \pmod l</math> and <math>\mid \bar{q} \mid< l/2</math>.
Line 53 ⟶ 54:
==Computation modulo primes==
The
in
The scalar multiplication <math>\bar{q}(x, y)</math> can be done either by [[exponentiation by squaring|double-and-add]] methods or by using the <math>\bar{q}</math>th division polynomial. The latter approach gives:
Line 62 ⟶ 63:
</math>
where <math>\psi_{n}</math> is the
<math>y_{\bar{q}}/y</math> is a function in
We must split the problem into two cases: the case in which <math>(x^{q^{2}}, y^{q^{2}}) \neq \pm \bar{q}(x, y)</math>, and the case in which <math>(x^{q^{2}}, y^{q^{2}}) = \pm \bar{q}(x, y)</math>. Note that these equalities are checked modulo <math>\psi_l</math>.
===Case 1: <math>(x^{q^{2}}, y^{q^{2}}) \neq \pm \bar{q}(x, y)</math>===
By using the [[Elliptic curves#The group law|addition formula]] for the group <math>E(\mathbb{F}_{q})</math> we obtain:
Line 75 ⟶ 76:
Note that this computation fails in case the assumption of inequality was wrong.
We are now able to use the
We first show that
Since <math>q^{2}-1</math> is even, by replacing <math>y^{2}</math> by <math>x^3+Ax+B</math>, we rewrite the expression as
: <math>
(x^3+Ax+B)((x^3+Ax+B)^{\frac{q^{2}-1}{2}}-\theta(x))^2
</math>
Line 87 ⟶ 88:
: <math>
X(x)\equiv (x^3+Ax+B)\left(\frac{(x^3+Ax+B)^{\frac{q^{2}-1}{2}}-\theta(x)}{x^{q^2}-x_{\bar{q}}}\right)^2\bmod \psi_l(x).
</math>
Now if <math>X \equiv x^{q} _ {\bar{t}}\bmod \psi_l(x)</math> for
: <math>
Line 96 ⟶ 97:
</math>
for all
As mentioned earlier, using
===Case 2
We begin with the assumption that <math>(x^{q^{2}}, y^{q^{2}}) = \bar{q}(x, y)</math>. Since
This implies that
\bar{q}(x, y)=w\phi(x,y)</math>. If so, <math>t_{l}</math> is <math>\pm 2w \pmod l</math> depending on the y-coordinate.
If
===Additional case <math>l = 2</math>===
If you recall, our initial considerations omit the case of <math>l = 2</math>.
Since we assume
==The algorithm==
Input:
:(1) Choose a set of odd primes <math>S</math> not containing <math>p</math> such that <math>N=\prod_{l\in S} l > 4\sqrt{q}.</math> ▼
2. An integer {{mvar|q}} for a finite field <math>F_q</math> with <math>q=p^{b}, b \ge 1</math>.
:(3) Compute the division polynomial <math>\psi_l</math>. All computations in the loop below are performed in the ring <math>\mathbb{F}_{q}[x,y]/(y^{2}-x^{3}-Ax-B, \psi_{l}).</math>▼
Output:
The number of points of {{mvar|E}} over <math>F_q</math>.
▲
{{nowrap|'''Put''' <math>t_2=0</math> '''if''' <math>\gcd(x^{q}-x, x^{3} + Ax + B)\neq 1</math>, '''else''' <math>t_2=1</math>.}}
▲
:::(ii) For <math>1\leq \bar{t} \leq (l-1)/2</math> do:▼
:::(iii) if <math>w(x^{q}, y^{q})=(x^{q^{2}}, y^{q^{2}})</math> then <math>t_l=2w</math>▼
{{nowrap|'''if''' <math>Y = y^{q} _ {\bar{t}}</math> '''then'''}}
:::(v) else <math>t_{l}=0</math>▼
'''else'''
:(5) Use the [[Chinese Remainder Theorem]] to compute <math>t</math> modulo <math>N</math>.▼
{{nowrap|<math>t_{l}=-\bar{t}</math>.}}
'''else if''' {{mvar|q}} is a square modulo {{mvar|l}} '''then'''
{{nowrap|compute {{mvar|w}} with <math>q\equiv w^{2} \pmod l</math>}}
{{nowrap|compute <math>w(x^{q}, y^{q})</math>}}
{{nowrap|'''if''' <math>w(x^{q}, y^{q})=(x^{q^{2}}, y^{q^{2}})</math> '''then'''}}
{{nowrap|<math>t_l=2w</math>}}
▲
{{nowrap|<math>t_l=-2w</math>}}
'''else'''
{{nowrap|<math>t_{l}=0</math>}}
'''else'''
▲
from the equations <math>t \equiv t_{l} \pmod l</math>, where <math>l \in S</math>.
Output <math>q+1-t</math>.
==Complexity==
Line 142 ⟶ 156:
In the 1990s, [[Noam Elkies]], followed by [[A. O. L. Atkin]], devised improvements to Schoof's basic algorithm by restricting the set of primes <math>S = \{l_1, \ldots, l_s\}</math> considered before to primes of a certain kind. These came to be called Elkies primes and Atkin primes respectively. A prime <math>l</math> is called an Elkies prime if the characteristic equation: <math>\phi^2-t\phi+ q = 0</math> splits over <math>\mathbb{F}_l</math>, 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 curve#Elliptic curves over the complex numbers|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: <math>O(l)</math> rather than <math>O(l^2)</math>. 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 <math>O(\log q)</math> bound are Elkies primes, this yields an algorithm that is more efficient than Schoof's, with an expected running time of <math>O(\log^6 q)</math> using naive arithmetic, and <math>\tilde{O}(\log^4 q)</math> using fast arithmetic.
==Implementations==
Several algorithms were implemented in [[C++]] by Mike Scott
* Schoof's algorithm [
* Schoof's algorithm [
==See also==
Line 159 ⟶ 173:
* 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 <math>E(\mathbb{F}_{q})</math>. 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.
Line 166 ⟶ 179:
{{Number-theoretic algorithms}}
{{Algebraic curves navbox}}
[[Category:Asymmetric-key algorithms]]
|