Buck–boost converter: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Ponydepression
 
No edit summary
Line 1: Line 1:
Hi there. Let me begin by introducing the writer, her title is Sophia. He is an purchase clerk and it's some thing he truly enjoy. She is really fond of caving but she doesn't have the time lately. Alaska is where I've usually been residing.<br><br>Feel free to visit my blog post ... love psychics ([http://help.ksu.edu.sa/node/65129 help.ksu.edu.sa])
'''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 (mathematics)|group]] 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]]. 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 <math>E</math> be an [[elliptic curve]] defined over the finite field <math>\mathbb{F}_q</math>, where <math>q=p^n</math> for <math>p</math> a prime and <math>n</math> an integer <math>\geq 1</math>. Over a field of characteristic <math>\neq 2, 3</math> an elliptic curve can be given by a (short) Weierstrass equation
: <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>\sharp E(\mathbb{F}_{q})</math> makes use of [[Hasse's theorem on elliptic curves]] along with the [[Chinese remainder theorem]] and [[division polynomials]].
 
==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>\sharp E(\mathbb{F}_q)</math> satisfies
 
: <math>
\mid q + 1 - \sharp E(\mathbb{F}_{q}) \mid \leq 2\sqrt{q}.
</math>
 
This powerful result, given by Hasse in 1934, simplifies our problem by narrowing down <math>\sharp E(\mathbb{F}_{q})</math> to a finite (albeit large) set of possibilities. Defining <math>t</math> to be <math>q + 1 - \sharp E(\mathbb{F}_{q})</math>, and making use of this result, we now have that computing the cardinality of <math>t</math> modulo <math>N</math> where <math>N > 4\sqrt{q}</math>, is sufficient for determining <math>t</math>, and thus <math>\sharp E(\mathbb{F}_{q})</math>. While there is no efficient way to compute <math>t \pmod N</math> directly for general <math>N</math>, it is possible to compute <math>t  \pmod l</math> for <math>l</math> a small prime, rather efficiently. We choose <math>S=\{l_1,l_2,...,l_r\}</math> to be a set of distinct primes such that <math>\prod l_i = N > 4\sqrt{q}</math>. Given <math>t \pmod l_i</math> for all <math>l_i\in S</math>, the [[Chinese remainder theorem]] allows us to compute <math>t \pmod N</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 characteristic fields.
 
==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>\overline{\mathbb{F}_{q}}</math>, the [[algebraic closure]] of <math>\mathbb{F}_{q}</math>; i.e. we allow points with coordinates in <math>\bar{\mathbb{F}}_{q}</math>. The [[Frobenius endomorphism]] of <math>\bar{\mathbb{F}}_{q}</math> over <math>\mathbb{F}_q</math> extends to the elliptic curve by <math> \phi : (x, y) \mapsto (x^{q}, y^{q})</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}})</math> to itself.
 
The Frobenius endomorphism satisfies a quadratic polynomial which is linked to the cardinality of <math>E(\mathbb{F}_{q})</math> by the following theorem:
 
'''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 - \sharp E(\mathbb{F}_q)  </math>
 
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>
denote scalar multiplication of <math>(x,y)</math> by <math>q</math> and of <math>(x^{q},y^{q})</math> by <math>t</math>.
 
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 the search for a value of <math>t</math> 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 <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>. 
Note that <math>\phi(O) = O</math> and that for any integer <math>r</math> we have <math>r\phi (P) = \phi (rP)</math>. Thus <math>\phi (P)</math> will have the same order as <math>P</math>. Thus for <math>(x, y)</math> belonging to <math>E[l]</math>, we also have <math>t(x^{q}, y^{q})= \bar{t}(x^{q}, y^{q})</math> if <math>t \equiv \bar{t}  \pmod l</math>. Hence we have reduced our problem to solving the equation
 
: <math>  (x^{q^{2}}, y^{q^{2}}) + \bar{q}(x, y) \equiv \bar{t}(x^{q}, y^{q}),</math>
 
where <math>\bar{t}</math> and <math>\bar{q}</math> have integer values in <math>[-(l-1)/2,(l-1)/2]</math>.
 
