JP2004177673A - Pairing ciphering device, pairing ciphering calculation program - Google Patents

Pairing ciphering device, pairing ciphering calculation program Download PDF

Info

Publication number
JP2004177673A
JP2004177673A JP2002343942A JP2002343942A JP2004177673A JP 2004177673 A JP2004177673 A JP 2004177673A JP 2002343942 A JP2002343942 A JP 2002343942A JP 2002343942 A JP2002343942 A JP 2002343942A JP 2004177673 A JP2004177673 A JP 2004177673A
Authority
JP
Japan
Prior art keywords
calculation
pairing
point
register
elliptic curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2002343942A
Other languages
Japanese (ja)
Inventor
Tetsuya Izu
哲也 伊豆
Takeshi Takagi
剛 高木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2002343942A priority Critical patent/JP2004177673A/en
Publication of JP2004177673A publication Critical patent/JP2004177673A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • H04L9/3073Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves involving pairings, e.g. identity based encryption [IBE], bilinear mappings or bilinear pairings, e.g. Weil or Tate pairing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To speedily perform pairing calculation of elliptic curve cryptography. <P>SOLUTION: In the program for pairing calculation shown in the figure, calculations are carried out to obtain the coefficients of the formulae of straight lines 11, 12 for the pairing calculation by defining a function TDBL and using values obtained in the process of calculating elliptic duplication. Or, calculations are carried out to obtain the coefficients of the formulae of the straight lines 11, 12 for the pairing calculation by using the values obtained in the process of calculating elliptic addition and by defining a function TADD. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、楕円曲線上のペアリング暗号装置、ペアリング暗号計算方法及びそのプログラムに関する。
【0002】
【従来の技術】
楕円曲線上のペアリングを用いた暗号(以下、ペアリング暗号)は公開鍵暗号の1つであり、秘密共有、署名、認証などの暗号プリミティブから構成されている。これらプリミティブにおいて、楕円曲線上のペアリングと呼ばれる演算は共通して使用され、かつ暗号処理の中心となる。このことから、ペアリング暗号を実装する上で、ペアリング演算の高速化を実現する技術は必要不可欠である。
【0003】
ペアリング暗号の例として、大岸・境・笠原による秘密共有プリミティブに関する文献1を参照して説明する。
センターは楕円曲線Eを定めて公開するとともに、センターの秘密鍵としてスカラーs(sは整数)を定める。ユーザーAはセンターに個人情報PA(PAは楕円曲線E上の点)を登録し、秘密鍵QA=s×PA(QAは楕円曲線E上の点)を秘密裏に受け取る。同様に、ユーザーBはセンターに個人情報PB(PBは楕円曲線E上の点)を登録し、秘密鍵QB=s×PB(QBは楕円曲線E上の点)を秘密裏に受け取る。個人情報はすべてのユーザーに公開される。ユーザーAとユーザーBが秘密共有を行う場合、ユーザーAはユーザーBとの共有情報KABを、
KAB=(QA,PB)+(PB,QA)
=(s×PA,PB)+(PB,s×PA)
=(PA,PB)^s+(PB,PA)^s
によって求める。ここで(P,Q)は点Pと点Qのペアリングを表す。また^はべき乗を表す。ユーザーBはユーザーAとの共有情報KBAを、
KBA=(QB,PA)+(PA,QB)
=(s×PB,PA)+(PA,s×PB)
=(PB,PA)^s+(PA,PB)^s
によって求める。このときKAB=KBAとなることから、ユーザーAとユーザーBの間で秘密情報が共有されたことになる。このようにして大岸・境・笠原方式によるペアリング暗号は秘密共有を行う。
【0004】
ペアリング暗号では楕円曲線上のペアリングと呼ばれる演算を使用する。以下、楕円曲線について説明する。
pを5以上の素数、mを1以上の整数とすると、要素数q=p^mの有限体GF(q)上の楕円曲線とは、方程式
E:y^2=x^3+a×x+b
を満たす点(x,y)の集合上に、無限遠点と呼ばれる点∞を加えた集合のことをいう。無限遠点∞を0と表すこともある。ここでa,b,x,yは有限体GF(q)の要素である。楕円曲線上の点は(x,y)のような座標形式(アファイン座標)で表現できるが、無限遠点∞は(x,y)のような座標形式で表現することができない唯一の点である。このように、アファイン座標では無限遠点以外の点はGF(q)の2つの要素の組として表される。
【0005】
楕円曲線E上の点の間には、以下のようにして点の加算と呼ばれる演算が定義できる。
PをGF(q)上の楕円曲線E上の点とする。以下のようにPの逆元−Pを定義する。
【0006】
(1)P=∞ならば−P=∞
(2)P≠∞ならばP=(x,y)としたときに、−P=(x,−y)
P1,P2をGF(q)上の楕円曲線E上の2点とする。以下のようにしてP1とP2の和P3=P1+P2を定義する。
【0007】
(1)P1=∞ならばP3=P2
(2)P2=∞ならばP3=P1
(3)P1=−P2ならばP3=∞
(4)P1≠−P2ならばP1=(x1,y1),P2=(x2,y2),
P3=(x3,y3)としたときに、
x3=λ^2−x1−x2, y3=−λ×x3−ν,
ただし
λ=(y2−y1)/(x2−x1),ν=(y1×x2−y2×x1)/(x2−x1)・・・・・・:P1≠P2のとき
λ=(3×x1^2+a)/(2×y1),ν=(−x1^3+a×x1+2×b)/(2×y1)・・・:P1=P2のとき
とする。P1≠P2のときに、P1+P2を計算することを楕円加算、P1=P2のときにP1+P2=2×P1を計算することを楕円2倍算という。楕円加算・楕円2倍算は、有限体GF(q)での加減算・乗算・平方算・逆元計算の組み合わせによって計算される。
【0008】
図9及び図10は、楕円加算と楕円2倍算の説明図である。楕円加算は、図9に示されるように、楕円曲線上の点P1=(x1,y1)とP2=(x2,y2)とを結ぶ直線と楕円曲線との交点を、x軸で折り返した点P3=P1+P2=(x3,y3)として定義される。楕円2倍算は、図10に示されるように、楕円曲線上の点P1=(x1,y1)の接線と楕円曲線との交点を、x軸で折り返した点P4=P1+P1=2×P1=(x4,y4)として定義される。
【0009】
有限体GF(q)上の楕円曲線Eと、曲線上の点Pと、整数(スカラーとも呼ぶ)dに対して、点d×P=P+P+…+P(d個の和)を計算することをスカラー倍算という。スカラー倍算は、楕円加算、楕円2倍算の組み合わせによって実現される。スカラー倍点d×Pの計算は、dの2進展開
d=d[n−1]×2^(n−1)+d[n−2]×2^(n−2)+・・・+d[1]×2+d[0]
を利用して行われることが多い。
【0010】
図11は、従来のスカラー倍算アルゴリズム1を示す図である。図11において、ステップS1で変数Q[0]の初期値をPとし、ステップS3で点Q[0]の楕円2倍算を実行し、演算結果をQ[0]に格納する。そしてd[i]==1であれば、ステップS5で、Q[0]と点Pの楕円加算を実行し、演算結果をQ[0]に格納する。
【0011】
楕円曲線におけるスカラー倍計算は、楕円加算と楕円2倍算と呼ばれる演算の組み合わせで実現されるため、全体の計算時間はこれら演算の計算回数として評価される。さらに楕円加算、楕円2倍算の計算時間は、有限体GF(q)における乗算、平方算、逆元計算の計算時間の和によって評価される。これは実際の楕円加算、楕円2倍算、スカラー倍算の計算が、有限体における加減算・乗算・平方算・逆元計算の組み合わせで計算され、多くの場合、加減算の計算時間はその他の計算時間に比べて無視できるほど短いからである。
【0012】
有限体GF(q)での逆元の計算時間は、乗算・平方算の計算時間に比べて非常に大きい。このため、楕円曲線の点を表現する上でヤコビアン座標が使用されることがある。ヤコビアン座標では、点は(X:Y:Z)のような有限体GF(q)の3つの要素の組み合わせで表される。ただし(X:Y:Z)とr≠0であるGF(q)の要素rに対し(r^2×X:r^3×Y:r×Z)は同じ点と考える。楕円曲線はヤコビアン座標では、x=X/Z^2,y=Y/Z^3を代入して、
E:Y^2=X^3+a×X×Z^4+b×Z^6
となる。ヤコビアン座標を用いると、楕円曲線上の点は(X:Y:Z)のような座標形式で表現することができる。無限遠点は∞=(0:1:0)となる。このように、ヤコビアン座標では楕円曲線上の全ての点はGF(q)の3つの要素の組として表される。
【0013】
ヤコビアン座標において、楕円加算に必要な計算時間は12M+4S、楕円2倍算に必要な計算時間は4M+6Sである。特に入力点の一方のZ座標が1の場合、楕円加算に必要な計算時間は8M+3Sとなる。
【0014】
ヤコビアン座標ではZ座標の2乗や3乗が必要となるため、これらの値を座標の値として保持する座標(チュドノフスキー・ヤコビアン座標)が使用されることがある。チュドノフスキー・ヤコビアン座標では、点は(X:Y:Z:Z2:Z3)のような有限体GF(q)の5つの要素の組み合わせで表され、Z2=Z^2、Z3=Z^3となっている。ただしX,Y,Zはヤコビアン座標として考える。無限遠点は∞=(0:1:0:0:0)となる。このように、チュドノフスキー・ヤコビアン座標では楕円曲線上の全ての点はGF(q)の5つの要素の組として表される。
【0015】
チュドノフスキー・ヤコビアン座標において、楕円加算に必要な計算時間は11M+3S、楕円2倍算に必要な計算時間は5M+6Sである。特に入力点の一方のZ座標が1の場合、楕円加算に必要な計算時間は8M+3Sとなる。
【0016】
次に楕円曲線上のペアリングについて説明する。Eを有限体GF(q)上の楕円曲線とする。lを楕円曲線Eの点の個数(曲線の位数といい#Eとかく)の約数とし、kとして、lがq^k−1の約数となるような最小の自然数を選ぶ。このとき楕円曲線Eの有限体GF(q)上の点Pと有限体GF(q^k)上の点Qに対するl次のペアリング(P,Q)とは、PとQに対して1のl乗根のなす集合の要素を対応させる演算であって、以下の条件を満たす。
【0017】
(P1+P2,Q)=(P1,Q)×(P2,Q)
(P,Q1+Q2)=(P,Q1)×(P,Q2)
全てのPに対して、Q=∞のとき、(P,Q)=1
ペアリングの具体的な例としてベイユ・ペアリングとテイト・ペアリングが知られている。以下では断りのない限りテイト・ペアリングを使用する。
【0018】
次にテイト・ペアリングの計算方法について説明する。
楕円曲線Eの有限体GF(q)上の点Pと有限体GF(q^k)上の点Qに対するテイト・ペアリングは
(P,Q)=(fp(Q+S)/fp(S))^((q^k―1)/l)
と表せる。ここで関数fpは、有限体GF(q^k)上の点を入力とし、1のl乗根の集合の要素を出力する関数であり、以下の式で表せる。
【0019】
fp(Q+S)=Π[l1(Q+S)/l2(Q+S)]
fp(S)=Π[l1(S)/l2(S)]
点Sは、有限体GF(q^k)上の点、l1は点Tと点Pを結ぶ直線(T=Pの場合は、点Tの接線)の方程式であり、l2はT+P(T=Pの場合にはT+T)を通るx軸に垂直な直線の方程式を表す。また、Πは、ある条件を満たす直線の方程式の積を計算することを表す。
【0020】
【非特許文献1】
大岸聖史,境隆一,笠原正雄,「楕円曲線上のID 情報に基づく鍵共有法に関する考察」,電子情報通信学会技術報告書,ISEC 99−57、1999年11月
【0021】
【発明が解決しようとする課題】
ペアリング暗号が現実社会において広く用いられるためには、処理時間および実装上必要となるリソース(メモリ・回路量等)の低減が求められる。ペアリング暗号ではペアリングと呼ばれる演算が共通して使用され、処理全体における比重も高いため、この部分の性能向上が全体の性能向上に直結する。ペアリング暗号処理においてペアリング計算の比重は高いため、さらなる高速化が望まれている。
【0022】
しかしながら、楕円曲線暗号の計算に使用されている座標は、楕円曲線のスカラー倍算の高速演算を目的としているため、ペアリングの計算には必ずしも最適ではなかった。
【0023】
本発明の課題は、ペアリング暗号におけるペアリング計算を高速に行うことである。
【0024】
【課題を解決するための手段】
本発明は、楕円曲線上の点に対するペアリングを用いた暗号を処理するペアリング暗号装置において、有限体上の楕円曲線と、楕円曲線上の点を記憶する記憶手段と、楕円2倍算または楕円加算の計算過程で得られる値を記憶し、記憶してある値を用いてペアリング演算の直線の方程式の係数を計算する演算手段とを備える。
【0025】
この発明によれば、楕円2倍算または楕円加算の計算過程で得られる値を用いて、ペアリング演算の直線の方程式の係数を計算することができるので、ペアリング演算の計算時間を短縮することができる。
【0026】
他の発明は、楕円曲線上の点に対するペアリングを用いた暗号を処理するペアリング暗号装置において、有限体上の楕円曲線と、楕円曲線上の点を記憶する記憶手段と、ペアリング演算の中間計算に用いられる直線の方程式を展開した式の一部の計算結果を記憶しておき、記憶してある計算結果を用いて直線の方程式の計算を行う演算手段とを備える。
【0027】
例えば、楕円曲線上の点Tと点Pとを結ぶ直線の方程式をl1,点T+Pを通りx軸に垂直な直線の方程式をl2とし、有限体上の点Q+S、点Sとしたときに、ペアリング演算の中間計算に用いられる直線の方程式とは、l1(Q+S)×l2(S)と、l1(S)×l2(Q+S)である。
【0028】
この発明によれば、ペアリング演算の中間計算に用いられる直線の方程式を展開した式の一部の計算結果を利用して方程式の計算を行うことで計算時間を短縮できる。
【0029】
上記の発明において、前記演算手段は、有限体上の4つの要素(X:Y:Z:Z^2)の組で1つの点の座標を表した簡約座標を用いてペアリング演算の計算を行う。このように簡約座標を用いてペアリング演算の計算を行うことで計算時間を短縮できる。
【0030】
上記の発明において、演算手段は、楕円曲線上の点Q+Sの座標を(xQS,yQS)、点Sの座標を(xS,yS)、楕円曲線上の点Tと点Pを結ぶ直線の方程式をl1、点T+Pを通るx軸に垂直な直線の方程式をl2としたときに、xQS×xSと、yQS×xSの値を事前に計算して記憶しておき、記憶してあるxQS×xSと、yQS×xSの値を用いて、ペアリング演算のl1(Q+S)×l2(S)及びl1(S)×l2(Q+S)の計算を行うようにしても良い。
【0031】
上記のように構成することで、ペアリング演算におけるl1(Q+S)×l2(S)とl1(S)×l2(Q+S)の計算時間を短縮することができる。
上記の発明において、演算手段は、点Tの座標T=(X1:Y1:Z1)、点T+Tの座標T+T=(X4:Y4:Z4)、点T+Tを結ぶ直線l1、点T+Tを通るx軸に垂直な直線l2としたときに、楕円2倍算の計算過程で計算されるZ1^2と3×X1^2+a×Z1^4とを用いて直線l1,l2の方程式の係数の計算を行うようにしてもよい。
【0032】
このように構成することで、ペアリング演算における楕円2倍算の直線の方程式l1,l2の係数の計算時間を短縮できる。
また、上記の発明において、演算手段は、点Tの座標T=(X1:Y1:Z1)、点T+Pの座標T+P=(X3:Y3:Z3)、点T+Pを結ぶ直線l1、点T+Pを通るx軸に垂直な直線l2としたときに、楕円加算の計算過程で計算されるZ3^2とY2×Z1^3−Y1とを用いて、直線l1,l2の方程式の係数の計算を行うようにしても良い。
【0033】
このように構成することで、ペアリング演算における楕円加算の直線l1,l2の方程式の係数の計算時間を短縮できる。
なお、記憶手段は、例えば、図1の記憶部15、あるいは記憶部15とレジスタ14に対応し、演算手段は、図1の演算部12または演算器13に対応する。
【0034】
【発明の実施の形態】
以下、本発明の実施の形態を、図面を参照しながら説明する。実施の形態のペアリング暗号装置は、パーソナルコンピュータ、ICカード(スマートカード)等に内蔵されたICチップ、携帯電話、携帯情報端末装置、DVDプレーヤ等からなり、演算を行うプロセッサを有している。
【0035】
図1は、本発明に係るペアリング暗号装置11の要部の構成を示す図である。実施の形態のペアリング暗号装置11の演算部12は、演算器(CPU)13と、複数のレジスタからなるレジスタ14とからなり、演算結果は再びレジスタ14に入力される。記憶部15は、ハードディスク、メモリ等からなり、後述する楕円曲線暗号のスカラー倍算の演算プログラムが記憶される。演算部12は、記憶部15に記憶されているプログラムを実行し、ペアリング暗号の演算等を行う。
【0036】
以下の説明では、本発明に係るペアリング暗号の演算方法を、素体GF(q)(q=p^m、pは5以上の素数、mは1以上の自然数)上の楕円曲線に適用した場合について説明する。
【0037】
GF(q)上の円曲線Eは、以下の式で表せる。
E:y^2=x^3+a×x+b
ここでa,b,x,yはGF(q)の要素で、4×a^3+27×b^2≠0を満たす。
【0038】
図2は、一般的なテイト・ペアリングのアルゴリズムであるミラー・アルゴリズム(以下、アルゴリズム2という)のプログラムを示す図であり、図3は、そのアルゴリズム2を改良した本発明の第1の実施の形態のアルゴリズム(改良ミラー・アルゴリズム)(以下、アルゴリズム3という)のプログラムを示す図である。
【0039】
先ず、図2に示すアルゴリズム2を説明する。図2のプログラムは、nビットの整数lと、楕円曲線上の点P、Q、Sの座標を入力し、点Pと点Qのペアリング演算(P、Q)の結果を出力するものである。
【0040】
変数Tを記憶するレジスタ(以下、レジスタTいう)に点Pの座標を格納し、関数fを格納するレジスタ(以下、レジスタfという)に初期値として「1」を格納する(図2,S11)。
【0041】
次に、変数iをn−1〜0まで順に変化させ、以下の処理を実行する(図2,S12)。
楕円2倍算T=T+Tを計算し、楕円2倍算の直線l1,l2の方程式の係数を計算する(図2,S13)。
【0042】
ここで、l1は、点Tと点Pを結ぶ直線の方程式であり、l2は、T+Tの点を通るx軸に垂直な直線の方程式を表す。
次に、ステップS14において、f=f^2×l1(Q+S)×l2(S)/l1(S)/l2(Q+S)を計算する。
【0043】
整数lのiビット目の値l[i]が「1」か否かを判別する(図2,S15)。l[i]=1であれば、次のステップS16に進み、楕円加算T+Pを計算し、楕円加算T+Pの直線l1,l2の方程式の係数を計算する。
【0044】
次に、ステップS17において、f=f×l1(Q+S)×l2(S)/l1(S)/l2(Q+S)を計算する。その後、ステップS12に戻り、i=0まで処理を繰り返す。
【0045】
ステップS12〜S17の処理が終了したなら、ステップS18に進み、上記の処理で求めたfの値からf=f^{(q^k−1)/l}を計算する。
上記のミラー・アルゴリズムを改良したものが、図3に示す本発明の第1の実施の形態のアルゴリズム3である。以下の説明では、図2のプログラムと異なる部分について説明する。
【0046】
第1の実施の形態のアルゴリズム3は、図2のテイト・ペアリングの演算のプログラムにおいて、楕円2倍算の計算と、楕円2倍算の直線l1,l2の方程式の係数の計算と、楕円加算の計算と、楕円加算の直線l1,l2の方程式の係数の計算において、共通する中間変数の計算を1度だけ行うようにしたものである。そのため、アルゴリズム3のプログラムにおいては、楕円2倍算と直線l1,l2の方程式の計算を共通する中間変数を用いて行う関数TDBLと、楕円加算と直線l1,l2の方程式の計算を共通する中間変数を用いて行う関数TADDとを定義している。
【0047】
図3のステップS21及びS22の処理は、図2のステップS11及びS12の処理と同じである。
次のステップS23において、関数TDBLを呼び出し、変数Tで指定される点の楕円2倍算と、直線l1、l2の方程式の係数の計算を行い、計算算結果を変数T、l1,l2に対応するレジスタに格納する。
【0048】
次のステップS24において、f=f^2×l1(Q+S)×l2(S)/l1(S)/l2(Q+S)を計算する。
ステップS25において、l[i]=1と判別されたときには、次のステップS26に進み、関数TADDを呼び出し、楕円加算T+Pと直線l1,l2の方程式の係数の計算を行う。
【0049】
次のステップS27において、f=f×l1(Q+S)×l2(S)/l1(S)/l2(Q+S)を計算する。
ステップS28及びS29の処理は、図2のステップS18及びS19と同じである。
【0050】
次に、図4は、図3のプログラムの楕円2倍算と直線l1,l2の方程式の係数を計算する関数TDBLのプログラムを示す図である。
この第1の実施の形態においては、有限体GF(q)の5つの要素(X:Y1:Z:Z2:Z3)で点の座標を表すチュドノフスキー・ヤコビアン座標を簡略化した簡約チュドノフスキー・ヤコビアン座標を用いる。簡約チュドノフスキー・ヤコビアン座標(以下、簡約座標という)とは、有限体GF(q)の4つの要素(X:Y:Z:Z2)で点の座標を表したものである。なお、Z2=Z^2である。
【0051】
関数TDBLの計算において、直線l1,l2の方程式は、点Tと、楕円2倍算により得られる点T+Tの座標を、それぞれT=(X1:Y1:Z1)、T+T=(X4:Y4:Z4)としたときに、以下のように表せる。
【0052】
l1:(Z4×Z1^2×y−2×Y1^2)−(3×X1^2+a×Z1^4)×(Z1^2×x−X1)=0 ・・・・(1)
l2:Z4^2×x−X4=0 ・・・・(2)
図4の関数TDBLのプログラムは、簡約座標で表した点Tの座標(X1:Y1:Z1:Z12)と、定数aを入力し、楕円2倍算により得られる点2×T(=T+T)の座標(X4:Y4:Z4:Z42)と、楕円2倍算の直線l1,l2の方程式の係数A,B,C,D,Eを出力するものである。
【0053】
図4のステップS31以降の処理で楕円2倍算の計算を行う。先ず、点TのX座標X1の平方算を計算し、計算結果を変数X12としてレジスタ(以下、レジスタX12という)に格納する(図4,S32)。次に、点TのY座標Y1の平方算を計算し、計算結果を変数Y12としてレジスタ(以下、レジスタY12という)に格納する(図4,S33)。
【0054】
次に、ステップS33で計算したレジスタY12の平方算を計算し、計算結果を変数Y14としてレジスタY14に格納する(図4,S34)。次に、点TのZ座標の平方Z12の平方算を計算し、計算結果をレジスタZ14に格納する(図4,S35)。以下、計算結果は、それぞれの変数に対応するレジスタに格納されるものとする。
【0055】
次に、3×X12+a×Z14の計算、すなわち、3×X1^2+a×Z1^4を計算し、計算結果をレジスタMに格納する(図4,S36)。
次に、4×X1×Y12の計算,すなわち、4×X1×Y1^2を計算し、計算結果をレジスタSに格納する(図4,S37)。
【0056】
次に、M^2−2×Sの計算、すなわち、レジスタMの2乗からレジスタSを2倍した値を減算し、結果をレジスタX4に格納する(図4,S38)。
次に、M×(S−X4)−8×Y14の計算、すなわち、レジスタSからレジスタX4を減算した値とレジスタMとを乗算し、その計算結果から8×Y1^4を減算し、その結果をレジスタY4に格納する(図4,S39)。
【0057】
次に、2×Y1×Z1の計算結果をレジスタZ4に格納する(図4,S40)。
次に、ステップS40で求めたレジスタZ4の平方算を計算し、計算結果をレジスタZ42に格納する(図4,S41)。
【0058】
上記の処理により、楕円2倍算2×Tにより得られる点のX座標X4,Y座標Y4,Z座標Z4,Z座標の平方Z42を計算することができる。
次に、ステップS42以降の処理で直線l1,l2の方程式の係数を計算する。
【0059】
最初に、−M×Z12の計算、すなわち、−(3×X1^2+a×Z1^2)×Z1^2を計算し、計算結果をレジスタAに格納する(図4,S43)。このステップS43の処理により、レジスタAには、−(3×X1^2×Z1^2+a×Z1^6)が格納される。
【0060】
次に、Z4×Z12の計算、すなわち、レジスタZ4とレジスタZ12とを乗算し、乗算結果をレジスタBに格納する(図4,S44)。このステップS44の処理により、レジスタBには、Z4×Z1^2が格納される。
【0061】
次に、−2×Y12+M×X1の計算、すなわち、レジスタY12に−2を乗算した結果と、レジスタMと点TのX座標X1とを乗算した結果を加算し、計算結果をレジスタCに格納する(図4,S45)。このステップS45の処理により、レジスタCには、−2×Y1^2+(3×X1^2+a×Z1^4)×X1が格納される。
【0062】
次に、レジスタZ42の値をレジスタDに格納する(図4,S46)。このステップS46の処理により、レジスタDには、Z4^2が格納される。
最後に、レジスタX4の負の値をレジスタEに格納する(図4,S47)。
【0063】
上述した関数TDBLのプログラムは、楕円2倍算の計算過程で得られるZ1^2,Y1^2、M=3×X1^2+a×Z1^4をレジスタに記憶しておき、それらのレジスタの値を用いて直線l1,l2の方程式の係数A,B,C,D,Eを計算しているので係数A〜Eを計算するための計算時間を大幅に短縮することができる。
【0064】
上述した関数TDBLを、ヤコビアン座標を用いて計算した場合には、楕円2倍算の計算に4回の乗算と6回の平方算とで、4M+6Sの計算時間を必要とする。直線l1,l2の方程式の係数の計算は、楕円2倍算の計算過程でZ1^2,Y1^2,(3×X1^2+a×Z1^4)が計算されることから、Z4×Z1^2,(3×X1^2+a×Z1^4)×Z1^2,(3×X1^2+a×Z1^4)×X1,Z4^2を計算すればよいので、3M+1Sの計算時間が必要となる。従って、合計で4M+6S+3M+1S=7M+7Sの計算時間が必要となる。
【0065】
また、チュドノフスキー・ヤコビアン座標を用いて計算した場合には、楕円2倍算の計算に5回の乗算と6回の平方算で5M+6Sの計算時間を必要とする。直線l1.l2の方程式の係数の計算は、Z1^2,Y1^2,(3×X1^2+a×Z1^4),Z4^2が計算されていることから、Z4×Z1^2,(3×X1^2+a×Z1^4)×Z1^2,(3×X1^2+a×Z1^4)×X1を計算すればよいので、これに3Mの計算時間を必要とする。従って、合計で5M+6S+3M=8M+6Sの計算時間を必要とする。
【0066】
これに対して、関数TDBLを簡約座標を用いて計算した場合には、楕円2倍算の計算4M+6Sの計算時間を必要とし、直線の方程式の係数の計算は、Z1^2,Y1^2,(3×X1^2+a×Z1^4),Z4^2が楕円2倍算の計算過程で計算されていることから、Z4×Z1^2,(3×X1^2+a×Z1^4)×Z1^2,(3×X1^2+a×Z1^4)×X1を計算すればよいので、その計算時間は3Mとなる。従って、合計で4M+6S+3M=7M+6Sの計算時間となる。
【0067】
以上のことから、簡約座標を用いることで関数TDBLの計算時間を、ヤコビアン座標による計算時間に比べて約6.3%、チュドノフスキー・ヤコビアン座標による計算時間に比べて約7.8%高速にできる。よって、関数TDBLの計算にGF(q)の4つの要素の組(X:Y:Z:Z^2)で表した簡約座標を用いることで楕円2倍算と直線l1,l2の方程式の係数の計算時間を短縮することができる。
【0068】
次に、図5は、図3のプログラムのステップS26の関数TADDのプログラムを示す図である。
関数TADDの計算において、ヤコビアン座標における点Tの座標をT=(X1:Y1:Z1)、点Pの座標をP=(X2:Y2:1)、楕円加算T+Pにより得られる点の座標T+P=(X3:Y3:Z3)としたときに、楕円加算の直線l1,l2の方程式は、以下のように表せる。
l1:Z3×(y−Y2)−(Y2×Z1^3−Y1)×(x−X2)=0 ・・・・(3)
l2:Z3^2×x−X3=0 ・・・(4)
上記の直線l1,l2の方程式の係数を以下のようにする。
【0069】
l1:A×x+B×y+C
l2:D×x+E
図5のプログラムは、簡約座標における点Tと点Pの座標T=(X1:Y1:Z1:Z12)、P=(X2:Y2:1:1)を入力し、楕円加算T+Pにより得られる点の座標T+P=(X3:Y3:Z3:Z32)と、l1,l2の方程式の係数A,B,C,D,Eを出力するものである。
【0070】
図5のステップS51以降の処理で楕円加算の計算を行う。
最初に、点TのX座標X1をレジスタU1に格納する(図5,S52)。次に、点PのX座標X2と、点TのZ座標の平方Z12を乗算し、乗算結果をレジスタU2に格納する(図5,S53)。
【0071】
次に、点TのY座標Y1をレジスタS1に格納する(図5,S54)。次に、Y2×Z1×Z12の計算、すなわち、点PのY座標Y2と、点TのZ座標Z1とZ座標の平方Z12とを乗算し、計算結果をレジスタS2に格納する(図5,S55)。
【0072】
次に、レジスタU2からレジスタU1の値を減算し、減算結果をレジスタHに格納する(図5,S56)。
次に、S2−S1の計算、すなわち、レジスタS2のY2×Z1^3からレジスタS1のY1を減算し、減算結果をレジスタRに格納する(図5,S57)。
【0073】
次に、レジスタHの平方算を計算し、計算結果をレジスタH2に格納する(図5,S58)。
次に、レジスタH2とレジスタHを乗算し、乗算結果をレジスタH3に格納する)(図5,S59)。
【0074】
次に、レジスタU1とレジスタH2を乗算し、乗算結果をレジスタU1H2に格納する(図5,S60)。
次に、−H3−2×U1H1+R^2の計算を行い、計算結果をレジスタX3に格納する(図5,S61)。
【0075】
次に、−S1×H3+R×(U1H2−X3)の計算を行い、計算結果をレジスタY3に格納する(図5,S62)。
次に、点TのZ座標Z1とレジスタHとを乗算し、乗算結果をレジスタZ3に格納する(図5,S63)。
【0076】
次に、レジスタZ3の平方算を計算し、計算結果をレジスタZ32に格納する(図5,S64)。
上述した処理により簡約座標において、楕円加算T+Pにより得られる点の座標T+P=(X3:Y3:Z3:Z32=Z3^2)を計算することができる。
【0077】
ステップS65以降の処理で直線l1,l2の方程式の係数の計算を行う。
先ず、レジスタRの負の値をレジスタAに格納する(図5,S66)。このステップS66の処理により、レジスタAには、−(Y2×Z1^3−Y1)が格納される。
【0078】
次に、レジスタZ3の値をレジスタBに格納する(図5,S67)。次に、−Z3×Y2+R×X2の計算、すなわち、レジスタZ3の負の値とレジスタY2の乗算結果と、レジスタRとレジスタX2の乗算結果を加算し、加算結果をレジスタCに格納する(図5,S68)。このステップS68の処理により、レジスタCには、“−Z3×Y2+(Y2×Z1^3−Y1)×X2”が格納される。
【0079】
次に、レジスタZ32の値をレジスタDに格納する(図5,S69)。このステップS69の処理により、レジスタDには、Z3^2が格納される。
最後に、レジスタX3の負の値をレジスタEに格納する(図5,S70)。
【0080】
楕円加算の計算において、”Y2×Z1^3−Y1(レジスタR)”と、Z3^2(レジスタZ32)が計算されているので、直線l1の方程式の係数Aは、レジスタRの負の値を求めることで計算できる。また、係数Bは、レジスタZ3の値から求めることができる。また、係数Cは、レジスタZ3とレジスタY2の乗算結果とレジスタRとレジスタX2の乗算結果を加算することにより計算できる。さらに、直線l2の係数Dは、レジスタZ32の値から求めることができ、係数Eは、レジスタX3の負の値から求めることができる。
【0081】
従って、楕円加算の計算過程で得られる”Y2×Z1^3−Y1”とZ3^2をレジスタに保持しておき、それらの値を直線l1,l2の方程式の係数の計算に利用することで、2回の乗算、つまり2Mの計算時間で係数の計算を行うことができる。また、楕円加算の計算は、8M+3Sの計算時間で計算することができるので、簡約座標を用いて関数TADDの計算を行った場合、合計で8M+3S+2M=10M+3Sの計算時間で良い。
【0082】
一方、ヤコビアン座標またはチュドノフスキー・ヤコビアン座標を用いて関数TADDの計算を行った場合には、楕円加算の計算に8M+3Sの計算時間を必要とし、直線l1,l2の方程式の係数の計算は、Y2×Z1^3−Y1が楕円加算の計算過程で計算されていることから、Z3×Y2と、(Y2×Z1^3−Y1)×X2と、Z3^3の計算をすればよく、これに2M+1Sの計算時間が必要となる。従って、関数TADDの計算に合計で8M+3S+2M+1S=10M+4Sの計算時間を必要とする。
【0083】
関数TADDを簡約座標を用いて計算した場合の計算時間と、ヤコビアン及びチュドノフスキー・ヤコビアン座標を用いて計算した場合の計算時間を比較すると、前者の計算時間は、後者の計算時間に比べて約6,1%高速になる。従って、楕円加算と直線l1,l2の方程式の係数を求める関数TADDの計算を高速するためには簡約座標を用いることが好ましい。
【0084】
次に、ペアリング演算の中間計算に用いる直線の方程式を展開した式を用いて計算時間を短縮する本発明の第2の実施の形態について説明する。
楕円2倍算T+Tに対応する直線l1,l2の方程式は、前述したようにヤコビアン座標(または簡約座標)において、以下のように表せる。
【0085】
l1:(Z4×Z1^2×y−2×Y1^2)−(3×X1^2+a×Z1^4)×(Z1^2×x−X1)=0 ・・・・・(1)
l2:Z4^2×x−X4=0 ・・・・・・(2)
楕円2倍算T+Tに対応する関数fの計算では、図3のステップS24の関数fの計算式に示されるように、l1(Q+S)×l2(S)とl1(S)×l2(Q+S)を計算する必要がある。直線l1,l2の方程式の係数が与えられた場合に、関数fを上記の方程式に基づいて直接計算すると、値の代入に2×3×k×M、関数fの更新に4Mk+2Skの計算時間が必要となる。ここで、Mk、Skは、有限体GF(q^k)における乗算、平方算の計算時間を表し、通常は、1Mk=k^2×M、1Sk=k^2×Sとなる。よって、必要な計算時間の合計は、2×3×k×M+4Mk+2Sk=(4×k^2+6×k)×M+2×k^2×Sとなる。
【0086】
l1の右辺をAx+By+C、l2の右辺の式をDx+Eとおくと、
l1(Q+S)×l2(S)=A×D×(xQS×xS)+B×D×(yQS×xS)+A×E×xQS+B×E×yQS+C×D×xS+C×E ・・(5)
l1(S)×l2(Q+S)=A×D×(xQS×xS)+B×D×(yQS×xS)+A×E×xS+B×E×yS+C×D×xQS+C×E・・(6)
となる。ここで、xQ,yQ,xQS,yQS、xS,ySは、それぞれ、アファイン座標における点Qの座標Q=(xQ,yQ)、点Q+Sの座標Q+S=(xQS,yQS)、点Sの座標S=(xS,yS)として、ペアリング計算の入力値として与えられる。
【0087】
従って、l1(Q+S)×l2(S)及びl1(S)×l2(Q+S)を上記(5)式及び(6)式のように展開し、xQS×xS、yQS×xSの値を事前に計算しておけば、図3のアルゴリズム3のプログラムのステップS24及びS27の関数fの計算時間を短縮することができる。
【0088】
図6及び図7のプログラムは、上述した考え基づいて作成したプログラムである。図6のプログラムは、図3のステップS24の関数fを計算する処理の詳細なフローチャートである。
【0089】
図6のプログラムは、レジスタf1,f2,A,B,C,D,E,xQS,yQS,xS,yS,xQSxS,xSyQS,xQSySに格納されている値を取得し、計算結果をf1,f2として出力するものである。
【0090】
レジスタAとレジスタDに格納されている直線l1,l2の方程式の係数A、Dを乗算し、乗算結果をレジスタADに格納する(図6,S81)。
次に、レジスタBとレジスタDに格納されている直線l1,l2の方程式の係数BとDを乗算して、乗算結果をレジスタBDに格納する(図6,S82)。
【0091】
次に、レジスタAとレジスタEに格納されている方程式の係数AとEを乗算して、乗算結果をレジスタAEに格納する(図6,S83)。
次に、レジスタBとレジスタEに格納されている方程式の係数BとEを乗算し、乗算結果をレジスタBEに格納する(図6,S84)。
【0092】
次に、レジスタCとレジスタDに格納されている方程式の係数CとDを乗算し、乗算結果をレジスタCDに格納する(図6,S85)。
次に、レジスタCとレジスタEに格納されている方程式の係数CとEを乗算して、乗算結果をレジスタCEに格納する(図6,S86)。
【0093】
次に、レジスタADとレジスタxQSxSとを乗算し、乗算結果をレジスタTに格納する(図6,S87)。このステップS87の処理により、レジスタTには、A×D×xQS×xSが格納される。
【0094】
次に、レジスタBDとレジスタxSyQSの乗算と、レジスタAEとレジスタxQSの乗算と、レジスタBEとレジスタyQSの乗算と、レジスタCDとレジスタxSの乗算を行い、それらの計算結果とレジスタTとレジスタCEとを加算し、その計算結果をレジスタT1に格納する(図6,S88)。
【0095】
次に、レジスタBDとレジスタxQSySの乗算と、レジスタAEとレジスタxSの乗算と、レジスタBEとレジスタySの乗算と、レジスタCDとレジスタxQSの乗算を行い、それらの計算結果とレジスタTとレジスタCEとを加算し、その計算結果をレジスタT2に格納する(図6,S89)。
【0096】
次に、レジスタf1の平方算を計算し、その計算結果とレジスタT1とを乗算し、乗算結果をレジスタf1に格納する(図6,S90)。
次に、レジスタf2の平方算を計算し、その計算結果とレジスタT2とを乗算し、乗算結果をレジスタf2に格納する(図6,S91)。
【0097】
なお、図6のプログラムの処理を、変数i=0となるまで実行した後、f=f1/f2を計算することで関数fを求める。
図6のプログラムによれば、xQS×xSとyQS×xSの値を事前に計算しておき、l1(Q+S)×l2(S)及びl1(S)×l2(Q+S)を計算する計算式を上記のxQS×xSとyQS×xSに基づいて展開した式を用いることで、l1(Q+S)×l2(S)の計算時間は、係数A〜Eの代入に6M、座標値の代入に5kMとなる。また、l1(S)×l2(Q+S)の計算時間は、座標値の代入に4kM、f1,f2の更新に2Mk+2Skとなる。さらに、fの更新2Mk+2Skが必要となる。
【0098】
従って、従来の計算方法で直接計算した場合の計算時間が(4×k^2+6×k)×M+2×k^2×Sであったのに対して、第2の実施の形態の楕円2倍算の中間計算で用いる方程式を展開した式を用いた場合の計算時間は、(2×k^2+9×k+6)×M+2×k^2×Sで良い。よって、ペアリング演算における楕円2倍算の関数fの計算時間を短縮することができる。
【0099】
次に、図7は、図3のアルゴリズム3のステップS27の関数fを計算するプログラムを示す図である。
図7のプログラムは、レジスタf1,f2,A,B,C,D,E,xQS,yQS,xS,yS,xQSxS,xSyQS,xQSySに格納されている値を取得して、f1,f2の計算結果を出力するものである。
【0100】
図7において、ステップS101〜S107までの処理は、上述した図6のステップS81〜S87の処理と同じである。
また、図7のステップS108及びS109の処理も、図6のステップS88及び89の処理と同じである。
【0101】
上記のステップS108の処理により、レジスタT1には、l1(Q+S)×l2(S)に対応する値が格納される。また、ステップS109の処理により、レジスタT2には、l1(S)×l2(Q+S)に対応する値が格納される。
【0102】
次に、レジスタf1とレジスタT1を乗算し、乗算結果をレジスタf1に格納する(図7,S110)。
次に、レジスタf2とレジスタT2を乗算し、乗算結果をレジスタf2に格納する(図7,S111)。
【0103】
図7のプログラムを変数i=0となるまで実行した後、f=f1/f2を計算して関数fを求める。
図7のプログラムによれば、xQS×xSとyQS×xSの値を事前に計算しておき、関数fを計算する計算式をxQS×xSとyQS×xSに基づいて展開した式を用いることで、計算時間を、2×Mk+9×k×M+6×M=(2×k^2+9×k+6)×Mに削減することができる。
【0104】
従って、方程式を直接計算する従来の計算方法を用いた場合に、4Mk+6×k×M=(4×k^2+6×k)の計算時間が必要なのに対して、第2の実施の形態の楕円加算の関数fの中間計算で用いられる方程式を展開した式を用いた場合には、(2×k^2+9×k+6)×Mの計算時間でよい。よって、ペアリング演算において、楕円加算の関数fの計算時間を短縮することができる。
【0105】
なお、上述した実施例では、図3のアルゴリズム3に第1の実施の形態の計算方法と第2の実施の形態の計算方法の両方を適用する場合について説明したが、何れか一方のみを適用してプログラムを作成しても良い。その場合、ペアリング計算の計算時間は、第1の実施の形態による計算時間の短縮効果または第2の実施の形態による計算時間の短縮効果の一方を得ることができる。
【0106】
ここで、上述した実施の形態のペアリング暗号の演算プログラムを実行するペアリング暗号装置のハードウェア構成の一例を図8を参照して説明する。このペアリング暗号装置は、例えば、パーソナルコンピュータ等の情報処理装置により実現できる。
【0107】
CPU23は、上述した演算プログラム等を実行する。ROM24にはBIOS等の制御プログラムが格納される。RAM(メモリ)26は、演算に使用される各種のレジスタとして使用される。記憶装置25には、楕円曲線暗号の演算プログラム等が格納される。
【0108】
記録媒体読み取り装置27は、CDROM、DVD、フレキシブルディスク、ICカード等の可搬記録媒体28の読み取り、あるいは書き込みを行う装置である。
【0109】
入力装置29は、キーボード等のデータを入力する装置である。通信インタフェース30は、インターネット等のネットワーク31に接続するための装置であり、この装置を介してネットワーク上の情報提供者32のサーバからプログラムをダウンロードすることができる。なお、CPU22,RAM24,外部記憶装置25等はバス22により接続されている。
【0110】
本発明は、楕円曲線暗号の暗号化及び解読を行う専用の装置に限らず、ICカード、DVD装置、携帯電話機、パーソナルコンピュータ等の種々の製品に適用できる。
【0111】
(付記1) 楕円曲線上の点に対するペアリングを用いた暗号を処理するペアリング暗号装置において、
有限体上の楕円曲線と、楕円曲線上の点を記憶する記憶手段と、
楕円2倍算または楕円加算の計算過程で得られる値を記憶し、記憶してある値を用いてペアリング演算の直線の方程式の係数を計算する演算手段とを備えるペアリング暗号装置。
【0112】
(付記2) 楕円曲線上の点に対するペアリングを用いた暗号を処理するペアリング暗号装置において、
有限体上の楕円曲線と、楕円曲線上の点を記憶する記憶手段と、
ペアリング演算の中間計算で用いる直線の方程式を展開した式の一部の計算結果を記憶し、記憶してある計算結果を用いて直線の方程式の計算を行う演算手段とを備えるペアリング暗号装置。
【0113】
(付記3) 前記演算手段は、有限体上の4つの要素(X:Y:Z:Z^2)(^:べき乗を表す)の組で1つの点の座標を表した簡約座標を用いてペアリング演算の計算を行う付記1または2記載のペアリング暗号装置。
【0114】
(付記4) 前記演算手段は、楕円曲線上の点Q+Sの座標を(xQS,yQS)、点Sの座標を(xS,yS)、楕円曲線上の点Tと点Pを結ぶ直線の方程式をl1、点T+Pを通るx軸に垂直な直線の方程式をl2としたときに、xQS×xSと、yQS×xSの値を事前に計算して記憶しておき、記憶してあるxQS×xSと、yQS×xSの値を用いて、ペアリング演算のl1(Q+S)×l2(S)/(l1(S)×l2(Q+S))の計算を行う付記1または2記載のペアリング暗号装置。
【0115】
(付記5) 楕円曲線上の点に対するペアリングを用いた暗号の演算プログラムであって、
有限体上の楕円曲線と、楕円曲線上の点を記憶手段に記憶させ、
ペアリング演算の中間計算に用いる直線の方程式を展開した式の一部の計算結果を保持しておき、保持した計算結果を用いてペアリング演算の計算を演算手段に実行させるペアリング暗号演算プログラム。
【0116】
(付記6) 前記演算手段は、点Tの座標T=(X1:Y1:Z1)、点T+Tの座標T+T=(X4:Y4:Z4)、点T+Tを結ぶ直線l1、点T+Tを通るx軸に垂直な直線l2としたときに、楕円2倍算の計算過程で計算されるZ1^2と3×X1^2+a×Z1^4とを用いて直線l1,l2の方程式の係数の計算を行う付記1〜5の何れかに記載のペアリング暗号装置。
【0117】
(付記7) 前記演算手段は、点Tの座標T=(X1:Y1:Z1)、点T+Pの座標T+P=(X3:Y3:Z3)、点T+Pを結ぶ直線l1、点T+Pを通るx軸に垂直な直線l2としたときに、楕円加算の計算過程で計算されるZ3^2とY2×Z1^3−Y1とを用いて、直線l1,l2の方程式の係数の計算を行う付記1〜5の何れかに記載のペアリング暗号装置。
【0118】
(付記8) 前記演算手段は、点Tの座標T=(X1:Y1:Z1)、点T+Pの座標P+T=(X3:Y3:Z3)、点T+Tの座標T+T=(X4:Y4:Z4)とし、点T+Pを結ぶ直線l1(P=Tのときには点Tの接線)、点T+P(または点T+T)を通るx軸に垂直な直線l2としたときに、楕円2倍算の計算過程で計算されるZ1^2と3×X1^2+a×Z1^4とを用いて楕円2倍算における直線l1.l2の方程式の係数の計算を行い、楕円加算の計算過程で計算されるZ3^2とY2×Z1^3−Y1とを用いて、楕円加算における直線l1,l2の方程式の係数の計算を行う付記1〜5の何れかに記載のペアリング暗号装置。
【0119】
(付記9) 楕円曲線上の点に対するペアリングを用いた暗号のペアリング暗号プログラムであって、
有限体上の楕円曲線と、楕円曲線上の点を記憶手段に記憶させ、
楕円2倍算または楕円加算の計算過程で得られる値を記憶し、記憶してある値を用いてペアリング演算の直線の方程式の係数を演算手段に計算させるペアリング暗号演算プログラム。
【0120】
(付記10) 有限体上の4つの要素(X:Y:Z:Z^2)(^:べき乗を表す)の組で1つの点の座標を表した簡約座標を用いてペアリング演算の計算を行わせる付記5または9記載のペアリング暗号演算プログラム。
【0121】
(付記11) 楕円曲線上の点Q+Sの座標を(xQS,yQS)、点Sの座標を(xS,yS)、楕円曲線上の点Tと点Pを結ぶ直線の方程式をl1、点T+Pを通るx軸に垂直な直線の方程式をl2としたときに、xQS×xSと、yQS×xSの値を事前に計算して記憶させ、記憶してあるxQS×xSと、yQS×xSの値を用いて、ペアリング演算のl1(Q+S)×l2(S)/(l1(S)×l2(Q+S))の計算を行わせる付記5、9または10記載のペアリング暗号演算プログラム。
【0122】
(付記12) 点Tの座標T=(X1:Y1:Z1)、点T+Tの座標T+T=(X4:Y4:Z4)、点T+Tを結ぶ直線l1、点T+Tを通るx軸に垂直な直線l2としたときに、楕円2倍算の計算過程で計算されるZ1^2と3×X1^2+a×Z1^4とを用いて直線l1.l2の方程式の計算を行わせる付記5、9〜11の何れかに記載のペアリング暗号演算プログラム。
【0123】
(付記13) 点Tの座標T=(X1:Y1:Z1)、点T+Pの座標T+P=(X3:Y3:Z3)、点T+Pを結ぶ直線l1、点T+Pを通るx軸に垂直な直線l2としたときに、楕円加算の計算過程で計算されるZ3^2とY2×Z1^3−Y1とを用いて、直線l1,l2の方程式の計算を行わせる付記5、9〜11の何れかに記載のペアリング暗号演算プログラム。
【0124】
(付記14) 点Tの座標T=(X1:Y1:Z1)、点T+Pの座標P+T=(X3:Y3:Z3)、点T+Tの座標T+T=(X4:Y4:Z4)とし、点T+Pを結ぶ直線l1(P=Tのときには点Tの接線)、点T+P(または点T+T)を通るx軸に垂直な直線l2としたときに、楕円2倍算の計算過程で計算されるZ1^2と3×X1^2+a×Z1^4とを用いて楕円2倍算における直線l1.l2の方程式の係数の計算を行い、楕円加算の計算過程で計算されるZ3^2とY2×Z1^3−Y1とを用いて、楕円加算における直線l1,l2の方程式の係数の計算を行わせる付記5、9〜11の何れかに記載のペアリング暗号演算プログラム。
【0125】
【発明の効果】
本発明によれば、ペアリング暗号におけるペアリング計算を高速化できる。また、楕円2倍算または楕円加算の計算過程で得られる値を用いてペアリング演算に用いられる直線の方程式の係数を計算することで計算時間を短縮できる。また、ペアリング演算の中間計算に用いられる直線の方程式を展開した式の一部の値を予め計算しておくことで計算時間を短縮できる。
【図面の簡単な説明】
【図1】実施の形態のペアリング暗号装置の要部の構成を示す図である。
【図2】アルゴリズム2のプログラムを示す図である。
【図3】アルゴリズム3のプログラムを示す図である。
【図4】第1の実施の形態の関数TDBLのプログラムを示す図である。
【図5】第1の実施の形態の関数TADDのプログラムを示す図である。
【図6】第2の実施の形態の関数fのプログラムを示す図である。
【図7】第2の実施の形態の関数fのプログラムを示す図である。
【図8】ハードウェア環境を示す図である。
【図9】楕円加算の説明図である。
【図10】楕円2倍算の説明図である。
【図11】アルゴリズム1のプログラムを示す図である。
【符号の説明】
11 ペアリング暗号装置
12 演算部
13 演算器
14 レジスタ
15 記憶部
23 CPU
24 ROM
25 記憶装置
26 RAM
27 記録媒体読み取り装置
29 入出力装置
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a pairing encryption device on an elliptic curve, a pairing encryption calculation method, and a program therefor.
[0002]
[Prior art]
Encryption using pairing on an elliptic curve (hereinafter, pairing encryption) is one of public key encryption, and is composed of encryption primitives such as secret sharing, signature, and authentication. In these primitives, an operation called pairing on an elliptic curve is commonly used and is the center of cryptographic processing. For this reason, in implementing the pairing encryption, a technology for realizing a high-speed pairing operation is indispensable.
[0003]
As an example of the pairing encryption, a description will be given with reference to Document 1 regarding a secret sharing primitive by Ogishi / Sakai / Kasahara.
The center defines and publishes the elliptic curve E, and defines a scalar s (s is an integer) as the center's secret key. The user A registers personal information PA (PA is a point on the elliptic curve E) at the center, and secretly receives a secret key QA = s × PA (QA is a point on the elliptic curve E). Similarly, the user B registers personal information PB (PB is a point on the elliptic curve E) at the center, and secretly receives a secret key QB = s × PB (QB is a point on the elliptic curve E). Personal information will be made available to all users. When the user A and the user B share the secret, the user A transmits the shared information KAB with the user B,
KAB = (QA, PB) + (PB, QA)
= (S × PA, PB) + (PB, s × PA)
= (PA, PB) ^ s + (PB, PA) ^ s
Ask by. Here, (P, Q) represents pairing of the points P and Q. ^ represents a power. User B provides shared information KBA with user A,
KBA = (QB, PA) + (PA, QB)
= (S × PB, PA) + (PA, s × PB)
= (PB, PA) ^ s + (PA, PB) ^ s
Ask by. At this time, since KAB = KBA, the secret information is shared between the user A and the user B. In this way, the Ogishi / Sakai / Kasahara pairing cipher performs secret sharing.
[0004]
The pairing encryption uses an operation called pairing on an elliptic curve. Hereinafter, the elliptic curve will be described.
Assuming that p is a prime number of 5 or more and m is an integer of 1 or more, an elliptic curve on a finite field GF (q) having q = p ^ m is an equation
E: y ^ 2 = x ^ 3 + a × x + b
Is a set obtained by adding a point ∞ called an infinite point to a set of points (x, y) satisfying the following. The point at infinity ∞ may be represented as 0. Here, a, b, x, and y are elements of the finite field GF (q). A point on an elliptic curve can be represented in a coordinate format (affine coordinates) such as (x, y), but the point at infinity ∞ is the only point that cannot be represented in a coordinate format such as (x, y). is there. Thus, in the affine coordinates, points other than the point at infinity are represented as a pair of two elements of GF (q).
[0005]
An operation called addition of points can be defined between points on the elliptic curve E as follows.
Let P be a point on the elliptic curve E on GF (q). We define the inverse of P-P as follows.
[0006]
(1) If P = ∞, -P = ∞
(2) If P ≠ ∞, if P = (x, y), then −P = (x, −y)
Let P1 and P2 be two points on the elliptic curve E on GF (q). The sum P3 = P1 + P2 of P1 and P2 is defined as follows.
[0007]
(1) If P1 = ∞, P3 = P2
(2) If P2 = ∞, P3 = P1
(3) If P1 = -P2, P3 = ∞
(4) If P1 ≠ −P2, P1 = (x1, y1), P2 = (x2, y2),
When P3 = (x3, y3),
x3 = λ ^ 2-x1-x2, y3 = −λ × x3-ν,
However
λ = (y2-y1) / (x2-x1), ν = (y1 × x2-y2 × x1) / (x2-x1)... when P1 ≠ P2
λ = (3 × x1 ^ 2 + a) / (2 × y1), ν = (− x1 ^ 3 + a × x1 + 2 × b) / (2 × y1): When P1 = P2
And Calculating P1 + P2 when P1 ≠ P2 is called elliptic addition, and calculating P1 + P2 = 2 × P1 when P1 = P2 is called elliptic doubling. Elliptic addition and elliptic doubling are calculated by a combination of addition, subtraction, multiplication, squaring, and inverse calculation in a finite field GF (q).
[0008]
9 and 10 are explanatory diagrams of the ellipse addition and the ellipse doubling. As shown in FIG. 9, the elliptic addition is a point obtained by turning the intersection of a straight line connecting points P1 = (x1, y1) and P2 = (x2, y2) on the elliptic curve with the elliptic curve on the x-axis. It is defined as P3 = P1 + P2 = (x3, y3). As shown in FIG. 10, the ellipse doubling is performed by turning the intersection of the tangent line of the point P1 = (x1, y1) on the elliptic curve and the elliptic curve along the x-axis, P4 = P1 + P1 = 2 × P1 = (X4, y4).
[0009]
For an elliptic curve E on a finite field GF (q), a point P on the curve, and an integer (also referred to as a scalar) d, calculate a point d × P = P + P +... + P (sum of d pieces). It is called scalar multiplication. Scalar multiplication is realized by a combination of elliptic addition and elliptic doubling. The scalar multiple d × P is calculated by binary expansion of d.
d = d [n−1] × 2 ^ (n−1) + d [n−2] × 2 ^ (n−2) +... + d [1] × 2 + d [0]
Often done using.
[0010]
FIG. 11 is a diagram showing a conventional scalar multiplication algorithm 1. In FIG. 11, the initial value of the variable Q [0] is set to P in step S1, the ellipse doubling of the point Q [0] is executed in step S3, and the operation result is stored in Q [0]. If d [i] == 1, ellipse addition of Q [0] and point P is executed in step S5, and the operation result is stored in Q [0].
[0011]
Since the scalar multiplication calculation on the elliptic curve is realized by a combination of operations called elliptic addition and elliptic doubling, the entire calculation time is evaluated as the number of calculations of these operations. Further, the calculation time of elliptic addition and elliptic doubling is evaluated by the sum of the calculation times of multiplication, squaring, and inverse element calculation in the finite field GF (q). This is because the actual calculation of elliptic addition, elliptical doubling, and scalar multiplication is calculated by a combination of addition, subtraction, multiplication, squaring, and inverse calculation in a finite field. This is because it is negligibly short compared to the time.
[0012]
The calculation time of the inverse element in the finite field GF (q) is much longer than the calculation time of multiplication and squaring. For this reason, Jacobian coordinates may be used to represent points of an elliptic curve. In Jacobian coordinates, a point is represented by a combination of three elements of a finite field GF (q) such as (X: Y: Z). However, (r ^ 2 × X: r ^ 3 × Y: r × Z) is considered to be the same for the element (X: Y: Z) and the element r of GF (q) where r ≠ 0. For the elliptic curve, in Jacobian coordinates, substituting x = X / Z ^ 2, y = Y / Z ^ 3,
E: Y ^ 2 = X ^ 3 + a × X × Z ^ 4 + b × Z ^ 6
It becomes. Using the Jacobian coordinates, points on the elliptic curve can be represented in a coordinate format such as (X: Y: Z). The point at infinity is ∞ = (0: 1: 0). Thus, in the Jacobian coordinates, all points on the elliptic curve are represented as a set of three elements of GF (q).
[0013]
In the Jacobian coordinates, the calculation time required for ellipse addition is 12M + 4S, and the calculation time required for ellipse doubling is 4M + 6S. In particular, when one Z coordinate of the input point is 1, the calculation time required for the ellipse addition is 8M + 3S.
[0014]
Since the Jacobian coordinates require the square or the third power of the Z coordinates, coordinates (Tudnovsky-Jacobi coordinates) holding these values as coordinate values may be used. In the Chudnovski-Jacobi coordinates, a point is represented by a combination of five elements of a finite field GF (q) such as (X: Y: Z: Z2: Z3), where Z2 = Z {2, Z3 = Z}. It is 3. However, X, Y, and Z are considered as Jacobian coordinates. The point at infinity is ∞ = (0: 1: 0: 0: 0). As described above, all points on the elliptic curve are represented as a set of five elements of GF (q) in the Chudnovsky-Jacobi coordinates.
[0015]
In the Chudnovsky-Jacobian coordinates, the calculation time required for ellipse addition is 11M + 3S, and the calculation time required for ellipse doubling is 5M + 6S. In particular, when one Z coordinate of the input point is 1, the calculation time required for the ellipse addition is 8M + 3S.
[0016]
Next, pairing on an elliptic curve will be described. Let E be an elliptic curve on a finite field GF (q). Let l be a divisor of the number of points on the elliptic curve E (the order of the curve, called #E), and choose the smallest natural number such that l is a divisor of q ^ k-1 as k. At this time, the l-order pairing (P, Q) for the point P on the finite field GF (q) of the elliptic curve E and the point Q on the finite field GF (q ^ k) is 1 for P and Q. This is an operation for associating elements of a set formed by the l-th root of and satisfies the following condition.
[0017]
(P1 + P2, Q) = (P1, Q) × (P2, Q)
(P, Q1 + Q2) = (P, Q1) × (P, Q2)
For all P, when Q = ∞, (P, Q) = 1
As specific examples of the pairing, Beil pairing and Tate pairing are known. In the following, Tate pairing will be used unless otherwise specified.
[0018]
Next, a method of calculating the pairing will be described.
Tate pairing for a point P on a finite field GF (q) of an elliptic curve E and a point Q on a finite field GF (q ^ k) is
(P, Q) = (fp (Q + S) / fp (S)) ^ ((q ^ k−1) / l)
Can be expressed as Here, the function fp is a function that receives a point on the finite field GF (q ^ k) and outputs an element of a set of l-th root, and can be expressed by the following equation.
[0019]
fp (Q + S) = Π [11 (Q + S) / 12 (Q + S)]
fp (S) = Π [11 (S) / 12 (S)]
The point S is a point on the finite field GF (q ^ k), l1 is an equation of a straight line connecting the point T and the point P (in the case of T = P, a tangent to the point T), and l2 is T + P (T = P represents the equation of a straight line perpendicular to the x-axis through T + T). Further, Π indicates that a product of equations of a straight line satisfying a certain condition is calculated.
[0020]
[Non-patent document 1]
Seishi Ogishi, Ryuichi Sakai, Masao Kasahara, "A Study on Key Agreement Based on ID Information on Elliptic Curve", IEICE Technical Report, ISEC 99-57, November 1999
[0021]
[Problems to be solved by the invention]
In order for the pairing encryption to be widely used in the real world, it is required to reduce processing time and resources (memory, circuit amount, etc.) required for mounting. In the pairing encryption, an operation called pairing is commonly used, and the specific gravity of the entire processing is high. Therefore, the performance improvement of this part is directly linked to the overall performance improvement. Since the pairing calculation has a high specific gravity in the pairing encryption processing, further speeding up is desired.
[0022]
However, the coordinates used for the calculation of the elliptic curve cryptography are not always optimal for the calculation of the pairing since they are intended for the high-speed calculation of the scalar multiplication of the elliptic curve.
[0023]
An object of the present invention is to perform a pairing calculation in a pairing encryption at high speed.
[0024]
[Means for Solving the Problems]
The present invention provides a pairing cryptographic device that processes cryptography using pairing for a point on an elliptic curve, an elliptic curve on a finite field, storage means for storing a point on the elliptic curve, and elliptic doubling or A calculating means for storing a value obtained in the calculation process of the elliptic addition, and calculating a coefficient of a linear equation of the pairing calculation using the stored value.
[0025]
According to the present invention, it is possible to calculate the coefficient of the equation of the straight line of the pairing operation using the value obtained in the calculation process of the ellipse doubling or the ellipse addition, so that the calculation time of the pairing operation is reduced. be able to.
[0026]
Another invention provides a pairing encryption device that processes encryption using pairing for a point on an elliptic curve, wherein the storage unit stores an elliptic curve on a finite field, a point on the elliptic curve, and a pairing operation. A calculation unit is provided for storing a part of the calculation result of an equation obtained by expanding a straight line equation used for the intermediate calculation, and calculating the straight line equation using the stored calculation result.
[0027]
For example, when the equation of a straight line connecting the point T and the point P on the elliptic curve is 11, the equation of a straight line passing through the point T + P and perpendicular to the x-axis is 12, and the points Q + S and the point S on the finite field are: The straight line equations used for the intermediate calculation of the pairing operation are 11 (Q + S) × 12 (S) and 11 (S) × 12 (Q + S).
[0028]
According to the present invention, the calculation time can be shortened by performing the calculation of the equation by using a part of the calculation result of the equation developed from the straight line equation used for the intermediate calculation of the pairing calculation.
[0029]
In the above invention, the calculating means performs the calculation of the pairing calculation using reduced coordinates representing the coordinates of one point by a set of four elements (X: Y: Z: Z ^ 2) on the finite field. Do. Thus, the calculation time can be reduced by performing the pairing calculation using the simplified coordinates.
[0030]
In the above invention, the calculating means calculates the coordinates of the point Q + S on the elliptic curve as (xQS, yQS), the coordinates of the point S as (xS, yS), and the equation of a straight line connecting the point T and the point P on the elliptic curve. When the equation of a straight line perpendicular to the x-axis passing through the point T + P is set to l2, the values of xQS × xS and yQS × xS are calculated and stored in advance, and the stored xQS × xS , YQS × xS, the calculation of l1 (Q + S) × 12 (S) and l1 (S) × 12 (Q + S) of the pairing operation may be performed.
[0031]
With the above configuration, it is possible to reduce the calculation time of l1 (Q + S) × 12 (S) and 11 (S) × 12 (Q + S) in the pairing operation.
In the above invention, the calculation means calculates the coordinate T of the point T = (X1: Y1: Z1), the coordinate T + T of the point T + T = (X4: Y4: Z4), a straight line 11 connecting the point T + T, and an x-axis passing through the point T + T. Is calculated using the equation Z1 ^ 2 and 3 × X1 ^ 2 + a × Z1 ^ 4, which are calculated in the calculation process of the ellipse doubling, when the straight line l2 is perpendicular to the straight line l2. You may do so.
[0032]
With this configuration, it is possible to reduce the calculation time for the coefficients of the straight line equations l1 and l2 of the elliptic doubling in the pairing calculation.
Further, in the above invention, the calculation means passes the coordinates T of the point T = (X1: Y1: Z1), the coordinates T + P of the point T + P = (X3: Y3: Z3), a straight line 11 connecting the point T + P, and the point T + P. Assuming that a straight line l2 perpendicular to the x-axis is used, the coefficients of the equations of the straight lines l1 and l2 are calculated using Z3 ^ 2 and Y2 × Z1 ^ 3-Y1 calculated in the elliptic addition calculation process. You may do it.
[0033]
With this configuration, it is possible to reduce the calculation time of the coefficients of the equations of the straight lines l1 and l2 of the elliptic addition in the pairing calculation.
The storage means corresponds to, for example, the storage unit 15 of FIG. 1, or the storage unit 15 and the register 14, and the calculation means corresponds to the calculation unit 12 or the calculation unit 13 of FIG.
[0034]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. The pairing encryption device according to the embodiment includes a personal computer, an IC chip built in an IC card (smart card), a mobile phone, a portable information terminal device, a DVD player, and the like, and has a processor for performing calculations. .
[0035]
FIG. 1 is a diagram showing a configuration of a main part of a pairing encryption device 11 according to the present invention. The operation unit 12 of the pairing encryption device 11 according to the embodiment includes an operation unit (CPU) 13 and a register 14 including a plurality of registers. The operation result is input to the register 14 again. The storage unit 15 includes a hard disk, a memory, and the like, and stores a calculation program of scalar multiplication of elliptic curve cryptography described later. The calculation unit 12 executes a program stored in the storage unit 15 and performs a calculation of the pairing encryption and the like.
[0036]
In the following description, the operation method of the pairing encryption according to the present invention is applied to an elliptic curve on a prime field GF (q) (q = p ^ m, p is a prime number of 5 or more, m is a natural number of 1 or more). A description will be given of the case in which this is done.
[0037]
A circular curve E on GF (q) can be expressed by the following equation.
E: y ^ 2 = x ^ 3 + a × x + b
Here, a, b, x, and y are elements of GF (q) and satisfy 4 × a ^ 3 + 27 × b ^ 2 ≠ 0.
[0038]
FIG. 2 is a diagram showing a program of a mirror algorithm (hereinafter referred to as algorithm 2) which is a general Tate pairing algorithm, and FIG. 3 is a first embodiment of the present invention in which the algorithm 2 is improved. FIG. 6 is a diagram showing a program of an algorithm (improved mirror algorithm) (hereinafter referred to as algorithm 3) of the form (1).
[0039]
First, algorithm 2 shown in FIG. 2 will be described. The program shown in FIG. 2 inputs an n-bit integer 1 and coordinates of points P, Q, and S on an elliptic curve, and outputs a result of a pairing operation (P, Q) of the points P and Q. is there.
[0040]
The coordinates of the point P are stored in a register storing the variable T (hereinafter referred to as register T), and "1" is stored as an initial value in a register storing the function f (hereinafter referred to as register f) (FIG. 2, S11). ).
[0041]
Next, the variable i is sequentially changed from n-1 to 0, and the following processing is executed (FIG. 2, S12).
The ellipse doubling T = T + T is calculated, and the coefficients of the equations of the straight lines l1 and l2 of the ellipse doubling are calculated (FIG. 2, S13).
[0042]
Here, l1 is an equation of a straight line connecting the point T and the point P, and l2 is an equation of a straight line perpendicular to the x-axis passing through the point of T + T.
Next, in step S14, f = f ^ 2 × 11 (Q + S) × 12 (S) / 11 (S) / 12 (Q + S) is calculated.
[0043]
It is determined whether the value l [i] of the i-th bit of the integer l is "1" (FIG. 2, S15). If l [i] = 1, the process proceeds to the next step S16, where elliptic addition T + P is calculated, and coefficients of equations of straight lines l1 and l2 of elliptic addition T + P are calculated.
[0044]
Next, in step S17, f = f × 11 (Q + S) × 12 (S) / 11 (S) / 12 (Q + S) is calculated. Thereafter, the process returns to step S12, and the process is repeated until i = 0.
[0045]
When the processing of steps S12 to S17 is completed, the process proceeds to step S18, and f = f {(q {k-1) / l} is calculated from the value of f obtained in the above processing.
An improvement of the above-mentioned mirror algorithm is algorithm 3 of the first embodiment of the present invention shown in FIG. In the following description, portions different from the program of FIG. 2 will be described.
[0046]
The algorithm 3 of the first embodiment is based on the calculation of the elliptic doubling, the calculation of the coefficients of the equations of the straight lines l1 and l2 of the elliptic doubling, In the calculation of the addition and the calculation of the coefficients of the equations of the straight lines l1 and l2 of the elliptic addition, the calculation of the common intermediate variable is performed only once. Therefore, in the program of the algorithm 3, the function TDBL that performs the elliptic doubling and the calculation of the equations of the straight lines l1 and l2 using the common intermediate variable, and the intermediate function that performs the elliptic addition and the calculation of the equations of the straight lines l1 and l2 are common. A function TADD performed using variables is defined.
[0047]
The processing in steps S21 and S22 in FIG. 3 is the same as the processing in steps S11 and S12 in FIG.
In the next step S23, the function TDBL is called, the ellipse doubling of the point specified by the variable T and the calculation of the coefficients of the equations of the straight lines l1 and l2 are performed, and the calculation results correspond to the variables T, l1 and l2. Stored in the register.
[0048]
In the next step S24, f = f ^ 2 × 11 (Q + S) × 12 (S) / 11 (S) / 12 (Q + S) is calculated.
When it is determined in step S25 that l [i] = 1, the process proceeds to the next step S26, where the function TADD is called, and the coefficients of the equations of the elliptic addition T + P and the straight lines l1 and l2 are calculated.
[0049]
In the next step S27, f = f × 11 (Q + S) × 12 (S) / 11 (S) / 12 (Q + S) is calculated.
Steps S28 and S29 are the same as steps S18 and S19 in FIG.
[0050]
Next, FIG. 4 is a diagram showing a program of a function TDBL for calculating elliptic doubling and coefficients of equations of straight lines l1 and l2 in the program of FIG.
In the first embodiment, a simplified Chudnov is obtained by simplifying the Tudnovski-Jacobi coordinates representing the coordinates of a point with five elements (X: Y1: Z: Z2: Z3) of a finite field GF (q). Uses Ski-Jacobi coordinates. The reduced Chudnovsky-Jacobi coordinates (hereinafter referred to as reduced coordinates) are the coordinates of a point represented by four elements (X: Y: Z: Z2) of a finite field GF (q). Note that Z2 = Z ^ 2.
[0051]
In the calculation of the function TDBL, the equations of the straight lines l1 and l2 represent the coordinates of the point T and the point T + T obtained by the ellipse doubling as T = (X1: Y1: Z1) and T + T = (X4: Y4: Z4, respectively). ) Can be expressed as follows.
[0052]
11: (Z4 × Z1 ^ 2 × y-2 × Y1 ^ 2)-(3 × X1 ^ 2 + a × Z1 ^ 4) × (Z1 ^ 2 × x-X1) = 0 (1)
l2: Z4 ^ 2 × x−X4 = 0 (2)
The program of the function TDBL shown in FIG. 4 is obtained by inputting the coordinates (X1: Y1: Z1: Z12) of the point T expressed by the simplified coordinates and a constant a, and obtaining a point 2 × T (= T + T) obtained by elliptic doubling. (X4: Y4: Z4: Z42) and the coefficients A, B, C, D, and E of the equations of the straight lines 11 and 12 of the ellipse doubling.
[0053]
The calculation of the ellipse doubling is performed in the processing after step S31 in FIG. First, the squaring of the X coordinate X1 of the point T is calculated, and the calculation result is stored in a register (hereinafter, referred to as a register X12) as a variable X12 (FIG. 4, S32). Next, the square calculation of the Y coordinate Y1 of the point T is calculated, and the calculation result is stored in a register (hereinafter, referred to as a register Y12) as a variable Y12 (FIG. 4, S33).
[0054]
Next, the square calculation of the register Y12 calculated in step S33 is calculated, and the calculation result is stored in the register Y14 as a variable Y14 (FIG. 4, S34). Next, the square calculation of the square Z12 of the Z coordinate of the point T is calculated, and the calculation result is stored in the register Z14 (FIG. 4, S35). Hereinafter, it is assumed that the calculation results are stored in registers corresponding to the respective variables.
[0055]
Next, 3 × X12 + a × Z14 is calculated, that is, 3 × X1 ^ 2 + a × Z1 ^ 4, and the calculation result is stored in the register M (FIG. 4, S36).
Next, the calculation of 4 × X1 × Y12, that is, 4 × X1 × Y1 ^ 2 is calculated, and the calculation result is stored in the register S (FIG. 4, S37).
[0056]
Next, the calculation of M ^ 2-2 × S, that is, the value obtained by doubling the register S from the square of the register M is subtracted, and the result is stored in the register X4 (FIG. 4, S38).
Next, the calculation of M × (S−X4) −8 × Y14, that is, the value obtained by subtracting the register X4 from the register S is multiplied by the register M, and 8 × Y1 ^ 4 is subtracted from the calculation result. The result is stored in the register Y4 (FIG. 4, S39).
[0057]
Next, the calculation result of 2 × Y1 × Z1 is stored in the register Z4 (FIG. 4, S40).
Next, the square calculation of the register Z4 obtained in step S40 is calculated, and the calculation result is stored in the register Z42 (FIG. 4, S41).
[0058]
By the above processing, the X coordinate X4, the Y coordinate Y4, the Z coordinate Z4, and the square Z42 of the Z coordinate of the point obtained by the ellipse doubling 2 × T can be calculated.
Next, the coefficients of the equations of the straight lines l1 and l2 are calculated in the processing after step S42.
[0059]
First, calculation of −M × Z12, that is, − (3 × X1 ^ 2 + a × Z1 ^ 2) × Z1 ^ 2 is calculated, and the calculation result is stored in the register A (FIG. 4, S43). By the processing in step S43,-(3 × X1 ^ 2 × Z1 ^ 2 + a × Z1 ^ 6) is stored in the register A.
[0060]
Next, Z4 × Z12 is calculated, that is, the register Z4 is multiplied by the register Z12, and the multiplication result is stored in the register B (FIG. 4, S44). By the processing in step S44, Z4 × Z1 ^ 2 is stored in the register B.
[0061]
Next, the calculation of −2 × Y12 + M × X1, that is, the result obtained by multiplying the register Y12 by −2 and the result obtained by multiplying the register M and the X coordinate X1 of the point T are added, and the calculation result is stored in the register C. (S45 in FIG. 4). By the processing in step S45, the register C stores −2 × Y1 ^ 2 + (3 × X1 ^ 2 + a × Z1 ^ 4) × X1.
[0062]
Next, the value of the register Z42 is stored in the register D (FIG. 4, S46). By the processing in step S46, Z4 ^ 2 is stored in the register D.
Finally, the negative value of the register X4 is stored in the register E (FIG. 4, S47).
[0063]
The above program of the function TDBL stores Z1 ^ 2, Y1 ^ 2, and M = 3 × X1 ^ 2 + a × Z1 ^ 4 obtained in the calculation process of the ellipse doubling in registers, and stores the values of these registers. Are used to calculate the coefficients A, B, C, D, and E of the equations of the straight lines l1 and l2, so that the calculation time for calculating the coefficients A to E can be greatly reduced.
[0064]
When the above function TDBL is calculated using the Jacobian coordinates, the calculation of elliptic doubling requires 4M + 6S calculation time for 4 multiplications and 6 squaring operations. In the calculation of the coefficients of the equations of the straight lines l1 and l2, since Z1 ^ 2, Y1 ^ 2, and (3 × X1 ^ 2 + a × Z1 ^ 4) are calculated in the calculation process of the ellipse doubling, Z4 × Z1 ^ It is sufficient to calculate 2, (3 × X1 ^ 2 + a × Z1 ^ 4) × Z1 ^ 2, (3 × X1 ^ 2 + a × Z1 ^ 4) × X1, Z4 ^ 2, so that a calculation time of 3M + 1S is required. . Therefore, a total of 4M + 6S + 3M + 1S = 7M + 7S calculation time is required.
[0065]
Further, when the calculation is performed using the Chudnovsky-Jacobi coordinates, the calculation of the elliptic doubling requires a calculation time of 5M + 6S by five multiplications and six squares. Straight line l1. In the calculation of the coefficient of the equation of l2, since Z1 ^ 2, Y1 ^ 2, (3 × X1 ^ 2 + a × Z1 ^ 4), Z4 ^ 2 are calculated, Z4 × Z1 ^ 2, (3 × X1 (2 + a × Z1 ^ 4) × Z1 ^ 2, (3 × X1 ^ 2 + a × Z1 ^ 4) × X1, which requires 3M calculation time. Therefore, a total calculation time of 5M + 6S + 3M = 8M + 6S is required.
[0066]
On the other hand, when the function TDBL is calculated using the reduced coordinates, the calculation time of the ellipse doubling calculation 4M + 6S is required, and the calculation of the coefficient of the equation of the straight line is Z1 ^ 2, Y1 ^ 2, Since (3 × X1 ^ 2 + a × Z1 ^ 4) and Z4 ^ 2 are calculated in the calculation process of the elliptic doubling, Z4 × Z1 ^ 2, (3 × X1 ^ 2 + a × Z1 ^ 4) × Z1 Since it is sufficient to calculate ^ 2, (3 × X1 ^ 2 + a × Z1 よ い 4) × X1, the calculation time is 3M. Therefore, the total calculation time is 4M + 6S + 3M = 7M + 6S.
[0067]
From the above, by using the reduced coordinates, the calculation time of the function TDBL is approximately 6.3% faster than the calculation time in the Jacobian coordinates, and approximately 7.8% faster than the calculation time in the Chudnovsky-Jacobi coordinates. Can be. Therefore, by using the reduced coordinates expressed by a set of four elements of GF (q) (X: Y: Z: Z ^ 2) in the calculation of the function TDBL, the elliptic doubling and the coefficients of the equations of the straight lines l1 and l2 are performed. Calculation time can be reduced.
[0068]
Next, FIG. 5 is a diagram showing a program of the function TADD in step S26 of the program of FIG.
In the calculation of the function TADD, the coordinates of the point T in the Jacobian coordinates are T = (X1: Y1: Z1), the coordinates of the point P are P = (X2: Y2: 1), and the coordinates T + P of the point obtained by the elliptic addition T + P = When (X3: Y3: Z3), the equations of the straight lines l1 and l2 of the ellipse addition can be expressed as follows.
11: Z3 × (y−Y2) − (Y2 × Z1 ^ 3-Y1) × (x−X2) = 0 (3)
l2: Z3 ^ 2 × x−X3 = 0 (4)
The coefficients of the equations of the straight lines l1 and l2 are as follows.
[0069]
11: Axx + Bxy + C
l2: Dxx + E
The program shown in FIG. 5 is obtained by inputting coordinates T = (X1: Y1: Z1: Z12) and P = (X2: Y2: 1: 1) of the point T and the point P in the simplified coordinates, and obtaining the points obtained by the ellipse addition T + P. And outputs the coefficients A, B, C, D, and E of the equations of l1 and l2 as T + P = (X3: Y3: Z3: Z32).
[0070]
The calculation of the ellipse addition is performed in the processing after step S51 in FIG.
First, the X coordinate X1 of the point T is stored in the register U1 (FIG. 5, S52). Next, the X coordinate X2 of the point P is multiplied by the square Z12 of the Z coordinate of the point T, and the multiplication result is stored in the register U2 (FIG. 5, S53).
[0071]
Next, the Y coordinate Y1 of the point T is stored in the register S1 (FIG. 5, S54). Next, the calculation of Y2 × Z1 × Z12, that is, the Y coordinate Y2 of the point P is multiplied by the Z coordinate Z1 of the point T and the square Z12 of the Z coordinate, and the calculation result is stored in the register S2 (FIG. 5). S55).
[0072]
Next, the value of the register U1 is subtracted from the register U2, and the subtraction result is stored in the register H (FIG. 5, S56).
Next, the calculation of S2-S1, that is, Y1 of the register S1 is subtracted from Y2 × Z1 ^ 3 of the register S2, and the subtraction result is stored in the register R (FIG. 5, S57).
[0073]
Next, the square calculation of the register H is calculated, and the calculation result is stored in the register H2 (FIG. 5, S58).
Next, the register H2 is multiplied by the register H, and the multiplication result is stored in the register H3 (FIG. 5, S59).
[0074]
Next, the register U1 is multiplied by the register H2, and the multiplication result is stored in the register U1H2 (FIG. 5, S60).
Next, a calculation of −H3−2 × U1H1 + R ^ 2 is performed, and the calculation result is stored in the register X3 (S61 in FIG. 5).
[0075]
Next, calculation of -S1 * H3 + R * (U1H2-X3) is performed, and the calculation result is stored in the register Y3 (FIG. 5, S62).
Next, the Z coordinate Z1 of the point T is multiplied by the register H, and the multiplication result is stored in the register Z3 (FIG. 5, S63).
[0076]
Next, the square calculation of the register Z3 is calculated, and the calculation result is stored in the register Z32 (FIG. 5, S64).
By the above-described processing, the coordinates T + P of the point obtained by the ellipse addition T + P in the simplified coordinates can be calculated (X3: Y3: Z3: Z32 = Z3 ^ 2).
[0077]
In the processing after step S65, the coefficients of the equations of the straight lines l1 and l2 are calculated.
First, the negative value of the register R is stored in the register A (S66 in FIG. 5). By the process of step S66,-(Y2 × Z1 ^ 3-Y1) is stored in the register A.
[0078]
Next, the value of the register Z3 is stored in the register B (FIG. 5, S67). Next, the calculation of −Z3 × Y2 + R × X2, that is, the result of multiplying the negative value of the register Z3 by the register Y2 and the result of the multiplication of the register R and the register X2 are stored in the register C (FIG. 5, S68). By the processing in step S68, “−Z3 × Y2 + (Y2 × Z1 ^ 3-Y1) × X2” is stored in the register C.
[0079]
Next, the value of the register Z32 is stored in the register D (FIG. 5, S69). By the processing in step S69, Z3 ^ 2 is stored in the register D.
Finally, the negative value of the register X3 is stored in the register E (FIG. 5, S70).
[0080]
In the calculation of the ellipse addition, since “Y2 × Z1 ^ 3-Y1 (register R)” and Z3 ^ 2 (register Z32) are calculated, the coefficient A of the equation of the straight line l1 is a negative value of the register R. Can be calculated by finding The coefficient B can be obtained from the value of the register Z3. The coefficient C can be calculated by adding the multiplication result of the register Z3 and the register Y2 and the multiplication result of the register R and the register X2. Further, the coefficient D of the straight line l2 can be obtained from the value of the register Z32, and the coefficient E can be obtained from the negative value of the register X3.
[0081]
Therefore, “Y2 × Z1 ^ 3-Y1” and Z3 ^ 2 obtained in the calculation process of the ellipse addition are held in the register, and the values are used for calculating the coefficients of the equations of the straight lines l1 and l2. The coefficient can be calculated in two multiplications, that is, in a calculation time of 2M. In addition, since the calculation of the ellipse addition can be performed in the calculation time of 8M + 3S, when the function TADD is calculated using the simplified coordinates, the calculation time of 8M + 3S + 2M = 10M + 3S in total is sufficient.
[0082]
On the other hand, when the function TADD is calculated using the Jacobian coordinates or the Chudnovsky-Jacobi coordinates, the calculation time of 8M + 3S is required for the calculation of the ellipse addition, and the calculation of the coefficients of the equations of the straight lines l1 and l2 is as follows. Since Y2 × Z1 ^ 3-Y1 is calculated in the calculation process of the ellipse addition, it is sufficient to calculate Z3 × Y2, (Y2 × Z1 ^ 3-Y1) × X2, and Z3 ^ 3. Requires 2M + 1S calculation time. Accordingly, calculation of the function TADD requires a total of 8M + 3S + 2M + 1S = 10M + 4S calculation time.
[0083]
Comparing the calculation time when the function TADD is calculated using the simplified coordinates and the calculation time when using the Jacobian and Chudnovsky-Jacobi coordinates, the former calculation time is smaller than the latter calculation time. Approximately 6.1% faster. Therefore, it is preferable to use simplified coordinates in order to speed up the calculation of the function TADD for obtaining the coefficients of the equations of the ellipse addition and the straight lines l1 and l2.
[0084]
Next, a description will be given of a second embodiment of the present invention in which the calculation time is reduced by using an expression obtained by expanding a straight line equation used for the intermediate calculation of the pairing calculation.
The equation of the straight lines l1 and l2 corresponding to the ellipse doubling T + T can be expressed as follows in Jacobian coordinates (or simplified coordinates) as described above.
[0085]
11: (Z4 × Z1 ^ 2 × y−2 × Y1 ^ 2) − (3 × X1 ^ 2 + a × Z1 ^ 4) × (Z1 ^ 2 × x−X1) = 0 (1)
l2: Z4 ^ 2 × x−X4 = 0 (2)
In the calculation of the function f corresponding to the ellipse doubling T + T, as shown in the calculation formula of the function f in step S24 in FIG. 3, 11 (Q + S) × 12 (S) and 11 (S) × 12 (Q + S) Needs to be calculated. When the coefficients of the equations of the straight lines l1 and l2 are given, when the function f is directly calculated based on the above equation, the calculation time of 2 × 3 × k × M for substituting the value and 4Mk + 2Sk for updating the function f Required. Here, Mk and Sk represent calculation times for multiplication and squaring in a finite field GF (q ^ k), and are usually 1Mk = k ^ 2 × M and 1Sk = k ^ 2 × S. Therefore, the total required calculation time is 2 × 3 × k × M + 4Mk + 2Sk = (4 × k ^ 2 + 6 × k) × M + 2 × k ^ 2 × S.
[0086]
If the right side of l1 is Ax + By + C and the right side of l2 is Dx + E,
11 (Q + S) × 12 (S) = A × D × (xQS × xS) + B × D × (yQS × xS) + A × E × xQS + B × E × yQS + C × D × xS + C × E (5)
11 (S) × 12 (Q + S) = A × D × (xQS × xS) + B × D × (yQS × xS) + A × E × xS + B × E × ys + C × D × xQS + C × E (6)
It becomes. Here, xQ, yQ, xQS, yQS, xS, and yS are coordinates Q of point Q in affine coordinates = (xQ, yQ), coordinates Q + S of point Q + S = (xQS, yQS), and coordinates S of point S, respectively. = (XS, yS) as an input value for the pairing calculation.
[0087]
Therefore, l1 (Q + S) × 12 (S) and l1 (S) × 12 (Q + S) are expanded as in the above equations (5) and (6), and the values of xQS × xS and yQS × xS are determined in advance. If the calculation is performed, the calculation time of the function f in steps S24 and S27 of the program of the algorithm 3 in FIG. 3 can be reduced.
[0088]
6 and 7 are programs created based on the above-described concept. The program in FIG. 6 is a detailed flowchart of the process for calculating the function f in step S24 in FIG.
[0089]
The program in FIG. 6 obtains the values stored in the registers f1, f2, A, B, C, D, E, xQS, yQS, xS, yS, xQSxS, xSyQS, xQSyS, and calculates the calculation results as f1, f2 Is output as
[0090]
The coefficients A and D of the equations of the straight lines l1 and l2 stored in the registers A and D are multiplied, and the multiplication result is stored in the register AD (S81 in FIG. 6).
Next, the coefficients B and D of the equations of the straight lines 11 and 12 stored in the register B and the register D are multiplied, and the multiplication result is stored in the register BD (S82 in FIG. 6).
[0091]
Next, the coefficients A and E of the equations stored in the registers A and E are multiplied, and the multiplication result is stored in the register AE (S83 in FIG. 6).
Next, the coefficients B and E of the equations stored in the register B and the register E are multiplied, and the multiplication result is stored in the register BE (S84 in FIG. 6).
[0092]
Next, the coefficients C and D of the equations stored in the registers C and D are multiplied, and the multiplication result is stored in the register CD (S85 in FIG. 6).
Next, the coefficients C and E of the equations stored in the registers C and E are multiplied, and the multiplication result is stored in the register CE (FIG. 6, S86).
[0093]
Next, the register AD is multiplied by the register xQSxS, and the multiplication result is stored in the register T (S87 in FIG. 6). By the process of step S87, A × D × xQS × xS is stored in the register T.
[0094]
Next, the multiplication of the register BD and the register xSyQS, the multiplication of the register AE and the register xQS, the multiplication of the register BE and the register yQS, and the multiplication of the register CD and the register xS are performed. And the result of the calculation is stored in the register T1 (FIG. 6, S88).
[0095]
Next, a multiplication of the register BD and the register xQSyS, a multiplication of the register AE and the register xS, a multiplication of the register BE and the register yS, and a multiplication of the register CD and the register xQS are performed. And the result of the calculation is stored in the register T2 (FIG. 6, S89).
[0096]
Next, the square calculation of the register f1 is calculated, the calculation result is multiplied by the register T1, and the multiplication result is stored in the register f1 (FIG. 6, S90).
Next, the square calculation of the register f2 is calculated, the calculation result is multiplied by the register T2, and the multiplication result is stored in the register f2 (S91 in FIG. 6).
[0097]
After executing the processing of the program in FIG. 6 until the variable i = 0, the function f is obtained by calculating f = f1 / f2.
According to the program of FIG. 6, the values of xQS × xS and yQS × xS are calculated in advance, and the calculation formulas for calculating 11 (Q + S) × 12 (S) and 11 (S) × 12 (Q + S) are as follows. By using the equations developed based on the above xQS × xS and yQS × xS, the calculation time of 11 (Q + S) × 12 (S) is 6M for substituting the coefficients A to E and 5 kM for substituting the coordinate values. Become. Further, the calculation time of l1 (S) × 12 (Q + S) is 4 kM for substituting coordinate values and 2Mk + 2Sk for updating f1 and f2. Further, 2Mk + 2Sk of f is required.
[0098]
Accordingly, while the calculation time when directly calculating by the conventional calculation method is (4 × k ^ 2 + 6 × k) × M + 2 × k ^ 2 × S, the ellipse is doubled in the second embodiment. The calculation time in the case of using an expression obtained by expanding the equation used in the intermediate calculation of the calculation may be (2 × k ^ 2 + 9 × k + 6) × M + 2 × k ^ 2 × S. Therefore, it is possible to reduce the calculation time of the function f of the elliptic doubling in the pairing operation.
[0099]
Next, FIG. 7 is a diagram showing a program for calculating the function f in step S27 of the algorithm 3 in FIG.
The program in FIG. 7 obtains the values stored in the registers f1, f2, A, B, C, D, E, xQS, yQS, xS, yS, xQSxS, xSyQS, xQSyS, and calculates f1 and f2. Outputs the result.
[0100]
In FIG. 7, the processing of steps S101 to S107 is the same as the processing of steps S81 to S87 of FIG. 6 described above.
Further, the processing in steps S108 and S109 in FIG. 7 is the same as the processing in steps S88 and S89 in FIG.
[0101]
By the processing in step S108, a value corresponding to l1 (Q + S) × 12 (S) is stored in the register T1. Further, by the processing in step S109, a value corresponding to l1 (S) × 12 (Q + S) is stored in the register T2.
[0102]
Next, the register f1 is multiplied by the register T1, and the multiplication result is stored in the register f1 (S110 in FIG. 7).
Next, the register f2 is multiplied by the register T2, and the multiplication result is stored in the register f2 (FIG. 7, S111).
[0103]
After executing the program of FIG. 7 until the variable i = 0, the function f is obtained by calculating f = f1 / f2.
According to the program of FIG. 7, the values of xQS × xS and yQS × xS are calculated in advance, and the expression for calculating the function f is developed by using the expression developed based on xQS × xS and yQS × xS. , The calculation time can be reduced to 2 × Mk + 9 × k × M + 6 × M = (2 × k ^ 2 + 9 × k + 6) × M.
[0104]
Therefore, when the conventional calculation method of directly calculating the equation is used, the calculation time of 4Mk + 6 × k × M = (4 × k ^ 2 + 6 × k) is required, whereas the elliptic addition of the second embodiment is required. If an equation obtained by expanding an equation used in the intermediate calculation of the function f is used, the calculation time may be (2 × k ^ 2 + 9 × k + 6) × M. Therefore, in the pairing calculation, the calculation time of the elliptic addition function f can be reduced.
[0105]
In the example described above, a case has been described in which both the calculation method of the first embodiment and the calculation method of the second embodiment are applied to the algorithm 3 of FIG. 3, but only one of them is applied. Alternatively, the program may be created. In this case, the calculation time of the pairing calculation can obtain one of the effect of reducing the calculation time according to the first embodiment and the effect of reducing the calculation time according to the second embodiment.
[0106]
Here, an example of a hardware configuration of a pairing encryption device that executes a pairing encryption operation program according to the above-described embodiment will be described with reference to FIG. This pairing encryption device can be realized by, for example, an information processing device such as a personal computer.
[0107]
The CPU 23 executes the above-described calculation program and the like. The ROM 24 stores a control program such as a BIOS. The RAM (memory) 26 is used as various registers used for calculation. The storage device 25 stores an arithmetic program for elliptic curve cryptography and the like.
[0108]
The recording medium reading device 27 is a device that reads or writes on a portable recording medium 28 such as a CDROM, a DVD, a flexible disk, and an IC card.
[0109]
The input device 29 is a device for inputting data such as a keyboard. The communication interface 30 is a device for connecting to a network 31 such as the Internet, and can download a program from a server of an information provider 32 on the network via this device. Note that the CPU 22, the RAM 24, the external storage device 25, and the like are connected by the bus 22.
[0110]
INDUSTRIAL APPLICABILITY The present invention is not limited to a dedicated device for performing encryption and decryption of elliptic curve cryptography, but can be applied to various products such as an IC card, a DVD device, a mobile phone, and a personal computer.
[0111]
(Supplementary Note 1) In a pairing encryption device that processes encryption using pairing for a point on an elliptic curve,
An elliptic curve on a finite field, and storage means for storing points on the elliptic curve;
A pairing encryption device, comprising: a calculation unit that stores a value obtained in a calculation process of elliptic doubling or elliptic addition, and calculates a coefficient of a linear equation of a pairing calculation using the stored value.
[0112]
(Supplementary Note 2) In a pairing encryption device that processes encryption using pairing for a point on an elliptic curve,
An elliptic curve on a finite field, and storage means for storing points on the elliptic curve;
A pairing encryption device comprising: a calculation unit that stores a part of the calculation result of an equation obtained by expanding a straight line equation used in the intermediate calculation of the pairing calculation, and calculates the straight line equation using the stored calculation result. .
[0113]
(Supplementary Note 3) The calculating means uses simplified coordinates representing the coordinates of one point in a set of four elements (X: Y: Z: Z ^ 2) (^: power) on the finite field. 3. The pairing encryption device according to claim 1 or 2, wherein the pairing encryption device calculates a pairing operation.
[0114]
(Supplementary Note 4) The calculating means calculates the coordinates of the point Q + S on the elliptic curve as (xQS, yQS), the coordinates of the point S as (xS, yS), and the equation of a straight line connecting the points T and P on the elliptic curve. When the equation of a straight line perpendicular to the x-axis passing through the point T + P is set to l2, the values of xQS × xS and yQS × xS are calculated and stored in advance, and the stored xQS × xS 3. The pairing encryption device according to appendix 1 or 2, wherein the value of (11 (Q + S) × 12 (S) / (11 (S) × 12 (Q + S)) of the pairing operation is calculated using the value of yQS × xS.
[0115]
(Supplementary Note 5) A cryptographic operation program using pairing for a point on an elliptic curve,
An elliptic curve on a finite field and a point on the elliptic curve are stored in storage means,
A pairing cryptographic operation program that holds a part of the calculation result of an expression obtained by expanding a straight line equation used for the intermediate calculation of the pairing operation, and causes the calculation means to execute the calculation of the pairing operation using the held calculation result .
[0116]
(Supplementary Note 6) The calculating means calculates the coordinates T of the point T = (X1: Y1: Z1), the coordinates T + T of the point T + T = (X4: Y4: Z4), a straight line 11 connecting the points T + T, and an x-axis passing through the points T + T. Is calculated using the equation Z1 ^ 2 and 3 × X1 ^ 2 + a × Z1 ^ 4, which are calculated in the calculation process of the ellipse doubling, when the straight line l2 is perpendicular to the straight line l2. The pairing encryption device according to any one of supplementary notes 1 to 5.
[0117]
(Supplementary Note 7) The calculating means calculates the coordinates T of the point T = (X1: Y1: Z1), the coordinates T + P of the point T + P = (X3: Y3: Z3), a straight line 11 connecting the points T + P, and an x-axis passing through the points T + P. When the straight line l2 is perpendicular to, the coefficients of the equations of the straight lines l1 and l2 are calculated using Z3 ^ 2 and Y2 × Z1 ^ 3−Y1 calculated in the calculation process of the ellipse addition. 5. The pairing encryption device according to any one of 5.
[0118]
(Supplementary Note 8) The arithmetic means calculates the coordinates T of the point T = (X1: Y1: Z1), the coordinates P + T of the point T + P = (X3: Y3: Z3), and the coordinates T + T = (X4: Y4: Z4) of the point T + T. When a straight line 11 connecting the points T + P (tangent to the point T when P = T) and a straight line 12 perpendicular to the x-axis passing through the points T + P (or the points T + T) are calculated in the calculation process of the ellipse doubling. Using the obtained Z1 に お け る 2 and 3 × X1 ^ 2 + a × Z1 ^ 4, a straight line 11. The coefficients of the equation of l2 are calculated, and the coefficients of the equations of the straight lines l1 and l2 in the ellipse addition are calculated using Z3 ^ 2 and Y2 × Z1 ^ 3-Y1 calculated in the calculation process of the ellipse addition. The pairing encryption device according to any one of supplementary notes 1 to 5.
[0119]
(Supplementary Note 9) A pairing encryption program for encryption using pairing for a point on an elliptic curve,
An elliptic curve on a finite field and a point on the elliptic curve are stored in storage means,
A pairing cryptographic operation program that stores a value obtained in a calculation process of elliptic doubling or elliptic addition, and causes a calculating unit to calculate a coefficient of a linear equation of a pairing operation using the stored value.
[0120]
(Supplementary Note 10) Calculation of pairing operation using reduced coordinates representing coordinates of one point by a set of four elements (X: Y: Z: Z ^ 2) (^: representing power) on a finite field 5. The pairing cryptographic operation program according to Supplementary Note 5 or 9, which performs the following.
[0121]
(Supplementary Note 11) The coordinates of the point Q + S on the elliptic curve are (xQS, yQS), the coordinates of the point S are (xS, yS), the equation of a straight line connecting the point T and the point P on the elliptic curve is 11, and the point T + P is When the equation of a straight line perpendicular to the x-axis passing through is 12, the values of xQS × xS and yQS × xS are calculated and stored in advance, and the stored values of xQS × xS and yQS × xS are calculated as The pairing cryptographic operation program according to Supplementary Note 5, 9 or 10, wherein the program is used to perform a calculation of l1 (Q + S) × 12 (S) / (11 (S) × 12 (Q + S)) of the pairing operation.
[0122]
(Supplementary Note 12) Coordinates T of the point T = (X1: Y1: Z1), coordinates T + T of the point T + T = (X4: Y4: Z4), a straight line 11 connecting the point T + T, and a straight line 12 perpendicular to the x-axis passing through the point T + T And Z1Z2 and 3 × X1 ^ 2 + a × Z1 ^ 4 calculated in the calculation process of the ellipse doubling, the straight line l1. The pairing cryptographic operation program according to any one of Supplementary Notes 5, 9 to 11, which causes the equation of l2 to be calculated.
[0123]
(Supplementary Note 13) The coordinates T of the point T = (X1: Y1: Z1), the coordinates T + P of the point T + P = (X3: Y3: Z3), a straight line 11 connecting the points T + P, and a straight line 12 perpendicular to the x-axis passing through the points T + P. Where Z3 ^ 2 and Y2 × Z1 ^ 3-Y1 calculated in the elliptic addition calculation process are used to calculate the equations of the straight lines l1 and l2. A pairing cryptographic operation program according to 1.
[0124]
(Supplementary Note 14) The coordinates T of the point T = (X1: Y1: Z1), the coordinates P + T of the point T + P = (X3: Y3: Z3), the coordinates T + T of the point T + T = (X4: Y4: Z4), and the point T + P is When a straight line l1 (tangent to the point T when P = T) and a straight line l2 passing through the point T + P (or the point T + T) and perpendicular to the x-axis, Z1Z2 calculated in the calculation process of the ellipse doubling And 3 × X1 ^ 2 + a × Z1 ^ 4, a straight line 11. The coefficients of the equation of l2 are calculated, and the coefficients of the equations of the straight lines l1 and l2 in the ellipse addition are calculated using Z3 ^ 2 and Y2 × Z1 ^ 3-Y1 calculated in the elliptic addition calculation process. The pairing encryption operation program according to any one of Supplementary Notes 5 and 9 to 11.
[0125]
【The invention's effect】
According to the present invention, the pairing calculation in the pairing encryption can be speeded up. Further, the calculation time can be reduced by calculating the coefficients of the equation of the straight line used for the pairing operation using the values obtained in the calculation process of the ellipse doubling or the ellipse addition. In addition, the calculation time can be reduced by calculating in advance some values of an equation obtained by expanding a straight line equation used for the intermediate calculation of the pairing calculation.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration of a main part of a pairing encryption device according to an embodiment.
FIG. 2 is a diagram showing a program of an algorithm 2;
FIG. 3 is a diagram showing a program of an algorithm 3;
FIG. 4 is a diagram illustrating a program of a function TDBL according to the first embodiment.
FIG. 5 is a diagram illustrating a program of a function TADD according to the first embodiment.
FIG. 6 is a diagram illustrating a program of a function f according to the second embodiment.
FIG. 7 is a diagram illustrating a program of a function f according to the second embodiment.
FIG. 8 is a diagram illustrating a hardware environment.
FIG. 9 is an explanatory diagram of elliptic addition.
FIG. 10 is an explanatory diagram of elliptic doubling.
FIG. 11 is a diagram showing a program of an algorithm 1;
[Explanation of symbols]
11 Pairing encryption device
12 Operation part
13 arithmetic unit
14 registers
15 Memory
23 CPU
24 ROM
25 Storage device
26 RAM
27 Recording medium reader
29 I / O devices

Claims (5)

楕円曲線上の点に対するペアリングを用いた暗号を処理するペアリング暗号装置において、
有限体上の楕円曲線と、楕円曲線上の点を記憶する記憶手段と、
楕円2倍算または楕円加算の計算過程で得られる値を記憶し、記憶してある値を用いてペアリング演算の直線の方程式の係数を計算する演算手段とを備えるペアリング暗号装置
In a pairing encryption device that processes encryption using pairing for a point on an elliptic curve,
An elliptic curve on a finite field, and storage means for storing points on the elliptic curve;
A pairing encryption device comprising: a calculation unit that stores a value obtained in a calculation process of ellipse doubling or ellipse addition, and calculates a coefficient of a linear equation of a pairing calculation using the stored value.
楕円曲線上の点に対するペアリングを用いた暗号を処理するペアリング暗号装置において、
有限体上の楕円曲線と、楕円曲線上の点を記憶する記憶手段と、
ペアリング演算の中間計算に用いられる直線の方程式を展開した式の一部の計算結果を記憶しておき、記憶してある計算結果を用いて直線の方程式の計算を行う演算手段とを備えるペアリング暗号装置。
In a pairing encryption device that processes encryption using pairing for a point on an elliptic curve,
An elliptic curve on a finite field, and storage means for storing points on the elliptic curve;
A pair of storage means for storing a part of the calculation result of an equation obtained by expanding a straight line equation used for the intermediate calculation of the pairing calculation, and calculating the straight line equation using the stored calculation result Ring encryption device.
前記演算手段は、有限体上の4つの要素(X:Y:Z:Z^2)(^:べき乗を表す)の組で1つの点の座標を表した簡約座標を用いてペアリング演算の計算を行う請求項1または2記載のペアリング暗号装置。The calculating means performs a pairing calculation using reduced coordinates representing the coordinates of one point with a set of four elements (X: Y: Z: Z ^ 2) (^: representing a power) on a finite field. 3. The pairing encryption device according to claim 1, which performs a calculation. 前記演算手段は、楕円曲線上の点Q+Sの座標を(xQS,yQS)、点Sの座標を(xS,yS)、楕円曲線上の点Tと点Pを結ぶ直線の方程式をl1、点T+Pを通るx軸に垂直な直線の方程式をl2としたときに、xQS×xSと、yQS×xSの値を事前に計算して記憶しておき、記憶してあるxQS×xSと、yQS×xSの値を用いて、ペアリング演算のl1(Q+S)×l2(S)/(l1(S)×l2(Q+S))の計算を行う請求項1,2または3記載のペアリング暗号装置。The calculating means calculates the coordinates of the point Q + S on the elliptic curve as (xQS, yQS), the coordinates of the point S as (xS, yS), the equation of a straight line connecting the point T and the point P on the elliptic curve, and the point T + P When the equation of a straight line perpendicular to the x-axis passing through is set to 12, the values of xQS × xS and yQS × xS are calculated and stored in advance, and the stored xQS × xS and yQS × xS 4. The pairing encryption device according to claim 1, wherein the value of (1) is used to calculate l1 (Q + S) × 12 (S) / (11 (S) × 12 (Q + S)). 楕円曲線上の点に対するペアリングを用いた暗号の演算プログラムであって、
有限体上の楕円曲線と、楕円曲線上の点を記憶手段に記憶させ、
ペアリング演算の中間計算に用いられる直線の方程式を展開した式の一部の計算結果を保持しておき、保持した計算結果を用いてペアリング演算の計算を演算手段に実行させるペアリング暗号演算プログラム。
A cryptographic operation program using pairing for a point on an elliptic curve,
An elliptic curve on a finite field and a point on the elliptic curve are stored in storage means,
A pairing cryptographic operation in which a calculation result of a part of an expression obtained by expanding a linear equation used for an intermediate calculation of a pairing operation is held, and the calculation means performs a pairing operation using the held calculation result. program.
JP2002343942A 2002-11-27 2002-11-27 Pairing ciphering device, pairing ciphering calculation program Withdrawn JP2004177673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002343942A JP2004177673A (en) 2002-11-27 2002-11-27 Pairing ciphering device, pairing ciphering calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002343942A JP2004177673A (en) 2002-11-27 2002-11-27 Pairing ciphering device, pairing ciphering calculation program

Publications (1)

Publication Number Publication Date
JP2004177673A true JP2004177673A (en) 2004-06-24

Family

ID=32705607

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002343942A Withdrawn JP2004177673A (en) 2002-11-27 2002-11-27 Pairing ciphering device, pairing ciphering calculation program

Country Status (1)

Country Link
JP (1) JP2004177673A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006163164A (en) * 2004-12-09 2006-06-22 Hitachi Ltd Id base signature, encryption system, and encryption method
JP2006301513A (en) * 2005-04-25 2006-11-02 Nippon Telegr & Teleph Corp <Ntt> Multi-pairing operation method, pairing comparison method, device and program using them
JP2006323160A (en) * 2005-05-19 2006-11-30 Nippon Telegr & Teleph Corp <Ntt> Pairing arithmetic unit, pairing arithmetic method and pairing arithmetic program
JP2006330495A (en) * 2005-05-27 2006-12-07 Nippon Telegr & Teleph Corp <Ntt> Pairing computation method, and apparatus and program using same
WO2007080633A1 (en) * 2006-01-11 2007-07-19 Mitsubishi Denki Kabushiki Kaisha Elliptical curve encryption parameter generation device, elliptical curve encryption calculation device, elliptical curve encryption parameter generation program, and elliptical curve encryption calculation program

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006163164A (en) * 2004-12-09 2006-06-22 Hitachi Ltd Id base signature, encryption system, and encryption method
JP4546231B2 (en) * 2004-12-09 2010-09-15 株式会社日立製作所 ID-based signature and encryption system and method
JP2006301513A (en) * 2005-04-25 2006-11-02 Nippon Telegr & Teleph Corp <Ntt> Multi-pairing operation method, pairing comparison method, device and program using them
JP4630117B2 (en) * 2005-04-25 2011-02-09 日本電信電話株式会社 Multi-pairing calculation method, pairing comparison method, apparatus using the same, and program
JP2006323160A (en) * 2005-05-19 2006-11-30 Nippon Telegr & Teleph Corp <Ntt> Pairing arithmetic unit, pairing arithmetic method and pairing arithmetic program
JP4580274B2 (en) * 2005-05-19 2010-11-10 日本電信電話株式会社 Pairing calculation device, pairing calculation method, and pairing calculation program
JP2006330495A (en) * 2005-05-27 2006-12-07 Nippon Telegr & Teleph Corp <Ntt> Pairing computation method, and apparatus and program using same
JP4644039B2 (en) * 2005-05-27 2011-03-02 日本電信電話株式会社 Pairing calculation method, apparatus and program using the method
WO2007080633A1 (en) * 2006-01-11 2007-07-19 Mitsubishi Denki Kabushiki Kaisha Elliptical curve encryption parameter generation device, elliptical curve encryption calculation device, elliptical curve encryption parameter generation program, and elliptical curve encryption calculation program
JPWO2007080633A1 (en) * 2006-01-11 2009-06-11 三菱電機株式会社 Elliptic curve encryption parameter generation device, elliptic curve encryption operation device, elliptic curve encryption parameter generation program, and elliptic curve encryption operation program
JP4688886B2 (en) * 2006-01-11 2011-05-25 三菱電機株式会社 Elliptic curve encryption parameter generation apparatus, elliptic curve encryption system, and elliptic curve encryption parameter generation program
US8111826B2 (en) 2006-01-11 2012-02-07 Mitsubishi Electric Corporation Apparatus for generating elliptic curve cryptographic parameter, apparatus for processing elliptic curve cryptograph, program for generating elliptic curve cryptographic parameter, and program for processing elliptic cyptograph

Similar Documents

Publication Publication Date Title
US7505587B2 (en) Elliptic curve cryptosystem apparatus, storage medium storing elliptic curve cryptosystem program, and elliptic curve cryptosystem arithmetic method
TWI734368B (en) Data homomorphic encryption and decryption method and device for realizing privacy protection
CN107465505B (en) Key data processing method and device and server
JP2004279784A (en) Arithmetic unit on finite field and arithmetic program on finite field
US6038581A (en) Scheme for arithmetic operations in finite field and group operations over elliptic curves realizing improved computational speed
US7486789B2 (en) Device and method for calculation on elliptic curve
CN107579813A (en) information encryption and decryption method and device
KR101269737B1 (en) Encryption processing apparatus, encryption processing method, and computer program medium
US6981149B1 (en) Secure, easy and/or irreversible customization of cryptographic device
Yuksel Universal hashing for ultra-low-power cryptographic hardware applications
JP2003152706A (en) Encryption generating device, encryption decrypting device, encryption generating program, encryption decrypting program, authentication system, and electronic device
JP2010164721A (en) Arithmetic circuit and encryption circuit for montgomery multiplication
CN113711247A (en) Data processing method, device and system of machine learning model
JP2004177673A (en) Pairing ciphering device, pairing ciphering calculation program
US20070053506A1 (en) Elliptic curve encryption processor, processing method of the processor using elliptic curves, and program for causing a computer to execute point scalar multiplication on elliptic curves
US7177422B2 (en) Elliptic curve encryption processing method, elliptic curve encryption processing apparatus, and program
CN111262707B (en) Digital signature method, verification method, device and storage medium
CA2298995C (en) Apparatus and method for generating expression data for finite field operation
JP4543143B2 (en) Elliptic curve encryption device, elliptic curve cryptography calculation method
CN115941262A (en) Transaction execution method and node in blockchain system
CN115118411A (en) Method, device and equipment for down-link multi-party trusted computing and storage medium
JP2022160985A (en) Apparatus for processing non-polynomial operation on homomorphic encrypted message and method thereof
JP3904421B2 (en) Remainder multiplication arithmetic unit
JP2005316267A (en) Elliptic curve pairing arithmetic unit
May et al. Signature Algorithms on Non-commutative Algebras Over Finite Fields of Characteristic Two

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060207