The th
division polynomial is such that its roots are precisely the coordinates of points of order . Thus, to restrict the computation of (x^{q^{2}}, y^{q^{2}}) + \bar{q}(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{F}_{q}[x,y]/(y^{2}-x^{3}-Ax-B, \psi_{l}). This means in particular that the degree of and defined via (X(x,y),Y(x,y)):=(x^{q^{2}}, y^{q^{2}}) + \bar{q}(x, y) is at most 1 in and at most (l^2-3)/2 in . The scalar multiplication \bar{q}(x, y) can be done either by
double-and-add methods or by using the \bar{q}th division polynomial. The latter approach gives: : \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) where \psi_{n} is the th division polynomial. Note that y_{\bar{q}}/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^{q^{2}}, y^{q^{2}}) \neq \pm \bar{q}(x, y), and the case in which (x^{q^{2}}, y^{q^{2}}) = \pm \bar{q}(x, y). Note that these equalities are checked modulo \psi_l.
Case 1: (x^{q^{2}}, y^{q^{2}}) \neq \pm \bar{q}(x, y) By using the
addition formula for the group E(\mathbb{F}_{q}) we obtain: : 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}}. 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{t} 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^{q^{2}} - y_{\bar{q}})^{2}=y^{2}(y^{q^{2}-1}-y_{\bar{q}}/y)^{2}. Since q^{2}-1 is even, by replacing y^{2} by x^3+Ax+B, we rewrite the expression as : (x^3+Ax+B)((x^3+Ax+B)^{\frac{q^{2}-1}{2}}-\theta(x))^2 and have that : 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). Now if X \equiv x^{q} _ {\bar{t}}\bmod \psi_l(x) for some \bar{t}\in [0,(l-1)/2], then \bar{t} satisfies : \phi ^{2}(P) \mp \bar{t} \phi(P) + \bar{q}P = O for all -torsion points . As mentioned earlier, using and y_{\bar{t}}^{q} we are now able to determine which of the two values of \bar{t} (\bar{t} or -\bar{t}) works. This gives the value of t\equiv \bar{t}\pmod l. Schoof's algorithm stores the values of \bar{t}\pmod l in a variable t_l for each prime considered. ===Case 2: (x^{q^{2}}, y^{q^{2}}) = \pm \bar{q}(x, y)=== We begin with the assumption that (x^{q^{2}}, y^{q^{2}}) = \bar{q}(x, y). Since is an odd prime it cannot be that \bar{q}(x, y)=-\bar{q}(x, y) and thus \bar{t}\neq 0. The characteristic equation yields that \bar{t} \phi(P) = 2\bar{q} P. And consequently that \bar{t}^{2}\bar{q} \equiv (2q)^{2} \pmod l. This implies that is a square modulo . Let q \equiv w^{2} \pmod l. Compute w\phi(x,y) in \mathbb{F}_{q}[x,y]/(y^{2}-x^{3}-Ax-B, \psi_{l}) and check whether \bar{q}(x, y)=w\phi(x,y). If so, t_{l} 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^{q^{2}}, y^{q^{2}}) = +\bar{q}(x, y) is false, thus (x^{q^{2}}, y^{q^{2}}) = - \bar{q}(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_{2} \equiv 0 \pmod 2 if and only if E(\mathbb{F}_{q}) 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}, 0). Thus t_{2} \equiv 0 \pmod 2 if and only if the polynomial x^{3} + Ax + B has a root in \mathbb{F}_{q}, if and only if \gcd(x^{q}-x, x^{3} + Ax + B)\neq 1. ==The algorithm==