==Computation modulo primes==
The <math>l</math>th [[division polynomial]] is such that its roots are precisely the <math>x</math> coordinates of points of order <math>l</math>. Thus, to restrict the computation of <math>(x^{q^{2}}, y^{q^{2}}) + \bar{q}(x, y)</math> to the <math>l</math>-torsion points means computing these expressions as functions in the coordinate ring of <math>E</math> ''and'' modulo the <math>l</math>th division polynomial. I.e. we are working in <math>\mathbb{F}_{q}[x,y]/(y^{2}-x^{3}-Ax-B, \psi_{l})</math>. This means in particular that the degree of <math>X</math> and  <math>Y</math> defined via <math>(X(x,y),Y(x,y)):=(x^{q^{2}}, y^{q^{2}}) + \bar{q}(x, y)</math> is at most 1 in <math>y</math> and at most <math>(l^2-3)/2</math>
in <math>x</math>.
 
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:
 
: <math>
\bar{q} (x,y) = (x_{\bar{q}},y_{\bar{q}}) = \left( x - \frac {\psi_{\bar{q}-1} \psi_{\bar{q}+1}}{\psi^{2}_{\bar{q}}}, \frac{\psi_{2\bar{q}}}{2\psi^{4}_{\bar{q}}} \right)
</math>
 
where <math>\psi_{n}</math> is the <math>n</math>th division polynomial. Note that 
<math>y_{\bar{q}}/y</math> is a function in <math>x</math> only and denote it by <math>\theta(x)</math>.
 
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:
 
: <math>
X(x,y) = \left( \frac{y^{q^{2}} - y_{\bar{q}}}{x^{q^{2}} - x_{\bar{q}}} \right) ^{2} - x^{q^{2}} - x_{\bar{q}}.
</math>
Note that this computation fails in case the assumption of inequality was wrong.
 
We are now able to use the <math>x</math>-coordinate to narrow down the choice of <math>\bar{t}</math> to two possibilities, namely the positive and negative case. Using the <math>y</math>-coordinate one later determines which of the two cases holds.
 
We first show that <math>X</math> is a function in <math>x</math> alone. Consider <math>(y^{q^{2}} - y_{\bar{q}})^{2}=y^{2}(y^{q^{2}-1}-y_{\bar{q}}/y)^{2}</math>.
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))
</math>
 
and have that
 
: <math>
X(x)\equiv (x^3+Ax+B)((x^3+Ax+B)^{\frac{q^{2}-1}{2}}-\theta(x))\bmod \psi_l(x).
</math>
Now if <math>X \equiv x^{q} _ {\bar{t}}\bmod \psi_l(x)</math> for one <math>\bar{t}\in [0,(l-1)/2]</math> then <math>\bar{t}</math> satisfies
 
: <math>
\phi ^{2}(P) \mp \bar{t} \phi(P) + \bar{q}P = O
</math>
 
for all <math>l</math>-torsion points <math>P</math>.
 
As mentioned earlier, using <math>Y</math> and <math>y_{\bar{t}}^{q}</math> we are now able to determine which of the two values of <math>\bar{t}</math> (<math>\bar{t}</math> or <math>-\bar{t}</math>) works.  This gives the value of <math>t\equiv \bar{t}\pmod l</math>. Schoof's algorithm stores the values of <math>\bar{t}\pmod l</math> in a variable <math>t_l</math> for each prime <math>l</math> considered.
 
