JP2004163687A - Device and program for elliptic curve ciphering - Google Patents

Device and program for elliptic curve ciphering Download PDF

Info

Publication number
JP2004163687A
JP2004163687A JP2002329857A JP2002329857A JP2004163687A JP 2004163687 A JP2004163687 A JP 2004163687A JP 2002329857 A JP2002329857 A JP 2002329857A JP 2002329857 A JP2002329857 A JP 2002329857A JP 2004163687 A JP2004163687 A JP 2004163687A
Authority
JP
Japan
Prior art keywords
scalar multiplication
scalar
elliptic curve
elliptic
point
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.)
Pending
Application number
JP2002329857A
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 JP2002329857A priority Critical patent/JP2004163687A/en
Publication of JP2004163687A publication Critical patent/JP2004163687A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/724Finite field arithmetic
    • G06F7/725Finite field arithmetic over elliptic curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To enhance resistance properties of elliptic curve ciphering to power analysis attack. <P>SOLUTION: When i=1, scalar multiplication of r1×P is performed, and when i=2, scalar multiplication of r2×P is performed. When i=s, scalar multiplication of rs×P is performed, and when i=s+1, scalar multiplication of (d-r1-r2...-rs)×P is performed. By performing elliptic addition ECADD of the points obtained by s+1 scalar multiplications, scalar multiplication of d×P can be obtained. By individually performing scalar multiplication using random numbers, the resistance properties of elliptic curve ciphering to power analysis attack can be enhanced. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、楕円曲線暗号装置、楕円曲線暗号プログラム及び楕円曲線暗号演算方法に関する。
