Fast computation of Tate pairing on general divisors of genus3hyperelliptic curves∗Eunjeong Lee a,Hyang-Sook Lee b and Yoonjin Lee ca School of Computational Sciences,Korea Institute for Advanced Study,130-722,Seoul,Koreab Department of Mathematics,Ewha Womans University,120-750,Seoul,Koreac Department of Mathematics,Simon Fraser University,V5A1S6,British Columbia,CanadaAbstractFor the Tate pairing computation over hyperelliptic curves,there are developments by Duursma-Lee and Barreto et al.,and those computations are focused on degenerate divisors.As divisorsare not degenerate form in general,it is necessary tofind algorithms on general divisors forthe Tate pairing computation.In this paper,we present two efficient methods for computingthe Tate pairing over divisor class groups of the hyperelliptic curves y2=x p−x+d,d=±1of genus3.First,we provide the pointwise method,which is a generalization of the previousdevelopments by Duursma-Lee and Barreto et al.In the second method,we use the resultantfor the Tate pairing computation.According to our theoretical analysis of the complexity,theresultant method is48.5%faster than the pointwise method in the best case and15.3%fasterin the worst case,and our implementation result shows that the resultant method is muchfaster than the pointwise method.These two methods are completely general in the sense thatthey work for general divisors with Mumford representation,and they provide very explicitalgorithms.keywords:Tate pairing;hyperelliptic curves;divisors;resultant;pairing-based cryptosystem IntroductionIn recent years the Tate pairing and the Weil pairing have been getting a lot of attentions for designing various protocols in cryptosystem[4,5,14,13,22,25,26].It is therefore important to develop an efficient implementation of the pairings for the practical applications.The recent papers by Barreto et al.[1]and Galbraith et al.[11]provided the fast computation of the Tate pairing over the supersingular elliptic curves y2=x3−x±1in characteristic three.In2003, Duursma and Lee[9]provided a closed formula for the efficient computation of the Tate pairing on y2=x p−x±1,p=3(mod4)in characteristic p.After then,Barreto et al.[2]improved Duursma and Lee’s result and proposed a general technique for the efficient computation of the Tate pairing on supersingular abelian varieties using Eta pairing approach[2,20].They also described efficient pairing algorithms on F q-rational points for elliptic and hyperelliptic curves over F q.∗(e-mail)ejlee@kias.re.kr,hsl@ewha.ac.kr,yoonjinl@sfu.ca The authors a,b were supported by KOSEF,grant number R01-2005-000-10713-0.This work was also done while the last author c was visiting KIAS in Seoul during the summers of2004and2005.The author expresses their gratitude to the institute.1In fact,generally divisor operations over hyperelliptic curves are more complicated than point operations over elliptic curves.Therefore,it has been pointed out that Elliptic Curve Cryptosystem (ECC)is more efficient than Hyperelliptic Curve Cryptosystem(HCC)[25].The Tate pairing computation uses the Miller algorithm,and the Miller algorithm relies on divisor operations.Thus one expects that the Tate pairing computation over hyperelliptic curves may not be as efficient as that over elliptic curves.However,in some special cases,it was shown that HCC can be made more efficient than ECC by giving the explicit formula for divisor operations[6,19,23].For the higher genus,preserving the same security level,we can decrease the size of the definingfield.In fact,some examples given in[6,19]show that for the efficiency of cryptosystems,the size of the definingfield is more important than the complexity of group operation formula.For the Tate pairing,Barreto et al.[2]presented implementation results over elliptic curves and hyperelliptic curves of genus2,where both are defined over F2n.The running time for the Tate pairing over hyperelliptic curves was faster than that of elliptic curves.For the Tate pairing computation it is therefore certainly worthwhile to work over some special types of hyperelliptic curves.Recent developments[2,9]on the Tate pairing computation on hyperelliptic curves over afinite field F q have focused on the case of degenerate divisors.However,in the pairing-based cryptography, the efficient Tate pairing implementation over general divisors is significantly more important.For instance,in the Boneh-Franklin identity-based encryption scheme,the private keys are general divisors,and therefore the decryption process requires computing a pairing of general divisors.For the case of genus2,the result in[6]presents both divisor-wise and pointwise approach,and it turns out that the divisor-wise approach is more efficient than the pointwise approach.For the case of genus≥3,when divisors are general,there has been no Tate pairing computation method developed so far.In this paper,we develop general methods of computing the Tate pairing for the genus3case. We present two feasible methods by pointwise approach and the resultant approach for computing the Tate pairing over divisor class groups of the hyperelliptic curves H d:y2=x p−x+d,where d=±1and p=7.Those methods are completely general in the sense that they work for general divisors with Mumford representation[21],and we give very explicit and feasible algorithms over H d.Furthermore,we analyze the complexities of two methods and show implementation results of proposed algorithms.For our two methods,we use the Eta pairing for reducing the computation cost.We used SINGULAR[12]software package for symbolic computations in this paper.In Section2,we present the pointwise method for computing the Tate pairing over general divisors.This method is a generalization of the pointwise method developed in[2]and[9].In Section3,we use resultant to compute the Tate pairing with Mumford representation.In Section4, we compare the complexities of two methods and show that the resultant method is48.5%faster than the pointwise method in the best case and15.3%faster in the worst case.In Section5,we report experiment results based on our implementation using NTL[24]software package.According to the implementation,we conclude that the Tate pairing computation by using the resultant is much faster than the pointwise approach.We point out that this is thefirst implementation over a genus3curve.1Tate pairing on divisorsLet F q be afinitefield with q elements,and H/F q be a hyperelliptic curve over F q.We denote by J H the group of degree zero divisor classes of H.Note that each divisor class can be uniquely2represented by the reduced divisor using the Mumford representation[21].Reduced divisors of the curve H can be found as discussed in[17]and[21],and most of reduced divisors in J H with genus 3are written as D=[U D,V D]=[x3+u D,2x2+u D,1x+u D,0,v D,2x2+v D,1x+v D,0].We recall the definition of the Tate pairing[10].Let be a positive divisor of the order of J H(F q)with gcd( ,q)=1,and k be the smallest integer such that |(q k−1);such k is called the embedding degree.Let J H[ ]={D∈J H| D=O}.The Tate pairing is a map·:J H[ ]×J H(F q k)/ J H(F q k)→F∗q k/(F∗q k)D,E =f D(E ),where div(f D)= D and E ∼E with support(E )∩support(div(f D))=∅.We define the Tateparing value by t(D,E)= D,E q k−1so that the pairing value is defined uniquely.We write x(i) for x p i.We consider a hyperelliptic curve H d over F q defined by y2=x p−x+d,d=±1,for p≡3 (mod4),where q=p n with gcd(2p,n)=1,and we let F/F q and K/F q be the extensions of degree [F:F q]=p and degree[K:F q]=2p,respectively.Over the extensionfield K,the curve is the quotient of a hermitian curve,hence it is Hasse-Weil maximal.And the class group over K is annihilated by p pn+1;this can be also seen from the following Lemma1.1.It shows that for P∈H d(K),(p pn+1)((P)−(O))is principal[8].Lemma1.1([8]).Let P=(α,β)∈H d.The functionh P=βp y−(αp−x+d)p+12has divisor(h P)=p(P)+(P )−(p+1)O,where P =(α(2)+2d,β(2)).From Lemma1.1,we observe that p((P)−(O))≡([p]P)−(O),thus the multiplication by p over H d has an extremely special form such as[p]=φπ2,whereφ=(x+2d,−y)andπis a Frobenius map of p th power.Let m=(n+1)/2,then from[8]we have|J H+1(F q)|=(1+p n)3+(pn)p m(1+p n+p2n),|J H−1(F q)|=(1+p n)3−(pn)p m(1+p n+p2n).(1)1.1Eta pairing on H dWe discuss the Eta pairing introduced in[2]which is very useful for efficient computation of the Tate pairing.We consider a hyperelliptic curve H d over somefinitefield F p n,and letψbe an endomorphism on the curve H d given byψ:H d(K)→H d(K),ψ(x,y)=(ρ−x,σy),(2) whereρ∈F is a root ofρp−ρ+2d=0,andσ,¯σ∈K are the roots ofσ2+1=0.For efficient Tate pairing computation,we concern with the twisted Tate pairingˆt:JH d [ ]×J Hd(F p2pn)/ J Hd(F p2pn)−→F∗p2pnˆt(D,E)=fD(ψ(E))p pn−1,3where(f D)=(p pn+1)D from[9,Theorem4].For two divisors D and E in J Hd,the Eta pairing is defined byη(D,E)=n−1i=0h Di(ψ(E))p n−1−i,(3)where D i+1+(h Di )=pD i with a divisor D0=D and some rational function h Di.By Lemma1.1,H d has a property thatq(P)−q(O)=(γ(P))−(O)+(g P),(4) for some automorphismγon H d and some function g P.Thusγcan be given byγ=φnπ2n.The following theorem is crucial for efficient computation of the Tate pairing on divisors.Theorem1.2([2],[20]).Let q=p n,p≡3(mod4),γ=φnπ2n on J Hd induced from Eq.(4),andψbe an endomorphism on the curve H d over F q.Assume thatφnψ[q]=ψ,(5) whereψ[q]denotes a map obtained by raising the coefficients ofψby q th power.Then for divisors D and E in J H(F q),we haveη(qD,E)=η(D,E)q.For any divisor E=[U E,V E]in J Hd (F q),the endomorphismψin Eq.(2)on divisors are easilydeduced as follows:ψ(E)=[Uψ(E),Vψ(E)],whereUψ(E)=x3−(3ρ+u E,2)x2+(3ρ2+2u E,2ρ+u E,1)x−(ρ3+u E,2ρ2+u E,1ρ+u E,0),Vψ(E)=σ(v E,2x2−(2ρv E,2+v E,1)x+v E,2ρ2+v E,1ρ+v E,0).(6)Using Eq.(6),a straightforward verification shows that H d satisfies the crucial condition in Eq.(5). From Theorem1.2,it thus follows thatˆt(D,E)=η(D,E)76n+1(77n−1).(7)It is therefore enough to computeη(D,E)to obtainˆt(D,E)for any divisors D,E∈J Hd (F q).When all the points in support(D)and support(E)are F q-rational points,using Eq.(7)makes the Tate pairing computation very efficient as mentioned in[2].In Section2,we will extend the concept of the Eta pairing on the general divisors,that is,the supports of D and E are not necessarily F q-rational points.Throughout this paper,we focus on the hyperelliptic curve H d:y2=x p−x+d,d=±1,p≡3 (mod4)of genus g=3,therefore we work on the case p=7;this case is cryptographically useful[9]. 2Pointwise computation of the Tate pairingThis section presents a generalization of the pointwise method developed in[2]and[9],and this method can be used for any divisors,not only for F q-rational points.The Eta pairing is used for reducing the computation cost as well.As mentioned in Eq.(7),for divisors D,E in J Hd,the Tate pairing can be computed byˆt(D,E)=η(D,E)76n+1(77n−1),(8)4where D and E have the form D=(P1)+(P2)+(P3)−3(O),E=(Q1)+(Q2)+(Q3)−3(O)for points P k and Q j contained in H d(F73n)with k,j=1,2,3.From Eq.(3)we haveη(D,E)=n−1i=0h Di(ψ(E))7n−1−i.For i≥1,let D i=(P i,1)+(P i,2)+(P i,3)−3(O),then h Di(ψ(E))can be computed byh Di (ψ(E))=3k,j=1h Pi,k(ψ(Q j)),(9)where(h Pi,k )=7(P i,k)+(P i,k )−8(O),P0,k=P k,P i,k=(α(2i)+i2d,(−1)iβ(2i))∼7i[P0,k]and[Pi,k]=−[7P i,k]for i≥1.Algorithm1shows the pointwise computation of Tate pairing. Algorithm1Pointwise computationINPUT:D,E∈J Hd (F7n)OUTPUT:ˆt(D,E)1.g←1pute P k=(αk,βk),k=1,2,3and Q j=(x j,y j),j=1,2,3which are supporting points for D and E,respectively.3.For i=0to n−1do4.For k,j=1to3dopute h k,j=β7k ·y j·σ−(α7k+x j+d−ρ)46.setαk←α72k +2d,βk←β72k7.set g←g7· 3k,j=1h k,j8.Return g76n+1(77n−1),where g=η(D,E).Let m3(resp.M3,M)be the time cost for a multiplication in F73n(resp.F73(14n),F714n). For simplicity,we assume that a squaring cost is similar to a multiplication cost,and we omit the computation cost for7th powering since it is negligible compared with the other operations.Step5requires two multiplications and two squarings in F73n,and Step7needs eight multipli-cations in F73(14n)and one multiplication in F714n.For computingˆt(D,E),the total complexity is thereforeT P:=2T3rt+n(9·4m3+8M3+1M)=2T3rt+n(36m3+8M3+1M),(10) where T3rt is the time forfinding all the roots of a cubic polynomial over F73n;this is required for obtaining the supporting points of D and E.3Computation of the Tate pairing by using the resultantIn this section,our goal is,for given divisor inputs with the divisor representation,tofind an efficient algorithm which provides us thefinal Tate pairing value over H d.For evaluating a function at a5divisor,we apply the resultant for the efficient computation of the Tate pairing,and show that this approach is much faster than thefirst method.According to Eq.(7),for the Tate pairing computation over divisors D,E∈J H(F7n),it is sufficient to computeη(D,E).In the following subsections3.1and3.2,to obtain the value of η(D,E),wefind the explicit formulas for D i=[7i]D and h Difor i≥1,and we also obtain the evaluation formula of rational function h Diat a divisor in a very explicit way.3.17-multiplication on divisorsLet D be a reduced divisor of H d such thatD=(P1)+(P2)+(P3)−3O=[U D,V D],where P j=(αj,βj)for j=1,2,3,U D=x3+u D,2x2+u D,1x+u D,0,and V D=v D,2x2+v D,1x+v D,0∈F7n[x].Let D0=D,D i+1+(h Di )=7D i,and D i=[U Di,V Di]for each positive integer i.The following lemma provides us with explicit formulas for U Di and V Diin terms of the coef-ficients of U D and V D for i≥1.The proof can be obtained from the knowledge of Section5in Appendix of[17].Lemma3.1.Let[7]be the multiplication map by7on the divisor class group of H d/F7n.Thenwe have,for i≥1,[7i]D=D i=[U Di ,V Di]withU Di =x3+(u(2i)D,2+id)x2+(u(2i)D,1+3idu(2i)D,2−2i2)x+u(2i)D,0−2idu(2i)D,1−3i2u(2i)D,2−i3d,V Di =(−1)i v(2i)D,2x2+(−1)i(3idv(2i)D,2+v(2i)D,1)x+(−1)i(−3i2v(2i)D,2−2idv(2i)D,1+v(2i)D,0).In the following proposition,wefind the function h D such that(h D)=7D+D in an explicit way.Proposition3.2.Let h D(x,y)be a function such that(h D)=7D+D ,andτbe a mapτ:H d→ˆH d,(x,y)→(ˆX,Y)=(x−ξ7−d,y).Then,for appropriateξ,we haveˆh ˜D(ˆX,Y):=hD(x,y)◦τ−1=δ1Y3+s(ˆX)Y2+t(ˆX)Y+δ16(ˆX),whereδ16(ˆX)=−(ˆX3+˜u71ˆX+˜u70)4,andδ1,s(ˆX)and t(ˆX)are described in Table5of Appendix. Proof.Let D=(P1)+(P2)+(P3)−3(O),and7((P j)−(O))=(h j)−(P j)+(O)for j=1,2,3. Then7D=(h1h2h3)−[(P 1)+(P 2)+(P 3)−3(O)]=(h D)−D ,where D =(P 1)+(P 2)+(P 3)−3(O).For simplicity,the change of variableτξ:x→X=x−ξ,y→Y=ywithξ=−u D,23transforms the curve H d to a curve˜H d:Y2=X7−X+(ξ7−ξ+d).6Let P j=(αj,βj),˜P j=(αj−ξ,βj),˜αj=αj−ξand˜βj=βj.From the fact thatβj=V D(αj)and˜βj=V˜D (˜αj)=V˜D(αj−ξ),it follows that U˜D=x3+˜u1x+˜u0and V˜D=˜v2X2+˜v1X+˜v0.We also have˜D=(˜P1)+(˜P2)+(˜P3)−3(O)=[X3+˜u1X+˜u0,˜v2X2+˜v1X+˜v0].Furthermore, (˜h j)=7(˜P j)+(˜P j )−8(O),where˜h j=h j(X+ξ,Y).Lettingθ=ξ7−ξ+d,it is easy to see that˜hj=˜βj7Y−(˜αj7−X+θ)4=(˜v2˜αj2+˜v1˜αj+˜v0)7Y−(˜αj7−X+θ)4.Thus we obtainh˜D(X,Y)=˜h1(X,Y)˜h2(X,Y)˜h3(X,Y)=3j=1(˜v2˜αj2+˜v1˜αj+˜v0)7Y−(˜αj7−X+θ)4.(11)If we apply the Elimination method in[7]to Eq.(11)with elimination order{˜α1,˜α2,˜α3}>{˜u1,˜u0},then we can obtain Eq.(11)as a function of˜u1and˜u0.The coefficients forˆh˜D (ˆX,Y)=h˜D (X−θ,Y)are described in Table5,where the second column shows the corresponding coefficientin terms of˜v i s and˜u is.3.2Evaluation at a divisorIn this subsection,we use resultant to evaluate a rational function at a divisor,which is necessary to achieve our goal.For the definition of resultant and its properties,we refer to[27,Ch.VI]. Theorem3.3.Let F be afield.For A,B∈F[x]with deg A=m,deg B=n,we haveres(A,B)=a nmi=1B(αi),whereα1,α2,···,αm∈¯F(=algebraic closure of F)are all the roots of A and a is the leading coefficient of A.With the same notations as in Theorem3.3,furthermore,we haveres(A,B)=(−1)mn res(B,A).(12)In addition,efficient reduction method for computing the resultant is also introduced in[27,Ch. VI].When m≥n,by Euclidean division algorithm,there exists Q(x),R(x)∈F(x)such that A(x)=Q(x)B(x)+R(x)with deg R<n.Thenres(A,B)=(−1)mn res(B,R).(13)Now we are ready to apply the resultant to our Tate pairing computation.Lemma3.4.For h D(x,y)and E=[U E,V E],we let H D,E(x)=h D(x,V E(x)).Then we haveh D(E)=res(U E,H D,E).Proof.In fact,h D(E)=H D,E(x1)H D,E(x2)H D,E(x3),where x i’s are the roots of U E(x).The assertion thus follows immediately from Theorem3.3.7Algorithm2Tate pairing computation by using resultantINPUT:D=[U D,V D],E=[U E,V E]∈J Hd (F7n),endomorphismψOUTPUT:ˆt(D,E)1.Setξ←2u D,2andθ←ξ7−ξ+d.pute u1=3ξ2+2ξu D,2+u D,1and u0=ξ3+u D,2ξ2+u D,1ξ+u D,0.puteδj for j=1,...,15using Table54.g←1,5.for i=0to n−1doputeˆE=τξ+θ(ψ(E))pute H˜D,ˆE =ˆh˜D(x,VˆE)and R=H˜D,ˆE(mod UˆE)(Table6).pute h Di (ψ(E))=res(UˆE,R).9.g←g7·h Di(ψ(E))10.set u0←u720,u1←u72111.setξ←ξ72,θ←θ72,δj←δ72j if j=2,3,4,5,6,andδj←(−1)iδ72j otherwise.12.Return g76n+1(77n−1),g=η(D,E).Table6of Appendix describes the nonzero coefficients of H D,E(x),and the complexity is counted by using Karastuba’s technique[15].Now by using the reduction method in Eq.(13),we can compute res(U E,H D,E)as follows: Lemma3.5.Let H D,E(x)=Q(x)U E(x)+R(x)with deg R≤2.Then we haveh D(E)=res(U E,R).Proof.We observe that the degree of H D,E is12and the degree of U E is3.Thus by using Eq.(12),we have res(U E,H D,E)=res(H D,E,U E).From Eq.(13)it follows that res(H D,E,U E)= res(UE,R),so we get res(U E,H D,E)=res(U E,R).3.3Algorithm for the Tate pairing computation by using the resultantIn this subsection,we describe an algorithm for computing the Tate pairing on divisors,and we also compute its complexity.From Lemma3.1,Proposition3.2and Lemma3.4,the Tate pairing given inEq.(7)can be computed by using Algorithm2.Since vˆE,j =σ·(some element in F77n),j=0,1,2,we note that H˜D,ˆEin the step7of Algorithm2can be written asH˜D,ˆE =−x12+10i=0(d iσ+e i)x i,d i,e i∈F77n for0≤i≤10.Tofind H˜D,ˆE (mod UˆE)in the step7,we use the following recursive relations:x i≡a i x2+b i x+c i(mod U E),3≤i≤12a3=−uˆE,2,b3=−uˆE,1,c3=−uˆE,0∈F77na i=a i−1a3+b i−1,b i=a i−1b3+c i−1,c i=a i−1c3.Then R can be computed by8R=H˜D,ˆE (mod UˆE)=(a12+10i=3a i(d iσ+e i)+d2σ+e2)x2+(b12+10i=3b i(d iσ+e i)+d1σ+e1)x+(c12+10i=3c i(d iσ+e i)+d0σ+e0).(14)Now we discuss the complexity of Algorithm2by counting the number of operations which are necessary for computingη(D,E).We denote the time for multiplications in F714n,F77n and F7n by M,m and m,respectively,and a multiplication between F7n and F77n by˜m.Notingthat,in Step6,uˆE,j ,j=0,1,2and vˆE,0,vˆE,1belong to F77n,and from Eq.(6)we have vˆE,2=σ·(some element in F7n).The computation cost of H˜D,ˆE =ˆh˜D(x,VˆE)in Step7is counted inTable6.We need7m+18m for computing x i(mod U E)since we do not need the computation x11,and we need48m to compute R in Eq.(14).The total complexity of this algorithm is therefore40m+n(29m+31˜m+70m +T res+1M),(15)where T res is the computation cost for the resultant res(UˆE ,R)of UˆEand R in F714n.In detail,we need3m in the step2,and37m in the step3from Table5.For each loop,we need5m in the step6,17m+31˜m+4m in the step7from Table6,and1M in the step9.We calculate the resultant by computing the determinant of two polynomials with degree2 and3in Mumford representation.Then we have T res=48m ,where m is a multiplication(resp. squaring)in F77n.4Complexity comparisonIn this section we compare the complexities of our two methods given in Section2and3.When an extension degree is of the form k=2i3j,the computation cost for a multiplication in F q k is theoretically3i5j times of the cost for a multiplication F q([16],[18]).From this observation, we assume that1mult.in F73n(m3)≈5m,1mult.in F73(14n)(M3)≈5M,1mult.in F714n(M)≈3m (16)and we also let˜m≈7m.With the above assumptions,the pointwise computation cost in Eq.(10) is T P:=2T3rt+n(36·5m+123m ),where T3rt is the time forfinding all the roots of a cubic polynomial over F73n.By Berlekamp-Rabin algorithm[3],we have T3rt=O(32log3log73n)·5m≈27n·4·m3=108nm3.Counting the cost for T3rt,wefinally haveT P≈n(1260m+123m ).(17)On the other hand,the total time for the resultant method in Eq.(15)is T R:=40m+n(246m+ 70m +T res+1M),where T res is the time for computing the resultant of two polynomials over F714n.As mentioned in Section3.3,we have T res=48m ,where m is a multiplication in F77n. Thus,the computation cost of our resultant approach is approximatelyT R=40m+n(246m+121m ).(18)9Table1:Complexity comparison:examplessecurity(bits)80128192 bitlength of714n114030728192 n2979211 pointwise(T P)36540m+3567m 99540m+9717m 265860m+25953m resultant(T R)7174m+3509m 19474m+9559m 51946m+25531mT P T R 1.17982≤T PT R≤1.938081.17998≤T PT R≤1.939631.18004≤T PT R≤1.94019To compare the complexities of two methods,we summarize T P,T R and the ratio T P/T R in Table1,where the examples are chosen for cryptographically meaningful values[18].According to[16],the ratio of m and m is7≤mm≤49,and the last row of Table1showsthe range of the ratio of T PT R for eachfixed value of n.For each n,as m /m is decreasing,the ratioT P T R is increasing.This implies that as the performance of m ,the multiplication in F77n,is gettingmore efficient,the resultant method gets more efficient than the pointwise method.Furthermore,we observe that when m /m isfixed,as n is increasing,T PT R is also increasing.Thus,for highersecurity level,the resultant method gives better efficiency than the pointwise method.Therefore, we can conclude that the Tate pairing computation by using the resultant is48.5%faster than the pointwise computation in the best case and15.3%faster in the worst case.5Experimental resultsWe have proposed two methods by the resultant and pointwise approach for computing the Tate pairing over the genus3hyperelliptic curve H d:y2=x7−x+d,d=±1over F q.In Section4,we compared the complexities of two proposed methods,and it turned out that the resultant approach is up to48.5%faster than the pointwise approach.In this section,we provide experiment results for the Tate pairing computation over the genus3hyperelliptic curve and compare the running time. Basically our goal in this experimentation is that we verify our theoretical complexity comparison in Section4by actual implementation using one of the standard packages such as NTL.We make implementations when both input divisors D and E are general divisors,and we use the NTL software package.We provide implementation for genus3hyperelliptic curves for thefirst time.Wefirst need tofind a prime n for each security level s such that2s≈73n,and alsofind a largeprime dividing|J Hd (F7n)|such that ≈2s.The formula for|J Hd(F7n)|is given in Eq.(1).Bysearching for good candidates for and n from n=29through n=79,wefind the four values of n,namely,29,43,47and73with corresponding primes as given in Appendix.Table2shows the amount of time to perform thefield multiplications in F7n,F73n and F77n using NTL.The table was computed by taking average time of5000multiplications of random elements in eachfield.In Section4,we assumed the ratio m3/m is5for thefield operations m3in F73n and m in F7n.However,in NTL the actual ratio m3/m is approximately7or9as shown in Table2,and m /m in Table2is in the range7≤m /m≤49as we expected.In our implementation M3 is optimized to56m3.Therefore,each complexity for the Tate pairing computation is given by T R=40m+n(246m+121m )andT P=2T3rt+n(36m3+8M3+1M)=2T3rt+n(36m3+56·8m3+3m )≈n(700m3+3m ).10Table2:Multiplication timings(in milliseconds)n29434773F7n(m)0.25620.56860.6626 1.6062F73n(m3) 2.4 4.3218 4.890611.1562F77n(m )7.843816.67217.515627.8688m3/m9.367687.600777.38092 6.94571m /m30.615929.321126.434717.3508According to the actual ratio of thefield operations in NTL,Table1is adjusted to obtain Table3.As shown in Table3,for n≥43,as n increases,T P/T R also increases as we expected in Section4. On the other hand,when n increases from29to43,T P/T R decreases,which is opposite to what we expected,and we guess that the reason is the following:For instance,we observe that when n changes from29to43,the decrement of m3/m(resp.m /m)is1.767(resp.1.295).On the other hand,when n changes from43to47,the decrement of m3/m(resp.m /m)is0.220(resp.2.886). So,the decrement of m3/m is much larger than m /m when n changes from29to43,while m3/m is much smaller than m /m when n changes from29to43.From Table3,the resultant method is40.57%(resp.29.38%,34.32%,and52.26%)faster than the point-wise method for n=29(resp.43,47,and73).These examples support our theoretical complexity analysis in Section4,that is,for higher security level the resultant method is more efficient than the pointwise method for the Tate pairing computation.Table3:Complexity comparison:examples in NTLbitlength of714n1140169018472869 n29434773 pointwise(T P)20300m3+87m 30100m3+129m 32900m3+141m 51100m3+219m resultant(T R)7174m+3509m 10618m+5203m 11602m+5687m 17998m+8833m T PT R1.68254 1.42525 1.522572.09465Table4shows the implementation results of the Tate pairing for selected examples.The resul-tant method is48.8%(resp.39.1%,38.7%,and43.4%)faster than the pointwise method for n=29 (resp.43,47,and73).We performedfifty calculations with random samples for each method and took the average time.The experiments ran on a machine with2.2Ghz Opteron,and we used Microsoft Visual C++6.0.Our implementation shows that the performance ratio T PT R for n=29is larger than the ratiofor n=73,while the theoretical complexity analysis in Table3shows the other way around.This difference occurs because of the relative time cost T3rtT Pfor computing all the supporting pointsof an input divisor.In more detail,in the theoretical complexity analysis,for T3rtT Pwe have aflat ratio approximately0.152.On the other hand,in our implementation,T3rtT Pis0.447242(resp.0.436616,0.41533,and0.170231)for n=29(resp.43,47,and73).Thus the ratio T3rtT P is variousdepending on the values of n,and in fact,the ratio is largest when n=29and smallest when11Table4:Experiment results(in seconds)bit-length of 237338373608bit-length of714n1140169018472869n29434773pointwise method(T P)38.356499.2936120.672399.962resultant method(T R)19.631560.462273.9278226.412T P1.95382 1.64224 1.63229 1.76652T Rn=73.According to the theoretical complexity analysis and the implementation,we conclude that the resultant method is faster than the pointwise method for the Tate pairing computation.Conclusions.In this paper,we have provided two methods by pointwise approach and resul-tant approach for computing the Tate pairing over divisor class groups of the hyperelliptic curves H d:y2=x p−x+d,d=±1of p=7.From the theoretical analysis of the complexity,the resultant method is48.5%faster than the pointwise method in the best case and15.3%faster in the worst case,and our implementation results also support our theoretical analysis of the complexity.There is room for further optimization in the implementation,and using NTL might not be the best choice.However,our implementation is sufficient enough to conclude that the resultant method is more efficient than the pointwise method in the Tate pairing computation.References[1]P.S.L.M.Barreto,H.Y.Kim,B.Lynn,M.Scott,Efficient Algorithms for Pairing-BasedCryptosystems.Advances in Cryptology–Crypto2002,Lecture Notes in Computer Science, Vol.2442,Springer-Verlag,(2002)354–368.[2]P.S.L.M.Barreto,S.Galbraith, C.hEigeartaigh and M.Scott,Efficient Pairing Com-putation on Supersingular Abelian Varieties,Cryptology eprint Atchives,Available at ,2004,No.2004/375.[3]E.R Berlekamp,Factoring polynomials over largefinitefields,p.,Vol24,(1970)713-735.[4]D.Boneh and M.Franklin,Identity-based encryption from the Weil pairing.Advances inCryptology,Crypto2001,Lecture Notes in Computer Science,Vol.2139,Springer-Verlag, (2001)213-229.[5]J.C.Cha,J.H.Cheon,An Identity-Based Signature from Gap Diffie-Hellman Groups.Pro-ceedings of PKC,Lecture Notes in Computer Science,Vol.2567,(2003)18-30.[6]Y.Choie and E.Lee,Implementation of Tate pairing on hyperelliptic curves of genus2,Information security and cryptology—ICISC2003,97–111,Lecture Notes in Comput.Sci., 2971,Springer,Berlin,(2004).12。