JP4502817B2 - Elliptic curve scalar multiplication method and apparatus - Google Patents
Elliptic curve scalar multiplication method and apparatus Download PDFInfo
- Publication number
- JP4502817B2 JP4502817B2 JP2004567900A JP2004567900A JP4502817B2 JP 4502817 B2 JP4502817 B2 JP 4502817B2 JP 2004567900 A JP2004567900 A JP 2004567900A JP 2004567900 A JP2004567900 A JP 2004567900A JP 4502817 B2 JP4502817 B2 JP 4502817B2
- Authority
- JP
- Japan
- Prior art keywords
- variable
- scalar
- elliptic curve
- unit
- scalar multiplication
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title description 46
- 238000004364 calculation method Methods 0.000 claims description 106
- 238000006243 chemical reaction Methods 0.000 claims description 12
- 238000012545 processing Methods 0.000 description 63
- 230000008569 process Effects 0.000 description 25
- 238000012795 verification Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 7
- 230000014509 gene expression Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000003247 decreasing effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 230000007123 defense Effects 0.000 description 2
- RMFAWIUWXUCNQL-UHFFFAOYSA-N 1-[2-[[2-hydroxy-3-(3-methoxyphenoxy)propyl]amino]ethylamino]-3-(3-methoxyphenoxy)propan-2-ol;dihydrochloride Chemical compound Cl.Cl.COC1=CC=CC(OCC(O)CNCCNCC(O)COC=2C=C(OC)C=CC=2)=C1 RMFAWIUWXUCNQL-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/60—Methods 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/72—Methods 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/724—Finite field arithmetic
- G06F7/725—Finite field arithmetic over elliptic curves
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)
- Storage Device Security (AREA)
Description
本発明はセキュリティ技術に係り、特に楕円曲線演算を用いたメッセージ処理方法に関する。 The present invention relates to security technology, and more particularly to a message processing method using elliptic curve calculation.
楕円曲線暗号はN.Koblitz,V.S.Millerにより提案された公開鍵暗号の一種である。公開鍵暗号には、公開鍵と呼ばれる一般に公開してよい情報と、秘密鍵と呼ばれる秘匿しなければならない秘密情報がある。与えられたメッセージの暗号化や署名の検証には公開鍵を用い、与えられたメッセージの復号化や署名の作成には秘密鍵を用いる。
楕円曲線暗号における秘密鍵は、スカラー値が担っている。また、楕円曲線暗号の安全性は楕円曲線上の離散対数問題の求解が困難であることに由来している。楕円曲線上の離散対数問題とは、楕円曲線上のある点Pとそのスカラー倍の点dPが与えられた時、スカラー値dを求める問題である。
楕円曲線上の点とは、楕円曲線の定義方程式をみたす数の組をいい、楕円曲線上の点全体には、無限遠点という仮想的な点を単位元とした演算、すなわち楕円曲線上の加法(乃至は加算)が定義される。そして、同じ点同士による楕円曲線上の加法のことを、特に楕円曲線上の2倍算という。
楕円曲線上の2点の加法は次のようにして計算される。2点を通る直線を引くとその直線は楕円曲線と他の点において交わる。その交わった点とx軸に関して対称な点を、加法を行った結果の点とする。例えば、ワイエルシュトラス型楕円曲線の場合には、点(x1,y1)と点(x2,y2)の加算
(x3,y3)=(x1,y1)+(x2,y2)は
を計算することにより得られる。ここで、ワイエルシュトラス型楕円曲線の定義式は
で与えられる。すなわち、式3のx,yに各々xi,yi(i=1,2,3)を代入した場合に、式3の等式が成り立つ。
楕円曲線上の点の2倍算は次のようにして計算される。楕円曲線上の点における接線をひくと、その接線は楕円曲線上の他の点において交わる。その交わった点とx座標に関して対称な点を、2倍算を行った結果の点とする。例えば、ワイエルシュトラス型楕円曲線の場合には、点(x1,y1)の2倍算
(x3,y3)=2(x1,y1)=(x1,y1)+(x1,y1)は
を計算することにより得られる。
ある点に対し、特定の回数だけ加法を行うことをスカラー倍といい、その結果をスカラー倍点、その回数のことをスカラー値という。
楕円曲線上の離散対数問題の求解の困難性が理論的に確立されてきている一方で、実際の実装においては秘密鍵等の秘密情報に関連する情報(計算時間や電力消費量など)が暗号処理において漏洩する場合があり、その漏洩情報をもとに秘密情報を復元するといった、サイドチャネル攻撃という攻撃法が提案されている。
楕円曲線暗号に対するサイドチャネル攻撃が、J.Coron,Resistance against Differential Power Analysis for Elliptic Curve Cryptosystems,Cryptographic Hardware and Embedded Systems: Proceedings of CHES’99,LNCS 1717,Springer−Verlag,(1999)pp.292−302.(文献1)に記載されている。
楕円曲線暗号においては、与えられたメッセージの暗号化、復号化、署名の作成またはその検証は、楕円曲線演算を用いて行う必要がある。特に楕円曲線上のスカラー倍の計算は、秘密情報であるスカラー値を用いた暗号処理において用いられる。
楕円曲線暗号に対するサイドチャネル攻撃の防御法が、B.Moeller,Securing Elliptic Curve Point Multiplication against Side−Channel Attacks,Information Security(ISC2001),LNCS 2200,Springer−Verlag,(2001),pp.324−334.(文献2)に記載されている。Elliptic curve cryptography Koblitz, V .; S. It is a kind of public key cryptography proposed by Miller. Public key cryptography includes information that can be disclosed to the public called a public key and secret information that must be kept secret, called a secret key. A public key is used for encryption of a given message and signature verification, and a secret key is used for decryption of a given message and creation of a signature.
The secret key in elliptic curve cryptography is a scalar value. The security of elliptic curve cryptography is derived from the difficulty of solving the discrete logarithm problem on the elliptic curve. The discrete logarithm problem on an elliptic curve is a problem of obtaining a scalar value d when a certain point P on the elliptic curve and a point dP that is a scalar multiple thereof are given.
A point on an elliptic curve is a set of numbers that satisfy the definition equation of the elliptic curve. Addition (or addition) is defined. The addition on the elliptic curve by the same points is particularly called doubling on the elliptic curve.
The addition of two points on the elliptic curve is calculated as follows. When a straight line passing through two points is drawn, the straight line intersects the elliptic curve at another point. The intersecting point and a point that is symmetric with respect to the x-axis are taken as points resulting from the addition. For example, in the case of a Weierstrass-type elliptic curve, the addition of the point (x 1 , y 1 ) and the point (x 2 , y 2 ) (x 3 , y 3 ) = (x 1 , y 1 ) + ( x 2 , y 2 ) is
Is obtained by calculating. Here, the defining formula of the Weierstrass-form elliptic curve is
Given in. That is, when x i and y i (i = 1, 2, 3) are substituted for x and y in
The doubling of the points on the elliptic curve is calculated as follows. When a tangent at a point on the elliptic curve is drawn, the tangent intersects at another point on the elliptic curve. The intersecting point and a point that is symmetric with respect to the x-coordinate are taken as the result of doubling. For example, in the case of a Weierstrass-form elliptic curve, the
Is obtained by calculating.
Adding a certain number of times to a certain point is called scalar multiplication, the result is called a scalar multiple, and the number of times is called a scalar value.
While the difficulty of solving the discrete logarithm problem on an elliptic curve has been theoretically established, information related to secret information such as a secret key (calculation time, power consumption, etc.) is encrypted in an actual implementation. An attack method called a side channel attack has been proposed in which there is a case of leaking in processing, and secret information is restored based on the leaked information.
Side channel attacks against elliptic curve cryptography are Coron, Resistance against Differential Power Analysis for Elliptic Curve Cryptoysystems, Cryptographic Hardware and Embeded Systems 99, Proceedings 17: Proceeding. 292-302. (Reference 1).
In elliptic curve cryptography, encryption, decryption, signature generation or verification of a given message must be performed using elliptic curve computation. In particular, calculation of scalar multiplication on an elliptic curve is used in cryptographic processing using a scalar value that is secret information.
A side channel attack defense method against elliptic curve cryptography is Moeller, Securing Elliptic Curve Point Multiplication Against Side-Channel Attacks, Information Security (ISC2001), LNCS 2200, Springer-Verlag, (2001). 324-334. (Reference 2).
情報通信ネットワークの進展と共に電子情報に対する秘匿や認証の為に暗号技術は不可欠な要素となってきている。そこでは暗号技術の安全性とともにメモリ等の使用リソースの削減が望まれている。楕円曲線上の離散対数問題が非常に困難である為に、素因数分解の困難性を安全性の根拠にしている暗号と比べて、楕円曲線暗号は鍵長を比較的短くすることができる。そのため比較的少ないリソースで暗号処理を行うことが可能である。しかしながら、備えているメモリ量が少ないスマートカード(ICカードともいう)等においては、必ずしも満足できるとは限らない。それゆえに少ないメモリで実行できる暗号処理が必要となる。
上記技術は、サイドチャネル攻撃を防ぐ方法としては有効であるが、メモリ使用量の削減という点は考慮されていない。
本発明は、サイドチャネル攻撃を防ぐことができる、かつメモリ使用量の少ない、楕円曲線演算方法を提供する。
本発明は更に、上記楕円曲線演算方法を用いた、暗号化処理方法、復号化処理方法、署名作成方法、署名検証方法、データ共有方法を提供する。
本発明は、楕円曲線演算において、スカラー値と楕円曲線上の点からスカラー倍点を計算するスカラー倍計算方法であって、上記スカラー値を数値列にエンコードするステップと、上記楕円曲線上の点から前計算テーブルを作成するステップと、上記エンコードした数値列及び上記前計算テーブルからスカラー倍点を計算するステップとを有する。
本発明は、また、上記エンコードするステップの出力する数値列を0と奇数からなるように構成してもよい。
本発明は、また、上記スカラー倍点を計算するステップは、第1の演算を予め定められた回数を実行するステップと、第1の演算とは異なる第2の演算を実行するステップとを含むように構成してもよい。
本発明は、また、楕円曲線演算において、スカラー値と楕円曲線上の点の奇数倍点を格納した前計算テーブルからスカラー倍点を計算するスカラー倍計算方法であって、上記スカラー値を数値列にエンコードするステップと、上記エンコードした数値列と上記前計算テーブルからスカラー倍点を計算するステップとを有し、上記エンコードするステップの出力する数値列は0と奇数からなるように構成してもよい。
以上のように本発明のスカラー倍計算方法によれば、奇数倍の点のみを前計算テーブルに格納し、スカラー値を奇数倍の点のみを用いるようにエンコードすることにより、サイドチャネル攻撃を防ぐことができ、メモリ使用量が少ないスカラー倍計算方法が利用可能になる。Cryptographic technology has become an indispensable element for concealing and authenticating electronic information with the development of information and communication networks. Therefore, it is desired to reduce the resources used such as memory as well as the security of encryption technology. Since the discrete logarithm problem on the elliptic curve is very difficult, the elliptic curve cryptography can make the key length relatively short compared to the cryptography based on the difficulty of prime factorization. Therefore, it is possible to perform encryption processing with relatively few resources. However, a smart card (also referred to as an IC card) having a small amount of memory is not always satisfactory. Therefore, cryptographic processing that can be executed with a small amount of memory is required.
Although the above technique is effective as a method for preventing side channel attacks, it does not take into consideration the reduction in memory usage.
The present invention provides an elliptic curve calculation method that can prevent a side channel attack and that uses a small amount of memory.
The present invention further provides an encryption processing method, a decryption processing method, a signature creation method, a signature verification method, and a data sharing method using the above elliptic curve calculation method.
The present invention provides a scalar multiple calculation method for calculating a scalar multiple from a scalar value and a point on an elliptic curve in an elliptic curve calculation, the step of encoding the scalar value into a numerical sequence, and a point on the elliptic curve And a step of calculating a scalar multiple from the encoded numerical sequence and the previous calculation table.
The present invention may also be configured such that the numerical sequence output from the encoding step consists of 0 and an odd number.
In the present invention, the step of calculating the scalar multiple includes a step of executing the first operation a predetermined number of times and a step of executing a second operation different from the first operation. You may comprise as follows.
The present invention also provides a scalar multiplication calculation method for calculating a scalar multiple from a pre-calculation table storing a scalar value and an odd multiple of a point on the elliptic curve in an elliptic curve calculation, wherein the scalar value is a numerical sequence. And a step of calculating a scalar multiple from the encoded numerical sequence and the pre-calculation table, and the numerical sequence output from the encoding step may be composed of 0 and an odd number. Good.
As described above, according to the scalar multiplication calculation method of the present invention, only odd-numbered points are stored in the pre-calculation table, and the scalar value is encoded to use only odd-numbered points, thereby preventing side channel attacks. It is possible to use a scalar multiplication method with a small memory usage.
図1は、実施形態におけるシステム構成図である。
図2は、各実施形態における情報の受け渡しを示すシーケンス図である。
図3は、実施形態におけるスカラー倍計算部の構成図である。
図4は、エンコード部の行うエンコード方法を示すフローチャート図である。
図5は、前計算部の行う前計算方法を示すフローチャート図である。
図6は、実計算部の行う実計算方法を示すフローチャート図である。
図7は、実施形態における署名検証システム構成図である。FIG. 1 is a system configuration diagram according to the embodiment.
FIG. 2 is a sequence diagram showing information delivery in each embodiment.
FIG. 3 is a configuration diagram of the scalar multiplication calculator in the embodiment.
FIG. 4 is a flowchart showing an encoding method performed by the encoding unit.
FIG. 5 is a flowchart showing a pre-calculation method performed by the pre-calculation unit.
FIG. 6 is a flowchart showing an actual calculation method performed by the actual calculation unit.
FIG. 7 is a configuration diagram of a signature verification system in the embodiment.
以下、本発明の実施例を図面により説明する。
図1はネットワーク142によって接続された本発明による楕円曲線演算方法を適用したコンピュータA101、コンピュータB121がネットワーク142により接続されたシステム構成を示すものである。
図1の暗号通信システムにおけるコンピュータA101でメッセージの暗号化を行うには、Pm+k(aQ)及びkQを計算して出力し、コンピュータB121で暗号文の復号化を行うには、秘密鍵a及びkQより−a(kQ)を計算し、
を計算して出力すればよい。ここでPmはメッセージ、kは乱数、aは秘密鍵を示す定数、Qは定点、aQは公開鍵を示す点である。
ネットワーク142には、Pm+k(aQ),kQのみ送信され、メッセージPmを復元するためには、kaQ、すなわちkQのa倍を計算する必要がある。ところが、秘密鍵aはネットワーク142には送信されないため、秘密鍵aを保持しているものだけが、Pmを復元できることになる。
図1において、コンピュータA101は、CPU113やコプロセッサ114などの演算装置、RAM103、ROM106や外部記憶装置107などの記憶装置、コンピュータ外部とのデータ入出力を行う入出力インタフェース110を装備しており、外部にはコンピュータA101をユーザが操作するためのディスプレイ108、キーボード109、着脱可能な可搬型記憶媒体の読み書き装置などが接続されている。
更にコンピュータA101は、RAM103、ROM106や外部記憶装置107などの記憶装置によって、記憶部102を実現し、CPU113やコプロセッサ114などの演算装置が、記憶部102に格納されたプログラムを実行することにより、データ処理部112、スカラー倍計算部115を実現する。
データ処理部112は、本実施形態においては、暗号化処理部112として機能し、入力されたメッセージの暗号化を行う。
スカラー倍計算部115は、暗号処理部112で暗号化を行うのに必要なパラメタを計算する。記憶部102は、定数104(例えば、楕円曲線の定義式や楕円曲線上の定点である。)、秘密情報105(例えば、秘密鍵である。)などを記憶している。
コンピュータB121は、コンピュータA101と同様のハードウェア構成を備える。
更にコンピュータB121は、RAM123、ROM126や外部記憶装置107などの記憶装置によって、記憶部122を実現し、CPU133やコプロセッサ134などの演算装置が、記憶部122に格納されたプログラムを実行することにより、データ処理部132、スカラー倍計算部135を実現する。
データ処理部132は、本実施形態においては、復号化処理部132として機能し、暗号化されたメッセージである暗号文141の復号化を行う。
スカラー倍計算部135は、復号化処理部132で復号化を行うのに必要なパラメタを計算する。記憶部122は、定数124(例えば、楕円曲線の定義式や楕円曲線上の定点である。)、秘密情報125(例えば、秘密鍵である。)などを記憶している。
なお、上記各プログラムは、あらかじめ、上記コンピュータ内の記憶部に格納されていても良いし、必要なときに、入出力インタフェース110と上記コンピュータ721が利用可能な媒体を介して、他の装置から上記記憶部に導入されてもよい。媒体とは、たとえば、入出力インタフェース110に着脱可能な記憶媒体、または通信媒体(すなわちネットワークまたはネットワークを伝搬する搬送波)を指す。
図2は、コンピュータA101、コンピュータB121の各処理部が行う情報の受け渡しの様子を示したものである。
次に、図1のコンピュータA101が、入力されたメッセージを暗号化する場合の動作について説明する。メッセージはディジタル化されたデータであれば良く、テキスト、画像、映像、音などの種類は問わない。
暗号化処理部112は、入出力インタフェース110を介して、平文メッセージ(図2の入力メッセージ204)を受け取ると、入力された平文メッセージのビット長が予め定めたビット長か否かを判断する。予め定めたビット長より長い場合には、予め定めたビット長となるように平文メッセージを区切る。以下、所定のビット長に区切られている部分メッセージ(単にメッセージともいう)について説明する。
次に、暗号化処理部112は、メッセージのビット列によって表される数値をx座標(x1)にもつ楕円曲線上の点Pmのy座標の値(y1)を計算する。
例えば、ワイエルシュトラス型楕円曲線は、A,Bをそれぞれ定数とするとき、
で表されるので、これよりy座標の値を求めることができる。
次に、暗号化処理部112は、乱数kを生成する。そして、記憶部102に格納されている定数104から読み出した(図2の205)公開鍵aQとQのx座標と、求めたy座標の値と乱数kとをスカラー倍計算部115へ送る(図2の206)。
スカラー倍計算部115は、Qのx座標、y座標の値、乱数kによるスカラー倍点(xd1,yd1)=kQと、公開鍵aQのx座標、y座標の値、乱数によるスカラー倍点(xd2,yd2)=k(aQ)とを計算し、計算されたスカラー倍点を暗号化処理部112へ送る(図2の207)。
暗号化処理部112は、送られたスカラー倍点を用いて、暗号化処理を行う。例えば、ワイエルシュトラス型の楕円曲線については、Pm+k(aQ)とkQを計算する。すなわち、
を計算し、暗号化されたメッセージxe1,xe2を得る。
コンピュータA101は暗号化処理部112で暗号化された1つ以上の部分メッセージから暗号化された出力メッセージを組み立てる(図2の208)。
コンピュータA101は、暗号化された出力メッセージをデータ141として入出力インタフェース110より出力し、ネットワーク142を介してコンピュータB121へ転送する。
なお、図2の記憶部102からの情報読み出しは、スカラー計算部115へ当該情報を送る前で有れば、入力メッセージを受け付ける前であっても良い。
次に、コンピュータB121が、暗号化されたメッセージ141を復号化する場合の動作について、図2を参照しつつ説明する。
復号化処理部132(図2のデータ処理部112)は、入出力インタフェース110を介して、暗号化されたデータ141(図2の入力メッセージ204)が入力されると、入力された暗号化されたデータ141のビット長が予め定めたビット長か否かを判断する。予め定めたビット長より長い場合には、予め定めたビット長となるように暗号化されたデータを区切る。以下、所定のビット長に区切られている部分データ(単にデータともいう)について説明する。
データ141のビット列によって表される数値をx座標にもつ楕円曲線上のy座標の値を計算する。
暗号化されたメッセージがxe1,xe2のビット列であり、ワイエルシュトラス型楕円曲線の場合、y座標の値(ye1)は
(ただし、A,Bはそれぞれ定数である)
から得ることができる。
復号化処理部132は、記憶部122(図2の102)に格納されている秘密情報125から読み出した(図2の205)秘密鍵aと、x座標、y座標の値(xe1,ye1)を、スカラー倍計算部135(図2の115)へ送る(図2の206)。
スカラー倍計算部135は、x座標、y座標の値、秘密情報a125からスカラー倍点(xd3,yd3)=a(xe2,ye2)を計算する。スカラー倍計算部135は、計算されたスカラー倍点を復号化処理部132へ送る(図2の207)。復号化処理部132は、送られたスカラー倍点を用いて、復号化処理を行う。
例えば、暗号化されたメッセージが、xe1,xe2のビット列であり、ワイエルシュトラス型の楕円曲線の場合は、
(Pm+k(aQ))−a(kQ)=(xe1,ye1)−(xd3,yd3)
を計算することにより達成する。すなわち、
を計算し、暗号化される前の部分メッセージx1に相当するxf1を得る。
コンピュータB121は、復号化処理部132で復号化された部分メッセージから平文メッセージを組み立て(図2の208)、入出力インタフェース110を介して、ディスプレイ108などから出力する。
次に、コンピュータB121が、復号化処理を行う場合の、スカラー倍計算部135の処理を詳細に説明する。
図3は、各実施例で用いるスカラー倍計算部の機能ブロックを示したものである。スカラー倍計算部115(図1の135)は、エンコード部302、前計算部303、実計算部304からなる。エンコード部302は、剰余取得部321、剰余変換判定部322、剰余変換部323、繰り返し判定部324、格納部325からなる。前計算部303は、加算部331、2倍算部332、繰り返し判定部333からなる。実計算部304は、ビット値判定部341、加算部342、2倍算部343、繰り返し判定部344からなる。
スカラー倍計算部115がスカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する方法を説明する。
スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部302は、入力されたスカラー値dを数値列dw[j]にエンコードする。すなわち、
をみたすdw[j]に、スカラー値dを変換する。ここで、wはあらかじめ定めた小さな正整数で、ウィンドウ幅と呼ばれる。計算時間を優先する場合はwを大きな値とする。メモリ使用量を小さくする場合はwを小さな値にする。前計算部303は、入力された楕円曲線上の点Pから前計算テーブルを作成する。前計算テーブルはP,3P,...,(2w−1)Pにより構成される。実計算部304は、エンコードされたスカラー値と前計算テーブルを用いてスカラー倍点dPを計算する。
なお、エンコード部302の行うエンコード処理は、スカラー値dを受け取った後、および実計算部304がスカラー倍点を計算する前であればよい。すなわち、前計算部303が前計算テーブルを作成する前に行っても、後に行なってもよい。
また、点Pが固定点である場合、前計算部303の行う前計算テーブルの作成処理は、ただ一度行えばよい。すなわち、一旦前計算テーブルを作成すれば、それ以降のスカラー倍計算では前計算テーブルを再作成する必要はない。
次にエンコード部302、前計算部303、実計算部304の行なう各処理について詳細に説明する。
まず、図4を用いて、エンコード部302がスカラー値dをエンコードする方法を説明する。
変数iに初期値0を、変数d’にスカラー値dをそれぞれ代入する(401)。
剰余取得部321は、スカラー値d’の2wによる剰余をu[i]に格納する(402)。
剰余取得部321は、(d’−u[i])/2wを計算し、それを新たなd’とする(411)。
変数iを1増加させる(412)。
繰り返し判定部324は、変数iとkが一致するかどうかを判定する。
一致すればステップ421へ行く。一致しなければステップ414へ行く(413)。
剰余取得部321は、d’の2wによる剰余をu[i]に格納する(414)。
剰余変換判定部322は、u[i]が偶数か奇数かを判定する。
u[i]が偶数の場合はステップ416へ行く。奇数の場合はステップ417へ行く(415)。
剰余変換部323は、u[i]が奇数となるように、
u[i],u[i−1]を変換する(416)。これは、
の操作を行なうことにより達成される。ここで、sign(u)はuの符号を取り出す関数であり、uが正の時は1、uが負の時は−1となる。
格納部325は、
dw[(i−1)w],dw[(i−1)w+1],...,dw[(i−1)+w−1]にそれぞれ、u[i−1],0,…,0を格納し、ステップ411へ戻る(417)。
ステップ413で変数iとkが一致した場合、格納部325はdw[kw],dw[kw+1],...,dw[kw+w−1]にそれぞれ、u[k],0,…,0を格納する(421)。
エンコード部302は、dw[n],dw[n−1],...,dw[0]を実計算部304へ出力する(422)。
次に、図5を用いて、前計算部303が楕円曲線上の点から、前計算テーブルを作成する方法を説明する。
点PをECDBLにより2倍し、その結果を点2Pに格納する(501)。
変数jに初期値1を代入する(502)。
jが2w−1より小さいかどうかを判定する。jが2w−1より小さい場合はステップ504へ行く。2w−1以上の場合はステップ511へ行く(503)。
ステップ503でjが2w−1より小さい場合、点2Pと点(2j−1)PをECADDにより加算し、その結果を点(2j+1)Pに格納する(504)。
変数jを1増加させ、ステップ503へ戻る(505)。
ステップ503でjが2w−1以上の場合、P,3P,...,(2w−1)Pを前計算テーブルとして出力する(511)。
ただし、ECADD,ECDBLはそれぞれ楕円曲線における加算、2倍算を表す。加算は式1,2を用いて、2倍算は式4,5を用いてそれぞれ計算される。なお、加算、2倍算の計算には式1,2、および式4,5を用いる以外にも、射影座標やヤコビアン座標における計算公式があり、Cohen,H.,Miyaji,A.,Ono,T.,Efficient Elliptic Curve Exponentiation Using Mixed Coordinates,Advances in Cryptology−ASIACRYPT 1998,LNCS 1514,Springer−Verlag,(1998),pp.51−65.(文献3)に記載されている。
また、楕円曲線上の点Q=(x,y)に対して、楕円曲線加算に関する逆元の点−Qは、−Q=(x,−y)と表されるため、点Qの座標が与えられていれば容易に計算できる。そのため、点P,3P,…,(2w−1)Pのみを前計算テーブルとして格納する。その後の実計算部304が行う計算で必要となる点−P,−3P,…,−(2w−1)Pは、それらから導出すればよく、前計算テーブルには格納する必要はない。
なお、前計算部303の行う前計算テーブルの作成処理は、点P,3P,…,(2w−1)Pが計算されればよい。そのため、モンゴメリトリックを用いて、楕円曲線演算で必要となる逆元演算の計算の共通化を行うことにより、高速化をはかってもよい。
モンゴメリトリックによる逆元演算共通化方法がCohen,H.,A course in computational algebraic number theory,GTM138,Springer−Verlag,(1993).(文献4)の481ページに記載されている。
最後に、図6を用いて、実計算部304がエンコードされたスカラー値と楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。
変数cに初期値nを代入する(601)。
dw[c]が0か0でないかを判定する。
dw[c]が0の場合はステップ603へ行く。0でなければステップ611へ行く(602)。
変数cを1減少させ、ステップ602へ戻る(603)。
ステップ602でdw[c]が0でない場合、点Qにdw[c]Pを代入する(611)。
変数jに初期値c−1を代入する(612)。
jが0より小さいかどうかを判定する。jが0より小さい場合はステップ621へ行く。0以上の場合はステップ614へ行く(613)。
点QをECDBLにより2倍し、点Qに再び格納する(614)。
dw[j]が0か0でないかを判定する。
dw[j]が0の場合はステップ617へ行く。0でなければステップ616へ行く(615)。
ステップ615でdw[j]が0でない場合、点Qとdw[j]PとをECADDにより加算する。ただし、dw[j]が負の場合は(−dw[j])Pのy座標を反転したものを用いて加算を行う。その結果を点Qに格納し、ステップ617へ行く(616)。なお、dw[j]が0でない場合は、dw[j]は奇数である。そのため、dw[j]Pもしくは(−dw[j])Pのいずれかが、前計算テーブルに必ず存在する。
変数jを1減少させ、ステップ613へと戻る(617)。
ステップ613でjが0より小さい場合、点Qを出力する(621)。
エンコード部302が行う処理により出力されるdw[j]は、式12,式13をみたす。この理由は次の通りである。
dw[j]はjがwで割り切れる時はu[j/w]に等しく、割り切れない場合は0に等しい。そのため、式12の右辺は、
と等しい。ただし、k=n/wである。一方、ステップ416の変換では、
の値は不変である。したがって、ステップ416の変換で、式17の値は不変である。他方、スカラー値dを2w−進展開したものがu[i]の初期状態であるので、式17はdに等しい。ゆえに式12がみたされる。また、ステップ416の変換では、
をみたすu[i]は、変換後も式19をみたす。したがって、式13がみたされる。
エンコード部302が行う処理で計算されるu[i]はi=0を除き全て奇数となる。この理由は次の通りである。ステップ415でu[i]が奇数であれば、u[i]の値はそのまま保持されるので、u[i]は奇数である。ステップ415でu[i]が偶数であれば、ステップ416でu[i],u[i−1]は式15,16により変換される。式14によりbの値が計算されるため、bは1もしくは−1である。そのため、式15の変換で、u[i]は奇数に変換される。また、式16の変換では、u[i−1]の偶奇性は変化しない。ステップ415に初めて来る時のiは1である。そのため、u[0]は奇数とは限らない。結果として、i=0を除き、u[i]は全て奇数である。
なお、u[0]も奇数とするためには、スカラー値dが奇数であればよい。そのためには、入力されたすカラー値dが偶数の時は、d+1を改めてスカラー値d’としてエンコードする。すなわち、dを奇数に変換する。そして、スカラー倍点d’Pを計算する。
であるので、d’Pから点Pを引き、その値をスカラー倍点dPとして出力すればよい。
実計算部304が出力する点Qはスカラー倍点dPに等しい。この理由は次の通りである。
ステップ613において点Qが
と表されるとする。このとき、次にステップ613に来る時も点Qは式21をみたすことを示す。
点Qはステップ614で2倍され、dw[j]が0でなければステップ616でdw[j]Pが加えられる。そのためステップ616の直後では、点Qの値は
となる。したがってdw[j]=0の時も含めて、ステップ617の直前で、点Qは式22をみたす。ステップ617でjが1減少するので、式22のjにj+1を代入すると式21になる。すなわち、次にステップ613に来る時も点Qは式21をみたす。
j>cに対するdw[j]の値は0であるので、ステップ621で出力される点Qの値は
に等しい。実計算部304に入力されるスカラー値は、エンコード部302によりエンコードされたdw[j]であるので、そのdw[j]は式12をみたす。したがって、Q=dPである。
上記スカラー倍におけるメモリ使用量は、前計算部303の前計算テーブルの大きさにより定まる。上記スカラー倍計算方法では、前計算テーブルはP,3P,…,(2w−1)Pのみ、すなわち奇数倍の点のみを格納すればよいので、その点の数は2w−1個である。文献2の方法では、ウィンドウ幅wに対して、2w個の点を格納する必要がある。そのため、上記スカラー倍計算方法は、文献2の方法と比べて格納する点の数が少なく、メモリ使用量が小さくてすむ。
さらに、いかなる方法をもってしても、前計算テーブルに格納する点の数をこれ以上削減することができないという意味で、メモリ使用量は最小である。この理由は次の通りである。
m個の点からなる前計算テーブルを用いた場合、k+1個のu[i]を用いて、エンコードされたスカラー値として表すことのできる数は(2m)k+1個である。他方、nビット以下のスカラー値は全部で2n個あり、各々のスカラー値はそれぞれ異なる数値列にエンコードされなければならない。そのため、(2m)k+1≧2nが成り立つ。k+1=n/wであるので、m≧2w−1となる。実際、上記スカラー倍計算方法における前計算テーブルの点の個数は2w−1であり、最小である。
また、上記スカラー倍方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由は次の通りである。
エンコード部302によりスカラー値dは数値列dw[j]にエンコードされる。この数値列dw[j]は固定されたパターン
をもつ。ここで各xは各々非0の値であり、それぞれdw[iw]に対応する。そのため、実計算部304がスカラー倍点を計算する際に、ステップ613−617の繰り返し処理において、|0…0x|のブロックに対応する楕円曲線演算は、|D…DA|、すなわちw回のDの後にAとなる。ただし、DはECDBLを、AはECADDをそれぞれ表す。したがって、全てのスカラー値に対して、実行する楕円曲線演算は、
となり、必ず楕円加算が実行されるので、スカラー値との依存関係がない。
なお、文献1のランダム化射影座標を併用してスカラー倍計算を行ってもよい。そうすると、同じ点Pを入力しても実行毎に異なる値に変換してスカラー倍計算を行うので、攻撃者が中間値の値を予測できなくなる。
また、前計算テーブルに格納されている点が読み出されるたびに、再びランダム化して、前計算テーブルに書き込んでもよい。そうすると、同じデータの再使用がなくなるため、より一層、サイドチャネル攻撃への耐性が増す。
以上の通り、上記計算方法は、サイドチャネル攻撃に有用な情報を与えないので、サイドチャネル攻撃に対して耐性がある。また、奇数倍の点のみを前計算テーブルとして格納するため、メモリ使用量が小さくてすむという特徴がある。
なお、上記計算方法では楕円曲線としてワイエルシュトラス型楕円曲線を用いたが、標数2の有限体上で定義された楕円曲線や、OEF(Optimal Extension Field)上で定義された楕円曲線、もしくはモンゴメリ型楕円曲線を用いてもよい。OEFについては、D.V.Bailey,C.Paar,Optimal Extension Fields for Fast Arithmetic in Public−Key Algorithms,Advances in Cryptology Crypto ’98,LNCS 1462,(1998),472−485.(文献5)に記載されている。
以上、コンピュータB121が、暗号化されたデータ141を復号化する場合のスカラー倍計算部135の動作を説明したが、コンピュータA101が入力メッセージを暗号化する場合も同様である。
その場合には、コンピュータA101のスカラー倍計算部115は、既に説明した楕円曲線上の点Q、乱数kによるスカラー倍点kQと、公開鍵aQと乱数kによるスカラー倍点k(aQ)を出力する。このとき、上記計算方法で説明したスカラー値dを乱数k、楕円曲線上の点Pを楕円曲線上の点Q、公開鍵aQとして同様の処理を行うことにより、それぞれのスカラー倍点を求めることができる。
次に本発明を署名検証システムに適用する実施例を、図7と図2を用いて説明する。
図7の署名検証システムは、スマートカード701と署名検証処理を行うコンピュータ721とから成る。
スマートカード701は、機能としてはコンピュータA101と類似の構成を備えるが、CPU113やコプロセッサ114などの演算装置とが記憶部102に格納されているプログラムを実行することにより、データ処理部112ではなく、署名生成処理部712を実現する。ただし、外部記憶装置、ディスプレイ、キーボードを備えない。
コンピュータ721は、コンピュータA101と同様の構成を備えるが、CPU113がプログラムを実行することによりデータ処理部112ではなく、署名検証処理部732を実現する。
スカラー倍計算部715と735は、図1に示すスカラー倍計算部115または135と同様の機能を備える。
なお、本実施例において、コンピュータ721内の各プログラムは、あらかじめ、上記コンピュータ内の記憶部に格納されていても良いし、必要なときに、コンピュータ721が利用可能な媒体を介して他の装置から上記記憶部に導入されてもよい。
さらに、スマートカード内の各プログラムは、あらかじめ、上記スマートカード内の記憶部に格納されていても良いし、必要なときに、入出力インタフェースを介して接続するコンピュータ、または当該コンピュータが利用可能な媒体を介して上記記憶部に導入されてもよい。
媒体とは、たとえば当該コンピュータに着脱可能な記憶媒体、または通信媒体(すなわちネットワークまたはネットワークを伝搬する搬送波)を指す。
図7の署名検証システムにおける署名作成と署名検証動作を、図2を参照して説明する。
コンピュータ721は、ランダムに選んだ数値をチャレンジコード743として、インタフェース742を介してスマートカード701に転送する。
署名生成処理部712(図2の112)は、チャレンジコード743を受け付け、チャレンジコード743のハッシュ値をとり、所定のビット長の数値fに変換する。
署名生成処理部712は、乱数uを生成し、記憶部702(図2の102)に格納されている定数704から読み出した(図2の205)楕円曲線上の定点Qとともにスカラー倍計算部715(図2の115)へ送る(図2の206)。
スカラー倍計算部715は、定点Q、乱数uによるスカラー倍点(xu,yu)を計算し、計算されたスカラー倍点を署名生成処理部712へ送る(図2の207)。
署名生成処理部712は、送られたスカラー倍点を用いて署名の生成を行う。例えば、ECDSA署名であれば、
を計算することによりチャレンジコード743に対応する署名(s,t)を得る(図2の208)。
ここで、qは定点Qの位数、すなわち定点Qのq倍点qQが無限遠点になり、qより小さな数値mに対する定点Qのm倍点mQは無限遠点にはならない、というような数値のことである。
ECDSA署名については、ANSI X9.62 Public Key Cryptography for the Financial Services Industry,The Elliptic Curve Digital Signature Algorithm(ECDSA),(1999)(文献6)に記載されている。
スマートカード701は、署名生成処理部712で作成した署名741を入出力インタフェース710より出力し、インタフェース742を介してコンピュータ721へ転送する。
コンピュータ721の署名検証処理部732(図2の112)は、署名741が入力される(図2の204)と、署名741の数値s,tが適切な範囲内すなわち1≦s,t<qであるかを調べる。
数値s,tが上記範囲内になければチャレンジコード743に対する署名の検証結果として「無効」を出力し、スマートカード701を拒絶する。数値s,tが上記範囲内にあれば、署名検証処理部732は、
を計算する。そして、記憶部722(図2の102)に格納されている定数724から読み出した(図2の205)公開鍵aQ及び定点Qと計算したh1,h2をスカラー倍計算部735(図2の115)へ送る(図2の206)。
スカラー倍計算部735は、定点Qとh1によるスカラー倍点h1Qと、公開鍵aQとh2によるスカラー倍点h2aQとを計算し、計算されたスカラー倍点を署名検証処理部732へ送る(図2の207)。
署名検証処理部732は、送られたスカラー倍点を用いて、署名検証処理を行う。例えば、ECDSAの署名検証であれば、点R
を計算し、そのx座標をxRとしたとき、
を計算し、s’=sであればチャレンジコード743に対する署名の検証結果として「有効」を出力し、スマートカード701を認証し、受け入れる(図2の208)。
s’=sでなければ「無効」を出力し、スマートカードを拒絶する(図2の208)。
上記実施形態のスカラー倍計算部715、735は、図1のスカラー倍計算部115または135と同様の機能を備えるので、サイドチャネル攻撃を防ぎ且つメモリ使用量の少ないスカラー倍計算を実行できる。
そのためスマートカード701は署名作成処理を行う際に、コンピュータ721は署名検証処理を行う際に、サイドチャネル攻撃を防ぎ、その上少ないメモリ使用量で実行できる。
次に本発明を鍵交換システムに適用する例を説明する。本実施形態においては、図1のシステム構成が応用できる。
図1のデータ処理部112、132は、本実施形態においては、それぞれ鍵交換処理部112、132として機能する。
鍵交換システムのコンピュータA101が、入力されたデータ143から共有情報の導出を行う場合の動作について図1、図2を参照して説明する。
コンピュータB121のデータ処理部132(図2の112)は、記憶部122(図2の102)の定数125から秘密鍵bを読み出しコンピュータB121の公開鍵bQを計算する。そして、ネットワーク142を介して、公開鍵bQをデータ143としてコンピュータA101に転送する。
コンピュータA101の鍵交換処理部112(図2の112)はコンピュータB121の公開鍵bQの入力を受け付ける(図2の204)と、鍵交換処理部112は、記憶部102から読み出した(図2の205)秘密情報105であるコンピュータA101の秘密鍵aと、コンピュータB121の公開鍵bQとをスカラー倍計算部115へ送る(図2の206)。
スカラー倍計算部115は、秘密鍵aと、公開鍵bQによるスカラー倍点abQを計算し、計算されたスカラー倍点を鍵交換処理部112へ送る(図2の207)。
鍵交換処理部112は、送られたスカラー倍点を用いて共有情報の導出を行い、記憶部102に秘密情報105として格納する。例えば、スカラー倍点abQのx座標を、共有情報とする。
次に、コンピュータ121が、入力されたデータ141から共有情報の導出を行う場合の動作について説明する。
コンピュータA101のデータ処理部112は、記憶部102の定数105から秘密鍵aを読み出しコンピュータA101の公開鍵aQを計算する。そして、ネットワーク142を介して、公開鍵aQをデータ141としてコンピュータB121に転送する。
コンピュータB121の鍵交換処理部132(図2の112)はコンピュータA101の公開鍵aQの入力を受け付ける(図2の204)と、鍵交換処理部132は、記憶部122(図2の102)の定数125から読み出した(図2の205)秘密情報125であるコンピュータB121の秘密鍵bと、コンピュータA101の公開鍵aQとをスカラー倍計算部135(図2の115)へ送る(図2の206)。
スカラー倍計算部135は、秘密鍵bと、公開鍵aQによるスカラー倍点baQを計算し、計算されたスカラー倍点を鍵交換処理部132へ送る(図2の207)。
鍵交換処理部132は、送られたスカラー倍点を用いて共有情報の導出を行い、記憶部122に秘密情報125として格納する。例えば、スカラー倍点baQのx座標を、共有情報とする。
ここで、数abと数baは数値として同じなので、点abQと点baQは同じ点となり、同じ情報が導出されたことになる。
ネットワーク142には、点aQと点bQが送信されるが、点abQ(もしくは点baQ)を計算するには秘密鍵aもしくは秘密鍵bを用いなければならない。すなわち、秘密鍵aもしくは秘密鍵bを知らなければ、共有情報を得ることができない。このようにして得られた共有情報は、共通鍵暗号の秘密鍵として利用できる。
本実施形態においても、スカラー倍計算部115、135は、上述の特徴を備えるので、サイドチャネル攻撃を防ぎ、そのうえ少ないメモリ使用量で鍵交換処理が可能になる。
また、上記各実施形態における暗号化処理部、復号化処理部、署名作成部、署名検証部、鍵交換処理部は、専用のハードウェアを用いて行ってもよい。また、スカラー倍計算部をコプロセッサまたはそれ以外の専用ハードウェアで実現しても良い。
また、データ処理部は、上記暗号化処理、復号化処理、署名作成処理、署名検証処理、鍵交換処理のうち、任意の一つ以上の処理を行えるように構成してもよい。
本発明によれば、サイドチャネル攻撃に対して安全で、かつメモリ使用量の少ない、楕円曲線演算を用いたメッセージ処理が可能になる。Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 shows a system configuration in which a
In order to encrypt a message at the computer A101 in the cryptographic communication system of FIG. m + K (aQ) and kQ are calculated and output, and in order to decrypt the ciphertext by the computer B121, -a (kQ) is calculated from the secret keys a and kQ,
Can be calculated and output. Where P m Is a message, k is a random number, a is a constant indicating a secret key, Q is a fixed point, and aQ is a point indicating a public key.
In FIG. 1, a computer A101 is equipped with an arithmetic device such as a
Further, the computer A101 realizes the
In the present embodiment, the
The scalar
The computer B121 has the same hardware configuration as the computer A101.
Further, the
In the present embodiment, the
The
Each program may be stored in advance in a storage unit in the computer, or when necessary, from other devices via a medium that can be used by the input /
FIG. 2 shows how information is transferred by each processing unit of the computer A101 and the computer B121.
Next, an operation when the computer A101 in FIG. 1 encrypts an input message will be described. The message may be any digitized data, and may be any text, image, video, or sound.
When receiving the plaintext message (
Next, the
For example, the Weierstrass-type elliptic curve has A and B as constants, respectively.
Therefore, the value of the y coordinate can be obtained from this.
Next, the
The scalar
The
Computes the encrypted message x e1 , X e2 Get.
The computer A101 assembles an encrypted output message from the one or more partial messages encrypted by the encryption processing unit 112 (208 in FIG. 2).
The
Note that the information read from the
Next, an operation when the
When the encrypted data 141 (
The value of the y coordinate on the elliptic curve having the numerical value represented by the bit string of the
The encrypted message is x e1 , X e2 In the case of a Weierstrass-type elliptic curve, the y coordinate value (y e1 )
(However, A and B are constants)
Can be obtained from
The decryption processing unit 132 (205 in FIG. 2) read from the
The scalar
For example, an encrypted message is x e1 , X e2 In the case of a Weierstrass-type elliptic curve,
(P m + K (aQ))-a (kQ) = (x e1 , Y e1 )-(X d3 , Y d3 )
This is achieved by calculating That is,
And the partial message x before being encrypted 1 X corresponding to f1 Get.
The
Next, the process of the
FIG. 3 shows a functional block of the scalar multiplication unit used in each embodiment. The scalar multiplication calculation unit 115 (135 in FIG. 1) includes an
A method by which the
When the scalar
D w The scalar value d is converted into [j]. Here, w is a predetermined small positive integer and is called a window width. When priority is given to calculation time, w is set to a large value. To reduce the memory usage, w is set to a small value. The
The encoding process performed by the
When the point P is a fixed point, the pre-calculation table creation process performed by the
Next, each process performed by the
First, a method in which the
The
The
The
The variable i is increased by 1 (412).
The
If they match, go to step 421. If they do not match, the process goes to step 414 (413).
The
The remainder
If u [i] is an even number, go to
The
u [i] and u [i-1] are converted (416). this is,
This is achieved by performing the operation. Here, sign (u) is a function for extracting the sign of u, and is 1 when u is positive, and is -1 when u is negative.
The
d w [(I-1) w], d w [(I-1) w + 1],. . . , D w U [i−1], 0,..., 0 are stored in [(i−1) + w−1], respectively, and the process returns to Step 411 (417).
If the variables i and k match in
The
Next, a method in which the
The point P is doubled by ECDBL, and the result is stored in the point 2P (501).
The
j is 2 w-1 Determine if less than. j is 2 w-1 If smaller, go to step 504. 2 w-1 In the above case, the process goes to Step 511 (503).
In
The variable j is incremented by 1, and the process returns to step 503 (505).
In
However, ECADD and ECDBL represent addition and doubling in an elliptic curve, respectively. Addition is calculated using
Further, for the point Q = (x, y) on the elliptic curve, the inverse point -Q relating to the addition of the elliptic curve is expressed as -Q = (x, -y). It can be easily calculated if given. Therefore, the points P, 3P, ..., (2 w -1) Store only P as a pre-calculation table. Points -P, -3P,...,-(2) required for the calculation performed by the
Note that the pre-calculation table creation process performed by the
A method of common inverse operation by Montgomery trick is described in Cohen, H. et al. , A course in computational algal number number theory, GTM138, Springer-Verlag, (1993). (Reference 4), page 481.
Finally, a method of calculating a scalar multiple point in an elliptic curve from the encoded scalar value and a point on the elliptic curve will be described with reference to FIG.
An initial value n is substituted for variable c (601).
d w It is determined whether [c] is 0 or not.
d w If [c] is 0, go to
The variable c is decreased by 1 and the process returns to step 602 (603).
D in
An initial value c-1 is substituted for variable j (612).
Determine if j is less than zero. If j is smaller than 0, go to
Point Q is doubled by ECDBL and stored again at point Q (614).
d w It is determined whether [j] is 0 or not.
d w If [j] is 0, go to
D in
The variable j is decreased by 1, and the process returns to step 613 (617).
If j is smaller than 0 in
D output by processing performed by the encoding unit 302 w [J] satisfies Expressions 12 and 13. The reason is as follows.
d w [J] is equal to u [j / w] when j is divisible by w, and is equal to 0 when it is not divisible. Therefore, the right side of Equation 12 is
Is equal to However, k = n / w. On the other hand, in the conversion of
The value of is unchanged. Therefore, the value of Expression 17 is unchanged by the conversion in
U [i] that satisfies the equation satisfies the equation 19 even after the conversion. Therefore, Equation 13 is satisfied.
U [i] calculated in the processing performed by the
In order to make u [0] odd, the scalar value d may be an odd number. For this purpose, when the input color value d is an even number, d + 1 is re-encoded as the scalar value d ′. That is, d is converted to an odd number. Then, a scalar multiple d′ P is calculated.
Therefore, the point P is subtracted from d′ P, and the value is output as the scalar multiple dP.
The point Q output from the
In
It is assumed that At this time, the point Q also indicates that the expression 21 is satisfied when the
Point Q is doubled in
It becomes. Therefore d w The point Q satisfies Equation 22 just before
d for j> c w Since the value of [j] is 0, the value of the point Q output in
be equivalent to. The scalar value input to the
The memory usage in the scalar multiplication is determined by the size of the pre-calculation table of the
Furthermore, the memory usage is minimal in the sense that the number of points stored in the pre-calculation table cannot be reduced any further by any method. The reason is as follows.
When a pre-calculation table composed of m points is used, a number that can be expressed as an encoded scalar value using (k + 1) u [i] is (2m). k + 1 It is a piece. On the other hand, all scalar values of n bits or less are 2 n Each scalar value must be encoded into a different sequence of numbers. Therefore, (2m) k + 1 ≧ 2 n Holds. Since k + 1 = n / w, m ≧ 2 w-1 It becomes. Actually, the number of points in the previous calculation table in the above scalar multiplication method is 2 w-1 It is the minimum.
The scalar multiplication method is also effective for a defense method against side channel attacks. The reason is as follows.
The
It has. Where each x is a non-zero value and d w Corresponds to [iw]. Therefore, when the
Since ellipse addition is always executed, there is no dependency on the scalar value.
In addition, you may perform a scalar multiplication calculation using the randomized projection coordinate of
Alternatively, each time a point stored in the precalculation table is read, it may be randomized again and written to the precalculation table. In this case, since the same data is not reused, the resistance to side channel attacks is further increased.
As described above, the above calculation method does not give useful information for the side channel attack, and is resistant to the side channel attack. Further, since only odd-numbered points are stored as the pre-calculation table, the memory usage is small.
In the above calculation method, a Weierstrass-type elliptic curve is used as the elliptic curve, but an elliptic curve defined on a finite field of characteristic 2 or an elliptic curve defined on OEF (Optical Extension Field), Alternatively, a Montgomery-type elliptic curve may be used. For OEF, see D.C. V. Bailey, C.I. Paar, Optimal Extension Fields for Fast Arithmetic in Public-Key Algorithms, Advances in Cryptology Crypto '98, LNCS 1462, (1998), 472-485. (Reference 5).
The operation of the
In that case, the
Next, an embodiment in which the present invention is applied to a signature verification system will be described with reference to FIGS.
The signature verification system of FIG. 7 includes a
The
The
The
In the present embodiment, each program in the
Further, each program in the smart card may be stored in advance in the storage unit in the smart card, and when necessary, a computer connected via the input / output interface or the computer can be used. You may introduce | transduce into the said memory | storage part via a medium.
The medium refers to, for example, a storage medium removable from the computer or a communication medium (that is, a network or a carrier wave propagating through the network).
A signature creation and signature verification operation in the signature verification system of FIG. 7 will be described with reference to FIG.
The
The signature generation processing unit 712 (112 in FIG. 2) receives the
The signature
The
The signature
To obtain a signature (s, t) corresponding to the challenge code 743 (208 in FIG. 2).
Here, q is the order of the fixed point Q, that is, the q point qQ of the fixed point Q is an infinite point, and the m times point mQ of the fixed point Q for a numerical value m smaller than q is not an infinite point. It is a numerical value.
The ECDSA signature is described in ANSI X9.62 Public Key Cryptography for the Final Services Industry, The Elliptic Curve Digital Signature (6) (19).
The
When the
If the numerical values s and t are not within the above range, “invalid” is output as the signature verification result for the
Calculate Then, h calculated with the public key aQ and the fixed point Q read out from the constant 724 stored in the storage unit 722 (102 in FIG. 2) (205 in FIG. 2). 1 , H 2 Is sent to the scalar multiplication unit 735 (115 in FIG. 2) (206 in FIG. 2).
The
The signature
And its x coordinate is x R When
If s ′ = s, “valid” is output as the signature verification result for the
If s ′ = s, “invalid” is output and the smart card is rejected (208 in FIG. 2).
Since the
Therefore, when the
Next, an example in which the present invention is applied to a key exchange system will be described. In the present embodiment, the system configuration of FIG. 1 can be applied.
The
The operation when the computer A101 of the key exchange system derives the shared information from the
The data processing unit 132 (112 in FIG. 2) of the computer B121 reads the secret key b from the constant 125 of the storage unit 122 (102 in FIG. 2) and calculates the public key bQ of the computer B121. Then, the public key bQ is transferred as
When the key exchange processing unit 112 (112 in FIG. 2) of the computer A101 receives the input of the public key bQ of the computer B121 (204 in FIG. 2), the key
The
The key
Next, an operation when the
The
When the key exchange processing unit 132 (112 in FIG. 2) of the computer B121 accepts the input of the public key aQ of the computer A101 (204 in FIG. 2), the key
The
The key
Here, since the number ab and the number ba are the same as numerical values, the point abQ and the point baQ are the same point, and the same information is derived.
A point aQ and a point bQ are transmitted to the
Also in this embodiment, the
In addition, the encryption processing unit, the decryption processing unit, the signature creation unit, the signature verification unit, and the key exchange processing unit in each of the above embodiments may be performed using dedicated hardware. Further, the scalar multiplication calculation unit may be realized by a coprocessor or other dedicated hardware.
Further, the data processing unit may be configured to perform any one or more of the encryption process, the decryption process, the signature creation process, the signature verification process, and the key exchange process.
According to the present invention, it is possible to perform message processing using elliptic curve calculation that is safe against side channel attacks and uses a small amount of memory.
Claims (6)
前記スカラー値を絶対値が偶数r以下の数値列にエンコードするエンコード部と、
前記楕円曲線上の点から前計算テーブルを作成する前計算部と、
前記エンコードした数値列及び前記前計算テーブルからスカラー倍点を計算する実計算部と
を備え、
前記エンコード部は、
エンコード結果を格納する数値列を初期化し、前記スカラー値を第1の変数に代入する第1のステップと、
前記第1の変数に対して前記偶数rを法とした剰余を第2の変数に代入する第2のステップと、
前記第1の変数から前記第2の変数を減算した値を前記偶数rで除した商を前記第1の変数に格納する第3のステップと、
前記第2の変数を前記第3の変数に代入する第4のステップと、
前記第1の変数に対して前記偶数rを法とした剰余を第2の変数に代入する第5のステップと、
前記第2の変数が偶数か否かを判定する第6のステップと、
前記第6のステップにおいて前記第2の変数が偶数であると判定された場合に、
前記第3の変数が正であれば、前記第2の変数に1を加算すると共に、前記第3の変数から偶数rを減算し、
前記第3の変数が負であれば、前記第2の変数から1を減算すると共に、前記第3の変数に偶数rを加算する第7のステップと、
前記第3の変数が示す数値を、前記数値列に追加する第8のステップと
を実行し、
前記エンコード部は、
前記第3から第8のステップを予め定められた回数繰り返し実行した上で、前記数値列を前記エンコードした数値列として出力し、
前記前計算部によって作成される前記前計算テーブルは、
前記楕円曲線上の点の奇数倍の点を含み、
前記実計算部は、
前記楕円曲線上の点の偶数r倍の点を計算する第9のステップと、
前記第9のステップの計算結果の点と前記前計算テーブルに格納されている点とを加算する第10のステップと
を実行し、
前記第10のステップにおいて前記実計算部によって加算される前記前計算テーブルに格納されている前記点は、前記エンコードした数値列に属する数値による倍点であることを特徴とするスカラー倍計算装置。In an elliptic curve in elliptic curve cryptography, a scalar multiple calculation device for calculating a scalar multiple from a scalar value and a point on an elliptic curve,
An encoding unit that encodes the scalar value into a numerical sequence having an absolute value of even number r or less ;
A pre-calculation unit that creates a pre-calculation table from points on the elliptic curve;
A real calculation unit for calculating a scalar multiple from the encoded numerical sequence and the previous calculation table,
The encoding unit is
A first step of initializing a numerical sequence for storing an encoding result and substituting the scalar value into a first variable;
A second step of substituting a remainder modulo the even number r for the first variable into a second variable;
A third step of storing in the first variable a quotient obtained by dividing a value obtained by subtracting the second variable from the first variable by the even number r;
A fourth step of substituting the second variable for the third variable;
A fifth step of substituting a remainder modulo the even number r for the first variable into a second variable;
A sixth step of determining whether the second variable is an even number;
If it is determined in the sixth step that the second variable is an even number,
If the third variable is positive, add 1 to the second variable and subtract an even number r from the third variable;
If the third variable is negative, a seventh step of subtracting 1 from the second variable and adding an even number r to the third variable;
An eighth step of adding the numerical value indicated by the third variable to the numerical string;
Run
The encoding unit is
After repeatedly executing the third to eighth steps a predetermined number of times, the numerical sequence is output as the encoded numerical sequence,
The pre-calculation table created by the pre-calculation unit is
Including points that are odd multiples of the points on the elliptic curve,
The actual calculation unit is
A ninth step of calculating even r times points on the elliptic curve;
A tenth step of adding the points of the calculation results of the ninth step and the points stored in the pre-calculation table;
Run
The scalar multiplication apparatus according to claim 10, wherein the point stored in the pre-calculation table added by the actual calculation unit in the tenth step is a multiple by a numerical value belonging to the encoded numerical sequence .
前記スカラー値を絶対値が偶数r以下の数値列にエンコードするエンコード部と、
前記エンコードした数値列及び前記前計算テーブルからスカラー倍点を計算する実計算部と
を備え、
前記エンコード部は、
エンコード結果を格納する数値列を初期化し、前記スカラー値を第1の変数に代入する第1のステップと、
前記第1の変数に対して前記偶数rを法とした剰余を第2の変数に代入する第2のステップと、
前記第1の変数から前記第2の変数を減算した値を前記偶数rで除した商を前記第1の変数に格納する第3のステップと、
前記第2の変数を前記第3の変数に代入する第4のステップと、
前記第1の変数に対して前記偶数rを法とした剰余を第2の変数に代入する第5のステップと、
前記第2の変数が偶数か否かを判定する第6のステップと、
前記第6のステップにおいて前記第2の変数が偶数であると判定された場合に、
前記第3の変数が正であれば、前記第2の変数に1を加算すると共に、前記第3の変数から偶数rを減算し、
前記第3の変数が負であれば、前記第2の変数から1を減算すると共に、前記第3の変数に偶数rを加算する第7のステップと、
前記第3の変数が示す数値を、前記数値列に追加する第8のステップと
を実行し、
前記エンコード部は、
前記第3から第8のステップを予め定められた回数繰り返し実行した上で、前記数値列を前記エンコードした数値列として出力し、
前記実計算部は、
前記楕円曲線上の点の偶数r倍の点を計算する第9のステップと、
前記第9のステップの計算結果の点と前記前計算テーブルに格納されている点とを加算する第10のステップと
を実行し、
前記第10のステップにおいて前記実計算部によって加算される前記前計算テーブルに格納されている前記点は、前記エンコードした数値列に属する数値による倍点であることを特徴とするスカラー倍計算装置。In an elliptic curve in elliptic curve cryptography, a scalar multiple calculation device for calculating a scalar multiple from a pre-calculation table storing a scalar value and an odd multiple of a point on an elliptic curve,
An encoding unit that encodes the scalar value into a numerical sequence having an absolute value of even number r or less ;
A real calculation unit for calculating a scalar multiple from the encoded numerical sequence and the previous calculation table,
The encoding unit is
A first step of initializing a numerical sequence for storing an encoding result and substituting the scalar value into a first variable;
A second step of substituting a remainder modulo the even number r for the first variable into a second variable;
A third step of storing in the first variable a quotient obtained by dividing a value obtained by subtracting the second variable from the first variable by the even number r;
A fourth step of substituting the second variable for the third variable;
A fifth step of substituting a remainder modulo the even number r for the first variable into a second variable;
A sixth step of determining whether the second variable is an even number;
If it is determined in the sixth step that the second variable is an even number,
If the third variable is positive, add 1 to the second variable and subtract an even number r from the third variable;
If the third variable is negative, a seventh step of subtracting 1 from the second variable and adding an even number r to the third variable;
An eighth step of adding the numerical value indicated by the third variable to the numerical string;
Run
The encoding unit is
After repeatedly executing the third to eighth steps a predetermined number of times, the numerical sequence is output as the encoded numerical sequence,
The actual calculation unit is
A ninth step of calculating even r times points on the elliptic curve;
A tenth step of adding the points of the calculation results of the ninth step and the points stored in the pre-calculation table;
Run
The scalar multiplication apparatus according to claim 10, wherein the point stored in the pre-calculation table added by the actual calculation unit in the tenth step is a multiple by a numerical value belonging to the encoded numerical sequence .
楕円曲線として、ワイエルシュトラス型楕円曲線、モンゴメリ型楕円曲線、標数2の有限体上で定義された楕円曲線、OEF上で定義された楕円曲線のいずれか1つを用いることを特徴とするスカラー倍計算装置。The scalar multiplication apparatus according to claim 1 or 2 ,
As the elliptic curve, any one of a Weierstrass type elliptic curve, a Montgomery type elliptic curve, an elliptic curve defined on a finite field of characteristic 2 and an elliptic curve defined on OEF is used. A scalar multiplication calculator.
前記データ変換部より依頼されてスカラー倍を計算するスカラー倍計算部と
を有するデータ生成装置であって、
前記スカラー倍計算部は、
請求項1または2に記載のスカラー倍計算装置を用いてスカラー倍を計算することを特徴とするデータ生成装置。A data conversion unit for generating second data from the first data;
A data generation device having a scalar multiplication calculation unit that is requested by the data conversion unit to calculate a scalar multiplication,
The scalar multiplication calculator
3. A data generation apparatus that calculates a scalar multiplication using the scalar multiplication apparatus according to claim 1 .
前記署名部より依頼されてスカラー倍を計算するスカラー倍計算部と
を有する署名作成装置であって、
前記スカラー倍計算部は、
請求項1または2に記載のスカラー倍計算装置を用いてスカラー倍を計算する
ことを特徴とする署名作成装置。A signature part for generating signature data from the data;
A signature creation device having a scalar multiplication calculation unit requested by the signature unit to calculate a scalar multiplication,
The scalar multiplication calculator
A signature creation device, wherein a scalar multiplication is calculated using the scalar multiplication device according to claim 1 .
前記復号部より依頼されてスカラー倍を計算するスカラー倍計算部と
を有する復号化装置であって、
前記スカラー倍計算部は、
請求項1または2に記載のスカラー倍計算装置を用いてスカラー倍を計算することを特徴とする復号化装置。A decryption unit for generating decrypted data from the encrypted data;
A decoding device having a scalar multiplication unit requested by the decoding unit to calculate a scalar multiplication,
The scalar multiplication calculator
A decoding device, wherein a scalar multiplication is calculated using the scalar multiplication device according to claim 1 .
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003028996 | 2003-02-06 | ||
JP2003028996 | 2003-02-06 | ||
PCT/JP2003/015253 WO2004070681A1 (en) | 2003-02-06 | 2003-11-28 | Elliptic curve scalar multiple calculation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2004070681A1 JPWO2004070681A1 (en) | 2006-05-25 |
JP4502817B2 true JP4502817B2 (en) | 2010-07-14 |
Family
ID=32844222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004567900A Expired - Fee Related JP4502817B2 (en) | 2003-02-06 | 2003-11-28 | Elliptic curve scalar multiplication method and apparatus |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP4502817B2 (en) |
AU (1) | AU2003284481A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7940936B2 (en) | 2006-12-15 | 2011-05-10 | Samsung Electronics Co., Ltd. | Public key generation method in elliptic curve cryptography and public key generation system executing the method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000132096A (en) * | 1998-10-27 | 2000-05-12 | Fujitsu Ltd | Scalar multiplication method and apparatus |
-
2003
- 2003-11-28 AU AU2003284481A patent/AU2003284481A1/en not_active Abandoned
- 2003-11-28 JP JP2004567900A patent/JP4502817B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000132096A (en) * | 1998-10-27 | 2000-05-12 | Fujitsu Ltd | Scalar multiplication method and apparatus |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7940936B2 (en) | 2006-12-15 | 2011-05-10 | Samsung Electronics Co., Ltd. | Public key generation method in elliptic curve cryptography and public key generation system executing the method |
Also Published As
Publication number | Publication date |
---|---|
JPWO2004070681A1 (en) | 2006-05-25 |
WO2004070681A2 (en) | 2004-08-19 |
AU2003284481A1 (en) | 2004-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7961874B2 (en) | XZ-elliptic curve cryptography with secret key embedding | |
US7308096B2 (en) | Elliptic scalar multiplication system | |
US7961873B2 (en) | Password protocols using XZ-elliptic curve cryptography | |
US7603560B2 (en) | Method and apparatus for digital signature authentication | |
US6876745B1 (en) | Method and apparatus for elliptic curve cryptography and recording medium therefore | |
US7904498B2 (en) | Modular multiplication processing apparatus | |
US7379546B2 (en) | Method for XZ-elliptic curve cryptography | |
JP2008252299A (en) | Encryption processing system and encryption processing method | |
EP0952697B1 (en) | Elliptic curve encryption method and system | |
JP4668931B2 (en) | Encryption processor with tamper resistance against power analysis attacks | |
JP2003098962A (en) | Method and device for calculating elliptic curve scalar multiple, and recording medium | |
JP3794266B2 (en) | Elliptic curve scalar multiplication method and apparatus, and storage medium | |
CN101296076A (en) | Digital signature scheme based on ECC | |
US6772184B2 (en) | Method for efficient modular division over prime integer fields | |
Paar et al. | The RSA cryptosystem | |
JP4423900B2 (en) | Scalar multiplication calculation method, apparatus and program for elliptic curve cryptography | |
JP2003255831A (en) | Method and device for calculating elliptic curve scalar multiple | |
JP4690819B2 (en) | Scalar multiplication calculation method and scalar multiplication calculation apparatus in elliptic curve cryptography | |
JP4502817B2 (en) | Elliptic curve scalar multiplication method and apparatus | |
Sasikaladevi et al. | SNAP-compressive lossless sensitive image authentication and protection scheme based on Genus-2 hyper elliptic curve | |
JP2005316038A (en) | Scalar multiple computing method, device, and program in elliptic curve cryptosystem | |
JP4692022B2 (en) | Scalar multiplication apparatus and program for elliptic curve cryptography | |
Abebe et al. | Lightweight integrated cryptosystem based on reconfigurable hardware for IoT security | |
Wade | The Iso-RSA Cryptographic Scheme | |
JP2007212768A (en) | Prior computing table creating device in elliptic curve cryptosystem |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060823 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060823 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060823 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100119 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100323 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100413 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100420 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130430 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130430 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140430 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |