]> Elliptic Curves - Computing the Tate Pairing

Computing the Tate Pairing

Suppose we are working on a curve E over 𝔽 q with security multiplier k such that E[l] is contained in E/𝔽 q k.

e(P,Q)=f P(𝒜 Q) (q k1 )/l

where 𝒜 Q is a divisor equivalent to (Q)(O). and (f P)=l(P)l(O). For a supersingular curve with k>1 , we may simplify this to e(P,Q)=f P(Q) (q k1 )/l provided PE/𝔽 q.

Miller’s Algorithm

Let g P,Q be the line between the points P and Q, and let f c be the function with divisor (f c)=c(P)(cP)(c1 )(O). Then for all a,b, we have f a+b(Q)=f a(Q)f b(Q)g aP,bP(Q)/g (a+b)P,(a+b)P(Q). Let the binary representation of l be l t,...,t 0 . Then Miller’s algorithm is the following:

  1. set f1 and VP

  2. for it1 to 0 do

    1. set ff 2 g V,V(Q)/g 2 V,2 V(Q) and V2 V

    2. if l i=1 then set f=fg V,P(Q)/g V+P,(V+P)(Q) and VV+P

At the end, f=f l(Q)=f P(Q)=e(P,Q), and V=lP.

Note on implementation: by adding extra logic in the above algorithm, one can avoid handling points of infinity when computing the g functions.

The g P,Q functions

Let the curve be Y=X 3 +aX+b.

  • Tangents: At the point (x,y), the line describing the tangent at that point is λX+Y+(y+λx), where λ=3 x 2 +a2 y.

  • Vertical lines: These are lines between P and P. Let P=(x,y). Then the vertical line through P is X+(x).

  • Other lines: The line between P=(x 1 ,y 1 ) and Q=(x 2 ,y 2 ) is given by λX+Y+(y 1 +λx 1 ) where λ=y 2 y 1 x 2 x 1 .

In implementations, it may be more efficient scale λ appropriately and do all the divisions at once.