【0002】
【従来の技術】
暗号方式は、共通鍵暗号方式と公開鍵暗号方式に大別される。共通鍵暗号方式と呼ばれるものは、暗号化と復号で同一の鍵(秘密鍵)を用いる方式であり、この秘密鍵を送信者と受信者以外の第三者にわからない情報とすることで安全性を保つ方式である。
【0003】
公開鍵暗号方式とは、暗号化と復号で異なる鍵を用いる方式であり、暗号化を行うための鍵(公開鍵)を一般に公開する代わりに、暗号文を復号するための鍵(秘密鍵)を受信者のみの秘密情報とすることで安全性を保つ方式である。公開鍵暗号としてRSA暗号、楕円曲線暗号などが知られている。
【0004】
楕円曲線暗号の例として、ECES暗号プリミティブを説明する。送信者Aは秘密鍵s(sは整数)を持ち、受信者Bが秘密鍵t(tは整数)を持つ場合に、楕円曲線Eと、楕円曲線E上に設定されるベースポイントP(x,y)と、公開鍵s×P(送信者Aの秘密鍵sとベースポイントPとのスカラー倍算)と、公開鍵t×P(受信者Bの秘密鍵tとベースポイントPとのスカラー倍算)があらかじめ公開されている。このとき送信者Aは、自分の秘密鍵sと、受信者Bの公開鍵t×Pとのスカラー倍算s×(t×P)を計算し、そのx座標のビット表現を求め、このビット表現とメッセージのビット表現との間でビット対応のEOR演算を施すことで、メッセージmに対する暗号文Cを生成し、それを受信者Bに送信する。受信者Bは、自分の秘密鍵tと、送信者Aの公開鍵s×Pとのスカラー倍算t×(s×P)を計算し、そのx座標のビット表現を求める。そして、”s×(t×P)=t×(s×P)”という関係式が成立することを考慮して、そのビット表現と暗号文Cのビット表現との間でビット対応のEOR演算を施すことで、暗号文Cを復号しメッセージmを得る。このようにして、ECES暗号と呼ばれる楕円曲線暗号のプリミティブでは、スカラー倍演算を用いて暗号・復号処理を行う。
【0005】
暗号の分野における技術の一つに、解読技術とよばれるものがある。解読技術とは秘密鍵等の秘密情報を暗号文等の入手可能な情報から推定する技術のことであり、様々な手法が存在する。その中で最近注目されている技術に、電力解析攻撃と呼ばれる手法がある。電力解析攻撃とは、1998年にPoul Kocherによって考案された手法で、スマートカード等に搭載された暗号プロセッサに様々な入力データを与えた時の電力消費データを収集・解析することにより、暗号プロセッサ内部の鍵情報を推定する手法である。電力解析攻撃を用いれば、共通鍵暗号、公開鍵暗号共に暗号プロセッサから秘密鍵を推定できることが知られている。
【0006】
電力解析攻撃には、単純電力解析(Single Power Analysis;以下SPAという)、差分電力解析(Differential Power Analysis;以下DPAという)の2種類が存在する。SPAは暗号プロセッサにおける単一の電力消費データの特徴から秘密鍵の推定を行う方法であり、DPAは多数の電力消費データの差分を解析することで秘密鍵の推定を行う方法である。
【0007】
RSA暗号に対してSPAとDPAを用いた推定法については、Thomas S.Messerges, Ezzy A.Dabbish and Robert H.Sloan ”Power Analysis Attacks of Modular Exponentitiation in Smartcards”, Cryptographic Hardware and Embedded Systems(以下、CHES’99という), Lecture Notes in Computer Science vol. 1717, Springer−Verlag, pp.144−157や、Jean−Sebastein Coron “Resistance against Differential Power Analysis for Elliptic Curve Crytosystems”, Cryptographic Hardware and Embedded Systems (CHES’99), Lecture Notesin Computer Science vol. 1717, Springer−Verlag, pp.292−302, 1999(以下、文献1という)などの文献にて述べられている。
【0008】
一方、公開鍵暗号系の中で、RSA暗号と並んで代表的なものに、楕円曲線暗号(Elliptic Curve Cryptography)がある。これは、楕円曲線の離散対数問題に基づくもので、N. Koblitz(”Elliptic Curve Cryptosystems”, Mathematics ofComputers, Vol. 48, pp. 203−209, 1987.)とV. Miller(”Use of elliptic curves in cryptography”, Advances in Cryptology−Proceedings of Crypto ’85, Lecture Notes in Computer Science, 218(1986), Springer−Verlag, pp 417−426)により提案された。
【0009】
楕円曲線暗号においては、公開鍵点Qは、例えば、公開されたベースポイントと呼ばれる楕円曲線上の点Pに対して、スカラー値である秘密鍵dを用いた楕円曲線上の点のスカラー倍算Q=d×Pで計算された楕円曲線上の点となる。以下にスカラー倍算Q=d×Pの演算アルゴリズムについて説明する。
【0010】
図11は、Binary Methodにより整数dのMSB(Most Significant Bit)からスカラー倍算d×Pの計算を行うアルゴリズム1の演算プログラムを示す図である。
【0011】
以下に述べるアルゴリズム1及び他のアルゴリズムの説明では、dはnビットのスカラー値、P,Qは楕円曲線上の点、ECADDは楕円加算、ECDBLは楕円2倍算をそれぞれ表す。
【0012】
変数Tの初期値として点Pの座標を設定し、変数iをn−2から0まで変化させて楕円2倍算ECDBL(T)を計算する。
2進展開の係数d[i]が”1”のときには、楕円2倍算ECDBL(T)により得られる点Tと、点Pの楕円加算ECADD(T,P)を計算し、計算結果を変数Tに格納する。
【0013】
上記の処理を変数i=n−2からi=0まで実行した後、変数Tの値をスカラー倍算d×Pにより得られる点Qの座標として出力する。
上記のアルゴリズム1は、d[i]の値が”1”か否かにより楕円加算ECADDが実行されたり、されなかったりする。SPA攻撃では、この性質を利用して秘密鍵dを解析する。多くの実験から楕円加算ECADDと楕円2倍算ECDBLの電力波形は特徴的で容易に区別可能であることが知られている。このことから、演算アルゴリズム1の処理の電力波形を測定すれば、その波形から楕円加算ECADDと楕円2倍算ECDBLの処理の順序と回数がわかるので秘密鍵dを解析できる。
【0014】
このSPA攻撃への対策について、add−and−double−alwaysと呼ばれる方法が上述した文献1で提案されている。この方法は、常に楕円2倍算と楕円加算が交互に計算されるためSPA攻撃に対して安全である。
【0015】
図12は、アルゴリズム1に対してadd−and−double−alwaysを施したアルゴリズム2の演算プログラムを示す図である。
変数T[0]の初期値として点Pの座標を設定し、変数iをn−2から0まで変化させて楕円2倍算ECDBL(T[0])を計算し、計算結果を変数T[0]に設定する。
【0016】
さらに、点T[0]と点Pとの楕円加算ECADD(T[0]、P)を計算し、計算結果を変数T[1]に設定する。
そして、係数d[i]の値により定まるT[d[i]]の値を変数T[0]に設定する。
【0017】
上記の処理をi=n−2からi=0まで実行した後、変数T[0]の値をスカラー倍算d×Pにより得られる点Qの座標として出力する。
上述したアルゴリム2によればSPA攻撃を防ぐことが可能となる。しかしながら、文献1には、これらのアルゴリズムに対するDPA攻撃についても述べられており、アルゴリズム2に対するDPA攻撃により秘密鍵情報が解析可能であることを示している。
【0018】
文献1は、RPC(Randomized Projective Coordinates)という乱数を使用した楕円曲線上の点の表現を導入することで、アルゴリズム2に対するDPA攻撃に対する対策について提案している。
【0019】
図13は、アルゴリズム2に対してRPCを施したアルゴリズム3の演算プログラムを示す図である。
変数T’[2]の初期値として、乱数を使用した楕円曲線上の点RPC(P)の座標を設定し、変数T’[0]の初期値としてT’[2]を設定する。
【0020】
変数iをn−2から0まで変化させて、楕円2倍算ECDBL(T’[0])を計算し、計算結果を変数T’[0]に設定する。点T’[0]と点T’[2]の楕円加算ECADD(T’[0]、T’[2])を計算し、計算結果を変数T’[1]に設定する。d[i]の値に応じてT’[0]またはT’[1]の値をT’[0]に格納する。
【0021】
上述した処理をi=n−2からi=0まで実行した後、変数T’[0]をRPC表現から楕円曲線上の点の座標に変換し、その座標をスカラー倍算d×Pにより得られる点Qの座標として出力する。
【0022】
図14は、Binary Methodにより整数dのLSB(Least Significant Bit)からスカラー倍算d×Pの計算を行うアルゴリズム4の演算プログラムを示す図である。このアルゴリズム4は、楕円加算ECADDと楕円2倍算ECDBLを常に計算するアルゴリズムで、かつRPCを適用したものである。
【0023】
最初に、変数T’[0]の初期値として0を設定し、変数T’[2]の初期値として、楕円楕円曲線上の点RPC(P)の座標を設定する。
変数iを0からn−1まで変化させて点T’[0]と点T’[2]の楕円加算ECADD(T’[0],T’[2])を計算し、計算結果を変数T’[1]に設定する。点T’[2]の楕円2倍算ECDBL(T’[2])を計算し、計算結果を変数T’[2]に設定する。d[i]の値に応じてT’[0]またはT’[1]の値をT’[0]に格納する。
【0024】
上述した処理をi=0からi=n−1まで実行した後、変数T’[0]をRPC表現から楕円曲線上の点の座標に変換し、変換した座標をスカラー倍算d×Pにより得られる点Qの座標として出力する。
【0025】
上記の乱数を用いる方法と同様の効果を持つ方法として、SPA対策を行ったMontgomery−LadderとRPCを併用した方法が、T. Izu, and T. Takagi, ”A Fast Parallel Elliptic Curve Multiplication Resistant against Side Channel Attacks’’, PKC 2002, LNCS 2274, pp.280−296, Springer−Verlag, 2002. (Izu−Takagi)で提案されている。これは、SPA対策を行ったMontgomery−Ladderと呼ばれるスカラー倍算方式を用いるのが特徴である。Montgomery−Ladderでは、スカラー倍算Q=d×Pにおいて、常に楕円2倍算と楕円加算を計算することにより、差が1Pとなるような2点の計算を行う。
【0026】
図15は、SPA対策を行ったMontgomery−LadderとRPCを使用したスカラー倍算のアルゴリズム5の演算プログラムを示す図である。
最初に、変数T’[0]の初期値として乱数を使用した楕円曲線上の点RPC(P)を設定し、変数T’[1]の初期値として点T’[0]の楕円2倍算ECDBL(T’[0])により得られる点の座標を設定する。
【0027】
次に、変数iをn−2から0まで変化させ、楕円2倍算ECDBL(T’〔d〔i〕〕)を計算し、計算結果を変数T’〔2〕に格納する。
次に、T’〔0〕とT’〔1〕の楕円加算ECADD(T’〔0〕,T’〔1〕)を計算し、計算結果を変数T’〔1〕に格納する。
【0028】
次に、係数d〔i〕の値により定まるT[2−d[i]]の値を変数T’[0]に設定する。
同様に係数d[i]の値により定まるT’[1+d[i]]の値を変数T’[1]に設定する。
【0029】
上記の処理をi=n−2からi=0まで繰り返した後、乱数を用いて表現した変数T’[0]の座標を元の楕円曲線上の座標に逆変換してスカラー倍算d×Pの点Rの座標として出力する。
【0030】
RPCと同様の効果を持つスカラー倍算の演算方法として、M. Joye, and C. Tymen, “Protections against differential analysis for elliptic curve cryptography”, CHES 2001,LNCS 2162, pp. 377−390, Springer−Verlag, 2001. (JT01)において、RC(Randomized Curve)法がある。RCは、素体上のワイヤストラス型の楕円曲線にのみ適用できる方法であり、RPCと同様に乱数を用いた点の表現を用いるDPA対策である。
【0031】
上述したアルゴリズム3のRPCの代わりにRCを適用したアルゴリズム3’を図16に示す。またアルゴリズム5にRCを適用したアルゴリズム5’を図17に示す。なお、図16及び図17において、RCで表現された楕円曲線上の点はダブルダッシュ(”)付の変数で示す。
【0032】
図16及び図17のアルゴリズム3’及び5’の演算プログラムは、基本的には、図13及び図15の演算プログラムと同じである。異なる点は、楕円曲線上の点Pの座標をRCにより変換した座標を用いてスカラー倍算の計算を行うことである。
【0033】
スカラー倍算d×Pの実現法には上述したアルゴリズム以外にWindow Methodと呼ばれる方法がある。例えば、4−bitのWindow Methodの場合、初期処理としてPの0〜15倍を計算し、その結果をテーブルとして持っておき、秘密鍵を4ビット単位(これをWindowと呼ぶ)で処理する。
【0034】
図18に4ビットWindow Methodの基本的なアルゴリズムであるアルゴリズム6を示す。なお、dはnビットのスカラー値で4の倍数と仮定する。また、d[n−1,n−4]は、整数dの下位n−1ビット目からn−4ビット目までの4ビットの値であり、W[i]は、Window Methodで使用するテーブルである。
【0035】
最初に、変数W[0]に初期値として楕円曲線上の点0の座標を設定し、変数W[1]の初期値として楕円曲線上の点Pの座標を設定し、変数W[2]の初期値として点Pの楕円2倍算ECDBL(P)の点の座標を設定する。
【0036】
次に、変数iを3から15まで変化させ、点W[i−1]と点Pとの楕円加算ECADD(W[i−1],P)を計算し、計算結果をテーブルW[i]に格納する。
【0037】
上記の処理により、例えば、変数iが3の場合には、W[3]=ECADD(W[2],P)となり、楕円2倍算2×Pの計算により得られる点と、点Pとの楕円加算により得られる点の座標が算出され、テーブルW[i]に格納される。
【0038】
次に、変数QとしてW[d[n−1,n−4]]を設定する。
次に、変数iをn−5から0まで4ビット単位で変化させ、楕円2倍算ECDBL(Q)の計算を4回行う。4回の楕円2倍算ECDBLの演算により、変数iにより指定されるビット位置から4ビット分のデータをシフトさせる。さらに、楕円加算ECADD(Q,W[d[i,i−3]])の計算を行い、4回の楕円2倍算ECDBLの演算結果と、テーブルWから取得するW[d[i,i−3]]との楕円加算ECADDの計算を行う。
【0039】
上記の処理をi=n−5からi=0まで実行することにより、スカラー倍算d×Pの点の座標を求める。
上記のアルゴリズム6を使用した場合、整数dのビット値によって行われたり行われなかったりする処理は存在しない。そのためWindow MethodはBinary Methodと異なり一般にSPA攻撃に対して安全であるといわれている。しかし、Window MethodはBinary Method と同様にDPA攻撃に対しては安全と言えず、文献1の電力解析の手法でdを推定することが可能である。
【0040】
Window MethodのDPA対策としてBinary Methodと同様にRPCやRCが有効であることが知られている。
図19は、アルゴリズム6に対してRPCを適用したアルゴリズム7の演算プログラムを示し、図20は、アルゴリズム6に対してRCを適用したアルゴリズム8の演算プログラムを示す。
【0041】
図19のアルゴリズム7及び図20のアルゴリズム8によりDPA耐性を向上させることができる。
【0042】
【非特許文献1】
Jean−Sebastein Coron “Resistance against Differential Power Analysis for Elliptic Curve Crytosystems”, Cryptographic Hardware and Embedded Systems (CHES’99), Lecture Notes in Computer Science vol. 1717, Springer−Verlag, pp.292−302, 1999
【0043】
【非特許文献2】
K. Itoh, T. Izu, and M. Takenaka ”Address−bit Differential Power Analysis of Cryptographic Schemes OK−ECDH and OK−ECDSA”, Cryptographic Hardware and Embedded Systems (CHES2002), Pre−proceeding, pp.129−143
【0044】
【発明が解決しようとする課題】
従来、上述したアルゴリズム3,5,3’,5’、7,8を用いれば、SPA及びDPA攻撃に対して安全であると言われていた。
【0045】
しかしながら、K. Itoh, T. Izu, and M. Takenaka ”Address−bit Differential Power Analysis of Cryptographic Schemes OK−ECDH and OK−ECDSA”, Cryptographic Hardware and Embedded Systems (CHES2002), Pre−proceeding, pp.129−143 (以下、文献2という)において、アルゴリズム5に対して電力解析を行う手法が発表された。従来のDPAはデータの変化がもたらす消費電力に注目していたのに対し、この手法(address−bit DPA)はアドレスの変化がもたらす消費電力に注目した解析手法である。
【0046】
例えば、図15のアルゴリズム5において、T’[2]=ECDBL(T’[d[i]])の処理(図15に*で示す処理)は、d[i]の値によって、T’[0]が使用されるか、T’[1]が使用されるかが決定される。そのため楕円加算ECADDで使用するデータが格納されているアドレスはd[i]と強い相関を持つ。同様のことは、T’[0]=T’[2−d[d[i]]の処理及びT’〔1〕=T’〔1+d〔i〕〕の処理(図15に#で示す処理)にも言える。これにより、address−bitDPAではアドレスとの相関を利用することで秘密鍵dを解析することができる。
【0047】
文献2のaddress−bit DPAは、アルゴリズム3’、5’にも適用可能である。また、アルゴリズム7,8のWindow Methodも、秘密鍵dの値と使用するテーブルとが強い関係を持つため同様の攻撃が可能であると考えられる。
【0048】
従って、アルゴリズム3、5、3’、5’、7,8がaddress−bit DPA攻撃に対して安全であるとは言えない。
文献2のaddress−bit DPAへの対策としてスカラー値をランダムに変化させる手法、例えば、exponent−splittingが提案されている。
【0049】
Exponent−splittingでは、乱数rを発生させ、r×Pと(d−r)×Pを別々に計算し、r×P+(d−r)×P=d×Pという性質から、スカラー倍算d×Pを計算する。ここでスカラー倍算r×P、(d―r)×Pには、従来のSPA、DPA攻撃に耐性を持つアルゴリズムを用いる。Address−bit DPAについては、スカラー値がランダムに変化するためdに関する情報が集めらないので防御が可能となる。
【0050】
図21は、Exponent−splitting のアルゴリズム9の演算プログラムを示す図である。
図21において、random()は、nビットの乱数を発生させる関数である。また、scalar(d,P)は、スカラー倍算d×Pを計算する関数であり、上述したアルゴリズム3,3’、5,7等により実現される。
【0051】
Exponent−splittingに対する攻撃報告は知られていないが、提案者らの主張通り一方のスカラー倍算をSPA/DPA耐性を持たないアルゴリズムで計算した場合、スカラー倍算全体にDPA攻撃が可能である。
【0052】
本発明の課題は、電力解析攻撃に対する耐性を向上させることである。
【0053】
【課題を解決するための手段】
本発明の楕円曲線暗号装置は、有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dを記憶する記憶手段と、s(s≧2)個の乱数r1〜rsを発生する乱数発生手段と、前記乱数発生手段により発生されるs個の乱数を用いて、r1×P、r2×P、・・・、rs×P、(d−r1−・・・−rs)×Pのs+1個のスカラー倍算の演算をそれぞれ実行し、それらの演算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する演算手段とを備える。
【0054】
この発明によれば、s個の乱数を用いてs+1回のスカラー倍算の計算を行うことにより、電力解析攻撃に対する楕円曲線暗号の耐性を向上させることができる。
【0055】
本発明の他の楕円曲線暗号装置は、有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、乱数r1とr2を発生する乱数発生手段と、前記乱数発生手段により発生される乱数を用いて、r1×Pのスカラー倍算と、r2×Pのスカラー倍算と、(d−r1−r2)×Pのスカラー倍算の演算をそれぞれ実行し、それらのスカラー倍算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する演算手段とを備える。
【0056】
この発明によれば、2個の乱数を用いて3回のスカラー倍算の計算を行うことで、電力解析攻撃に対する楕円曲線暗号の耐性を向上させることができる。
本発明の他の楕円曲線暗号装置は、有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、乱数r1とr2を発生する乱数発生手段と、前記乱数発生手段により発生される乱数を用いて、r1×Pのスカラー倍算と、r2×(r1×P)のスカラー倍算と、(d−r1×r2)×Pのスカラー倍算をそれぞれ実行し、r2×(r1×P)のスカラー倍算により得られる点P1と、(d−r1×r2)×Pのスカラー倍算とにより得られる点P2との楕円加算によりスカラー倍算d×Pを計算する演算手段とを備える。
【0057】
この発明によれば、乱数r1とr2を乗算した値を用いてスカラー倍算の計算を行うことで電力解析による個々の乱数の推定が困難になり、整数dの推定がより困難になる。これにより楕円曲線暗号の電力解析攻撃に対する耐性を向上させることができる。また、点P1と点P2の1回の楕円加算の計算を行うだけでよいので楕円加算の計算時間を短縮できる。さらに、乱数r1と乱数r2の乗算値が整数dと同じビット長を持てばよいので、乱数r1,r2のビット長を整数dのビット長より短くできる。これにより、乱数と点Pとのスカラー倍算の計算時間を短くでき、スカラー倍算の全体の計算時間を短縮できる。
【0058】
本発明の他の楕円曲線暗号装置は、有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、乱数r1とr2を発生する乱数発生手段と、前記乱数発生手段により発生される乱数を用いて、(d−r1)×Pのスカラー倍算と、(d+r2)×Pのスカラー倍算と、r2×((d−r1)×P)のスカラー倍算と、r1×((d+r2)×P)のスカラー倍算とをそれぞれ実行し、r2×((d−r1)×P)のスカラー倍算により得られる点P1と、r1×((d+r2)×P)のスカラー倍算により得られる点P2との楕円加算と、楕円加算の演算結果と1/(r1+r2)とのスカラー倍算を実行して、スカラー倍算d×Pを計算する演算手段とを備える。
【0059】
この発明によれば、乱数r1,r2を用いて、5回のスカラー倍算を実行することで電力解析による整数dの推定を困難にできる。
なお、記憶手段は、例えば、図1の記憶部16及びレジスタ14に対応し、演算手段は、演算部12または演算器13に対応する。
【0060】
【発明の実施の形態】
以下、本発明の実施の形態を、図面を参照しながら説明する。実施の形態の楕円曲線暗号装置は、例えば、専用の情報処理装置、パーソナルコンピュータ、ICカード(スマートカード)等に内蔵されたICチップ、携帯電話、携帯情報端末装置、DVDプレーヤ等からなり、楕円曲線の演算を行うプロセッサを有している。
【0061】
図1は、本発明に係る楕円曲線暗号装置11の要部の構成を示す図である。実施の形態の楕円曲線暗号装置11の演算部12は、演算器(CPU)13と、複数のレジスタからなるレジスタ14とからなり、演算結果は再びレジスタ14に入力される。記憶部16は、ハードディスク、メモリ等からなり、後述する楕円曲線暗号のスカラー倍算の演算プログラムが記憶される。演算部12は、記憶部16に記憶されている演算プログラムを実行し、乱数r1,r2等を発生し、それらの乱数を用いてスカラー倍算d×Pの計算を行う。
【0062】
以下の説明では、本発明に係る楕円曲線暗号の演算方法を、素体GF(p)(pは5以上の素数)上の楕円曲線に適用した場合について説明する。
GF(p)上の円曲線Eは、以下の式で表せる。
【0063】
E:y^2=x^3+a×x+b
ここでa,b,x,yはGF(p)の要素で、4×a^3+27×b^2≠0を満たす。
【0064】
図2は、本発明の第1の実施の形態のスカラー倍算の演算プログラムを示す図である。
第1の実施の形態は、nビットの整数dと、楕円曲線上のベースポイントPと、パラメータsを入力として受け取り、s個の乱数r1,r2,…、rsを発生させ、スカラーdをr1、r2、…、rs、d−r1−r2−…−rsに分割し、s+1個のスカラー倍算r1×P、r2×P、…、rs×P、(d−r1−r2−…−rs)×Pを個々に計算するものである。
【0065】
以下に述べる第1の実施の形態(他の実施の形態も同様)の演算プログラムは、演算部12により実行され、演算途中の値、あるいは演算結果はレジスタ14に格納される。
【0066】
演算部12は、変数r[s+1]として整数dを設定する(図2,S21)。変数iをi=1からi=sまで順に変化させ(図2,S23)、ステップS24及びS25の処理を実行する。
【0067】
ステップS24において、関数random()により乱数を発生させ、発生した乱数を変数r〔i〕に設定する。次のステップS25において、変数r[s+1]から乱数r〔i〕を減算し、減算結果を変数r[s+1]に設定する。
【0068】
ステップS23〜S26の次に、スカラー倍算の演算を行う。変数iをi=1からi≦s+1まで変化させ(図2,S28)、関数scalar(r〔i〕,P)を用いてr〔i〕×Pのスカラー倍算を計算し、計算結果を変数d[i]に格納する(図2,S29)。
【0069】
ここで、r〔i〕は関数random()により発生されるs個の乱数r〔1〕、r〔2〕・・・r〔s〕である。上記のステップS23〜S25の処理をs回繰り返すことにより、最終的なr〔s+1〕の値としてr[s+1]=d−r1−r2−・・・・−rs”が得られている。そして、ステップS28〜S29の処理をs+1回繰り返すことにより、スカラー倍算r1×P、r2×P、r3×P、・・・rs×P、(d−r1−r2−・・・−rs)×Pが順に計算される。
【0070】
次に、スカラーの統合を行う。変数iをi=1からi≦s+1まで変化させ(図2,S32)、それぞれの点の楕円加算ECADD(Q,d〔i〕)を計算し、計算結果を変数Qに格納する(図2,S33)。上記の処理をi=1〜s+1まで実行した後、変数Qをスカラー倍算d×Pの計算結果として出力する(図2,S35)。
【0071】
上記のステップS32及びS33の処理は、s+1個の点の楕円加算ECADDを計算する処理である。ステップS32〜S33のループの処理をs+1回繰り返した後の変数Qは以下の式で表せる。
【0072】

Figure 2004163687
上記の式(1)は、d×Pと等しいので変数Qを求めることでスカラー倍算d×Pを計算することができる。
【0073】
図3は、第1の実施の形態のスカラー倍算d×Pの説明図である。
i=1のときには、r1×Pのスカラー倍算が計算され、i=2のときにはr2×Pのスカラー倍算が計算される。i=sのときには、rs×Pのスカラー倍算が計算される。また、i=s+1のときには、(d−r1−r2−・・・−rs)×Pのスカラー倍算が計算される。そして、s+1個のスカラー倍算により得られる点の楕円加算ECADDを計算することで、d×Pのスカラー倍算を求めることができる。
【0074】
この第1の実施の形態によれば、パラメータsにより指定される個数の乱数を発生させ、発生させたs個の乱数を用いてスカラー倍算の計算をs+1回行うことで、SPA及びDPA等の電力解析による整数dの推定を困難にできる。また、パラメータsを個々のデータに対するスカラー倍算を実行する毎に変化させることで、整数dの推定をさらに困難にできる。
【0075】
次に、図4は、本発明の第2の実施の形態のスカラー倍算の演算プログラムを示す図である。
第2の実施の形態は、上述した第1の実施の形態において、s+1個のスカラー倍算の計算の中で少なくとも2個のスカラー倍算の計算をDPAに対する耐性を有するアルゴリズムを用いて行うものである。他のスカラー倍算の計算はDPA耐性を持たないアルゴリズムを用いても、あるいはDPA耐性を有するアルゴリズを用いても良い。
【0076】
図4のS41〜S46までの処理は、図2のS21〜26の処理と同じである。 次に、図4のステップS48において、関数select2(s+1)を用いて、s+1個のスカラー倍算の計算の中でDPA攻撃に対して安全なアルゴリズムを用いるものを決める。ここで、関数select2(s+1)は、s+1個の配列の中の2個の配列t〔〕の値を1にし、他の配列t〔〕の値を0にする関数である。
【0077】
次に、変数iをi=1からi=s+1まで順に変化させる(図4,S50)。t〔i〕=1か否かを判断する(図4,S51)。
t〔i〕=1のときには、次のステップS52において、関数scalar(r〔i〕,P)を用いて乱数r〔i〕と点Pのスカラー倍算を計算し、計算結果を変数d〔i〕に格納する。
【0078】
こで、関数scalar(r〔i〕,P)は、DPA攻撃に対して耐性を有するアルゴリズム、例えば、図13のアルゴリズム3,あるいは図15のアルゴリズム5等を用いてスカラー倍算の計算を行う関数である。
【0079】
t〔i〕=0のときには、ステップ53に進む。そして、次のステップS54において、関数scalar2(r〔i〕,P)を用いて乱数r〔i〕と点Pとのスカラー倍算を計算し、計算結果を変数d〔i〕に格納する。
【0080】
関数scalar2(r〔i〕,P)は、DPA攻撃に対する耐性を要求しないアルゴリズムによりスカラー倍算の計算を行う関数である。もちろん、DPA攻撃に対する耐性を有するアルゴリズムを用いて計算しても良い。
【0081】
次に、スカラーの統合を行う。変数iをi=1からi≦s+1まで変化させ(図4,S57)、楕円加算ECADD(Q,d〔i〕)の計算を行う(図4,S58)。ステップS57,S58の処理をi=1〜s+1まで実行した後、変数Qをスカラー倍算d×Pの計算結果として出力する(図4,S60)。
【0082】
この第2の実施の形態は、上述した第1の実施の形態の効果に加え、s+1個のスカラー倍算の計算の内少なくとも2個のスカラー倍算の計算にDPA攻撃に対する耐性を有するアルゴリズムを用い、他のスカラー倍算にはDPA耐性を有しないアルゴリズムを用いることにより、全ての計算をDPA耐性を有するアルゴリズムを用いる場合に比べてスカラー倍算の全体の計算時間を短縮できるという効果が得られる。
【0083】
次に、上述した第1と第2の実施の形態においてr=2とした場合について説明する。
第1’の実施の形態は、第1の実施の形態のs=2の場合に相当し、2個の乱数r1,r2を発生させ、スカラーdをr1,r2,d−r1−r2に分割し、3個のスカラー倍算r1×P,r2×P,(d−r1−r2)×Pを個々に計算するものである。
【0084】
r1×Pのスカラー倍算,r2×Pのスカラー倍算,(d−r1−r2)×Pのスカラー倍算が終了したなら、それらの演算により得られる3個の点の楕円加算ECADDを計算する。3個の点の楕円加算は、以下の式で表せる。
【0085】
r1×P+r2×P+(d−r1−r2)×P=(r1+r2+(d−r1−r2))×P=d×P
従って、3個の点の楕円加算ECADDを計算することによりスカラー倍算d×Pを計算することができる。
【0086】
また、この第1’の実施の形態において、r1×P,r2×P,(d−r1−r2)×Pのスカラー倍算の計算において、DPA攻撃に対する耐性を有するアルゴリズムを用いることで、スカラー倍算d×Pの計算をDPA攻撃に対する耐性を保持して実行できる。
【0087】
この第1’の実施の形態によれば、2個の乱数を用い、3個のスカラー倍算を個々に計算することで、電力解析により整数dが推定されるのを困難にできる。また、この場合、3個のスカラー倍算を計算するだけでよいので計算時間を短縮できる。
【0088】
次に、第2’の実施の形態は、第2の実施の形態のs=2の場合に相当し、3個のスカラー倍算r1×P,r2×P,(d−r1−r2)×Pの内の2個のスカラー倍算をランダムに指定し、その2個のスカラー倍算の計算をDPA攻撃に対する耐性を有するアルゴリズムを用いて行い、残りの1個のスカラー倍算の計算をDPA攻撃に対する耐性を有しないアルゴリズムを用いて行うものである。
【0089】
この第2’の実施の形態によれば、3個のスカラー倍算の計算の内の2個の計算をDPA攻撃に対する耐性を有するアルゴリズムを用い、他の1個の計算を耐性を有しないアルゴリズムを用いることで、スカラー倍算d×Pの計算をDPA攻撃に対する耐性を保持したままで計算時間を短縮することができる。
【0090】
次に、図5は、本発明の第3の実施の形態のスカラー倍算の演算プログラムを示す図である。
第3の実施の形態は、整数dとベースポイントPの座標と、2個の乱数r1,r2を発生させ、スカラーdをr1、r2、d−r1−r2に分割し、3個のスカラー倍算r1×P,r2×(r1×P),(d−r1×r2)×Pを個々に計算するものである。
【0091】
関数random()を用いて乱数を発生させ、発生させた乱数を変数r〔1〕に格納する(図5,ステップ62)。同様に、関数random()を用いて乱数を発生させ、発生させた乱数を変数r2に格納する(図5,S63)。
【0092】
次に、スカラー倍算の計算を行う。関数scalar(r〔1〕,P)を用いて乱数r〔1〕と点Pとのスカラー倍算を計算し、計算結果を変数P〔1〕に格納する(図5,S65)。
【0093】
次に、上記の処理により求めた変数P〔1〕と、関数scalar(r〔2〕,P[1])を用いて乱数r〔2〕と点P〔1〕とのスカラー倍算r[2]×(r1×P)を計算し、計算結果を変数P〔2〕に格納する(図5,S66)。
【0094】
次に、乱数r〔1〕とr〔2〕と関数scalar(d−r[1]×r〔2〕,P)を用いてスカラー(d−r〔1〕×r〔2〕)と点Pとのスカラー倍算を計算し、計算結果を変数P〔3〕に格納する(図5,S67)。
【0095】
上記のステップS65〜S67の処理を実行することにより、r〔1〕×Pのスカラー倍算と、r〔2〕×r[1]×Pのスカラー倍算と、(d−r〔1〕×r〔2〕)×Pのスカラー倍算の計算が行われる。
【0096】
次に、スカラーの統合を行う。変数P〔2〕により定まる点と変数P[3]により定まる点の楕円加算ECADD(P[2],P〔3〕)を計算し、計算結果を変数Qに格納する(図5,S69)。最後に、変数Qの座標をスカラー倍算d×Pの計算結果として出力する(図5,S70)。
【0097】
上記のステップS69の処理は、2個の点P[2]、P[3]の楕円加算ECADDを計算する処理であり、ステップS69の処理を終了した後の変数Qは、以下の式で表せる。
【0098】
Q=r〔1〕×r〔2〕×P+(d−r〔1〕×r〔2〕)×P (2)
上記の(2)式は、d×Pと等しいので、上述した処理によりスカラー倍算d×Pを計算することができる。
【0099】
図6は、第3の実施の形態のスカラー倍算d×Pの説明図である。
乱数をr1、r2とすると、最初にr1×Pのスカラー倍算が計算され、次に、r1×Pのスカラー倍算により得られた点とr2とのスカラー倍算、すなわち、r1×r2×Pのスカラー倍算が計算される。また、(d−r〔1〕×r〔2〕)とPとのスカラー倍算が計算される。
【0100】
そして、上記のスカラー倍算により得られる点”r1×r2×P”と、点”(d−r1×r2)×P”の楕円加算ECADDを計算することで、d×Pのスカラー倍算を計算することができる。
【0101】
この第3の実施の形態によれば、2個の乱数を用いて3個のスカラー倍算を計算することで、電力解析による整数dの推定を困難にし、楕円曲線暗号のDPA攻撃に対する耐性を向上させることができる。また、この第3の実施の形態は、スカラー倍算が2個の乱数r[1]とr[2]の乗算になっているので、乱数の推定がより困難になる。また、乱数r[1]とr[2]のビット長を整数dのビット長より短くすることができる。これにより、乱数と点Pとのスカラー倍算の計算時間を短くなるので、d×Pのスカラー倍算の全体の計算時間を短縮できる。
【0102】
次に、図7は、本発明の第4の実施の形態のスカラー倍算の演算プログラムを示す図である。
第4の実施の形態は、第3の実施の形態の3個のスカラー倍算の計算の中で2個のスカラー倍算の計算にDPA攻撃に対する耐性を有するアルゴリズムを用いるものである。
【0103】
図7のステップS71〜73の処理は、図5の演算プログラムのステップS61〜63の処理と同じである。
ステップS75において、関数select2(s+1)を用いてt[i]=1となる配列を決める。この場合s=2であるので、3個の配列t[i]の中の任意の2個の配列の値が1、他が0となるように設定する。
【0104】
次に、スカラー倍算の計算を行う。r[1]に対応する配列t[1]が1のときには、関数scalar(r[1],P)を用いて乱数r[1]と点Pとのスカラー倍算r1×Pを計算し、計算結果を変数P[1]に格納する。t[1]が1でなければ(S77,Selse)、関数scalar2(r[1],P)を用いてスカラー倍算r[1]×Pを計算し、計算結果を変数P[1]に格納する(図7,S77)。
【0105】
次に、r[2]に対応する配列t[2]が1のときには、関数scalar(r[2],P[1])を用いて乱数r[2]と点P[1]とのスカラー倍算r[2]×P[1]=r[2]×(r[1]×P)を計算し、計算結果を変数P[2]に格納する。t[2]が1でなければ(S78,Selse)、関数scalar2(r[2],P)を用いてスカラー倍算r[2]×(r[1]×P)を計算し、計算結果を変数P[2]に格納する(図7,S78)。
【0106】
次に、配列t[3]が1のときには、関数scalar(d−r[1]×r[2],P[2])を用いてスカラー(d−r[1]×r[2])と点Pとのスカラー倍算を計算し、計算結果を変数P[3]に格納する。t[3]が1でなければ(S79,else)、関数scalar2(d−r[1]×r[2],P)を用いてスカラー倍算(d−r[1]×r[2])×Pを計算し、計算結果を変数P[3]に格納する(図7,S79)。
【0107】
次に、点P[2]と点P[3]の楕円加算ECADD(P[2],P[3])を計算する(図7,S81)。最後に、変数Qの座標をスカラー倍算d×Pの計算結果として出力する(図7,S82)。
【0108】
この第4の実施の形態によれば、上述した第3の実施の形態の効果に加え、3個のスカラー倍算の中の2個のスカラー倍算をDPA攻撃に対する耐性を有するアルゴリズムを用い、他の1個のスカラー倍算を耐性を有しないアルゴリズムを用いることで、d×Pのスカラー倍算の全体の計算時間を短縮できる。さらに、1つのデータに対してスカラー倍算の計算が行われる毎に、どのスカラー倍算に対してDPA攻撃に対して耐性を有するアルゴリズムを用いるかを任意に決めているので電力解析がより困難になる。
【0109】
次に、図8は、本発明の第5の実施の形態のスカラー倍算の演算プログラムを示す図である。
第5の実施の形態は、2個の乱数r1,r2を発生させ、スカラーdをd=((d−r1)×r2+(d+r2)×r1)/(r1+r2)と分割し、4個のスカラー倍算(d−r1)×P、(d+r2)×P、r2×((d−r1)×P)、r1×((d+r2)×P)を個々に計算し、楕円加算の結果と1/(r1+r2)とのスカラー倍算とを実行するものである。
【0110】
関数random()を用いて乱数を発生させ、発生させた乱数を変数r〔1〕に格納する(図8,ステップ92)。同様に、関数random()を用いて乱数を発生させ、発生させた乱数を変数r[2]に格納する(図8,S93)。
【0111】
次に、スカラー倍算の計算を行う。関数scalar(r〔1〕,P)を用いて乱数r〔1〕と点Pとのスカラー倍算r[1]×Pを計算し、計算結果を変数P〔1〕に格納する(図8,S95)。
【0112】
次に、ステップS95の処理により求めた点P〔1〕と、関数scalar(d+r〔2〕,P[1])を用いて、スカラー倍算(d+r〔2〕)×P[1]を計算し、計算結果を変数P〔2〕に格納する(図8,S96)。
【0113】
次に、関数scalar(r〔2〕,P)を用いて乱数r[2]と点Pとのスカラー倍算r[2]×Pを計算し、計算結果を変数P〔3〕に格納する(図5,S97)。
【0114】
次に、ステップS97の処理により求めた点P[3]と、関数scalar(d−r〔1〕,P[3])を用いて、スカラー倍算(d−r[1])×P[3]=(d−r[1])×r[2]×Pを計算し、計算結果を変数P[4]に格納する(図8,S98)。
【0115】
上記のステップS95〜S98の処理を実行することにより、r〔1〕×Pのスカラー倍算と、(d+r〔2〕)×r[1]×Pのスカラー倍算と、r[2]×Pのスカラー倍算と、(d−r〔1〕)×r[2]×Pのスカラー倍算の計算が行われる。
【0116】
次に、スカラーの統合を行う。変数P[3]により定まる点と変数P[4]により定まる点の楕円加算ECADD(P[3],P[4])を計算し、計算結果を変数Qに格納する(図8,S100)。すなわち、スカラー倍算(d+r〔2〕)×r[1]×Pにより得られる点P[2]と、スカラー倍算(d−r〔1〕)×r[2]×Pにより得られる点P[4]の楕円加算ECADDを計算する。
【0117】
次に、関数scalar(1/(r[1]+r[2]),Q)を用い、スカラー(1/(r[1]+r[2])と変数Qのスカラー倍算を計算する(図8,S101)。最後に、変数Qの座標をスカラー倍算d×Pの計算結果として出力する(図8,S102)。
【0118】
上記のステップS101の処理を終了した後の変数Qは、以下の式で表せる。
Figure 2004163687
上記の式(3)は、d×Pと等しいので、上述した処理により変数Qとしてスカラー倍算d×Pを計算することができる。
【0119】
図9は、第5の実施の形態のスカラー倍算d×Pの説明図である。
乱数をr1、r2とすると、最初にr1×Pのスカラー倍算が計算され、次に、d+r2とr1×Pとのスカラー倍算、すなわち、r1×(d+r2)×Pのスカラー倍算が計算される。
【0120】
また、r2×Pのスカラー倍算が計算され、計算により得られる点r2×Pとスカラー(d−r1)とのスカラー倍算、すなわち、r1×(d−r1)×Pのスカラー倍算が計算される。
【0121】
そして、上記のスカラー倍算により得られる点r1×(d+r2)×Pと、点r1×(d−r1)×Pの楕円加算ECADD(r1×(d+r2)×P,r1×(d−r1)×P)を計算することで、d×Pのスカラー倍算を求めることができる。
【0122】
この第5の実施の形態によれば、2個の乱数を用いて、5個のスカラー倍算を個々に計算することで整数dの推定を困難にし、電力解析攻撃に対する耐性を向上させることができる。
【0123】
ここで、上述した実施の形態のスカラー倍算の演算プログラムを実行する楕円曲線暗号装置のハードウェア構成の一例を図10を参照して説明する。楕円暗号装置は、例えば、パーソナルコンピュータ等の情報処理装置により実現できる。
【0124】
CPU23は、上述したスカラー倍算の演算プログラム等を実行する。ROM24にはBIOS等の制御プログラムが格納される。RAM(メモリ)26は、演算に使用される各種のレジスタとして使用される。記憶装置25には、楕円曲線暗号の演算プログラム等が格納される。
【0125】
記録媒体読み取り装置27は、CDROM、DVD、フレキシブルディスク、ICカード等の可搬記録媒体28の読み取り、あるいは書き込みを行う装置である。
【0126】
入力装置29は、キーボード等のデータを入力する装置である。通信インタフェース30は、インターネット等のネットワーク31に接続するための装置であり、この装置を介してネットワーク上の情報提供者32のサーバからプログラムをダウンロードすることができる。なお、CPU22,RAM24,外部記憶装置25等はバス22により接続されている。
【0127】
本発明は、楕円曲線暗号の暗号化及び解読を行う専用の装置に限らず、ICカード、DVD装置、携帯電話機、パーソナルコンピュータ等の種々の製品に適用できる。
【0128】
また、本発明は、実施の形態及で説明したスカラー倍算を計算するアルゴリズムに限らず他の楕円曲線暗号のアルゴリズムにも適用できる。
(付記1) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dを記憶する記憶手段と、
s(s≧2)個の乱数r1〜rsを発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、r1×P、r2×P、・・・、rs×P、(d−r1−・・・−rs)×Pのスカラー倍算の演算をそれぞれ実行し、それらの演算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
(付記2) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、
乱数r1とr2を発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、r1×Pのスカラー倍算と、r2×Pのスカラー倍算と、(d−r1−r2)×Pのスカラー倍算の演算をそれぞれ実行し、それらのスカラー倍算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
(付記3) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、
乱数r1とr2を発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、r1×Pのスカラー倍算と、r2×(r1×P)のスカラー倍算と、(d−r1×r2)×Pのスカラー倍算をそれぞれ実行し、r2×(r1×P)のスカラー倍算により得られる点P1と、(d−r1×r2)×Pのスカラー倍算とにより得られる点P2との楕円加算によりスカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
【0129】
(付記4) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、
乱数r1とr2を発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、(d−r1)×Pのスカラー倍算と、(d+r2)×Pのスカラー倍算と、r2×((d−r1)×P)のスカラー倍算と、r1×((d+r2)×P)のスカラー倍算とをそれぞれ実行し、r2×((d−r1)×P)のスカラー倍算により得られる点P1と、r1×((d+r2)×P)のスカラー倍算により得られる点P2との楕円加算と、楕円加算の演算結果と1/(r1+r2)とのスカラー倍算を実行して、スカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
(付記5) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと整数dを取得し、
s個の乱数r1〜rsを発生させ、
s個の乱数を用いて、r1×P、r2×P、・・・、rs×P、(d−r1−・・・−rs)×Pのスカラー倍算の演算をそれぞれ実行し、それらの演算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する楕円曲線暗号プログラム。
(付記6) 付記2記載の楕円曲線暗号装置において、
前記演算手段は、3個のスカラー倍算を電力解析攻撃に対する耐性を有するアルゴリズムに基づいて個々に計算する。
【0130】
(付記7) 付記2記載の楕円曲線暗号装置において、
前記演算手段は、3個スカラー倍算の内の2個のスカラー倍算を、電力解析攻撃に対する耐性を有するアルゴリズムに基づいて個々に計算し、他のスカラー倍算を電力解析攻撃に対する耐性を有しないアルゴリズムに基づいて計算する。
【0131】
(付記8) 付記3記載の楕円曲線暗号装置において、
前記演算手段は、r1×P,r2×P及び(d−r1−r2)×Pの3つのスカラー倍算の演算において、少なくとも2つのスカラー倍算の演算に電力解析攻撃に対する耐性を有するアルゴリズムを用いる。
【0132】
(付記9) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶部に記憶させ、
乱数r1とr2を発生させ、発生された乱数を用いて、演算部に、r1×Pのスカラー倍算と、r2×Pのスカラー倍算と、(d−r1−r2)×Pのスカラー倍算の演算をそれぞれ実行させ、それらのスカラー倍算により得られる点の楕円加算を実行させてスカラー倍算d×Pを計算する楕円曲線暗号プログラム。
【0133】
(付記10) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶部に記憶させ、
乱数r1とr2を発生させ、発生された乱数を用いて、演算部に、r1×Pのスカラー倍算と、r2×(r1×P)のスカラー倍算と、(d−r1×r2)×Pのスカラー倍算をそれぞれ実行させ、r2×(r1×P)のスカラー倍算により得られる点P1と、(d−r1×r2)×Pのスカラー倍算とにより得られる点P2との楕円加算によりスカラー倍算d×Pを計算させる楕円曲線暗号プログラム。
【0134】
(付記11) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶部に記憶させ、
乱数r1とr2を発生させ、発生された乱数を用いて、演算部に、(d−r1)×Pのスカラー倍算と、(d+r2)×Pのスカラー倍算と、r2×((d−r1)×P)のスカラー倍算と、r1×((d+r2)×P)のスカラー倍算とをそれぞれ実行させ、r2×((d−r1)×P)のスカラー倍算により得られる点P1と、r1×((d+r2)×P)のスカラー倍算により得られる点P2との楕円加算と、楕円加算の演算結果と1/(r1+r2)とのスカラー倍算を実行させて、スカラー倍算d×Pを計算させる楕円曲線暗号プログラム。
【0135】
(付記12) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶部に記憶させ、
乱数r1とr2を発生させ、発生された乱数を用いて、演算部に、r1×Pのスカラー倍算と、r2×(r1×P)のスカラー倍算と、(d−r1×r2)×Pのスカラー倍算をそれぞれ実行させ、r2×(r1×P)のスカラー倍算により得られる点P1と、(d−r1×r2)×Pのスカラー倍算とにより得られる点P2との楕円加算によりスカラー倍算d×Pを計算させる楕円曲線暗号演算方法。
【0136】
(付記13) 有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶部に記憶させ、
乱数r1とr2を発生させ、発生された乱数を用いて、演算部に、(d−r1)×Pのスカラー倍算と、(d+r2)×Pのスカラー倍算と、r2×((d−r1)×P)のスカラー倍算と、r1×((d+r2)×P)のスカラー倍算とをそれぞれ実行させ、r2×((d−r1)×P)のスカラー倍算により得られる点P1と、r1×((d+r2)×P)のスカラー倍算により得られる点P2との楕円加算と、楕円加算の演算結果と1/(r1+r2)とのスカラー倍算を実行させてスカラー倍算d×Pを計算させる楕円曲線暗号演算方法。
【0137】
【発明の効果】
本発明によれば、楕円曲線暗号におけるスカラー倍算の計算の電力解析攻撃に対する耐性を向上させることができる。
【図面の簡単な説明】
【図1】楕円曲線暗号装置の要部の構成を示す図である。
【図2】第1の実施の形態のスカラー倍算の演算プログラムを示す図である。
【図3】第1の実施の形態のスカラー倍算の説明図である。
【図4】第2の実施の形態のスカラー倍算の演算プログラムを示す図である。
【図5】第3の実施の形態のスカラー倍算の演算プログラムを示す図である。
【図6】第3の実施の形態のスカラー倍算の説明図である。
【図7】第4の実施の形態のスカラー倍算の演算プログラムを示す図である。
【図8】第5の実施の形態のスカラー倍算の演算プログラムを示す図である。
【図9】第5の実施の形態のスカラー倍算の説明図である。
【図10】実施の形態の演算プログラムを実行するハードウェア環境を示す図である。
【図11】アルゴリズム1の演算プログラムを示す図である。
【図12】アルゴリズム2の演算プログラムを示す図である。
【図13】アルゴリズム3の演算プログラムを示す図である。
【図14】アルゴリズム4の演算プログラムを示す図である。
【図15】アルゴリズム5の演算プログラムを示す図である。
【図16】アルゴリズム3’の演算プログラムを示す図である。
【図17】アルゴリズム5’の演算プログラムを示す図である。
【図18】アルゴリズム6の演算プログラムを示す図である。
【図19】アルゴリズム7の演算プログラムを示す図である。
【図20】アルゴリズム8の演算プログラムを示す図である。
【図21】アルゴリズム9の演算プログラムを示す図である。
【符号の説明】
11 楕円曲線暗号装置
12 演算部
13 演算器
14 レジスタ
16 記憶部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an elliptic curve encryption device, an elliptic curve encryption program, and an elliptic curve encryption operation method.
[0002]
[Prior art]
Encryption methods are broadly classified into a common key encryption method and a public key encryption method. The common key encryption method uses the same key (private key) for encryption and decryption. The secret key is used as information that cannot be understood by a third party other than the sender and the receiver. It is a method to keep.
[0003]
The public key cryptosystem is a system in which different keys are used for encryption and decryption. Instead of making the key for performing encryption (public key) public, the key for decrypting ciphertext (private key) is used. Is used as secret information only for the receiver to maintain security. RSA cryptography, elliptic curve cryptography, and the like are known as public key cryptography.
[0004]
An ECES cryptographic primitive will be described as an example of an elliptic curve cryptosystem. When the sender A has the secret key s (s is an integer) and the receiver B has the secret key t (t is an integer), the elliptic curve E and the base point P (x , Y), the public key s × P (scalar multiplication of the secret key s of the sender A and the base point P), and the public key t × P (scalar of the secret key t of the receiver B and the base point P) Multiplication) has been published in advance. At this time, the sender A calculates a scalar multiplication s × (t × P) of the secret key s of the sender A and the public key t × P of the receiver B, obtains a bit representation of the x coordinate, and By performing an EOR operation corresponding to bits between the expression and the bit expression of the message, a ciphertext C for the message m is generated and transmitted to the receiver B. The receiver B calculates a scalar multiplication t × (s × P) of the secret key t of the receiver B and the public key s × P of the sender A, and obtains a bit representation of the x coordinate. Considering that the relational expression “s × (t × P) = t × (s × P)” holds, an EOR operation corresponding to a bit is performed between the bit expression and the bit expression of the ciphertext C. Is performed, the ciphertext C is decrypted to obtain the message m. In this way, the elliptic curve cryptographic primitive called ECES cryptography performs the encryption / decryption processing using the scalar multiplication operation.
[0005]
One of the technologies in the field of cryptography is what is called a decryption technology. The decryption technique is a technique for estimating secret information such as a secret key from available information such as a ciphertext, and various techniques exist. Among them, a technique that has recently attracted attention is a technique called power analysis attack. The power analysis attack is a method devised by Poul Kocher in 1998. The power analysis attack collects and analyzes power consumption data when various input data is supplied to a cryptographic processor mounted on a smart card or the like, and thereby the cryptographic processor is analyzed. This is a technique for estimating internal key information. It is known that a secret key can be estimated from a cryptographic processor by using a power analysis attack for both common key cryptography and public key cryptography.
[0006]
There are two types of power analysis attacks, a simple power analysis (hereinafter referred to as SPA) and a differential power analysis (Differential Power Analysis; hereinafter referred to as DPA). SPA is a method of estimating a secret key from the characteristics of a single piece of power consumption data in a cryptographic processor, and DPA is a method of estimating a secret key by analyzing differences between a large number of pieces of power consumption data.
[0007]
The estimation method using SPA and DPA for the RSA encryption is described in Thomas S. A. et al. Messages, Ezzy A. Dabbish and Robert H. Sloan, "Power Analysis Attack of Modular Exponentiation in Smartcards", Cryptographic Hardware and Embedded Systems, (hereafter referred to as CHES'99. 1717, Springer-Verlag, pp. 144-157, and Jean-Sebastian Coron, "Resistance Against Differential Power Analysis for Elliptic Curve Cryosystems, Credit Cards, Esd. 1717, Springer-Verlag, pp. 292-302, 1999 (hereinafter referred to as Reference 1).
[0008]
On the other hand, among public key cryptosystems, a representative one along with the RSA cryptosystem is an elliptic curve cryptography (Elliptic Curve Cryptography). This is based on the discrete logarithm problem of the elliptic curve. Koblitz ("Elliptic Curve Cryptosystems", Mathematicals of Computers, Vol. 48, pp. 203-209, 1987.); Miller ("Use of Elliptic Curves in Cryptography", Advances in Cryptology-Proceedings of Crypto '85, Lecture Notes, Computer, Sci.
[0009]
In the elliptic curve cryptography, a public key point Q is, for example, a scalar multiplication of a point P on an elliptic curve called a public base point using a secret key d which is a scalar value. It is a point on the elliptic curve calculated by Q = d × P. The operation algorithm of scalar multiplication Q = d × P will be described below.
[0010]
FIG. 11 is a diagram showing a calculation program of Algorithm 1 for calculating a scalar multiplication d × P from an MSB (Most Significant Bit) of an integer d by a Binary Method.
[0011]
In the following description of Algorithm 1 and other algorithms, d represents an n-bit scalar value, P and Q represent points on an elliptic curve, ECADD represents elliptic addition, and ECDBL represents elliptic doubling.
[0012]
The coordinates of the point P are set as the initial value of the variable T, and the variable i is changed from n−2 to 0 to calculate the ellipse doubling ECDBL (T).
When the coefficient d [i] of the binary expansion is “1”, the point T obtained by the ellipse doubling ECDBL (T) and the elliptic addition ECADD (T, P) of the point P are calculated, and the calculation result is defined as a variable Stored in T.
[0013]
After executing the above processing from the variable i = n−2 to i = 0, the value of the variable T is output as the coordinates of the point Q obtained by the scalar multiplication d × P.
In the above algorithm 1, elliptic addition ECADD is performed or not depending on whether the value of d [i] is “1”. In the SPA attack, the secret key d is analyzed using this property. From many experiments, it is known that the power waveforms of the elliptic addition ECADD and the elliptic doubling ECDBL are characteristic and easily distinguishable. From this, if the power waveform of the processing of the operation algorithm 1 is measured, the order and the number of the processing of the elliptic addition ECADD and the elliptic doubling ECDBL can be known from the waveform, so that the secret key d can be analyzed.
[0014]
As a countermeasure against the SPA attack, a method called add-and-double-alwayss is proposed in the above-mentioned Document 1. This method is safe against SPA attacks because elliptic doubling and elliptic addition are always calculated alternately.
[0015]
FIG. 12 is a diagram illustrating a calculation program of algorithm 2 in which add-and-double-always is performed on algorithm 1.
The coordinates of the point P are set as the initial values of the variable T [0], the variable i is changed from n−2 to 0, and the ellipse doubling ECDBL (T [0]) is calculated. 0].
[0016]
Further, an elliptic addition ECADD (T [0], P) of the point T [0] and the point P is calculated, and the calculation result is set to a variable T [1].
Then, the value of T [d [i]] determined by the value of coefficient d [i] is set to variable T [0].
[0017]
After executing the above processing from i = n−2 to i = 0, the value of the variable T [0] is output as the coordinates of the point Q obtained by the scalar multiplication d × P.
According to the algorithm 2 described above, it is possible to prevent the SPA attack. However, Document 1 also describes DPA attacks on these algorithms, and indicates that the secret key information can be analyzed by a DPA attack on Algorithm 2.
[0018]
Document 1 proposes a countermeasure against DPA attack on Algorithm 2 by introducing an expression of a point on an elliptic curve using a random number called RPC (Randomized Projective Coordinates).
[0019]
FIG. 13 is a diagram showing a calculation program of algorithm 3 in which RPC is performed on algorithm 2.
The coordinates of the point RPC (P) on the elliptic curve using random numbers are set as the initial values of the variable T ′ [2], and T ′ [2] is set as the initial value of the variable T ′ [0].
[0020]
The variable i is changed from n−2 to 0, the elliptic doubling ECDBL (T ′ [0]) is calculated, and the calculation result is set to the variable T ′ [0]. The elliptic addition ECADD (T '[0], T' [2]) of the point T '[0] and the point T' [2] is calculated, and the calculation result is set to a variable T '[1]. The value of T '[0] or T' [1] is stored in T '[0] according to the value of d [i].
[0021]
After executing the above-described processing from i = n−2 to i = 0, the variable T ′ [0] is converted from the RPC expression to the coordinates of a point on the elliptic curve, and the coordinates are obtained by scalar multiplication d × P. Is output as the coordinates of the point Q.
[0022]
FIG. 14 is a diagram illustrating a calculation program of Algorithm 4 for calculating a scalar multiplication d × P from an LSB (Least Significant Bit) of an integer d by a Binary Method. The algorithm 4 is an algorithm that always calculates the elliptic addition ECADD and the elliptic doubling ECDBL, and is an algorithm to which RPC is applied.
[0023]
First, 0 is set as the initial value of the variable T ′ [0], and the coordinates of the point RPC (P) on the elliptic elliptic curve are set as the initial value of the variable T ′ [2].
Elliptic addition ECADD (T '[0], T' [2]) of point T '[0] and point T' [2] is calculated by changing the variable i from 0 to n-1. Set to T '[1]. The ellipse doubling ECDBL (T ′ [2]) of the point T ′ [2] is calculated, and the calculation result is set to a variable T ′ [2]. The value of T '[0] or T' [1] is stored in T '[0] according to the value of d [i].
[0024]
After executing the above processing from i = 0 to i = n−1, the variable T ′ [0] is converted from the RPC expression to the coordinates of a point on the elliptic curve, and the converted coordinates are obtained by scalar multiplication d × P. It is output as the coordinates of the obtained point Q.
[0025]
As a method having the same effect as the above-described method using random numbers, a method using a Montgomery-Ladder and an RPC in which SPA countermeasures are used is described in T.K. Izu, and T .; Takagi, "A Fast Parallel Elliptic Curve Multiplication Resistant Against Side Channel Attack", PKC 2002, LNCS 2274, pp. 280-296, Spring, which is proposed by Spring. It is characterized by using a scalar multiplication method called Montgomery-Ladder, which takes measures against it. In Montgomery-Ladder, the scalar multiplication Q = d × P always calculates the ellipse doubling and elliptic addition. Calculation of two points so that the difference is 1P is performed.
[0026]
FIG. 15 is a diagram showing a calculation program of a scalar multiplication algorithm 5 using Montgomery-Ladder and RPC that take the SPA countermeasure.
First, a point RPC (P) on an elliptic curve using a random number is set as an initial value of a variable T ′ [0], and an ellipse twice of the point T ′ [0] is set as an initial value of the variable T ′ [1]. The coordinates of the point obtained by the calculation ECDBL (T '[0]) are set.
[0027]
Next, the variable i is changed from n−2 to 0, the elliptic doubling ECDBL (T ′ [d [i]]) is calculated, and the calculation result is stored in the variable T ′ [2].
Next, an elliptic addition ECADD (T '[0], T' [1]) of T '[0] and T' [1] is calculated, and the calculation result is stored in a variable T '[1].
[0028]
Next, the value of T [2-d [i]] determined by the value of the coefficient d [i] is set to a variable T '[0].
Similarly, the value of T '[1 + d [i]] determined by the value of the coefficient d [i] is set to the variable T' [1].
[0029]
After the above processing is repeated from i = n−2 to i = 0, the coordinates of the variable T ′ [0] expressed using random numbers are inversely transformed into the original coordinates on the elliptic curve, and the scalar multiplication d × Output as coordinates of point R of P.
[0030]
As a calculation method of scalar multiplication having the same effect as RPC, M.P. Joye, and C.W. Tymen, "Protections against differential analysis for elliptic curve cryptography", CHES 2001, LNCS 2162, pp. 377-390, Springer-Verlag, 2001. In (JT01), there is a RC (Randomized Curve) method. RC is a method that can be applied only to a wire-strass type elliptic curve on a prime field, and is a DPA measure using a point expression using random numbers in the same way as RPC.
[0031]
FIG. 16 shows an algorithm 3 ′ in which RC is applied instead of RPC of algorithm 3 described above. FIG. 17 shows an algorithm 5 ′ in which RC is applied to algorithm 5. In FIGS. 16 and 17, points on the elliptic curve represented by RC are indicated by variables with double dashes (").
[0032]
The operation programs of the algorithms 3 ′ and 5 ′ of FIGS. 16 and 17 are basically the same as the operation programs of FIGS. 13 and 15. A different point is that scalar multiplication is calculated using coordinates obtained by converting the coordinates of the point P on the elliptic curve by RC.
[0033]
As a method of realizing the scalar multiplication d × P, there is a method called Window Method other than the algorithm described above. For example, in the case of a 4-bit Window Method, 0 to 15 times P is calculated as initial processing, the result is stored as a table, and the secret key is processed in units of 4 bits (this is called Window).
[0034]
FIG. 18 shows Algorithm 6 which is a basic algorithm of the 4-bit Window Method. It is assumed that d is an n-bit scalar value and is a multiple of 4. Also, d [n-1, n-4] is a 4-bit value from the lower (n-1) th bit to the (n-4) th bit of the integer d, and W [i] is a table used in the Window Method. It is.
[0035]
First, the coordinates of the point 0 on the elliptic curve are set as an initial value in the variable W [0], the coordinates of the point P on the elliptic curve are set as the initial value of the variable W [1], and the variable W [2] The coordinates of the point of the ellipse doubling ECDBL (P) of the point P are set as the initial value of.
[0036]
Next, the variable i is changed from 3 to 15, an elliptic addition ECADD (W [i-1], P) of the point W [i-1] and the point P is calculated, and the calculation result is stored in a table W [i]. To be stored.
[0037]
By the above processing, for example, when the variable i is 3, W [3] = ECADD (W [2], P), and the point obtained by the calculation of the ellipse doubling 2 × P, the point P Are calculated and stored in the table W [i].
[0038]
Next, W [d [n-1, n-4]] is set as a variable Q.
Next, the variable i is changed from n-5 to 0 in units of 4 bits, and the calculation of the elliptic doubling ECDBL (Q) is performed four times. Four elliptic doubling ECDBL operations shift data of 4 bits from the bit position specified by the variable i. Further, the elliptic addition ECADD (Q, W [d [i, i-3]]) is calculated, and the result of four elliptic doubling ECDBL calculations and W [d [i, i] obtained from the table W are obtained. -3]] is calculated.
[0039]
By executing the above processing from i = n−5 to i = 0, the coordinates of the scalar multiplication d × P point are obtained.
When the above algorithm 6 is used, there is no processing that is performed or not performed depending on the bit value of the integer d. For this reason, Window Method is generally said to be safe against SPA attacks, unlike Binary Method. However, the Window Method is not safe against a DPA attack like the Binary Method, and it is possible to estimate d by the power analysis method of Reference 1.
[0040]
It is known that RPC and RC are effective as a Binary Method as a countermeasure for DPA of Window Method.
FIG. 19 shows an operation program of algorithm 7 in which RPC is applied to algorithm 6, and FIG. 20 shows an operation program of algorithm 8 in which RC is applied to algorithm 6.
[0041]
The DPA resistance can be improved by the algorithm 7 of FIG. 19 and the algorithm 8 of FIG.
[0042]
[Non-patent document 1]
JEAN-SEBESTIN CORON, "Resistance against Differential Power Analysis for Elliptic Curve Cryptosystems", Cryptographic Credits ed. 1717, Springer-Verlag, pp. 292-302, 1999
[0043]
[Non-patent document 2]
K. Itoh, T.W. Izu, and M.S. Takenaka, "Address-bit Differential Power Analysis of Cryptographic Schemes OK-ECDH and OK-ECDSA", Cryptographic Hardware and Enhanced Medicine, 200, 2000, 2003. 129-143
[0044]
[Problems to be solved by the invention]
Conventionally, it has been said that the above algorithms 3, 5, 3 ', 5', 7, 8 are safe against SPA and DPA attacks.
[0045]
However, K. Itoh, T.W. Izu, and M.S. Takenaka, "Address-bit Differential Power Analysis of Cryptographic Schemes OK-ECDH and OK-ECDSA", Cryptographic Hardware and Enhanced Medicine, 200, 2000, 2003. 129-143 (hereinafter referred to as Document 2) discloses a method of performing power analysis on Algorithm 5. While the conventional DPA focuses on the power consumption caused by data changes, this method (address-bit DPA) is an analysis method that focuses on the power consumption caused by address changes.
[0046]
For example, in the algorithm 5 of FIG. 15, the processing of T ′ [2] = ECDBL (T ′ [d [i]]) (the processing indicated by * in FIG. 15) is performed according to the value of d [i]. 0] or T ′ [1] is used. Therefore, the address where the data used in the elliptic addition ECADD is stored has a strong correlation with d [i]. The same applies to the processing of T '[0] = T' [2-d [d [i]] and the processing of T '[1] = T' [1 + d [i]] (processing indicated by # in FIG. 15). ). As a result, the address-bit DPA can analyze the secret key d by utilizing the correlation with the address.
[0047]
The address-bit DPA of Document 2 is also applicable to algorithms 3 ′ and 5 ′. Also, the Window Method of the algorithms 7 and 8 is considered to be able to perform the same attack because the value of the secret key d and the table to be used have a strong relationship.
[0048]
Therefore, algorithms 3, 5, 3 ', 5', 7, 8 are not safe against address-bit DPA attacks.
As a countermeasure against the address-bit DPA of Document 2, a method of randomly changing a scalar value, for example, an exponent-splitting has been proposed.
[0049]
In Exponent-splitting, a random number r is generated, r × P and (dr) × P are separately calculated, and scalar multiplication d is obtained from the property of r × P + (dr) × P = d × P. XP is calculated. Here, for the scalar multiplication r × P and (dr) × P, an algorithm having resistance to conventional SPA and DPA attacks is used. With respect to the Address-bit DPA, since the scalar value changes at random, information about d is not collected, so that protection is possible.
[0050]
FIG. 21 is a diagram showing a calculation program of Algorithm 9 of Exponent-splitting.
In FIG. 21, random () is a function for generating an n-bit random number. Further, scalar (d, P) is a function for calculating scalar multiplication d × P, and is realized by the above-described algorithms 3, 3 ′, 5, 7, and the like.
[0051]
Although there is no known attack report on Exponent-splitting, if one of the scalar multiplications is calculated by an algorithm having no SPA / DPA tolerance as proposed by the proposers, a DPA attack can be performed on the entire scalar multiplication.
[0052]
An object of the present invention is to improve resistance to a power analysis attack.
[0053]
[Means for Solving the Problems]
The elliptic curve encryption device of the present invention generates an elliptic curve E on a finite field, a base point P on the elliptic curve, a storage unit for storing an integer d, and generates s (s ≧ 2) random numbers r1 to rs. R1 × P, r2 × P,..., Rs × P, (d−r1... -Rs) × using s random numbers generated by the random number generating means And an operation means for executing operations of s + 1 scalar multiplications of P and performing elliptic addition of points obtained by the operations to calculate scalar multiplication d × P.
[0054]
According to the present invention, by performing s + 1 times of scalar multiplication calculations using s random numbers, it is possible to improve the resistance of the elliptic curve cryptosystem to a power analysis attack.
[0055]
Another elliptic curve encryption device of the present invention includes a storage unit for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d, a random number generating unit for generating random numbers r1 and r2. , Scalar multiplication of r1 × P, scalar multiplication of r2 × P, and scalar multiplication of (d−r1−r2) × P are respectively performed using random numbers generated by the random number generation means. And an operation means for performing elliptic addition of points obtained by the scalar multiplication to calculate scalar multiplication d × P.
[0056]
According to the present invention, the resistance of the elliptic curve cryptosystem to the power analysis attack can be improved by performing the scalar multiplication three times using two random numbers.
Another elliptic curve encryption device of the present invention includes a storage unit for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d, a random number generating unit for generating random numbers r1 and r2. The scalar multiplication of r1 × P, the scalar multiplication of r2 × (r1 × P), and the scalar multiplication of (d−r1 × r2) × P are performed using the random numbers generated by the random number generation means. Each is executed, and a scalar multiplication d is performed by elliptic addition of a point P1 obtained by scalar multiplication of r2 × (r1 × P) and a point P2 obtained by scalar multiplication of (d−r1 × r2) × P. XP calculating means.
[0057]
According to the present invention, by performing scalar multiplication using a value obtained by multiplying the random numbers r1 and r2, estimation of individual random numbers by power analysis becomes difficult, and estimation of an integer d becomes more difficult. Thereby, the resistance of the elliptic curve cryptosystem to power analysis attacks can be improved. In addition, since only one calculation of the ellipse addition of the points P1 and P2 is required, the calculation time of the ellipse addition can be reduced. Furthermore, since the product of the random number r1 and the random number r2 only needs to have the same bit length as the integer d, the bit lengths of the random numbers r1 and r2 can be shorter than the bit length of the integer d. Thereby, the calculation time of the scalar multiplication of the random number and the point P can be shortened, and the entire calculation time of the scalar multiplication can be shortened.
[0058]
Another elliptic curve encryption device of the present invention includes a storage unit for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d, a random number generating unit for generating random numbers r1 and r2. , Scalar multiplication of (d−r1) × P, scalar multiplication of (d + r2) × P, and r2 × ((d−r1) × P) A scalar multiplication and a scalar multiplication of r1 × ((d + r2) × P) are executed, respectively, and a point P1 obtained by the scalar multiplication of r2 × ((d−r1) × P) and r1 × (( The scalar multiplication d × P is calculated by executing the scalar multiplication of the point P2 obtained by the scalar multiplication of (d + r2) × P) and the operation result of the ellipse addition and 1 / (r1 + r2). Computing means.
[0059]
According to the present invention, it is possible to make it difficult to estimate the integer d by power analysis by executing scalar multiplication five times using the random numbers r1 and r2.
Note that the storage unit corresponds to, for example, the storage unit 16 and the register 14 in FIG. 1, and the operation unit corresponds to the operation unit 12 or the operation unit 13.
[0060]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. The elliptic curve encryption device according to the embodiment includes, for example, a dedicated information processing device, 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. It has a processor for calculating the curve.
[0061]
FIG. 1 is a diagram showing a configuration of a main part of an elliptic curve encryption device 11 according to the present invention. The operation unit 12 of the elliptic curve 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 16 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 calculation program stored in the storage unit 16, generates random numbers r1, r2, and the like, and calculates scalar multiplication d × P using those random numbers.
[0062]
In the following description, a case will be described in which the calculation method of the elliptic curve cryptography according to the present invention is applied to an elliptic curve in a prime field GF (p) (p is a prime number of 5 or more).
The circular curve E on GF (p) can be expressed by the following equation.
[0063]
E: y ^ 2 = x ^ 3 + a × x + b
Here, a, b, x, and y are elements of GF (p) and satisfy 4 × a ^ 3 + 27 × b ^ 2 ≠ 0.
[0064]
FIG. 2 is a diagram showing a scalar multiplication operation program according to the first embodiment of the present invention.
The first embodiment receives an n-bit integer d, a base point P on an elliptic curve, and a parameter s as inputs, generates s random numbers r1, r2,... Rs, and converts a scalar d to r1. , R2, ..., rs, d-r1-r2 -...- rs, and s + 1 scalar multiplications r1 * P, r2 * P, ..., rs * P, (d-r1-r2 -...- rs ) × P is calculated individually.
[0065]
The calculation program of the first embodiment (the same applies to other embodiments) described below is executed by the calculation unit 12, and a value in the middle of calculation or a calculation result is stored in the register 14.
[0066]
The calculation unit 12 sets an integer d as a variable r [s + 1] (FIG. 2, S21). The variable i is sequentially changed from i = 1 to i = s (FIG. 2, S23), and the processing of steps S24 and S25 is executed.
[0067]
In step S24, a random number is generated by the function random (), and the generated random number is set in a variable r [i]. In the next step S25, a random number r [i] is subtracted from the variable r [s + 1], and the subtraction result is set in the variable r [s + 1].
[0068]
After steps S23 to S26, a scalar multiplication operation is performed. The variable i is changed from i = 1 to i ≦ s + 1 (S28 in FIG. 2), a scalar multiplication of r [i] × P is calculated using a function scalar (r [i], P), and the calculation result is It is stored in a variable d [i] (FIG. 2, S29).
[0069]
Here, r [i] is s random numbers r [1], r [2]... R [s] generated by the function random (). By repeating the processing of steps S23 to S25 s times, r [s + 1] = d-r1-r2-... -Rs "is obtained as the final value of r [s + 1]. By repeating the processing of steps S28 to S29 s + 1 times, scalar multiplication r1 × P, r2 × P, r3 × P,... Rs × P, (d−r1−r2... −rs) × P is calculated in order.
[0070]
Next, scalar integration is performed. The variable i is changed from i = 1 to i ≦ s + 1 (S32 in FIG. 2), the elliptic addition ECADD (Q, d [i]) of each point is calculated, and the calculation result is stored in the variable Q (FIG. 2). , S33). After executing the above processing from i = 1 to s + 1, the variable Q is output as the result of the scalar multiplication d × P (S35 in FIG. 2).
[0071]
The processing in steps S32 and S33 is processing for calculating elliptic addition ECADD of s + 1 points. The variable Q after repeating the loop processing of steps S32 to S33 s + 1 times can be expressed by the following equation.
[0072]
Figure 2004163687
Since the above equation (1) is equal to d × P, the scalar multiplication d × P can be calculated by obtaining the variable Q.
[0073]
FIG. 3 is an explanatory diagram of the scalar multiplication d × P according to the first embodiment.
When i = 1, scalar multiplication of r1 × P is calculated, and when i = 2, scalar multiplication of r2 × P is calculated. When i = s, a scalar multiplication of rs × P is calculated. When i = s + 1, a scalar multiplication of (d−r1−r2... −rs) × P is calculated. Then, by calculating the elliptic addition ECADD of the points obtained by s + 1 scalar multiplications, a scalar multiplication of d × P can be obtained.
[0074]
According to the first embodiment, the number of random numbers specified by the parameter s is generated, and the calculation of the scalar multiplication is performed s + 1 times using the generated s random numbers. Can be difficult to estimate the integer d by the power analysis. Further, by changing the parameter s every time scalar multiplication is performed on individual data, estimation of the integer d can be made more difficult.
[0075]
Next, FIG. 4 is a diagram showing a calculation program for scalar multiplication according to the second embodiment of the present invention.
In the second embodiment, in the first embodiment, at least two scalar multiplications among s + 1 scalar multiplication calculations are performed using an algorithm having resistance to DPA. It is. The other scalar multiplication calculation may use an algorithm having no DPA tolerance, or may use an algorithm having DPA tolerance.
[0076]
The processing from S41 to S46 in FIG. 4 is the same as the processing from S21 to S26 in FIG. Next, in step S48 of FIG. 4, the function select2 (s + 1) is used to determine which of the s + 1 scalar multiplication calculations uses an algorithm that is secure against DPA attacks. Here, the function select2 (s + 1) is a function that sets the value of two arrays t [] in the s + 1 arrays to 1 and the value of the other arrays t [] to 0.
[0077]
Next, the variable i is sequentially changed from i = 1 to i = s + 1 (FIG. 4, S50). It is determined whether t [i] = 1 (FIG. 4, S51).
When t [i] = 1, in the next step S52, a scalar multiplication of the random number r [i] and the point P is calculated using the function scalar (r [i], P), and the calculation result is represented by a variable d [ i].
[0078]
Here, the function scalar (r [i], P) calculates the scalar multiplication using an algorithm that is resistant to the DPA attack, for example, the algorithm 3 in FIG. 13 or the algorithm 5 in FIG. Function.
[0079]
When t [i] = 0, the process proceeds to step 53. Then, in the next step S54, a scalar multiplication of the random number r [i] and the point P is calculated using the function scalar2 (r [i], P), and the calculation result is stored in a variable d [i].
[0080]
The function scalar2 (r [i], P) is a function for calculating scalar multiplication by an algorithm that does not require resistance to a DPA attack. Of course, the calculation may be performed using an algorithm having resistance to the DPA attack.
[0081]
Next, scalar integration is performed. The variable i is changed from i = 1 to i ≦ s + 1 (FIG. 4, S57), and the elliptic addition ECADD (Q, d [i]) is calculated (FIG. 4, S58). After executing the processing of steps S57 and S58 from i = 1 to s + 1, the variable Q is output as a result of scalar multiplication d × P (FIG. 4, S60).
[0082]
In the second embodiment, in addition to the effects of the above-described first embodiment, an algorithm having resistance to a DPA attack is calculated in at least two scalar multiplication calculations out of s + 1 scalar multiplication calculations. The use of an algorithm that does not have DPA tolerance for other scalar multiplications has the effect of reducing the overall calculation time of scalar multiplication compared to using an algorithm that has DPA tolerance for all calculations. Can be
[0083]
Next, a case where r = 2 in the above-described first and second embodiments will be described.
The first 'embodiment corresponds to the case of s = 2 of the first embodiment, generates two random numbers r1 and r2, and divides the scalar d into r1, r2, d-r1-r2. Then, three scalar multiplications r1 × P, r2 × P, and (d−r1−r2) × P are individually calculated.
[0084]
When the scalar multiplication of r1 × P, the scalar multiplication of r2 × P, and the scalar multiplication of (d−r1−r2) × P are completed, the elliptic addition ECADD of three points obtained by those operations is calculated. I do. Elliptic addition of three points can be expressed by the following equation.
[0085]
r1 × P + r2 × P + (d−r1−r2) × P = (r1 + r2 + (d−r1−r2)) × P = d × P
Therefore, scalar multiplication d × P can be calculated by calculating elliptic addition ECADD of three points.
[0086]
In the first embodiment, the scalar multiplication of r1 × P, r2 × P, and (d−r1−r2) × P is performed by using an algorithm that is resistant to a DPA attack. The calculation of the multiplication d × P can be executed while maintaining the resistance to the DPA attack.
[0087]
According to the first 'embodiment, by using two random numbers and individually calculating three scalar multiplications, it is difficult to estimate the integer d by power analysis. In this case, the calculation time can be reduced because only three scalar multiplications need to be calculated.
[0088]
Next, the second embodiment corresponds to the case where s = 2 in the second embodiment, and three scalar multiplications r1 × P, r2 × P, (d−r1−r2) × The two scalar multiplications of P are randomly specified, the two scalar multiplications are calculated using an algorithm that is resistant to DPA attacks, and the remaining one scalar multiplication is calculated by the DPA. This is performed using an algorithm that does not have resistance to attacks.
[0089]
According to the second 'embodiment, two of the three scalar multiplication calculations use an algorithm that is resistant to a DPA attack, and the other calculation has no resistance. By using, the calculation time of the scalar multiplication d × P can be reduced while maintaining the resistance to the DPA attack.
[0090]
Next, FIG. 5 is a diagram showing a scalar multiplication operation program according to the third embodiment of the present invention.
The third embodiment generates an integer d, the coordinates of a base point P, and two random numbers r1 and r2, divides the scalar d into r1, r2, and d-r1-r2, and performs three scalar multiplications. The calculations r1 × P, r2 × (r1 × P), and (d−r1 × r2) × P are individually calculated.
[0091]
A random number is generated using the function random (), and the generated random number is stored in a variable r [1] (FIG. 5, step 62). Similarly, a random number is generated using the function random (), and the generated random number is stored in a variable r2 (FIG. 5, S63).
[0092]
Next, scalar multiplication is calculated. A scalar multiplication of the random number r [1] and the point P is calculated using the function scalar (r [1], P), and the calculation result is stored in a variable P [1] (FIG. 5, S65).
[0093]
Next, using the variable P [1] obtained by the above processing and the function scalar (r [2], P [1]), a scalar multiplication r [2] of the random number r [2] and the point P [1] is performed. 2] × (r1 × P) is calculated, and the calculation result is stored in a variable P [2] (FIG. 5, S66).
[0094]
Next, using the random numbers r [1] and r [2] and the function scalar (dr [1] × r [2], P), a scalar (dr [1] × r [2]) and point A scalar multiplication with P is calculated, and the calculation result is stored in a variable P [3] (FIG. 5, S67).
[0095]
By performing the processing of steps S65 to S67, a scalar multiplication of r [1] × P, a scalar multiplication of r [2] × r [1] × P, and (d−r [1]) × r [2]) × P scalar multiplication is calculated.
[0096]
Next, scalar integration is performed. The elliptic addition ECADD (P [2], P [3]) of the point determined by the variable P [2] and the point determined by the variable P [3] is calculated, and the calculation result is stored in the variable Q (FIG. 5, S69). . Finally, the coordinates of the variable Q are output as the result of the scalar multiplication d × P (FIG. 5, S70).
[0097]
The process of step S69 is a process of calculating the elliptic addition ECADD of the two points P [2] and P [3], and the variable Q after the process of step S69 ends can be expressed by the following equation. .
[0098]
Q = r [1] × r [2] × P + (dr- [1] × r [2]) × P (2)
Since the above equation (2) is equal to d × P, the scalar multiplication d × P can be calculated by the above processing.
[0099]
FIG. 6 is an explanatory diagram of the scalar multiplication d × P according to the third embodiment.
Assuming that random numbers are r1 and r2, a scalar multiplication of r1 × P is calculated first, and then a scalar multiplication of a point obtained by the scalar multiplication of r1 × P and r2, that is, r1 × r2 × A scalar multiplication of P is calculated. Further, a scalar multiplication of (dr- [1] × r [2]) and P is calculated.
[0100]
Then, by calculating the elliptic addition ECADD of the point “r1 × r2 × P” obtained by the above scalar multiplication and the point “(d−r1 × r2) × P”, the scalar multiplication of d × P is performed. Can be calculated.
[0101]
According to the third embodiment, it is difficult to estimate the integer d by power analysis by calculating three scalar multiplications using two random numbers, and to make the elliptic curve cryptography resistant to DPA attacks. Can be improved. Further, in the third embodiment, since the scalar multiplication is a multiplication of two random numbers r [1] and r [2], it becomes more difficult to estimate the random numbers. Also, the bit length of the random numbers r [1] and r [2] can be shorter than the bit length of the integer d. As a result, the calculation time of the scalar multiplication of the random number and the point P is reduced, so that the entire calculation time of the scalar multiplication of d × P can be reduced.
[0102]
Next, FIG. 7 is a diagram showing a scalar multiplication operation program according to the fourth embodiment of the present invention.
The fourth embodiment uses an algorithm having resistance to a DPA attack in the calculation of two scalar multiplications in the calculation of three scalar multiplications of the third embodiment.
[0103]
The processing in steps S71 to S73 in FIG. 7 is the same as the processing in steps S61 to S63 in the calculation program in FIG.
In step S75, an array where t [i] = 1 is determined using the function select2 (s + 1). In this case, since s = 2, the values of any two of the three arrays t [i] are set to 1 and the others are set to 0.
[0104]
Next, scalar multiplication is calculated. When the array t [1] corresponding to r [1] is 1, a scalar multiplication r1 × P of the random number r [1] and the point P is calculated using the function scalar (r [1], P), The calculation result is stored in a variable P [1]. If t [1] is not 1 (S77, Selle), a scalar multiplication r [1] × P is calculated using a function scalar2 (r [1], P), and the calculation result is set as a variable P [1]. It is stored (S77 in FIG. 7).
[0105]
Next, when the array t [2] corresponding to r [2] is 1, a scalar between the random number r [2] and the point P [1] using the function scalar (r [2], P [1]). The multiplication r [2] × P [1] = r [2] × (r [1] × P) is calculated, and the calculation result is stored in a variable P [2]. If t [2] is not 1 (S78, Selle), scalar multiplication r [2] × (r [1] × P) is calculated using function scalar2 (r [2], P), and the calculation result is obtained. Is stored in a variable P [2] (FIG. 7, S78).
[0106]
Next, when the array t [3] is 1, a scalar (dr [1] × r [2]) is obtained using the function scalar (dr [1] × r [2], P [2]). And a scalar multiplication of the point P is calculated, and the calculation result is stored in a variable P [3]. If t [3] is not 1 (S79, else), scalar multiplication (dr [1] × r [2] using function scarr2 (dr [1] × r [2], P) is performed. ) × P is calculated, and the calculation result is stored in a variable P [3] (FIG. 7, S79).
[0107]
Next, an ellipse addition ECADD (P [2], P [3]) of the point P [2] and the point P [3] is calculated (FIG. 7, S81). Finally, the coordinates of the variable Q are output as the calculation result of the scalar multiplication d × P (FIG. 7, S82).
[0108]
According to the fourth embodiment, in addition to the effects of the third embodiment described above, two scalar multiplications among the three scalar multiplications are performed using an algorithm having resistance to a DPA attack, By using an algorithm that does not have the resistance of another scalar multiplication, the overall calculation time of the d × P scalar multiplication can be reduced. In addition, every time a scalar multiplication is performed on one data, it is arbitrarily determined which scalar multiplication uses an algorithm that is resistant to a DPA attack, so that power analysis is more difficult. become.
[0109]
Next, FIG. 8 is a diagram showing a scalar multiplication operation program according to the fifth embodiment of the present invention.
In the fifth embodiment, two random numbers r1 and r2 are generated, a scalar d is divided into d = ((d−r1) × r2 + (d + r2) × r1) / (r1 + r2), and four scalars are generated. The multiplication (d−r1) × P, (d + r2) × P, r2 × ((d−r1) × P), r1 × ((d + r2) × P) are individually calculated, and the result of the elliptic addition and 1 / Scalar multiplication with (r1 + r2).
[0110]
A random number is generated using the function random (), and the generated random number is stored in a variable r [1] (FIG. 8, step 92). Similarly, a random number is generated using the function random (), and the generated random number is stored in a variable r [2] (FIG. 8, S93).
[0111]
Next, scalar multiplication is calculated. A scalar multiplication r [1] × P of the random number r [1] and the point P is calculated using the function scalar (r [1], P), and the calculation result is stored in a variable P [1] (FIG. 8). , S95).
[0112]
Next, a scalar multiplication (d + r [2]) × P [1] is calculated using the point P [1] obtained by the processing in step S95 and the function scalar (d + r [2], P [1]). Then, the calculation result is stored in a variable P [2] (FIG. 8, S96).
[0113]
Next, a scalar multiplication r [2] × P of the random number r [2] and the point P is calculated using the function scalar (r [2], P), and the calculation result is stored in a variable P [3]. (FIG. 5, S97).
[0114]
Next, a scalar multiplication (dr [1]) × P [using the point P [3] obtained by the process of step S97 and the function scalar (dr [1], P [3]). 3] = (dr- [1]) × r [2] × P, and the calculation result is stored in a variable P [4] (FIG. 8, S98).
[0115]
By executing the processes of steps S95 to S98, a scalar multiplication of r [1] × P, a scalar multiplication of (d + r [2]) × r [1] × P, and r [2] × Scalar multiplication of P and scalar multiplication of (dr- [1]) × r [2] × P are performed.
[0116]
Next, scalar integration is performed. The elliptic addition ECADD (P [3], P [4]) of the point determined by the variable P [3] and the point determined by the variable P [4] is calculated, and the calculation result is stored in the variable Q (FIG. 8, S100). . That is, a point P [2] obtained by scalar multiplication (d + r [2]) × r [1] × P and a point obtained by scalar multiplication (d−r [1]) × r [2] × P Calculate the elliptic addition ECADD of P [4].
[0117]
Next, a scalar multiplication of the scalar (1 / (r [1] + r [2]) and the variable Q is calculated using the function scalar (1 / (r [1] + r [2]), Q) (FIG. 8, S101) Finally, the coordinates of the variable Q are output as the calculation result of the scalar multiplication d × P (FIG. 8, S102).
[0118]
The variable Q after completing the processing in step S101 can be represented by the following equation.
Figure 2004163687
Since the above equation (3) is equal to d × P, the scalar multiplication d × P can be calculated as the variable Q by the above processing.
[0119]
FIG. 9 is an explanatory diagram of the scalar multiplication d × P according to the fifth embodiment.
Assuming that random numbers are r1 and r2, a scalar multiplication of r1 × P is calculated first, and then a scalar multiplication of d + r2 and r1 × P, that is, a scalar multiplication of r1 × (d + r2) × P is calculated. Is done.
[0120]
Further, a scalar multiplication of r2 × P is calculated, and a scalar multiplication of a point r2 × P obtained by the calculation and a scalar (d−r1), that is, a scalar multiplication of r1 × (d−r1) × P is performed. Is calculated.
[0121]
Then, the point r1 × (d + r2) × P obtained by the above scalar multiplication and the elliptic addition ECADD of the points r1 × (d−r1) × P (r1 × (d + r2) × P, r1 × (d-r1) XP), a scalar multiplication of dxP can be obtained.
[0122]
According to the fifth embodiment, it is possible to make it difficult to estimate the integer d by individually calculating five scalar multiplications using two random numbers, and to improve resistance to a power analysis attack. it can.
[0123]
Here, an example of a hardware configuration of an elliptic curve cryptographic device that executes the scalar multiplication operation program according to the above-described embodiment will be described with reference to FIG. The elliptical encryption device can be realized by, for example, an information processing device such as a personal computer.
[0124]
The CPU 23 executes the above-described scalar multiplication operation 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.
[0125]
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.
[0126]
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.
[0127]
INDUSTRIAL APPLICABILITY The present invention is not limited to a dedicated device for performing encryption and decryption of elliptic curve cryptography, and can be applied to various products such as an IC card, a DVD device, a mobile phone, and a personal computer.
[0128]
Further, the present invention is not limited to the algorithm for calculating the scalar multiplication described in the embodiment and can be applied to other algorithms for elliptic curve cryptography.
(Supplementary Note 1) Storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d,
random number generating means for generating s (s ≧ 2) random numbers r1 to rs;
Using the random numbers generated by the random number generating means, scalar multiplication of r1 × P, r2 × P,..., Rs × P, (d−r1. An elliptic curve cryptographic apparatus comprising: an arithmetic unit for executing the calculation and performing the elliptic addition of the points obtained by these operations to calculate the scalar multiplication d × P.
(Supplementary Note 2) storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
Random number generating means for generating random numbers r1 and r2,
Using the random numbers generated by the random number generation means, scalar multiplication of r1 × P, scalar multiplication of r2 × P, and scalar multiplication of (d−r1−r2) × P are executed. An elliptic curve encryption device comprising: an arithmetic unit that performs elliptic addition of points obtained by the scalar multiplication to calculate a scalar multiplication d × P.
(Supplementary Note 3) storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
Random number generating means for generating random numbers r1 and r2,
Using a random number generated by the random number generating means, a scalar multiplication of r1 × P, a scalar multiplication of r2 × (r1 × P), and a scalar multiplication of (d−r1 × r2) × P are respectively performed. Is executed, and a point P1 obtained by scalar multiplication of r2 × (r1 × P) and a point P2 obtained by scalar multiplication of (d−r1 × r2) × P are subjected to scalar multiplication d × by elliptic addition. An elliptic curve encryption device comprising: an arithmetic unit for calculating P.
[0129]
(Supplementary Note 4) storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
Random number generating means for generating random numbers r1 and r2,
Using a random number generated by the random number generating means, a scalar multiplication of (d−r1) × P, a scalar multiplication of (d + r2) × P, and a scalar of r2 × ((d−r1) × P) The multiplication and the scalar multiplication of r1 × ((d + r2) × P) are executed, respectively, and the points P1 and r1 × ((d + r2) obtained by the scalar multiplication of r2 × ((d−r1) × P) are executed. ) × P), an ellipse addition to the point P2 obtained by the scalar multiplication of () × P) and a scalar multiplication of the result of the ellipse addition and 1 / (r1 + r2) to calculate a scalar multiplication d × P. And an elliptic curve encryption device.
(Supplementary Note 5) Obtain an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d,
Generate s random numbers r1 to rs,
Using s random numbers, scalar multiplication operations of r1 × P, r2 × P,..., rs × P, (d−r1... −rs) × P are executed, respectively. An elliptic curve cryptographic program for performing scalar multiplication d × P by performing elliptic addition of points obtained by calculation.
(Supplementary Note 6) In the elliptic curve encryption device according to supplementary note 2,
The arithmetic means individually calculates the three scalar multiplications based on an algorithm having resistance to a power analysis attack.
[0130]
(Supplementary note 7) In the elliptic curve encryption device according to supplementary note 2,
The arithmetic means individually calculates two scalar multiplications among the three scalar multiplications based on an algorithm having resistance to power analysis attacks, and has the other scalar multiplications resistant to power analysis attacks. Not calculated based on algorithm.
[0131]
(Supplementary Note 8) In the elliptic curve encryption device according to supplementary note 3,
The arithmetic means includes an algorithm having resistance to a power analysis attack in at least two scalar multiplication operations in three scalar multiplication operations of r1 × P, r2 × P, and (d−r1−r2) × P. Used.
[0132]
(Supplementary Note 9) An elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d are stored in a storage unit,
Random numbers r1 and r2 are generated, and a scalar multiplication of r1 × P, a scalar multiplication of r2 × P, and a scalar multiplication of (d−r1−r2) × P are performed by using the generated random numbers. An elliptic curve cryptographic program that performs scalar multiplication d × P by executing respective arithmetic operations and performing elliptic addition of points obtained by the scalar multiplication.
[0133]
(Supplementary Note 10) An elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d are stored in a storage unit,
Random numbers r1 and r2 are generated, and using the generated random numbers, a scalar multiplication of r1 × P, a scalar multiplication of r2 × (r1 × P), and (d−r1 × r2) × The scalar multiplication of P is executed, and the ellipse of the point P1 obtained by scalar multiplication of r2 × (r1 × P) and the point P2 obtained by scalar multiplication of (d−r1 × r2) × P Elliptic curve cryptographic program that calculates scalar multiplication d × P by addition.
[0134]
(Supplementary Note 11) An elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d are stored in a storage unit,
Random numbers r1 and r2 are generated, and using the generated random numbers, the arithmetic unit performs scalar multiplication of (d−r1) × P, scalar multiplication of (d + r2) × P, and r2 × ((d− The scalar multiplication of r1) × P) and the scalar multiplication of r1 × ((d + r2) × P) are executed, respectively, and a point P1 obtained by the scalar multiplication of r2 × ((d−r1) × P). And elliptic addition of a point P2 obtained by scalar multiplication of r1 × ((d + r2) × P) and scalar multiplication of 1 / (r1 + r2) with the result of the elliptic addition. Elliptic curve cryptographic program for calculating d × P.
[0135]
(Supplementary Note 12) An elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d are stored in a storage unit,
Random numbers r1 and r2 are generated, and using the generated random numbers, a scalar multiplication of r1 × P, a scalar multiplication of r2 × (r1 × P), and (d−r1 × r2) × The scalar multiplication of P is executed, and the ellipse of the point P1 obtained by scalar multiplication of r2 × (r1 × P) and the point P2 obtained by scalar multiplication of (d−r1 × r2) × P An elliptic curve cryptographic operation method in which scalar multiplication d × P is calculated by addition.
[0136]
(Supplementary Note 13) An elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d are stored in a storage unit,
Random numbers r1 and r2 are generated, and using the generated random numbers, the arithmetic unit performs scalar multiplication of (d−r1) × P, scalar multiplication of (d + r2) × P, and r2 × ((d− The scalar multiplication of r1) × P) and the scalar multiplication of r1 × ((d + r2) × P) are executed, respectively, and a point P1 obtained by the scalar multiplication of r2 × ((d−r1) × P). And elliptic addition of a point P2 obtained by scalar multiplication of r1 × ((d + r2) × P) and scalar multiplication of the result of the elliptic addition and 1 / (r1 + r2) to execute scalar multiplication d An elliptic curve cryptographic operation method for calculating × P.
[0137]
【The invention's effect】
According to the present invention, it is possible to improve the resistance of a scalar multiplication calculation in an elliptic curve cryptosystem to a power analysis attack.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a main part of an elliptic curve encryption device.
FIG. 2 is a diagram illustrating a calculation program for scalar multiplication according to the first embodiment;
FIG. 3 is an explanatory diagram of a scalar multiplication according to the first embodiment.
FIG. 4 is a diagram illustrating an operation program for scalar multiplication according to the second embodiment.
FIG. 5 is a diagram illustrating a scalar multiplication operation program according to a third embodiment.
FIG. 6 is an explanatory diagram of a scalar multiplication according to the third embodiment.
FIG. 7 is a diagram illustrating a scalar multiplication operation program according to a fourth embodiment.
FIG. 8 is a diagram illustrating an operation program for scalar multiplication according to the fifth embodiment.
FIG. 9 is an explanatory diagram of a scalar multiplication according to the fifth embodiment.
FIG. 10 is a diagram illustrating a hardware environment for executing the operation program according to the embodiment;
FIG. 11 is a diagram showing an operation program of algorithm 1;
FIG. 12 is a diagram showing an operation program of algorithm 2.
FIG. 13 is a diagram showing an operation program of algorithm 3.
FIG. 14 is a diagram showing an operation program of algorithm 4.
FIG. 15 is a diagram showing an operation program of algorithm 5.
FIG. 16 is a diagram showing an operation program of algorithm 3 ′.
FIG. 17 is a diagram showing a calculation program of an algorithm 5 ′.
FIG. 18 is a diagram showing an operation program of algorithm 6.
FIG. 19 is a diagram showing an operation program of algorithm 7.
FIG. 20 is a diagram showing an operation program of algorithm 8.
FIG. 21 is a diagram showing an operation program of algorithm 9.
[Explanation of symbols]
11 Elliptic curve encryption device
12 Operation part
13 arithmetic unit
14 registers
16 Storage unit

Claims (5)

有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dを記憶する記憶手段と、
s(s≧2)個の乱数r1〜rsを発生する乱数発生手段と、
前記乱数発生手段により発生されるs個の乱数を用いて、r1×P、r2×P、・・・、rs×P、(d−r1−・・・−rs)×Pのs+1個のスカラー倍算の演算をそれぞれ実行し、それらの演算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
Storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
random number generating means for generating s (s ≧ 2) random numbers r1 to rs;
S + 1 scalar of r1 × P, r2 × P,..., Rs × P, (d−r1... −rs) × P, using s random numbers generated by the random number generating means. An elliptic curve cryptographic apparatus comprising: an arithmetic unit that executes multiplication operations and performs elliptic addition of points obtained by the operations to calculate scalar multiplication d × P.
有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、
乱数r1とr2を発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、r1×Pのスカラー倍算と、r2×Pのスカラー倍算と、(d−r1−r2)×Pのスカラー倍算の演算をそれぞれ実行し、それらのスカラー倍算により得られる点の楕円加算を実行してスカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
Storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
Random number generating means for generating random numbers r1 and r2,
Using the random numbers generated by the random number generation means, scalar multiplication of r1 × P, scalar multiplication of r2 × P, and scalar multiplication of (d−r1−r2) × P are executed. An elliptic curve encryption device comprising: an arithmetic unit that performs elliptic addition of points obtained by the scalar multiplication to calculate a scalar multiplication d × P.
有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、
乱数r1とr2を発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、r1×Pのスカラー倍算と、r2×(r1×P)のスカラー倍算と、(d−r1×r2)×Pのスカラー倍算をそれぞれ実行し、r2×(r1×P)のスカラー倍算により得られる点P1と、(d−r1×r2)×Pのスカラー倍算とにより得られる点P2との楕円加算によりスカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
Storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
Random number generating means for generating random numbers r1 and r2,
Using a random number generated by the random number generating means, a scalar multiplication of r1 × P, a scalar multiplication of r2 × (r1 × P), and a scalar multiplication of (d−r1 × r2) × P are respectively performed. Is executed, and a point P1 obtained by scalar multiplication of r2 × (r1 × P) and a point P2 obtained by scalar multiplication of (d−r1 × r2) × P are subjected to scalar multiplication d × by elliptic addition. An elliptic curve encryption device comprising: an arithmetic unit for calculating P.
有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと、整数dとを記憶する記憶手段と、
乱数r1とr2を発生する乱数発生手段と、
前記乱数発生手段により発生される乱数を用いて、(d−r1)×Pのスカラー倍算と、(d+r2)×Pのスカラー倍算と、r2×((d−r1)×P)のスカラー倍算と、r1×((d+r2)×P)のスカラー倍算とをそれぞれ実行し、r2×((d−r1)×P)のスカラー倍算により得られる点P1と、r1×((d+r2)×P)のスカラー倍算により得られる点P2との楕円加算と、楕円加算の演算結果と1/(r1+r2)とのスカラー倍算を実行して、スカラー倍算d×Pを計算する演算手段とを備える楕円曲線暗号装置。
Storage means for storing an elliptic curve E on a finite field, a base point P on the elliptic curve, and an integer d;
Random number generating means for generating random numbers r1 and r2,
Using a random number generated by the random number generating means, a scalar multiplication of (d−r1) × P, a scalar multiplication of (d + r2) × P, and a scalar of r2 × ((d−r1) × P) The multiplication and the scalar multiplication of r1 × ((d + r2) × P) are executed, respectively, and the points P1 and r1 × ((d + r2) obtained by the scalar multiplication of r2 × ((d−r1) × P) are executed. ) × P), an ellipse addition to the point P2 obtained by the scalar multiplication of () × P) and a scalar multiplication of the result of the ellipse addition and 1 / (r1 + r2) to calculate a scalar multiplication d × P. And an elliptic curve encryption device.
有限体上の楕円曲線Eと、楕円曲線上のベースポイントPと整数dを記憶部に記憶させ、
s個の乱数r1〜rsを発生させ、発生させたs個の乱数を用いて、演算部に、r1×P、r2×P、・・・、rs×P、(d−r1−・・・・−rs)×Pのs+1個のスカラー倍算の演算をそれぞれ実行させ、それらの演算により得られる点の楕円加算を計算させてスカラー倍算d×Pを計算させる楕円曲線暗号プログラム。
An elliptic curve E on a finite field, a base point P on the elliptic curve and an integer d are stored in a storage unit,
s random numbers r1 to rs are generated, and using the generated s random numbers, r1 × P, r2 × P,..., rs × P, (d−r1. An elliptic curve cryptographic program that executes s + 1 scalar multiplication operations of −rs) × P, and calculates elliptic addition of points obtained by those operations to calculate scalar multiplication d × P.
JP2002329857A 2002-11-13 2002-11-13 Device and program for elliptic curve ciphering Pending JP2004163687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002329857A JP2004163687A (en) 2002-11-13 2002-11-13 Device and program for elliptic curve ciphering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002329857A JP2004163687A (en) 2002-11-13 2002-11-13 Device and program for elliptic curve ciphering

