Weil pairing and Miller's algorithm - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-24T18:10:56Z http://mathoverflow.net/feeds/question/68942 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/68942/weil-pairing-and-millers-algorithm Weil pairing and Miller's algorithm Jasiu 2011-06-27T15:50:26Z 2011-06-27T20:27:05Z <p>I'm studying Weil pairing and its applications in cryptography. I already know that it can be defined like this:</p> <p><code>$$w(P, Q) = (-1)^n\frac{f_P(Q)}{f_Q(P)}\frac{f_Q}{f_P}(\mathcal{O})$$</code></p> <p>where</p> <p><code>$\textrm{div}(f_P) = n(P) - n(\mathcal{O})$</code> and <code>$\textrm{div}(f_Q) = n(Q) - n(\mathcal{O})$</code>.</p> <p>This is not suitable for computation, so we shift the numerator by $R$ and the denominator by $S$ and we obtain:</p> <p><code>$$w(P, Q) = (-1)^n\frac{g_P(Q+S)}{g_Q(P+R)}\frac{g_Q(R)}{g_P(S)}$$</code></p> <p>where </p> <p><code>$\textrm{div}(g_P) = n(P+R) - n(\mathcal{R})$</code> and <code>$\textrm{div}(g_Q) = n(Q+S) - n(\mathcal{S})$</code>.</p> <p>Enter Miller's algorithm. In order to calculate $g_P(A)$ we define $h_k$ for $k = 0,\ldots,n$ as:</p> <p><code>$$\textrm{div}(h_k) = k(P+R) - k(R) - (kP) + \mathcal{O}$$</code></p> <p>Now, $h_n = g_P$ and we can calculate $h_{k+l}(A)$ from $h_k(A)$ and $h_l(A)$. So we construct a "double-and-add" algorithm similar to fast exponentiation.</p> <p>Although $g_P(A)$ is never zero or infinity (for $A = Q+S$ or $A = S$), it can happen that during the execution of "double-and-add" algorithm we can encounter some $h_k(A)$ equal to zero or infinity. The solution is to randomly select new $Q$ and $S$ and start over.</p> <p>How do I prove that there exist such $Q$ and $S$ that I will be able to calculate the Weil pairing of $P$ and $Q$?</p> <p>If possible, I'd like to see some simple argument that does not refer to algebraic geometry, as I don't know anything about it - I come from cryptography.</p> http://mathoverflow.net/questions/68942/weil-pairing-and-millers-algorithm/68955#68955 Answer by Joe Silverman for Weil pairing and Miller's algorithm Joe Silverman 2011-06-27T18:47:48Z 2011-06-27T18:47:48Z <p>I had thought that if suitably formulated, Miller's algorithm works without having to go back and recompute if some intermediate point turns out to be the point at infinity. Miller's algorithm is described in many books, but I'll point for example to the 2nd edition of my <em>Arithmetic of Elliptic Curves</em> (Springer GTM 106, 2009). The algorithm is described in Figure 11.6 on page 394, where note that the formula for $h_{P,Q}$ on that page depends on whether the relevant slope is finite or infinite. I'm not really an algorithms person, so there are likely to be ways to make the computation more efficient than what I described. And as a final note, there's an alternative way to compute the Weil and Tate pairings using elliptic divisibility sequences (nets) due to Kate Stange, The Tate pairing via elliptic nets, <em>Pairing-Based Cryptography -- PAIRING 2007</em>, Springer <strong>LNCS 4575</strong> (2007), 329-348 [http://eprint.iacr.org/2006/392].</p> <p>@Paul Garrett: Who is "Ed" Silverman?</p> http://mathoverflow.net/questions/68942/weil-pairing-and-millers-algorithm/68967#68967 Answer by Jasiu for Weil pairing and Miller's algorithm Jasiu 2011-06-27T20:27:05Z 2011-06-27T20:27:05Z <p>In order to calculate $h_{k+l}(A)$ from $h_k(A)$ and $h_l(B)$ you have to evaluate lines $l_1$ and $l_2$ at point $A$, where $l_1$ passes through $kP$ and $lP$ and $l_2$ is a vertical line through $(k+l)P$. The "double-and-add" algorithm takes $log_2(n)$ steps to compute $h_n(A)$, so only $O(log_2(n))$ points of form $mP$ are involved when determining lines $l_1$ and $l_2$ at various steps of the algorithm. There are certainly more points on an elliptic curve than that.</p>