===Case 2  <math>(x^{q^{2}}, y^{q^{2}}) = \pm q(x, y)</math>===
We begin with the assumption that <math>(x^{q^{2}}, y^{q^{2}}) = \bar{q}(x, y)</math>. Since <math>l</math> is an odd prime it cannot be that <math>\bar{q}(x, y)=-\bar{q}(x, y)</math> and thus <math>\bar{t}\neq 0</math>. The characteristic equation yields that <math>\bar{t} \phi(P) = 2\bar{q} P</math>. And consequently that <math>\bar{t}^{2}\bar{q} \equiv (2q)^{2}  \pmod l</math>. 
This implies that <math>q</math> is a square modulo <math>l</math>. Let <math>q \equiv w^{2}  \pmod l</math>. Compute <math>w\phi(x,y)</math> in <math>\mathbb{F}_{q}[x,y]/(y^{2}-x^{3}-Ax-B, \psi_{l})</math> and check whether <math>
\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 <math>q</math> turns out not to be a square modulo <math>l</math> or if the equation does not hold for any of <math>w</math> and <math>-w</math>, our assumption that <math>(x^{q^{2}}, y^{q^{2}}) = +\bar{q}(x, y)</math> is false, thus <math>(x^{q^{2}}, y^{q^{2}}) = - \bar{q}(x, y)</math>. The characteristic equation gives <math>t_l=0</math>.
 
===Additional case <math>l = 2</math>===
If you recall, our initial considerations omit the case of <math>l = 2</math>.
Since we assume <math>q</math> to be odd, <math>q + 1 - t  \equiv  t \pmod  2</math> and in particular, <math>t_{2} \equiv 0  \pmod 2</math> if and only if <math>E(\mathbb{F}_{q})</math> has an element of order 2. By definition of addition in the group, any element of order 2 must be of the form <math>(x_{0}, 0)</math>. Thus <math>t_{2} \equiv 0  \pmod 2</math> if and only if the polynomial <math>x^{3} + Ax + B</math> has a root in <math>\mathbb{F}_{q}</math>, if and only if <math>\gcd(x^{q}-x, x^{3} + Ax + B)\neq 1</math>.
 