Publications (1)

Publication Number Publication Date
JP2004163687A true JP2004163687A (en) 2004-06-10

Family

ID=32807736

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002329857A Pending JP2004163687A (en) 2002-11-13 2002-11-13 Device and program for elliptic curve ciphering

Country Status (1)

Country Link
JP (1) JP2004163687A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100699836B1 (en) 2005-03-19 2007-03-27 삼성전자주식회사 Apparatus and method to counter Different Faults AnalysisDFA in scalar multiplication
JP2008527865A (en) * 2005-01-18 2008-07-24 サーティコム コーポレーション Enhanced verification of digital signatures and public keys
JP2009537025A (en) * 2006-03-31 2009-10-22 アクサルト・エス・アー Protection from side channel attacks
CN101872294A (en) * 2009-04-23 2010-10-27 索尼公司 Signal conditioning package, operation verifying method and program
US7853013B2 (en) 2005-05-11 2010-12-14 Samsung Electronics Co., Ltd. Cryptographic method and system for encrypting input data
US8345863B2 (en) 2007-07-11 2013-01-01 Samsung Electronics Co., Ltd. Method of countering side-channel attacks on elliptic curve cryptosystem
US8467535B2 (en) 2005-01-18 2013-06-18 Certicom Corp. Accelerated verification of digital signatures and public keys
US8745376B2 (en) 2011-10-14 2014-06-03 Certicom Corp. Verifying implicit certificates and digital signatures
CN110377863A (en) * 2019-07-29 2019-10-25 秒针信息技术有限公司 A kind of the expansion approximating method and expansion fitting device of browsing stock assessment point

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8467535B2 (en) 2005-01-18 2013-06-18 Certicom Corp. Accelerated verification of digital signatures and public keys
JP2008527865A (en) * 2005-01-18 2008-07-24 サーティコム コーポレーション Enhanced verification of digital signatures and public keys
US10284370B2 (en) 2005-01-18 2019-05-07 Certicom Corp. Accelerated verification of digital signatures and public keys
US8806197B2 (en) 2005-01-18 2014-08-12 Certicom Corp. Accelerated verification of digital signatures and public keys
JP2012014203A (en) * 2005-01-18 2012-01-19 Certicom Corp Accelerated verification of digital signature and public key
US8204232B2 (en) 2005-01-18 2012-06-19 Certicom Corp. Accelerated verification of digital signatures and public keys
JP2012212164A (en) * 2005-01-18 2012-11-01 Certicom Corp Accelerated verification of digital signatures and public keys
US8788827B2 (en) 2005-01-18 2014-07-22 Certicom Corp. Accelerated verification of digital signatures and public keys
KR100699836B1 (en) 2005-03-19 2007-03-27 삼성전자주식회사 Apparatus and method to counter Different Faults AnalysisDFA in scalar multiplication
US7853013B2 (en) 2005-05-11 2010-12-14 Samsung Electronics Co., Ltd. Cryptographic method and system for encrypting input data
JP2009537025A (en) * 2006-03-31 2009-10-22 アクサルト・エス・アー Protection from side channel attacks
US8345863B2 (en) 2007-07-11 2013-01-01 Samsung Electronics Co., Ltd. Method of countering side-channel attacks on elliptic curve cryptosystem
CN101872294A (en) * 2009-04-23 2010-10-27 索尼公司 Signal conditioning package, operation verifying method and program
US8745376B2 (en) 2011-10-14 2014-06-03 Certicom Corp. Verifying implicit certificates and digital signatures
CN110377863A (en) * 2019-07-29 2019-10-25 秒针信息技术有限公司 A kind of the expansion approximating method and expansion fitting device of browsing stock assessment point
CN110377863B (en) * 2019-07-29 2021-12-28 秒针信息技术有限公司 Expansion fitting method and device for browsing resource evaluation points

Similar Documents

Publication Publication Date Title
US7536011B2 (en) Tamper-proof elliptic encryption with private key
JP4668931B2 (en) Encryption processor with tamper resistance against power analysis attacks
JP4632950B2 (en) Tamper-resistant cryptographic processing using personal keys
Izu et al. Improved elliptic curve multiplication methods resistant against side channel attacks
JP4284320B2 (en) Elliptic curve encryption device, elliptic curve encryption method, and elliptic curve encryption program
US7957527B2 (en) Cryptographic processing apparatus
US7835517B2 (en) Encryption processing apparatus, encryption processing method, and computer program
JP4513752B2 (en) Cryptographic processing apparatus, cryptographic processing method, and computer program
US20090136025A1 (en) Method for scalarly multiplying points on an elliptic curve
US6480606B1 (en) Elliptic curve encryption method and system
JP2003098962A (en) Method and device for calculating elliptic curve scalar multiple, and recording medium
JP2004163687A (en) Device and program for elliptic curve ciphering
US7177422B2 (en) Elliptic curve encryption processing method, elliptic curve encryption processing apparatus, and program
JP2005020735A (en) Side channel attack prevention in data processor
US20050201553A1 (en) Cryptography-processing method, cryptography-processing apparatus and computer program
JP2003255831A (en) Method and device for calculating elliptic curve scalar multiple
KR20170113268A (en) Non-modular multiplier, method for non-modular multiplication and computational device
Yen et al. Improvement on Ha-Moon randomized exponentiation algorithm
WO2004070681A2 (en) Elliptic curve scalar multiple calculation method and device
JP2004053814A (en) Elliptic curve cryptosystem device and elliptic curve cryptosystem operation method
JP2003228285A (en) Arithmetic unit for elliptic curve scalar multiple
Muhaya et al. Applying hessian curves in parallel to improve elliptic curve scalar multiplication hardware
JP2008217033A (en) Tamper-proof elliptical curve cryptography processing using secret key
JP2007212768A (en) Prior computing table creating device in elliptic curve cryptosystem
JP2011085750A (en) Elliptic curve scalar multiplication device

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20050713

Free format text: JAPANESE INTERMEDIATE CODE: A621

A131 Notification of reasons for refusal

Effective date: 20080603

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20080827

Free format text: JAPANESE INTERMEDIATE CODE: A523

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080930