==The algorithm==
:(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) 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>.
:(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>
:(4) For <math>l \in S</math> do:
::(a) Let <math>\bar{q}</math> be the unique integer such that  <math>q \equiv \bar{q}  \pmod l</math> and <math>\mid \bar{q} \mid< l/2</math>.
::(b) Compute <math>(x^{q}, y^{q})</math>, <math>(x^{q^{2}}, y^{q^{2}})</math> and <math>(x_{\bar{q}},y_{\bar{q}})</math> . 
::(c) if <math>x^{q^{2}}\neq x_{\bar{q}}</math> then
:::(i) Compute <math>(X,Y) </math>.
:::(ii) For  <math>1\leq \bar{t} \leq (l-1)/2</math> do:
::::(iii) if  <math>X = x^{q} _ {\bar{t}}</math> then
:::::(iv) if  <math>Y = y^{q} _ {\bar{t}}</math> then <math>t_{l}=\bar{t}</math>; else <math>t_{l}=-\bar{t}</math>.
::(d) else if <math>q</math> is a square modulo <math>l</math> then
:::(i) compute <math>w</math> with <math>q\equiv w^{2} \pmod l</math>
:::(ii) compute <math>w(x^{q}, y^{q})</math>
:::(iii) if <math>w(x^{q}, y^{q})=(x^{q^{2}}, y^{q^{2}})</math> then <math>t_l=2w</math>
:::(iv) else if <math>w(x^{q}, y^{q})=(x^{q^{2}}, -y^{q^{2}})</math> then <math>t_l=-2w</math>
:::(v) else <math>t_{l}=0</math>
::(e) else <math>t_{l}=0</math>
:(5) Use the [[Chinese Remainder Theorem]] to compute <math>t</math> modulo <math>N</math>.
 
Note that since the set <math>S</math> was chosen so that <math>N>4\sqrt{q}</math>, by Hasse's theorem, we in fact know <math>t</math> and <math> \sharp E(\mathbb{F}_{q}) = q+1-t</math> precisely.
 
==Complexity==
Most of the computation is taken by the evaluation of <math>\phi(P)</math> and <math>\phi^{2}(P)</math>, for each prime <math>l</math>, that is computing <math>x^q</math>, <math>y^q</math>, <math>x^{q^2}</math>, <math>y^{q^2}</math> for each prime <math>l</math>. This involves exponentiation in the ring <math>R = \mathbb{F}_{q}[x, y]/ (y^2-x^3-Ax-B, \psi_l)</math> and requires <math>O(\log q)</math> multiplications. Since the degree of <math>\psi_l</math> is <math>\frac{l^2-1}{2}</math>, each element in the ring is a polynomial of degree <math>O(l^2)</math>. By the [[prime number theorem]], there are around <math>O(\log q)</math> primes of size <math>O(\log q)</math>, giving that <math>l</math> is <math>O(\log q)</math> and we obtain that <math>O(l^2) = O(\log^2q)</math>. Thus each multiplication in the ring <math>R</math> requires <math>O(\log^4 q)</math> multiplications in <math>\mathbb{F}_{q}</math> which in turn requires <math>O(\log^2 q)</math> bit operations. In total, the number of bit operations for each prime <math>l</math> is <math>O(\log^7 q)</math>. Given that this computation needs to be carried out for each of the <math>O(\log q)</math> primes, the total complexity of Schoof's algorithm turns out to be <math>O(\log^8 q)</math>. Using fast polynomial and integer arithmetic reduces this to <math>\tilde{O}(\log^5 q)</math>.
 
==Improvements to Schoof's algorithm==
 
{{main|Schoof–Elkies–Atkin 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 <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.  It should be noted that while this heuristic assumption is known to hold for most elliptic curves, it is not known to hold in every case, even under the [[Generalized Riemann Hypothesis|GRH]].
 
==Implementations==
Several algorithms were implemented in [[C++]] by Mike Scott and are available with [ftp://ftp.computing.dcu.ie/pub/crypto/ source code]. The implementations are free (no terms, no conditions), and make use of the [http://certivox.com/solutions/miracl-crypto-sdk MIRACL] library which is distributed under the [[AGPLv3]].
* Schoof's algorithm [ftp://ftp.computing.dcu.ie/pub/crypto/schoof.cpp implementation] for <math>E(\mathbb{F}_p)</math> with prime <math>p</math>.
* Schoof's algorithm [ftp://ftp.computing.dcu.ie/pub/crypto/schoof2.cpp implementation] for <math>E(\mathbb{F}_{2^m})</math>.
 
==See also==
* [[Elliptic curve cryptography]]
* [[Counting points on elliptic curves]]
* [[Division Polynomials]]
* [[Frobenius endomorphism]]
 
==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 <math>E(\mathbb{F}_{q})</math>. Available at http://www.math.umn.edu/~musiker/schoof.pdf
* A. Brown: Algorithms for Elliptic Curves over Finite Fields, EPFL – LMA. Available at http://algo.epfl.ch/handouts/en/andrew.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
 
{{Number-theoretic algorithms}}
 
[[Category:Asymmetric-key algorithms]]
[[Category:Elliptic curve cryptography]]
[[Category:Elliptic curves]]
[[Category:Group theory]]
[[Category:Finite fields]]
[[Category:Number theory]]

Revision as of 14:39, 26 October 2013

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.

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 E be an elliptic curve defined over the finite field 𝔽q, where q=pn for p a prime and n an integer 1. Over a field of characteristic 2,3 an elliptic curve can be given by a (short) Weierstrass equation

y2=x3+Ax+B

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

Hasse's theorem

Mining Engineer (Excluding Oil ) Truman from Alma, loves to spend time knotting, largest property developers in singapore developers in singapore and stamp collecting. Recently had a family visit to Urnes Stave Church. Hasse's theorem states that if E/𝔽q is an elliptic curve over the finite field 𝔽q, then E(𝔽q) satisfies

q+1E(𝔽q)2q.

This powerful result, given by Hasse in 1934, simplifies our problem by narrowing down E(𝔽q) to a finite (albeit large) set of possibilities. Defining t to be q+1E(𝔽q), and making use of this result, we now have that computing the cardinality of t modulo N where N>4q, is sufficient for determining t, and thus E(𝔽q). While there is no efficient way to compute t(modN) directly for general N, it is possible to compute t(modl) for l a small prime, rather efficiently. We choose S={l1,l2,...,lr} to be a set of distinct primes such that li=N>4q. Given t(modl)i for all liS, the Chinese remainder theorem allows us to compute t(modN).

In order to compute t(modl) for a prime lp, we make use of the theory of the Frobenius endomorphism ϕ and division polynomials. Note that considering primes lp 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 𝔽q we consider points on E over 𝔽q, the algebraic closure of 𝔽q; i.e. we allow points with coordinates in 𝔽¯q. The Frobenius endomorphism of 𝔽¯q over 𝔽q extends to the elliptic curve by ϕ:(x,y)(xq,yq).

This map is the identity on E(𝔽q) and one can extend it to the point at infinity O, making it a group morphism from E(𝔽q¯) to itself.

The Frobenius endomorphism satisfies a quadratic polynomial which is linked to the cardinality of E(𝔽q) by the following theorem:

Theorem: The Frobenius endomorphism given by ϕ satisfies the characteristic equation

ϕ2tϕ+q=0, where t=q+1E(𝔽q)

Thus we have for all P=(x,y)E that (xq2,yq2)+q(x,y)=t(xq,yq), where + denotes addition on the elliptic curve and q(x,y) and t(xq,yq) denote scalar multiplication of (x,y) by q and of (xq,yq) by t.

One could try to symbolically compute these points (xq2,yq2), (xq,yq) and q(x,y) as functions in the coordinate ring 𝔽q[x,y]/(y2x3AxB) of E and the 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 tl, defined as t(modl), for a given prime l2,p. If a point (x,y) is in the l-torsion subgroup E[l]={PE(𝔽q¯)lP=O}, then qP=q¯P where q¯ is the unique integer such that qq¯(modl) and q¯<l/2. Note that ϕ(O)=O and that for any integer r we have rϕ(P)=ϕ(rP). Thus ϕ(P) will have the same order as P. Thus for (x,y) belonging to E[l], we also have t(xq,yq)=t¯(xq,yq) if tt¯(modl). Hence we have reduced our problem to solving the equation

(xq2,yq2)+q¯(x,y)t¯(xq,yq),

where t¯ and q¯ have integer values in [(l1)/2,(l1)/2].

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 (xq2,yq2)+q¯(x,y) to the l-torsion points means computing these expressions as functions in the coordinate ring of E and modulo the lth division polynomial. I.e. we are working in 𝔽q[x,y]/(y2x3AxB,ψl). This means in particular that the degree of X and Y defined via (X(x,y),Y(x,y)):=(xq2,yq2)+q¯(x,y) is at most 1 in y and at most (l23)/2 in x.

The scalar multiplication q¯(x,y) can be done either by double-and-add methods or by using the q¯th division polynomial. The latter approach gives:

q¯(x,y)=(xq¯,yq¯)=(xψq¯1ψq¯+1ψq¯2,ψ2q¯2ψq¯4)

where ψn is the nth division polynomial. Note that yq¯/y is a function in x only and denote it by θ(x).

We must split the problem into two cases: the case in which (xq2,yq2)±q¯(x,y), and the case in which (xq2,yq2)=±q¯(x,y). Note that these equalities are checked modulo ψl.

Case 1 (xq2,yq2)±q¯(x,y)

By using the addition formula for the group E(𝔽q) we obtain:

X(x,y)=(yq2yq¯xq2xq¯)2xq2xq¯.

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 t¯ 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 (yq2yq¯)2=y2(yq21yq¯/y)2. Since q21 is even, by replacing y2 by x3+Ax+B, we rewrite the expression as

(x3+Ax+B)((x3+Ax+B)q212θ(x))

and have that

X(x)(x3+Ax+B)((x3+Ax+B)q212θ(x))modψl(x).

Now if Xxt¯qmodψl(x) for one t¯[0,(l1)/2] then t¯ satisfies

ϕ2(P)t¯ϕ(P)+q¯P=O

for all l-torsion points P.

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

Case 2 (xq2,yq2)=±q(x,y)

We begin with the assumption that (xq2,yq2)=q¯(x,y). Since l is an odd prime it cannot be that q¯(x,y)=q¯(x,y) and thus t¯0. The characteristic equation yields that t¯ϕ(P)=2q¯P. And consequently that t¯2q¯(2q)2(modl). This implies that q is a square modulo l. Let qw2(modl). Compute wϕ(x,y) in 𝔽q[x,y]/(y2x3AxB,ψl) and check whether q¯(x,y)=wϕ(x,y). If so, tl is ±2w(modl) 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 w, our assumption that (xq2,yq2)=+q¯(x,y) is false, thus (xq2,yq2)=q¯(x,y). The characteristic equation gives tl=0.

Additional case l=2

If you recall, our initial considerations omit the case of l=2. Since we assume q to be odd, q+1tt(mod2) and in particular, t20(mod2) if and only if E(𝔽q) has an element of order 2. By definition of addition in the group, any element of order 2 must be of the form (x0,0). Thus t20(mod2) if and only if the polynomial x3+Ax+B has a root in 𝔽q, if and only if gcd(xqx,x3+Ax+B)1.

The algorithm

(1) Choose a set of odd primes S not containing p such that N=lSl>4q.
(2) Put t2=0 if gcd(xqx,x3+Ax+B)1, else t2=1.
(3) Compute the division polynomial ψl. All computations in the loop below are performed in the ring 𝔽q[x,y]/(y2x3AxB,ψl).
(4) For lS do:
(a) Let q¯ be the unique integer such that qq¯(modl) and q¯<l/2.
(b) Compute (xq,yq), (xq2,yq2) and (xq¯,yq¯) .
(c) if xq2xq¯ then
(i) Compute (X,Y).
(ii) For 1t¯(l1)/2 do:
(iii) if X=xt¯q then
(iv) if Y=yt¯q then tl=t¯; else tl=t¯.
(d) else if q is a square modulo l then
(i) compute w with qw2(modl)
(ii) compute w(xq,yq)
(iii) if w(xq,yq)=(xq2,yq2) then tl=2w
(iv) else if w(xq,yq)=(xq2,yq2) then tl=2w
(v) else tl=0
(e) else tl=0
(5) Use the Chinese Remainder Theorem to compute t modulo N.

Note that since the set S was chosen so that N>4q, by Hasse's theorem, we in fact know t and E(𝔽q)=q+1t precisely.

Complexity

Most of the computation is taken by the evaluation of ϕ(P) and ϕ2(P), for each prime l, that is computing xq, yq, xq2, yq2 for each prime l. This involves exponentiation in the ring R=𝔽q[x,y]/(y2x3AxB,ψl) and requires O(logq) multiplications. Since the degree of ψl is l212, each element in the ring is a polynomial of degree O(l2). By the prime number theorem, there are around O(logq) primes of size O(logq), giving that l is O(logq) and we obtain that O(l2)=O(log2q). Thus each multiplication in the ring R requires O(log4q) multiplications in 𝔽q which in turn requires O(log2q) bit operations. In total, the number of bit operations for each prime l is O(log7q). Given that this computation needs to be carried out for each of the O(logq) primes, the total complexity of Schoof's algorithm turns out to be O(log8q). Using fast polynomial and integer arithmetic reduces this to O~(log5q).

Improvements to Schoof's algorithm

Mining Engineer (Excluding Oil ) Truman from Alma, loves to spend time knotting, largest property developers in singapore developers in singapore and stamp collecting. Recently had a family visit to Urnes Stave Church.

In the 1990s, Noam Elkies, followed by A. O. L. Atkin, devised improvements to Schoof's basic algorithm by restricting the set of primes S={l1,,ls} 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: ϕ2tϕ+q=0 splits over 𝔽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 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(l2). 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 O(logq) bound are Elkies primes, this yields an algorithm that is more efficient than Schoof's, with an expected running time of O(log6q) using naive arithmetic, and O~(log4q) using fast arithmetic. It should be noted that while 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

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(𝔽q). Available at http://www.math.umn.edu/~musiker/schoof.pdf
  • A. Brown: Algorithms for Elliptic Curves over Finite Fields, EPFL – LMA. Available at http://algo.epfl.ch/handouts/en/andrew.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

Template:Number-theoretic algorithms