JP2006235416A - Device for computing scalar multiplication in elliptic curve cryptosystem, and program for the same - Google Patents

Device for computing scalar multiplication in elliptic curve cryptosystem, and program for the same Download PDF

Info

Publication number
JP2006235416A
JP2006235416A JP2005052253A JP2005052253A JP2006235416A JP 2006235416 A JP2006235416 A JP 2006235416A JP 2005052253 A JP2005052253 A JP 2005052253A JP 2005052253 A JP2005052253 A JP 2005052253A JP 2006235416 A JP2006235416 A JP 2006235416A
Authority
JP
Japan
Prior art keywords
scalar
unit
scalar multiplication
calculation
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.)
Granted
Application number
JP2005052253A
Other languages
Japanese (ja)
Other versions
JP4692022B2 (en
Inventor
Keisuke Hakuta
恵輔 伯田
Vuillaume Camille
カミーユ ヴィオム
Katsuyuki Okeya
勝幸 桶屋
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2005052253A priority Critical patent/JP4692022B2/en
Publication of JP2006235416A publication Critical patent/JP2006235416A/en
Application granted granted Critical
Publication of JP4692022B2 publication Critical patent/JP4692022B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an elliptic curve scalar multiplication computing device using a Koblitz curve which is excellent in reduction of memory usage and in high speed. <P>SOLUTION: In the scalar multiplication computing device for computing a scalar multiplication point from a scalar value and a point on a Koblitz curve: the scalar value is encoded into a numerical value sequence; one number other than 0 is selected from the numerical value sequence; by referring to each digit of the encoded numerical value sequence, addition on the elliptic curve is performed on the digit coinciding with the selected number; and a second operation on the elliptic curve is performed on the digit not coinciding with the selected number. Thus, the scalar multiplication computing device which is excellent in reduction of memory usage and in high speed can be realized. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明はセキュリティ技術に係り、特に楕円曲線演算を用いたメッセージ処理方法に関する。     The present invention relates to security technology, and more particularly to a message processing method using elliptic curve calculation.

情報通信ネットワークの進展と共に電子情報に対する秘匿や認証の為に暗号技術は不可欠な要素となってきている。暗号技術に課せられる要件としては、安全性以外にも、処理速度や少ないメモリ使用量などがあるが、一般的に安全性、処理速度、メモリ使用量の間にはトレードオフの関係があり、全ての要件をみたすことは難しい。   Cryptographic technology has become an indispensable element for concealing and authenticating electronic information with the development of information and communication networks. In addition to security, requirements imposed on cryptographic technology include processing speed and low memory usage, but generally there is a trade-off relationship between security, processing speed, and memory usage. It is difficult to meet all requirements.

暗号技術には,共通鍵暗号と公開鍵暗号があるが、公開鍵暗号の一種にN. Koblitz, V. S. Millerにより提案された、楕円曲線暗号がある。   Encryption techniques include common key encryption and public key encryption. One type of public key encryption is elliptic curve encryption proposed by N. Koblitz, V. S. Miller.

楕円曲線暗号は、楕円曲線上の離散対数問題が非常に困難である為に、素因数分解の困難性を安全性の根拠にしている暗号と比べて、楕円曲線暗号は鍵長を比較的短くすることができる。   Elliptic curve cryptography is very difficult to solve discrete logarithm problems on elliptic curves, so elliptic curve cryptography makes the key length relatively short compared to cryptography that is based on the difficulty of prime factorization. be able to.

楕円曲線のなかで、標準化団体(例えば、NIST(National Institute of Standards and Technology))が推奨する、暗号に適した楕円曲線は、ランダムな標数2の楕円曲線、コブリッツ曲線、及び、標数が大きな素体上の楕円曲線である。標準化団体の推奨する楕円曲線は、例えば、非特許文献1に記載されている。   Among the elliptic curves, the elliptic curves suitable for cryptography recommended by standardization organizations (for example, NIST (National Institute of Standards and Technology)) are random characteristic 2 elliptic curves, Kobritz curves, and characteristics. It is an elliptic curve on a large prime field. The elliptic curve recommended by the standardization organization is described in Non-Patent Document 1, for example.

公開鍵暗号には、公開鍵(Public Key)と呼ばれる一般に公開してよい情報と、秘密鍵(Private Key)と呼ばれる秘匿しなければならない秘密情報がある。平文メッセージの暗号化や署名の検証には公開鍵を用い、暗号文メッセージの復号化や署名の生成には秘密鍵を用いる。   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 private key. A public key is used for plaintext message encryption and signature verification, and a secret key is used for decryption of ciphertext messages and signature generation.

楕円曲線暗号における秘密鍵は、後述するスカラー値が担っている。また、楕円曲線暗号の安全性は楕円曲線上の離散対数問題の求解が困難であることに由来している。楕円曲線上の離散対数問題とは、楕円曲線上のある点Pとそのスカラー倍の点d Pが与えられた時、スカラー値dを求める問題である。楕円曲線上の点とは、楕円曲線の定義方程式をみたす数の組をいい、楕円曲線上の点全体には、無限遠点という仮想的な点を単位元とした演算、すなわち楕円曲線上の加法(または加算)が定義される。   The secret key in elliptic curve cryptography is a scalar value described later. The security of elliptic curve cryptography comes from the difficulty of solving discrete logarithm problems on elliptic curves. 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 d P that is a scalar multiple thereof are given. The point on the elliptic curve is a set of numbers that satisfy the definition equation of the elliptic curve. The entire point on the elliptic curve is calculated based on a virtual point called an infinite point, that is, on the elliptic curve. Addition (or addition) is defined.

ある点に対し、特定の回数だけ加法を行うことをスカラー倍といい、その結果をスカラー倍点、その回数のことをスカラー値という。そして、同じ点同士による楕円曲線上の加法のことを、特に楕円曲線上の2倍算という。楕円曲線上の2点の加法は次のようにして計算される。2点を通る直線を引くとその直線は楕円曲線と他の点において交わる。その交わった点とx軸に関して対称な点を、加法を行った結果の点とする。例えば、上記コブリッツ曲線の場合には、点(x1, y1)と点(x2 ,y2 )の加算(x3 ,y3 ) = (x1 ,y1 ) + (x2 ,y2 )は
x3 = λ2 + λ + x1 + x2 + a (式1)
y3 = (x1 + x3 ) λ +x3 + y1 (式2)
λ = (y1 + y2 )/(x1 + x2 ) (式3)
を計算することにより得られる。
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. The addition on the elliptic curve by the same points is called doubling on the elliptic curve. The addition of two points on an elliptic curve is calculated as follows: When you draw a straight line that passes through two points, the straight line intersects the elliptic curve at another point. The point that is symmetric with respect to the intersecting point and the x-axis is the result of the addition. For example, in the case of the above Kobritz 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 )
x 3 = λ 2 + λ + x 1 + x 2 + a (Formula 1)
y 3 = (x 1 + x 3 ) λ + x 3 + y 1 (Formula 2)
λ = (y 1 + y 2 ) / (x 1 + x 2 ) (Formula 3)
Is obtained by calculating.

ここで、コブリッツ曲線の定義方程式は
y2 + x y = x3 + a x2 + 1, (a = 0 or 1) (式4)
で与えられる。すなわち、式4のx, yに各々xi ,yi (i=1,2,3)を代入した場合に、式4の等式が成り立つ。
Here, the defining equation of the Kobritz curve is
y 2 + xy = x 3 + ax 2 + 1, (a = 0 or 1) (Formula 4)
Given in. In other words, when x i and y i (i = 1, 2, 3) are substituted for x and y in Equation 4, the equation of Equation 4 holds.

楕円曲線上の点の2倍算は次のようにして計算される。楕円曲線上の点における接線をひくと、その接線は楕円曲線上の他の一点において交わる。その交わった点とx座標に関して対称な点を、2倍算を行った結果の点とする。例えば、コブリッツ曲線の場合には、点(x1, y1)の2倍算を行った結果(x3 ,y3 ) = 2 (x1 ,y1 ) = (x1 ,y1) + (x1 ,y1 )は、式1, 式2及び
λ = (y1 /x1 ) + x1 (式5)
を計算することにより得られる。
The doubling of points on the elliptic curve is calculated as follows. When a tangent line at a point on the elliptic curve is drawn, the tangent line intersects at another point on the elliptic curve. The intersected 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 Kobritz curve, the result of doubling the point (x 1 , y 1 ) (x 3 , y 3 ) = 2 (x 1 , y 1 ) = (x 1 , y 1 ) + (x 1 , y 1 ) is expressed by Equation 1, Equation 2, and λ = (y 1 / x 1 ) + x 1 (Equation 5)
Is obtained by calculating.

また、コブリッツ曲線上の点に対して、τ倍算と呼ばれる処理の軽い演算を行うことが可能である。点(x1 ,y1 )に対するτ倍算とは、
(x3 ,y3 ) = τ (x1 ,y1 ) = (x1 2 ,y1 2) (式6)
を計算することである。また、
(x4 ,x4 ) + 2 (x, y) = μ (x2 ,y2 ) (式7)
μ = (- 1)a (式8)
が成り立つことが知られており、式7の性質によりτを、
τ2 + 2 = μ τ (式9)
をみたす複素数と考えることができる。
Further, it is possible to perform a light calculation called τ multiplication on points on the Kobritz curve. The τ multiplication for the point (x 1 , y 1 ) is
(x 3 , y 3 ) = τ (x 1 , y 1 ) = (x 1 2 , y 1 2 ) (Equation 6)
Is to calculate Also,
(x 4 , x 4 ) + 2 (x, y) = μ (x 2 , y 2 ) (Equation 7)
μ = (-1) a (Formula 8)
Is known to hold, and τ
τ 2 + 2 = μ τ (Equation 9)
It can be thought of as a complex number that satisfies

コブリッツ曲線では、スカラー値dを、
d = dw [m+a-1]τm+a-1 + dw [m+a-2]τm+a-2 + … + dw [j]τj + … + dw [0] (式10)
-2w-1 < dw [j] < 2w-1 (式11)
と変換することができる。ここで、各iに対してdw [j]は奇数、mはスカラー値dを2進表記した際のビット長である。である。
In the Kobritz curve, the scalar value d is
d = d w [m + a-1] τ m + a-1 + d w [m + a-2] τ m + a-2 +… + d w [j] τ j +… + d w [0 ] (Formula 10)
-2 w-1 <d w [j] <2 w-1 (Equation 11)
And can be converted. Here, for each i, d w [j] is an odd number, and m is a bit length when the scalar value d is expressed in binary. It is.

コブリッツ曲線におけるスカラー値dを、式10、式11を満たすτ進数表現に変換することをτ進エンコード、または単にエンコードという。   Converting the scalar value d in the Kobritz curve into a τ-adic representation that satisfies Expressions 10 and 11 is called τ-adic encoding or simply encoding.

従来,楕円曲線上の点をスカラー倍する場合は、スカラー値dを、
d = d [m]2m + d [m-1]2m - 1 + … + d [0] (式12)
d[i] = 0 または 1 (式13)
の形に変換し、式12、式13を用いてスカラー倍計算を行っている。したがって、桁をずらす際に比較的処理の重い楕円曲線上の2倍算を用いる必要がある。
Conventionally, to multiply a point on an elliptic curve by a scalar, the scalar value d is
d = d [m] 2 m + d [m-1] 2 m - 1 +… + d [0] (Equation 12)
d [i] = 0 or 1 (Equation 13)
The scalar multiplication is performed using Equations 12 and 13. Therefore, it is necessary to use doubling on an elliptic curve that is relatively heavy when shifting digits.

これに対し、コブリッツ曲線上の点のスカラー倍では、スカラー値dを、式10の形に変換し、式10を用いてスカラー倍計算を行う。したがって、桁をずらす際にτ倍算を用いることによって、コブリッツ曲線上の点を高速にスカラー倍できる高速演算方法TNAFw が知られている。 On the other hand, in the scalar multiplication of the point on the Kobritz curve, the scalar value d is converted into the form of Expression 10 and the scalar multiplication is performed using Expression 10. Therefore, a high-speed calculation method TNAF w is known in which a point on the Kobritz curve can be scalar multiplied at high speed by using τ multiplication when shifting digits.

楕円曲線暗号においては、与えられたメッセージの暗号化、復号化、署名の生成またはその検証は、楕円曲線演算を用いて行う必要がある。特に楕円曲線上のスカラー倍の計算は、秘密情報であるスカラー値を用いた暗号処理において用いられる。   In elliptic curve cryptography, encryption, decryption, signature generation, or verification of a given message must be performed using an elliptic curve calculation. In particular, calculation of scalar multiplication on an elliptic curve is used in cryptographic processing using a scalar value that is secret information.

コブリッツ曲線におけるスカラー倍の高速計算手法TNAFw (式10、及び、式11)の詳細が、非特許文献2に記載されている。多項式基底、及び、正規基底については、例えば、非特許文献2に記載されている。また、τ倍算のような性質を持つフロベニウス写像を有する楕円曲線が非特許文献3に記載されている。 Non-Patent Document 2 describes the details of the high-speed calculation method TNAF w (Equation 10 and Equation 11) for scalar multiplication in the Kobritz curve. The polynomial basis and the normal basis are described in Non-Patent Document 2, for example. Non-Patent Document 3 describes an elliptic curve having a Frobenius map having properties such as τ multiplication.

D. Johnson, A. Menezes, “The Elliptic Curve Digital Signature Algorithm (ECDSA)”, Technial Report CORR 99-34, Dept. of C&O, University of Waterloo, Canada.<URL>http://www.cacr.math.uwaterloo.ca/techreports/1999/corr99-34.pdfD. Johnson, A. Menezes, “The Elliptic Curve Digital Signature Algorithm (ECDSA)”, Technial Report CORR 99-34, Dept. of C & O, University of Waterloo, Canada. <URL> http: //www.cacr.math .uwaterloo.ca / techreports / 1999 / corr99-34.pdf J.A.Solinas, “Efficient Arithmetic on Koblitz Curves”, Designs, Codes and Cryptography, 19, Kluwer Academic Publishers (2000), pp.195-249.J.A.Solinas, “Efficient Arithmetic on Koblitz Curves”, Designs, Codes and Cryptography, 19, Kluwer Academic Publishers (2000), pp.195-249. R. P. Gallant, J. L. Lambert, and S. A. Vanstone “Faster Point Multiplication on Elliptic Curves with Efficient Endomorphisms”, In J. Kilian, editor, Advances in Cryptology Proceedings of CRYPTO 2001, volume 2139 of Lecture Notes in Computer Science, 190-200. Springer, 2001.RP Gallant, JL Lambert, and SA Vanstone “Faster Point Multiplication on Elliptic Curves with Efficient Endomorphisms”, In J. Kilian, editor, Advances in Cryptology Proceedings of CRYPTO 2001, volume 2139 of Lecture Notes in Computer Science, 190-200. , 2001.

上述のように楕円曲線暗号を用いれば、計算能力、メモリ容量などのリソースが比較的少なくても暗号処理を行うことが可能である。しかしながら、、一般の計算機に比べ、スマートカード(ICカードともいう)等において利用可能なリソースはさらに少なく、限られたリソース内で暗号処理を最適化する必要がある。   If elliptic curve cryptography is used as described above, it is possible to perform cryptographic processing even when resources such as calculation capability and memory capacity are relatively small. However, there are fewer resources available in smart cards (also referred to as IC cards) or the like compared to general computers, and it is necessary to optimize cryptographic processing within the limited resources.

また、署名検証や鍵交換では、スカラー倍計算の直前に受け取った点のスカラー倍算を行う必要があり、例えば非特許文献2のスカラー倍計算高速化技術TNAFw を用いるとスカラー倍計算の前に前計算テーブルを作成する必要がある。 Further, in signature verification and key exchange, it is necessary to perform scalar multiplication of points received immediately before scalar multiplication. For example, using the TNAF w speeding-up technique of scalar multiplication in Non-Patent Document 2, before scalar multiplication is performed. It is necessary to create a pre-calculation table.

そのため、非特許文献2に記載のスカラー倍計算高速化技術TNAFw では、メモリ使用量が非常に大きくなるため、使用可能なメモリが制限された場合には適用することが難しい。ここで、事前計算テーブルは、式11を満たすjに対し、点j Pからなる。 Therefore, the scalar multiplication calculation speed-up technology TNAF w described in Non-Patent Document 2 has a very large memory usage and is difficult to apply when the available memory is limited. Here, the pre-calculation table is composed of points jP for j satisfying Expression 11.

本発明は、標準化団体(例えば、NIST)が推奨するコブリッツ曲線を用い、スカラー値を数値列にエンコードし、上記数値列から0でない数を一つ選択し、上記エンコードした数値列の各桁を見て上記選択した数と一致する桁で楕円曲線上の加算を実行し、上記選択した数と一致しない桁で楕円曲線上の第二の演算を実行することによって、メモリ使用量、及び、高速演算可能な楕円曲線演算装置を提供する。   The present invention uses a Kobritz curve recommended by a standardization organization (e.g., NIST), encodes a scalar value into a numeric string, selects one non-zero number from the numeric string, and sets each digit of the encoded numeric string. By performing addition on the elliptic curve with digits that match the selected number at a glance, and by performing a second operation on the elliptic curve with digits that do not match the selected number, memory usage and faster An elliptic curve calculation device capable of calculation is provided.

本発明は更に、上記楕円曲線演算方法を用いた、暗号化処理装置、復号化処理装置、署名生成装置、署名検証装置、データ共有装置を提供する。   The present invention further provides an encryption processing device, a decryption processing device, a signature generation device, a signature verification device, and a data sharing device using the above elliptic curve calculation method.

ここで、エンコードとはスカラー値として用いられるような大きな整数(2の160ビット程度)から小さな数の列に変換する操作であり、この小さな数の列を数値列という。   Here, encoding is an operation for converting a large integer (about 2 160 bits) used as a scalar value into a small number of columns, and this small number of columns is called a numerical sequence.

従来技術を用いたスカラー倍計算方法と本発明によるスカラー倍計算方法との違いを図15に記載する。   The difference between the scalar multiplication method using the prior art and the scalar multiplication method according to the present invention is shown in FIG.

図15(a)に記す従来技術を用いたスカラー倍計算方法では、
(1)スカラー値dをエンコードする。
(2)点Pの情報から点3Pを計算する。前計算テーブルは、R1 = P、R2 = 3Pからなる。
(3)点Qを格納するメモリを無限遠点と呼ぶ仮想的な点Oで初期化する。ただし,点Qに用いるメモリはワーク領域であり、前計算テーブルとして用いられるメモリとは異なる。エンコード結果の数値列の各桁を順に調べ,式11のdw [j] が0でない桁になるまで、桁をずらすために点Qに対するτ倍算を行う。このとき点Qの内容は上書きする。
(4)dw [j]が0でない桁において,その数値(図15(a)では,1または3)に応じて,楕円曲線上の加算を行う。加算を行う際に,事前に計算した結果を格納している前計算テーブルを用いる。その数値が1の場合は、R1に格納されているPを読み出し、点Qとの加算を行う。その結果を再び点Qに格納する。
In the scalar multiplication calculation method using the prior art shown in FIG.
(1) Encode the scalar value d.
(2) The point 3P is calculated from the information of the point P. The pre-calculation table includes R 1 = P and R 2 = 3P.
(3) The memory storing the point Q is initialized with a virtual point O called a point at infinity. However, the memory used for the point Q is a work area and is different from the memory used as the pre-calculation table. Each digit of the numerical sequence of the encoding result is examined in order, and τ multiplication is performed on the point Q to shift the digit until d w [j] in Expression 11 becomes a non-zero digit. At this time, the contents of point Q are overwritten.
(4) In a digit where d w [j] is not 0, addition on the elliptic curve is performed according to the value (1 or 3 in FIG. 15A). When performing addition, a pre-calculation table that stores the pre-calculated results is used. If the value is 1, P stored in R 1 is read and added with point Q. The result is stored again at point Q.

同様に、その数値が3の場合は、R2に格納されている3Pを読み出し、点Pとの加算を行う。その結果を再び点Qに格納する。 Similarly, if the number is 3, reads 3P stored in R 2, performs addition between the point P. The result is stored again at point Q.

一方、その数が-1の場合は、R1に格納されているPを読み出し、-Pを求め、点Qと-Pとの加算を行う。その結果を再び点Qに格納する。 On the other hand, when the number is -1, P stored in R 1 is read out, -P is obtained, and point Q and -P are added. The result is stored again at point Q.

同様に、その数値が-3の場合は、R2に格納されている3Pを読み出し、-3Pを求め、点Qと-3Pとの加算を行う。その結果を再び点Qに格納する。 Similarly, if the number is -3 reads 3P stored in R 2, seeking -3P, performs addition between the point Q and -3P. The result is stored again at point Q.

尚、Pから-P、3Pから-3Pを求める計算は、楕円曲線の性質により高速に行うことが可能である。
(5)上記(3)(4)を数値列の全桁(式10の0 〜 m+a-1)を対象に繰り返す。
Note that the calculation for obtaining P from -P and 3P to -3P can be performed at high speed due to the properties of the elliptic curve.
(5) Repeat (3) and (4) above for all the digits of the numerical sequence (0 to m + a-1 in Equation 10).

これに対し,図15(b)に記す本発明によるスカラー倍計算方法では、
(1)数値列からdw [j]が0でない数(これをuとする)を選択し(図15(b)では、まず1を選択している)、前計算テーブルを点R = u Pで初期化する(図15(b)では、まずR = Pで初期化している)。ただし、点Qに用いるメモリはワーク領域であり、前計算テーブルとして用いられるメモリとは異なる。
(2)選択した数が現れる桁になるまで桁をずらすために点Rに対するτ倍算を行う。これより前計算テーブルに格納されている点Rは上書きされる。
(3)選択した数が現れたら,点Rと点Qの加算を行い、その結果を点Qに格納する。
(4)上記(2),(3)を数値列の全桁(式10の0 〜 m+a-1)を対象に繰り返し,
(5)上記(1)〜(4)を式11の-2w-1 < dw [j] < 2w-1を満たす奇数すべてについて繰り返す。
On the other hand, in the scalar multiplication calculation method according to the present invention shown in FIG.
(1) Select a number in which d w [j] is not 0 (assuming this is u) from the numerical sequence (in FIG. 15B, 1 is first selected), and the previous calculation table is represented by a point R = u Initialization is performed with P (in FIG. 15B, initialization is first performed with R = P). However, the memory used for the point Q is a work area and is different from the memory used as the pre-calculation table.
(2) τ multiplication is performed on the point R to shift the digit until the selected number appears. The point R stored in the previous calculation table is overwritten.
(3) When the selected number appears, the point R and the point Q are added, and the result is stored in the point Q.
(4) Repeat (2) and (3) above for all digits (0 to m + a-1 in Equation 10)
(5) The above (1) to (4) are repeated for all odd numbers satisfying −2 w−1 <d w [j] <2 w−1 in Expression 11.

以上のとおり、本発明によれば、点Rに対する計算結果を更新しつつ格納するメモリがあればよく,前計算テーブルは楕円曲線上の1点分で済む。   As described above, according to the present invention, it suffices if there is a memory for storing the calculation result for the point R while updating it, and the pre-calculation table is sufficient for one point on the elliptic curve.

図15(a)(b)の例では、簡単のためw = 3の場合として説明しているが、図15(a)に示す従来技術を製品に実装する際は、通常、w = 5 もしくはw = 6を選択するため、前計算テーブルには楕円曲線上の16個の点または32個の点を格納する必要がある。   In the example of FIGS. 15A and 15B, the case of w = 3 is described for the sake of simplicity. However, when the conventional technique shown in FIG. 15A is mounted on a product, usually, w = 5 or In order to select w = 6, it is necessary to store 16 points or 32 points on the elliptic curve in the pre-calculation table.

そのため,例えば点1個を格納するために必要なメモリ領域が50バイト程度の場合、従来技術における前計算テーブルのサイズが800バイト程度必要となるのに対し、本発明における前計算テーブルのサイズは50バイト程度で済むことになる。   Therefore, for example, if the memory area required to store one point is about 50 bytes, the size of the precalculation table in the prior art requires about 800 bytes, whereas the size of the precalculation table in the present invention is It will take about 50 bytes.

以上の通りであるから,従来技術を用いてスカラー倍計算を行う場合、前計算テーブルに格納する点の情報は、通常16個または32個必要となるのに対し、本発明によれば、前計算テーブルにはコブリッツ曲線上の一点の情報を格納し、その内容を上書きしていくことによってスカラー倍計算を行うため、前計算テーブルのサイズは1/16または1/32となる。したがって、メモリ使用量に優れた高速計算可能なスカラー倍計算装置を提供可能になる。   As described above, when performing the scalar multiplication using the conventional technique, the information of the points to be stored in the pre-calculation table normally requires 16 pieces or 32 pieces. Since the information of one point on the Kobritz curve is stored in the calculation table and the content is overwritten to perform scalar multiplication, the size of the previous calculation table is 1/16 or 1/32. Therefore, it is possible to provide a scalar multiplication apparatus capable of high-speed calculation with excellent memory usage.

より具体的な本発明の一態様は,楕円曲線上の加算とは異なる第二の演算を実行することができる楕円曲線を用いて、スカラー値と上記楕円曲線上の点とからスカラー倍点を計算する楕円曲線暗号におけるスカラー倍計算装置であって、上記スカラー値を数値列にエンコードするステップと、上記数値列から0でない数を一つ選択するステップと、上記選択した数と同じ絶対値をもつ桁において,上記スカラー倍点を求める演算を行うステップと,0でなく,かつ,上記数値列を構成する数について,上記選択するステップと上記演算を行うステップを繰り返すステップと、を実行することを特徴とする。   In a more specific aspect of the present invention, a scalar multiple is obtained from a scalar value and a point on the elliptic curve by using an elliptic curve that can execute a second operation different from addition on the elliptic curve. A scalar multiplication calculation device for elliptic curve cryptography to be calculated, the step of encoding the scalar value into a numerical sequence, the step of selecting one non-zero number from the numerical sequence, and the same absolute value as the selected number A step of performing an operation for obtaining the scalar multiple in a digit having, and a step of repeating the step of selecting and the step of performing the operation for a number that is not 0 and constitutes the numerical sequence. It is characterized by.

さらに,上記スカラー倍計算装置は,上記エンコードするステップを実行するエンコード部と,上記選択するステップと,上記計算するステップとを実行する実計算部と,からなるものであってもよい。   Furthermore, the scalar multiplication calculation device may include an encoding unit that executes the encoding step, an actual calculation unit that executes the selection step, and the calculation step.

さらに,上記楕円曲線はコブリッツ曲線であってもよい。   Further, the elliptic curve may be a Kobritz curve.

さらに,上記第二の演算はτ倍算であってもよい。   Further, the second calculation may be τ multiplication.

さらに,上記実計算部は、さらに、基底変換するステップを実行するものであってもよい。   Further, the actual calculation unit may further execute a step of basis conversion.

さらに,上記数値列から0でない数を一つ選択するステップは、上記数値列の各桁を構成する0以外でかつ未選択の数から数を1つ選択し、上記選択した数に対応する前計算を実行することにより前計算点を求め、上記前計算点をあらかじめ定められた前計算テーブルに格納する第一のステップからなり、上記スカラー倍点を求める演算を行うステップは、上記数値列の、上記選択した数と同じ絶対値を持つ数を持つ桁がある場合に,当該桁になるまで,上記前計算テーブルに格納されている上記前計算点に対して上記楕円曲線上の第二の演算を実行し、その結果を上記前計算テーブルの上記前計算点に上書きする第二のステップと、上記数値列の、上記選択した数と同じ絶対値を持つ桁において,上記前計算テーブルに格納されている上記前計算点を利用して上記楕円曲線上の加算を実行する第三のステップと、第二、第三のステップを繰り返す第四のステップと,からなり、上記数値列の各桁を構成する0以外の未選択の数がある場合に,上記第一から上記第四のステップを繰り返す第五のステップからなるものであってもよい。   Further, the step of selecting one non-zero number from the numerical sequence includes selecting one number from non-zero and non-selected numbers constituting each digit of the numerical sequence, and selecting a number corresponding to the selected number. Comprising the first step of obtaining a previous calculation point by executing a calculation and storing the previous calculation point in a predetermined previous calculation table, the step of calculating the scalar multiple is performed by If there is a digit having a number having the same absolute value as the selected number, the second point on the elliptic curve with respect to the previous calculation point stored in the previous calculation table until that digit is reached. Executes the operation and stores the result in the previous calculation table in the second step of overwriting the previous calculation point in the previous calculation table and the digit having the same absolute value as the selected number in the numeric string. The above total is It consists of a third step for performing addition on the elliptic curve using points, and a fourth step for repeating the second and third steps, and other than 0 constituting each digit of the numerical sequence. When there is an unselected number, it may consist of a fifth step that repeats the first to fourth steps.

さらに,上記エンコードするステップは、さらに、Φw (d) = (dR+dT*tw mods 2w)で与えられる,上記スカラー値dに対するΦw 関数の値を計算するステップを含むものであってもよい。なお、Φ 関数とは,大きな整数を小さな数の列にエンコードするステップにおいて、上記数列の各項を計算する際に用いられる関数であり,その詳細は非特許文献2に記載されている。 Further, the encoding step may further include a step of calculating a value of the Φw function for the scalar value d given by Φw (d) = (dR + dT * tw mods 2w). Note that the Φ w function is a function used when calculating each term of the above-described number sequence in the step of encoding a large integer into a small number sequence, and details thereof are described in Non-Patent Document 2.

また,本発明の他の態様は,データから署名データを生成する署名部と、上記署名データを作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する署名生成装置であって、
上記スカラー倍計算部は、上記スカラー倍計算装置を用いて,上記スカラー倍点を計算するステップを実行することを特徴とする。
According to another aspect of the present invention, there is provided a signature generation apparatus including a signature unit that generates signature data from data, and a scalar multiplication calculation unit that calculates a scalar multiple necessary for creating the signature data. And
The scalar multiplication unit performs the step of calculating the scalar multiplication point using the scalar multiplication apparatus.

また,本発明の他の態様は,データと署名データとから署名検証結果を出力する署名検証部と、上記署名検証結果を作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する署名検証装置であって、上記スカラー倍計算部は、上記スカラー倍計算装置を用いて,上記スカラー倍点を計算するステップを実行することを特徴とする。   According to another aspect of the present invention, a signature verification unit that outputs a signature verification result from data and signature data, a scalar multiple calculation unit that calculates a scalar multiple necessary for generating the signature verification result, And the scalar multiplication unit executes the step of calculating the scalar multiple using the scalar multiplication apparatus.

また,本発明の他の態様は,データから暗号化データを生成する暗号部と、上記暗号化データを作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する暗号化装置であって、上記スカラー倍計算部は、上記スカラー倍計算装置を用いて,上記スカラー倍点を計算するステップを実行することを特徴とする。   According to another aspect of the present invention, there is provided an encryption apparatus comprising: an encryption unit that generates encrypted data from data; and a scalar multiple calculation unit that calculates a scalar multiple necessary for creating the encrypted data. The scalar multiplication calculation unit executes the step of calculating the scalar multiple using the scalar multiplication calculation device.

また,本発明の他の態様は,暗号化データから復号化データを生成する復号部と、上記復号化データを作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する復号化装置であって、上記スカラー倍計算部は、上記スカラー倍計算装置を用いて,上記スカラー倍点を計算するステップを実行することを特徴とする。   Another aspect of the present invention provides a decryption unit that includes a decryption unit that generates decryption data from encrypted data, and a scalar multiple calculation unit that calculates a scalar multiple necessary for creating the decryption data. The scalar multiplication calculation unit executes the step of calculating the scalar multiplication point using the scalar multiplication calculation device.

本発明によれば、メモリ使用量が少なく,かつ,高速計算可能なスカラー倍演算装置を実現することができる。   According to the present invention, it is possible to realize a scalar multiplication unit that uses a small amount of memory and can perform high-speed calculations.

以下、本発明の実施例を図面により説明する。     Embodiments of the present invention will be described below with reference to the drawings.

図1はネットワーク142によって接続された本実施形態による楕円曲線演算方法を適用したコンピュータA101、コンピュータB121がネットワーク142により接続されたシステム構成を示すものである。図1の暗号通信システムにおけるコンピュータA101でメッセ―ジの暗号化を行うには、Pm + k (d Q)及びk Qを計算して出力し、コンピュータB121で暗号文の復号化を行うには、秘密鍵d及びk Qより-d (k Q)を計算し、
(Pm + k (d Q))-d (k Q) (式14)
を計算して出力すればよい。
FIG. 1 shows a system configuration in which a computer A 101 and a computer B 121 to which an elliptic curve calculation method according to this embodiment connected by a network 142 is applied are connected by a network 142. Message on a computer A101 in the cryptographic communication system of FIG. 1 - To perform encryption di, and calculates and outputs P m + k (d Q) and k Q, the decrypts the ciphertext with computer B121 Calculates -d (k Q) from the secret keys d and k Q
(P m + k (d Q))-d (k Q) (Formula 14)
Can be calculated and output.

ここでPm はメッセージ、kは乱数、dは秘密鍵を示す定数、Qは定点、d Qは公開鍵を示す点である。ネットワーク142には、Pm + k (d Q), kQのみ送信され、メッセージPm を復元するためには、k d Q、すなわちk Qのd倍を計算する必要がある。ところが、秘密鍵dはネットワーク142には送信されないため、秘密鍵dを保持しているものだけが、Pm を復元できることになる。 Here, P m is a message, k is a random number, d is a constant indicating a secret key, Q is a fixed point, and d Q is a point indicating a public key. Only P m + k (d Q), kQ is transmitted to the network 142, and in order to restore the message P m , it is necessary to calculate kd Q, that is, d times k Q. However, since the private key d is the network 142 is not sent, only those holding the secret key d is becomes possible to restore the P m.

図1において、コンピュータA101は、CPU113やコプロセッサ114などの演算装置、RAM103、ROM106や外部記憶装置107などの記憶装置、コンピュータ外部とのデータ入出力を行う入出力インタフェース110を装備しており、外部にはコンピュータA101をユーザが操作するためのディスプレイ108、キーボード109、着脱可能な可搬型記憶媒体の読み書き装置などが接続されている。   In FIG. 1, a computer A101 is equipped with an arithmetic device such as a CPU 113 and a coprocessor 114, a storage device such as a RAM 103, a ROM 106 and an external storage device 107, and an input / output interface 110 for performing data input / output with the outside of the computer. A display 108, a keyboard 109, and a removable portable storage medium read / write device for operating the computer A101 by the user are connected to the outside.

更にコンピュータA101は、RAM103、ROM106や外部記憶装置107などの記憶装置によって、記憶部102を実現し、CPU113やコプロセッサ114などの演算装置が、記憶部102に格納されたプログラムを実行することにより、データ処理部112、スカラー倍計算部115とそれらに含まれる各処理部を実現する。データ処理部112は、本実施形態においては、暗号化処理部112として機能し、入力されたメッセージの暗号化を行う。   Further, the computer A101 realizes the storage unit 102 by a storage device such as the RAM 103, the ROM 106, and the external storage device 107, and the arithmetic device such as the CPU 113 and the coprocessor 114 executes the program stored in the storage unit 102. The data processing unit 112, the scalar multiplication calculation unit 115, and the processing units included therein are realized. In the present embodiment, the data processing unit 112 functions as the encryption processing unit 112 and encrypts the input message.

スカラー倍計算部115は、暗号処理部112で暗号化を行うのに必要なパラメタを計算する。記憶部102は、定数104(例えば、楕円曲線の定義式や楕円曲線上の定点である)、秘密情報105(例えば、秘密鍵である)などを記憶している。コンピュータB121は、コンピュータA101と同様のハードウェア構成を備える。   The scalar multiplication calculation unit 115 calculates parameters necessary for the encryption processing unit 112 to perform encryption. The storage unit 102 stores a constant 104 (for example, an elliptic curve definition formula or a fixed point on the elliptic curve), secret information 105 (for example, a secret key), and the like. The computer B121 has the same hardware configuration as the computer A101.

更にコンピュータB121は、RAM123、ROM126や外部記憶装置127などの記憶装置によって、記憶部122を実現し、CPU133やコプロセッサ134などの演算装置が、記憶部122に格納されたプログラムを実行することにより、データ処理部132、スカラー倍計算部135とそれらに含まれる各処理部を実現する。データ処理部132は、本実施形態においては、復号化処理部132として機能し、暗号化されたメッセージである暗号文141の復号化を行う。   Further, the computer B121 realizes the storage unit 122 by a storage device such as the RAM 123, the ROM 126, and the external storage device 127, and the arithmetic device such as the CPU 133 and the coprocessor 134 executes the program stored in the storage unit 122. The data processing unit 132, the scalar multiplication calculation unit 135, and the processing units included therein are realized. In the present embodiment, the data processing unit 132 functions as the decryption processing unit 132 and decrypts the ciphertext 141 that is an encrypted message.

スカラー倍計算部135は、復号化処理部132で復号化を行うのに必要なパラメタを計算する。記憶部122は、定数124(例えば、楕円曲線の定義式や楕円曲線上の定点である)、秘密情報125(例えば、秘密鍵である。)などを記憶している。なお、上記各プログラムは、あらかじめ、上記コンピュータ内の記憶部に格納されていても良いし、必要なときに、入出力インタフェース110もしくは130と上記コンピュータA101もしくはB121が利用可能な媒体を介して、他の装置から上記記憶部に導入されてもよい。媒体とは、たとえば、入出力インタフェース110もしくは130に着脱可能な記憶媒体、または通信媒体(すなわちネットワークまたはネットワークを伝搬する搬送波やディジタル信号)を指す。   The scalar multiplication calculation unit 135 calculates parameters necessary for the decoding processing unit 132 to perform decoding. The storage unit 122 stores a constant 124 (for example, an elliptic curve definition formula or a fixed point on the elliptic curve), secret information 125 (for example, a secret key), and the like. Each of the above programs may be stored in advance in a storage unit in the computer, or when necessary, via a medium that can be used by the input / output interface 110 or 130 and the computer A101 or B121. You may introduce | transduce into the said memory | storage part from another apparatus. The medium refers to, for example, a storage medium that is detachable from the input / output interface 110 or 130, or a communication medium (that is, a network or a carrier wave or a digital signal that propagates through the network).

図2は、コンピュータA101、コンピュータB121の各処理部が行う情報の受け渡しの様子を示したものである。   FIG. 2 shows how information is transferred by each processing unit of the computer A101 and the computer B121.

次に、図1のコンピュータA101が、入力されたメッセージを暗号化する場合の動作について説明する。なお、本明細書におけるメッセージとはディジタル化されたデータであれば良く、テキスト、画像、映像、音などの種類は問わない。暗号化処理部112は、入出力インタフェース110を介して、平文メッセージ(図2の入力メッセージ204)を受け取ると、入力された平文メッセージのビット長が予め定めたビット長か否かを判断する。予め定めたビット長より長い場合には、予め定めたビット長となるように平文メッセージを区切る。   Next, an operation when the computer A101 in FIG. 1 encrypts an input message will be described. Note that the message in the present specification may be any digitized data, and may be any type of text, image, video, sound, or the like. When receiving the plaintext message (input message 204 in FIG. 2) via the input / output interface 110, the encryption processing unit 112 determines whether or not the bit length of the input plaintext message is a predetermined bit length. When the bit length is longer than a predetermined bit length, the plaintext message is divided so as to have a predetermined bit length.

以下、所定のビット長に区切られている部分メッセージ(単にメッセージともいう)について説明する。暗号化処理部112は、メッセージのビット列によって表される数値をx座標(x1 )にもつ楕円曲線上の点Pm のy座標の値(y1 )を計算する。コブリッツ曲線は式4で表わされるので、これよりy座標の値を求めることができる。 Hereinafter, a partial message (also simply referred to as a message) divided into a predetermined bit length will be described. The encryption processing unit 112 calculates the y coordinate value (y 1 ) of the point P m on the elliptic curve having the numerical value represented by the bit string of the message at the x coordinate (x 1 ). Since the Kobritz curve is expressed by Equation 4, the value of the y coordinate can be obtained from this.

次に、暗号化処理部112は、乱数kを生成する。そして、記憶部102に格納されている定数104から読み出した(図2の205)公開鍵d QとQのx座標と、求めたy座標の値と乱数kとをスカラー倍計算部115へ送る(図2の206)。スカラー倍計算部115は、Qのx座標、y座標の値、乱数kによるスカラー倍点(xd1 ,yd1 ) = k Qと、公開鍵d Qのx座標、y座標の値、乱数によるスカラー倍点(xd2 ,yd2 ) = k (d Q)とを計算し、計算されたスカラー倍点を暗号化処理部112へ送る(図2の207)。 Next, the encryption processing unit 112 generates a random number k. Then, the public key dQ read from the constant 104 stored in the storage unit 102 (205 in FIG. 2), the x coordinate of Q, the value of the obtained y coordinate, and the random number k are sent to the scalar multiplication unit 115. (206 in FIG. 2). The scalar multiplication unit 115 uses the x-coordinate and y-coordinate values of Q, the scalar double point (x d1 , y d1 ) = k Q, and the x-coordinate of the public key d Q, the y-coordinate value, and a random number. The scalar multiple (x d2 , y d2 ) = k (d Q) is calculated, and the calculated scalar multiple is sent to the encryption processing unit 112 (207 in FIG. 2).

暗号化処理部112は、送られたスカラー倍点を用いて、暗号化処理を行う。例えば、コブリッツ曲線では、k QとPm + k (d Q)を計算する。すなわち、
xe1 = xd1 (式15)
xe2 = λ2 + λ + x1 + xd2 + a (式16)
λ = (y1 + yd2 )/(x1 + xd2 ) (式17)
を計算し、暗号化されたメッセージxe1 ,xe2 を得る。
The encryption processing unit 112 performs encryption processing using the sent scalar multiple. For example, in the Kobritz curve, k Q and P m + k (d Q) are calculated. That is,
x e1 = x d1 (Formula 15)
x e2 = λ 2 + λ + x 1 + x d2 + a (Equation 16)
λ = (y 1 + y d2 ) / (x 1 + x d2 ) (Equation 17)
To obtain encrypted messages x e1 and x e2 .

コンピュータA101は暗号化処理部112で暗号化された1つ以上の部分メッセージから暗号化された出力メッセージを組み立てる(図2の208)。
コンピュータA101は、暗号化された出力メッセージをデータ141として入出力インタフェース110より出力し、ネットワーク142を介してコンピュータB121へ転送する。
なお、図2の記憶部102からの情報読み出しは、スカラー計算部115へ当該情報を送る前で有れば、入力メッセージを受け付ける前であっても良い。
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 computer A101 outputs the encrypted output message as data 141 from the input / output interface 110, and transfers it to the computer B121 via the network 142.
Note that the information read from the storage unit 102 in FIG. 2 may be performed before the input message is received as long as the information is transmitted to the scalar calculation unit 115.

次に、コンピュータB121が、暗号化されたメッセージ141を復号化する場合の動作について、図2を参照しつつ説明する。   Next, the operation when the computer B 121 decrypts the encrypted message 141 will be described with reference to FIG.

復号化処理部132(図2のデータ処理部112)は、入出力インタフェース130を介して、暗号化されたデータ141(図2の入力メッセージ204)が入力されると、入力された暗号化されたデータ141のビット長が予め定めたビット長か否かを判断する。予め定めたビット長より長い場合には、予め定めたビット長となるように暗号化されたデータを区切る。   When the encrypted data 141 (input message 204 in FIG. 2) is input via the input / output interface 130, the decryption processing unit 132 (the data processing unit 112 in FIG. 2) receives the input encrypted data. It is determined whether the bit length of the data 141 is a predetermined bit length. When the bit length is longer than the predetermined bit length, the encrypted data is divided so as to have the predetermined bit length.

以下、所定のビット長に区切られている部分データ(単にデータともいう)について説明する。データ141のビット列によって表される数値をx座標にもつ楕円曲線上のy座標の値を計算する。暗号化されたメッセージがxe1 ,xe2 のビット列であり、コブリッツ曲線ではy座標の値ye1 ,ye2
ye1 2 + xe1 ye1 = xe1 3 + a xe1 2 + 1,(a = 0 or 1) (式18)
ye2 2 + xe2 ye2 = xe2 3 + a xe2 2 + 1,(a = 0 or 1) (式19)
から得ることができる。
Hereinafter, partial data (also simply referred to as data) divided into a predetermined bit length will be described. The value of the y coordinate on the elliptic curve having the numerical value represented by the bit string of the data 141 at the x coordinate is calculated. The encrypted message is a bit string of x e1 and x e2 , and the y-coordinate values y e1 and y e2 are
y e1 2 + x e1 y e1 = x e1 3 + ax e1 2 + 1, (a = 0 or 1) (Equation 18)
y e2 2 + x e2 y e2 = x e2 3 + ax e2 2 + 1, (a = 0 or 1) (Equation 19)
Can be obtained from

復号化処理部132は、記憶部122(図2の102)に格納されている秘密情報125から読み出した(図2の205)秘密鍵dと、x座標、y座標の値(xe1 ,ye1 )を、スカラー倍計算部135(図2の115)へ送る(図2の206)。スカラー倍計算部135は、x座標、y座標の値、秘密情報dからスカラー倍点(xd3 ,yd3 ) = d(xe1 ,ye1 )を計算する。スカラー倍計算部135は、計算されたスカラー倍点を復号化処理部132へ送る(図2の207)。 The decryption processing unit 132 reads the secret key d (205 in FIG. 2) from the secret information 125 stored in the storage unit 122 (102 in FIG. 2), and the x and y coordinate values (x e1 , y e1 ) is sent to the scalar multiplication unit 135 (115 in FIG. 2) (206 in FIG. 2). The scalar multiplication unit 135 calculates a scalar multiple (x d3 , y d3 ) = d (x e1 , y e1 ) from the x-coordinate and y-coordinate values and the secret information d. The scalar multiplication calculator 135 sends the calculated scalar multiple to the decoding processor 132 (207 in FIG. 2).

復号化処理部132は、送られたスカラー倍点を用いて、復号化処理を行う。例えば、暗号化されたメッセージが、xe1 ,xe2 のビット列であり、コブリッツ曲線では、(Pm + k (d Q)) d (k Q) = (xe2 ,ye2 ) - (xd3 ,yd3 )を計算することにより達成する。すなわち、
xf1 = λ2 + λ + xe2 + xd3 + a (式20)
λ = (ye2 + yd3 )/(xe2 + xd3 ) (式21)
を計算し、暗号化される前の部分メッセージx1に相当するxf1 を得る。
The decoding processing unit 132 performs a decoding process using the sent scalar multiple. For example, the encrypted message is a bit string of x e1 and x e2 , and (P m + k (d Q)) d (k Q) = (x e2 , y e2 )-(x d3 , y d3 ). That is,
x f1 = λ 2 + λ + x e2 + x d3 + a (Equation 20)
λ = (y e2 + y d3 ) / (x e2 + x d3 ) (Formula 21)
And x f1 corresponding to the partial message x1 before being encrypted is obtained.

コンピュータB121は、復号化処理部132で復号化された部分メッセージから平文メッセージを組み立て(図2の208)、入出力インタフェース130を介して、ディスプレイ128などから出力する。   The computer B 121 assembles a plaintext message from the partial message decrypted by the decryption processing unit 132 (208 in FIG. 2), and outputs it from the display 128 or the like via the input / output interface 130.

以上のように、暗号化処理や復号化処理では、スカラー倍計算を行う必要がある。   As described above, it is necessary to perform scalar multiplication in encryption processing and decryption processing.

次に、コンピュータA101が、暗号化処理を行う場合やコンピュータB121が、復号化処理を行う場合の、スカラー倍計算部115の処理を詳細に説明する。   Next, the processing of the scalar multiplication unit 115 when the computer A101 performs encryption processing or when the computer B121 performs decryption processing will be described in detail.

実施例1では、図3で示されるスカラー倍計算部115の機能ブロックを用いる。スカラー倍計算部115(図1の135)は、エンコード部302、実計算部303からなる。エンコード部302は、剰余取得部321、剰余変換部322、繰り返し判定部323、δ剰余変換部324、Φw 関数計算部325、格納部326からなる。実計算部303は、ビット値判定部331、加算部332、τ倍算部333、繰り返し判定部334からなる。 In the first embodiment, the functional block of the scalar multiplication calculator 115 shown in FIG. 3 is used. The scalar multiplication calculation unit 115 (135 in FIG. 1) includes an encoding unit 302 and an actual calculation unit 303. The encoding unit 302 includes a residue acquisition unit 321, a residue conversion unit 322, an iterative determination unit 323, a δ residue conversion unit 324, a Φ w function calculation unit 325, and a storage unit 326. The actual calculation unit 303 includes a bit value determination unit 331, an addition unit 332, a τ multiplication unit 333, and a repetition determination unit 334.

スカラー倍計算部115がスカラー値d、及び、楕円曲線上の点Pから、楕円曲線におけるスカラー倍点d Pを計算する第1の計算方法を説明する。第1の計算方法では、前計算テーブルを用いずにスカラー倍計算を行えるという特徴がある。そのため、スカラー倍計算の直前に受け取った点のスカラー倍計算では、前計算テーブルを用いることなく、直接、スカラー倍点が計算できる。したがって、前計算テーブルを格納するメモリを節約することができる。スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部302は、入力されたスカラー値dを数値列dw [j]にエンコードする。 A first calculation method in which the scalar multiplication calculation unit 115 calculates the scalar multiplication point d P in the elliptic curve from the scalar value d and the point P on the elliptic curve will be described. The first calculation method is characterized in that scalar multiplication can be performed without using a pre-calculation table. Therefore, in the scalar multiplication of the point received immediately before the scalar multiplication calculation, the scalar multiplication point can be directly calculated without using the pre-calculation table. Therefore, the memory for storing the pre-calculation table can be saved. When the scalar multiplication unit 115 receives the scalar value d and the point P on the elliptic curve from the decoding processing unit 132, the encoding unit 302 encodes the input scalar value d into a numeric string d w [j].

これは、
d P = d' P (式22)
をみたす整数d'に対して、
d' = dw [m+a-1]τm+a-1 + dw [m+a-2]τm+a-2 + … + dw [j]τj + … + dw [0] (式23)
-2w-1 < dw [j] < 2w-1 (式24)
をみたすdw [j]に、スカラー値dを変換することに相当する。ただし、スカラー値dを数値列dw [j]にエンコードするには、スカラー値dをτw で割った余りをdw [j]とし、この操作を繰り返す。その詳細な計算方法については、非特許文献2に記載されている。
this is,
d P = d 'P (Equation 22)
For an integer d 'that satisfies
d '= d w [m + a-1] τ m + a-1 + d w [m + a-2] τ m + a-2 +… + d w [j] τ j +… + d w [ 0] (Formula 23)
-2 w-1 <d w [j] <2 w-1 (Equation 24)
This corresponds to converting the scalar value d into d w [j] that satisfies However, in order to encode the scalar value d into the numerical sequence d w [j], the remainder obtained by dividing the scalar value d by τ w is d w [j], and this operation is repeated. The detailed calculation method is described in Non-Patent Document 2.

ここで、mはスカラー値d'を2進表記した場合のビット長であり、wはあらかじめ定めた小さな自然数で、ウィンドウ幅と呼ばれる。本実施例では、w = 4、点Pは正規基底で表わされているものとする。   Here, m is the bit length when the scalar value d ′ is expressed in binary, and w is a small natural number determined in advance and is called the window width. In the present embodiment, it is assumed that w = 4 and the point P is represented by a normal basis.

実計算部303は、数値列dw [j]を用いてスカラー倍点d Pを計算する。 The actual calculation unit 303 calculates a scalar multiple dP using the numerical sequence d w [j].

次にエンコード部302、実計算部303の行う各処理について詳細に説明する。   Next, each process performed by the encoding unit 302 and the actual calculation unit 303 will be described in detail.

図4を用いて、エンコード部302がスカラー値dをエンコードする方法を説明する。   A method in which the encoding unit 302 encodes the scalar value d will be described with reference to FIG.

δ剰余変換部324は、変数d'にd modδを、β|u| にc0 を、γ|u| にc1 をそれぞれ代入する(401)。ただし、δとスカラー値dに対してd modδの計算方法については非特許文献2に記載されている。 δ residue transform unit 324, a d Modderuta variable d ', β | u | in the c 0, γ | u | To assign c 1 respectively (401). However, Non-Patent Document 2 describes a method for calculating d mod δ with respect to δ and the scalar value d.

ここで、δは
δ = (τm 1)/(τ - 1) (式25)
で表わされる数であり、
d modδは、
d' = d - kδ (式26)
d' = c0 + c1 τ (式27)
なる形で表される。ここで、k,c0 ,c1 はすべて整数である。
Where δ is δ = (τ m 1) / (τ-1) (Equation 25)
Is a number represented by
d modδ is
d '= d-kδ (Equation 26)
d '= c 0 + c 1 τ (Equation 27)
It is expressed in the form Here, k, c 0 and c 1 are all integers.

d modδをエンコードすると、その数値列の長さはスカラー値dをエンコードした数値列の長さより短くなることが知られている。すなわち、コブリッツ曲線のスカラー倍計算における加算、及び、τ倍算の回数を減らすことにより、スカラー倍計算の高速化が図ることが可能になる。   It is known that when d modδ is encoded, the length of the numerical sequence is shorter than the length of the numerical sequence encoding the scalar value d. That is, it is possible to increase the speed of the scalar multiplication by reducing the number of additions and τ multiplications in the scalar multiplication of the Kobritz curve.

変数iを0で初期化し、j0 、j1 、…、j2 w-1 -1 にそれぞれ0を代入する(402)。 The variable i is initialized with 0, and 0 is assigned to each of j 0 , j 1 ,..., J 2 w−1 −1 (402).

繰り返し判定部323は、c0 ≠ 0またはc1 ≠ 0であるかどうかを判定する。この2つの条件のうち、どちらか一方が成立すれば、ステップ411へ行く。2つの条件のいずれも成立しない場合、ステップ421へ行く(403)。 The repetition determination unit 323 determines whether c 0 ≠ 0 or c 1 ≠ 0. If either of these two conditions is met, go to step 411. If neither of the two conditions is satisfied, the process goes to step 421 (403).

ステップ403でいずれかの条件が成立する場合、uにc0 + tw * c1 mods 2w を代入する(411)。 If any of the conditions is satisfied in step 403, c 0 + t w * c 1 mods 2 w is substituted for u (411).

繰り返し判定部323は、uが奇数であるかどうかを判定する。条件が成立する場合、ステップ413へ行く。条件が成立しない場合、ステップ415へ行く(412)。   The repetition determination unit 323 determines whether u is an odd number. If the condition is met, go to step 413. If the condition is not satisfied, go to step 415 (412).

ステップ412で条件が成立する場合、dw [u][ju ]にsign(u) * iを、ju にju + 1をそれぞれ代入する(413)。 If the condition is satisfied in step 412, the d w [u] [j u ] to sign (u) * i, the values are the j u + 1 to j u (413).

c0 にc0 - sign(u) * β|u| を、c1 にc1 - sign(u) * γ|u| をそれぞれ代入する(414)。 to c 0 c 0 - sign (u ) * β | u | a, c 1 to c 1 - sign (u) * γ | u | substitutes respective (414).

iにi + 1、tにc0 を、c0 にc1 + μc0 /2を、c1 に- t/2を、それぞれ代入し、ステップ403へ行く(415)。 The c 0 to i + 1, t to i, a c 1 + μc 0/2 to c 0, c 1 in - a t / 2, substituting respectively, goes to step 403 (415).

dw [0][j0 ]、…、dw [2w-1 -1][ j2 w-1 -1 ]のそれぞれに, Ωをそれぞれ代入する(421)。ここで、Ωは終端を表わす記号である。 例えば、Ωとして、
Ω = 2L
とすることが可能である。ここで、Lは、2m < 2L を満たす整数である。
Ω = 2L とおくと、Ωのバイナリ表現は、最上位ビットのみが1であり、本実施例の実装が行いやすくなる。
Substitute Ω for each of d w [0] [j 0 ], ..., d w [2 w-1 -1] [j 2 w-1 -1 ] (421). Here, Ω is a symbol representing a termination. For example, as Ω,
Ω = 2 L
Is possible. Here, L is an integer satisfying 2 m <2 L.
Putting an Omega = 2 L, the binary representation of the Omega, only the most significant bit is 1, implementation of this embodiment is easily performed.

エンコード部302は、dw [0]、…、dw [j2 w-1 -1]を実計算部303へ出力する(422)。 The encoding unit 302 outputs d w [0],..., D w [j 2 w−1 −1 ] to the actual calculation unit 303 (422).

次に図5を用いて、実計算部303がエンコードされたスカラー値、楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。   Next, a method for calculating the scalar multiple in the elliptic curve from the encoded scalar value and the point on the elliptic curve will be described with reference to FIG.

w = 4の場合、各iに対してdw [i] は、± 1、±3、±5、± 7である。 For w = 4, for each i, d w [i] is ± 1, ± 3, ± 5, ± 7.

Q、R、u、dw [u]を入力し、Rを(u mod τw )P、jを0、kを0でそれぞれ初期化する(501)。 Q, R, u, and d w [u] are input, R is initialized with (u mod τ w ) P, j is set to 0, and k is set to 0 (501).

iに| dw[u][j] |を、Rにτj-k Rを、kにiをそれぞれ代入する(511)。
ここで、数xに対して、| x |はxの絶対値を表わす数である。
| d w [u] [j] | is substituted for i, τ jk R is substituted for R, and i is substituted for k (511).
Here, for the number x, | x | is a number representing the absolute value of x.

繰り返し判定部334は、dw [u][j] > 0であるかどうかを判定する。条件が成立すれば、ステップ513へ行く。条件が成立しない場合、ステップ514へ行く(512)。 The repetition determining unit 334 determines whether d w [u] [j]> 0. If the condition is met, go to step 513. If the condition is not satisfied, go to step 514 (512).

加算部332は、点Qと点Rを加算し、その結果をQに格納する(513)。   The adding unit 332 adds the point Q and the point R, and stores the result in Q (513).

加算部332は、点Qと点- Rを加算し、その結果をQに格納する(514)。   The adder 332 adds the point Q and the point -R, and stores the result in Q (514).

jにj + 1を代入する(515)。   j + 1 is substituted for j (515).

繰り返し判定部334は、dw [u][j] ≠Ωであるかどうかを判定する。条件が成立すれば、ステップ511へ行く。条件が成立しない場合、ステップ521へ行く(516)。 The iterative determination unit 334 determines whether d w [u] [j] ≠ Ω. If the condition is met, go to step 511. If the condition is not satisfied, go to step 521 (516).

実計算部302は、点Qを出力する(521)。   The actual calculation unit 302 outputs the point Q (521).

ステップ501からステップ521までの計算をi=0からi=3まで繰り返す。   The calculation from step 501 to step 521 is repeated from i = 0 to i = 3.

エンコード部302が行う処理により出力されるdw [j]は、式22、式23、式24をみたす。この理由は、以下のとおりである。 ステップ401で、d'にd modδを代入している。そのため、d' = d + kδと適当な数kを用いて表わすことができる。他方、コブリッツ曲線上では、点δPは無限遠点となることが知られており、そのため式22が成立する。 D w [j] output by the processing performed by the encoding unit 302 satisfies Expression 22, Expression 23, and Expression 24. The reason for this is as follows. In step 401, d mod δ is substituted for d ′. Therefore, it can be expressed using d ′ = d + kδ and an appropriate number k. On the other hand, on the Kobritz curve, it is known that the point δP is an infinite point, and therefore Equation 22 holds.

式23が成立する理由は、スカラー値dをτ4 で割った余りをd4 [j]とし、この操作を繰り返すからである。 The reason why Expression 23 is satisfied is that the remainder obtained by dividing the scalar value d by τ 4 is d 4 [j], and this operation is repeated.

また、τ4 で割った余りをd4 [j]とし、この操作を繰り返すと、d4 [j]は
- 8 = -24-1 < d4 [j] < 24-1 = 8
を満たすため、式24が成立する。
Moreover, if the remainder divided by τ 4 is d 4 [j] and this operation is repeated, d 4 [j] becomes
-8 = -2 4-1 <d 4 [j] <2 4-1 = 8
In order to satisfy, Equation 24 holds.

実計算部303が出力する点Qはスカラー倍点d Pに等しい。この理由は次の通りである。d'は、
d' = Σi,j sign(dw [u[i]][j])τ| dw [u[i]] | (式28)
と変形できる。このとき、
d'P = (Σi,j sign(dw [u[i]][j])τ| dw [u[i]] | (P)) (式29)
であり、各iに対して、Σj sign(dw [u[i]][j])τ| dw [u[i]] | (P)は、図5で計算されている。したがって、点QはQ = d Pを満たす。
The point Q output from the actual calculation unit 303 is equal to the scalar multiple dP. The reason is as follows. d '
d '= Σ i, j sign (d w [u [i]] [j]) τ | dw [u [i]] | (Equation 28)
And can be transformed. At this time,
d'P = (Σ i, j sign (d w [u [i]] [j]) τ | dw [u [i]] | (P)) (Equation 29)
For each i, Σ j sign (d w [u [i]] [j]) τ | dw [u [i]] | (P) is calculated in FIG. Therefore, the point Q satisfies Q = dP.

スカラー倍計算部115は前計算部を具備する必要がない。この理由は次の通りである。図5において、i回目の計算が終了した時点で、
Q = Σj sign(dw [u[0]][j])τ| dw [u[0]] | (P) + … + Σj sign(dw [u[i - 1]][j])τ| dw [u[i-1]] | (P) (式30)
であり、(i + 1)回目の計算のステップ501において、Rに(u[i] mod τ4 ) Pを代入するときに、a = 0の場合、
(u[0] mod τ4 ) P = P (式31)
(u[1] mod τ4 ) P = -τ P - 3 P (式32)
(u[2] mod τ4 ) P = -τ P - P (式33)
(u[3] mod τ4 ) P = -τ P + P (式34)
a = 1の場合、
(u[0] mod τ4 ) P = P (式35)
(u[1] mod τ4 ) P =τ P - 3 P (式36)
(u[2] mod τ4 ) P =τ P - P (式37)
(u[3] mod τ4 ) P =τ P + P (式38)
を計算する。したがって、点Pだけ格納されていればよく、点(u[i + 1] mod τ4 ) Pは点(u[i] mod τ4 ) Pから計算し、値を上書きすればよいので、前計算テーブルを必要とせず,メモリを節約できる。
The scalar multiplication calculation unit 115 does not need to include a pre-calculation unit. The reason is as follows. In FIG. 5, when the i-th calculation is completed,
Q = Σ j sign (d w [u [0]] [j]) τ | dw [u [0]] | (P) +… + Σ j sign (d w [u [i-1]] [j ]) τ | dw [u [i-1]] | (P) (Equation 30)
And when substituting (u [i] mod τ 4 ) P for R in step 501 of the (i + 1) th calculation, if a = 0,
(u [0] mod τ 4 ) P = P (Equation 31)
(u [1] mod τ 4 ) P = -τ P-3 P (Equation 32)
(u [2] mod τ 4 ) P = -τ P-P (Equation 33)
(u [3] mod τ 4 ) P = -τ P + P (Equation 34)
If a = 1,
(u [0] mod τ 4 ) P = P (Equation 35)
(u [1] mod τ 4 ) P = τ P-3 P (Equation 36)
(u [2] mod τ 4 ) P = τ P-P (Equation 37)
(u [3] mod τ 4 ) P = τ P + P (Equation 38)
Calculate Therefore, only the point P needs to be stored, and the point (u [i + 1] mod τ 4 ) P is calculated from the point (u [i] mod τ 4 ) P and the value is overwritten. No calculation table is required and memory can be saved.

また、本実施例におけるスカラー倍計算は高速性に優れる。これは、次の通りである。スカラー倍計算の直前に受け取った点に関するTNAF4 を用いたスカラー倍計算において、必要な計算コストは、
{(m + a)/5 + 3} * ECADD + {(m + a)/5 + 3} * ECFRB (式39)
となり、通常のTNAF4 を用いたスカラー倍計算において、必要な計算コストと同等である。ただし、ECADD、ECFRBはそれぞれ、楕円曲線上の加算、τ倍算を表わす。つまり、式35はスカラー計算において、各楕円演算の回数の総和を表わしている。
In addition, the scalar multiplication in this embodiment is excellent in high speed. This is as follows. In the scalar multiplication using TNAF 4 for the points received just before the scalar multiplication, the necessary calculation cost is
{(m + a) / 5 + 3} * ECADD + {(m + a) / 5 + 3} * ECFRB (Formula 39)
This is equivalent to the necessary calculation cost in the normal scalar multiplication using TNAF 4 . However, ECADD and ECFRB represent addition on the elliptic curve and τ multiplication, respectively. In other words, Expression 35 represents the total number of times of each elliptic calculation in the scalar calculation.

非特許文献2に記載のスカラー倍計算における計算コストは、
{(m + a)/5 + 3} * ECADD + {(m + a)/5 + 2} * ECFRB (式40)
である。したがって、通常のTNAF4 を用いたスカラー倍計算と同等の高速性を持ち、かつ、メモリ使用量に優れている。
The calculation cost in the scalar multiplication described in Non-Patent Document 2 is
{(m + a) / 5 + 3} * ECADD + {(m + a) / 5 + 2} * ECFRB (Formula 40)
It is. Therefore, it has the same high speed as the scalar multiplication using normal TNAF 4 and has excellent memory usage.

また、本実施例におけるスカラー倍計算では、各iに対して、jをランダムな順に並べることができる。ただし、dw [u[i]][j]は、スカラー値dをエンコードしたときの桁がj番目にu[i]または- u[i]となる数である。各iに対して、jをランダムな順に並べたとき、この順でスカラー倍計算を行うと、スカラー倍計算のランダム化を図ることができる。 Further, in the scalar multiplication calculation in this embodiment, j can be arranged in random order for each i. However, d w [u [i]] [j] is a number whose digit is u [i] or −u [i] when the scalar value d is encoded. When j is arranged in random order for each i, if scalar multiplication is performed in this order, the scalar multiplication can be randomized.

また、本実施例におけるスカラー倍計算方法は、非特許文献3に記載の楕円曲線やフロベニウス写像をもつ楕円曲線に対しても適用することができる。   Moreover, the scalar multiplication calculation method in the present embodiment can be applied to an elliptic curve described in Non-Patent Document 3 and an elliptic curve having a Frobenius map.

以上の通り、上記計算方法は、楕円曲線上の加算とは異なる第二の演算を有する楕円曲線に対し、メモリ使用量、及び、高速性に優れるという特徴がある。   As described above, the above calculation method is characterized by excellent memory usage and high speed with respect to an elliptic curve having a second operation different from the addition on the elliptic curve.

実施例2では、図3で示されるスカラー倍計算部115の機能ブロックを用いる。スカラー倍計算部115(図1の135)は、実施例1と同様である。   In the second embodiment, the functional block of the scalar multiplication calculator 115 shown in FIG. 3 is used. The scalar multiplication calculation unit 115 (135 in FIG. 1) is the same as that in the first embodiment.

スカラー倍計算部115がスカラー値d、及び、楕円曲線上の点Pから、楕円曲線におけるスカラー倍点d Pを計算する第2の計算方法を説明する。第2の計算方法では、任意のウィンドウ幅wに対してスカラー倍計算を行うことができるという特徴がある。ここでは、ウィンドウ幅wの値として、w = 5を用いて説明する。なお、実施例1と同様に、スカラー倍計算の直前に受け取った点のスカラー倍計算では、前計算テーブルを用いることなく、直接、スカラー倍点が計算できるので,メモリを節約できる。スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部302は、入力されたスカラー値dを数値列dw [j]にエンコードする。
これは、式22を満たす整数d'に対して、式23、式24を満たすdw [j]に、スカラー値dを変換することに相当する。
A second calculation method in which the scalar multiplication calculation unit 115 calculates the scalar multiplication point d P in the elliptic curve from the scalar value d and the point P on the elliptic curve will be described. The second calculation method is characterized in that scalar multiplication can be performed for an arbitrary window width w. Here, description will be made using w = 5 as the value of the window width w. As in the first embodiment, in the scalar multiplication of the point received immediately before the scalar multiplication calculation, the scalar multiplication point can be directly calculated without using the pre-calculation table, so that the memory can be saved. When the scalar multiplication unit 115 receives the scalar value d and the point P on the elliptic curve from the decoding processing unit 132, the encoding unit 302 encodes the input scalar value d into a numeric string d w [j].
This corresponds to the conversion of the scalar value d into d w [j] satisfying Expressions 23 and 24 for the integer d ′ satisfying Expression 22.

本実施例では、点Pは正規基底で表わされているものとする。   In this embodiment, it is assumed that the point P is represented by a normal basis.

実計算部303は、数値列dw [j]を用いてスカラー倍点d Pを計算する。 The actual calculation unit 303 calculates a scalar multiple dP using the numerical sequence d w [j].

次にエンコード部302、実計算部303の行う各処理について詳細に説明する。   Next, each process performed by the encoding unit 302 and the actual calculation unit 303 will be described in detail.

エンコード部302がスカラー値dをエンコードする方法は実施例1と同様である。   The encoding unit 302 encodes the scalar value d in the same manner as in the first embodiment.

次に図5、図6を用いて、エンコードされたスカラー値、楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。   Next, a method of calculating a scalar multiple in an elliptic curve from an encoded scalar value and a point on the elliptic curve will be described with reference to FIGS.

w = 5の場合、u[0] = 1、u[1] = 3、u[2] = 11、u[3] = 15、u[4] = 5、u[5] = 13、u[6] = 7、u[7] = 9とする。   If w = 5, u [0] = 1, u [1] = 3, u [2] = 11, u [3] = 15, u [4] = 5, u [5] = 13, u [ 6] = 7 and u [7] = 9.

実計算部303は、点P、及び、スカラー値dを受け取ると、u[0] = 1、u[3] = 15、u[5] = 13、u[7] = 9の場合、図5を用いて、点Qを計算し、u[1] = 3、u[2] = 11、u[4] = 5、u[6] = 7の場合、図6を用いて、点Q、Rを計算する。図5の処理は実施例1と同様である。   When the real calculation unit 303 receives the point P and the scalar value d, when u [0] = 1, u [3] = 15, u [5] = 13, and u [7] = 9, FIG. To calculate the point Q, and when u [1] = 3, u [2] = 11, u [4] = 5, u [6] = 7, using FIG. Calculate The processing in FIG. 5 is the same as that in the first embodiment.

Q、R、u、dw [u]を入力し、Rを(u mod τw ) P、jを0、kを0でそれぞれ初期化する(601)。 Q, R, u, and d w [u] are input, and R is initialized with (u mod τ w ) P, j is set to 0, and k is set to 0 (601).

iに| dw [u][j] |を、Rにτj-k Rを、kにiをそれぞれ代入する(611)。 | d w [u] [j] | is substituted for i, τ jk R is substituted for R, and i is substituted for k (611).

繰り返し判定部334は、dw [u][j] > 0であるかどうかを判定する。条件が成立すれば、ステップ613へ行く。条件が成立しない場合、ステップ614へ行く(612)。 The repetition determining unit 334 determines whether d w [u] [j]> 0. If the condition is met, go to step 613. If the condition is not satisfied, go to step 614 (612).

加算部332は、点Qと点Rを加算し、その結果をQに格納する(613)。   The adding unit 332 adds the point Q and the point R, and stores the result in Q (613).

加算部332は、点Qと点- Rを加算し、その結果をQに格納する(614)。   The adding unit 332 adds the point Q and the point -R, and stores the result in Q (614).

jにj + 1を代入する(615)。   j + 1 is substituted for j (615).

繰り返し判定部334は、 dw [u][j] ≠Ωであるかどうかを判定する。条件が成立すれば、ステップ611へ行く。条件が成立しない場合、ステップ621へ行く(616)。 The iterative determination unit 334 determines whether d w [u] [j] ≠ Ω. If the condition is met, go to step 611. If the condition is not satisfied, go to Step 621 (616).

Rにτm-k Rを代入して、実計算部302は、点Q、Rを出力する(621)。
エンコード部302が行う処理により出力されるdw [j]は、式22、式23、式24をみたす。この理由は、次の通りである。
Substituting τ mk R into R, the actual calculation unit 302 outputs points Q and R (621).
D w [j] output by the processing performed by the encoding unit 302 satisfies Expression 22, Expression 23, and Expression 24. The reason is as follows.

式22が成立する理由は実施例1と同様である。   The reason why Expression 22 is satisfied is the same as in the first embodiment.

式23が成立する理由は、スカラー値dをτ5 で割った余りをd5 [j]とし、この操作を繰り返すからである。 The reason why Expression 23 is satisfied is that the remainder obtained by dividing the scalar value d by τ 5 is d 5 [j], and this operation is repeated.

また、τ5 で割った余りをd5 [j]とし、この操作を繰り返すと、d5 [j]は
- 16 = -25-1 < d5 [j] < 25-1 = 16
を満たすため、式24が成立する。
Moreover, when the remainder divided by τ 5 is d 5 [j] and this operation is repeated, d 5 [j] becomes
-16 = -2 5-1 <d 5 [j] <2 5-1 = 16
In order to satisfy, Equation 24 holds.

実計算部303が出力する点Qはスカラー倍点d Pに等しい。この理由は次の通りである。d'は、
d' = Σi,j sign(dw [u[i]][j])τ| dw [u[i]] | (式41)
と変形できる。このとき、
d'P = (Σi,j sign(dw [u[i]][j])τ| dw [u[i]] | (P)) (式42)
であり、各iに対して、Σj sign(dw [u[i]][j])τ| dw [u[i]] | (P)は、図5、または、図6で計算されている。したがって、点QはQ = d Pを満たす。
The point Q output from the actual calculation unit 303 is equal to the scalar multiple dP. The reason is as follows. d '
d '= Σ i, j sign (d w [u [i]] [j]) τ | dw [u [i]] |
And can be transformed. At this time,
d'P = (Σ i, j sign (d w [u [i]] [j]) τ | dw [u [i]] | (P)) (Equation 42)
And for each i, Σ j sign (d w [u [i]] [j]) τ | dw [u [i]] | (P) is calculated in FIG. 5 or FIG. ing. Therefore, the point Q satisfies Q = dP.

スカラー倍計算部115は前計算部を具備する必要がない。この理由は次の通りである。図5、または、図6において、i回目の計算が終了した時点で、
Q = Σj sign(dw [u[0]][j])τ| dw [u[0]] | (P) + … + Σj sign(dw [u[i-1]][j])τ| dw [u[i-1]] | (P) (式43)
であり、(i + 1)回目のステップ501、または、ステップ601において、
Rに(u[i] mod τ5 ) Pを代入するときに、a = 0の場合、
(u[0] mod τ5 ) P = P (式44)
(u[1] mod τ5 ) P = τ2 P - P (式45)
(u[2] mod τ5 ) P = τ3 P + (u[1] mod τ5 ) P (式46)
(u[3] mod τ5 ) P = τ P - (u[2] mod τ5 ) P (式47)
(u[4] mod τ5 ) P = -τ P - P (式48)
(u[5] mod τ5 ) P = -τ2 (u[4] mod τ5 ) P + P (式49)
(u[6] mod τ5 ) P = -τ P + P (式50)
(u[7] mod τ5 ) P = -τ4 P - (u[6] mod τ5 ) P (式51)
a = 1の場合、
(u[0] mod τ5 ) P = P (式52)
(u[1] mod τ5 ) P = τ2 P - P (式53)
(u[2] mod τ5 ) P = -τ3 P + (u[1] mod τ5 ) P (式54)
(u[3] mod τ5 ) P = -τ P - (u[2] mod τ5 ) P (式55)
(u[4] mod τ5 ) P = τ P - P (式56)
(u[5] mod τ5 ) P = -τ2 (u[4] mod τ5 ) P + P (式57)
(u[6] mod τ5 ) P = τ P + P (式58)
(u[7] mod τ5 ) P = -τ4 P - (u[6] mod τ5 ) P (式59)
を計算する。したがって、点Pだけ格納されていればよく、点(u[i + 1] mod τ5 ) Pは点(u[i] mod τ5 ) Pから計算し、値を上書きすればよいので、前計算テーブルを必要とせず,メモリを節約できる。
The scalar multiplication calculation unit 115 does not need to include a pre-calculation unit. The reason is as follows. In FIG. 5 or FIG. 6, when the i-th calculation is completed,
Q = Σ j sign (d w [u [0]] [j]) τ | dw [u [0]] | (P) +… + Σ j sign (d w [u [i-1]] [j ]) τ | dw [u [i-1]] | (P) (Formula 43)
In (i + 1) -th step 501 or step 601,
When (u [i] mod τ 5 ) P is substituted for R, if a = 0,
(u [0] mod τ 5 ) P = P (Equation 44)
(u [1] mod τ 5 ) P = τ 2 P-P (Equation 45)
(u [2] mod τ 5 ) P = τ 3 P + (u [1] mod τ 5 ) P (Equation 46)
(u [3] mod τ 5 ) P = τ P-(u [2] mod τ 5 ) P (Equation 47)
(u [4] mod τ 5 ) P = -τ P-P (Equation 48)
(u [5] mod τ 5 ) P = -τ 2 (u [4] mod τ 5 ) P + P (Equation 49)
(u [6] mod τ 5 ) P = -τ P + P (Equation 50)
(u [7] mod τ 5 ) P = -τ 4 P-(u [6] mod τ 5 ) P (Equation 51)
If a = 1,
(u [0] mod τ 5 ) P = P (Formula 52)
(u [1] mod τ 5 ) P = τ 2 P-P (Equation 53)
(u [2] mod τ 5 ) P = -τ 3 P + (u [1] mod τ 5 ) P (Formula 54)
(u [3] mod τ 5 ) P = -τ P-(u [2] mod τ 5 ) P (Equation 55)
(u [4] mod τ 5 ) P = τ P-P (Formula 56)
(u [5] mod τ 5 ) P = -τ 2 (u [4] mod τ 5 ) P + P (Equation 57)
(u [6] mod τ 5 ) P = τ P + P (Formula 58)
(u [7] mod τ 5 ) P = -τ 4 P-(u [6] mod τ 5 ) P (Formula 59)
Calculate Therefore, only the point P need be stored, and the point (u [i + 1] mod τ 5 ) P can be calculated from the point (u [i] mod τ 5 ) P and overwritten with the value. No calculation table is required and memory can be saved.

実施例1では、図5、実施例2では、図5、図6を用いてスカラー倍計算を行う理由は次の通りである。   In the first embodiment, the reason for performing the scalar multiplication using FIGS. 5 and 6 in FIGS. 5 and 2 is as follows.

実施例1は、(u[i] mod τ5 ) Pはすべて点Pを用いて計算を行っているのに対し、第2実施例では、(u[i] mod τ5 ) Pは、i = 0,1,4,6の場合は点Pを用いて計算を行い、i = 2,3,5,7の場合は、(u[i-1] mod τ5 ) Pを用いて計算を行う。これより、(u[i] mod τ5 ) Pの計算を行う際に、(u[i-1] mod τ5 )Pを用いるときは、ステップ621で
R = (u[i-1] mod τ5 ) P (式60)
としておかなければならない。したがって、実施例2では、図5、図6を用いてスカラー倍計算を行う。
In the first embodiment, all (u [i] mod τ 5 ) P are calculated using the point P, whereas in the second embodiment, (u [i] mod τ 5 ) P is calculated as i = 0,1,4,6, use point P, and if i = 2,3,5,7, use (u [i-1] mod τ 5 ) P Do. This, when performing (u [i] mod τ 5 ) calculation of the P, when using a (u [i-1] mod τ 5) P, in step 621
R = (u [i-1] mod τ 5 ) P (Equation 60)
It must be kept as. Therefore, in Example 2, scalar multiplication is performed using FIGS.

また、本実施例におけるスカラー倍計算は高速性に優れる。これは、次の通りである。スカラー倍計算の直前に受け取った点に関するTNAF5 を用いたスカラー倍計算において、必要な計算コストは、
{(m + a)/6 + 7} * ECADD + {(m + a)/6 + 7} * ECFRB (式61)
となる。非特許文献2に記載のスカラー倍計算における計算コストは、
{(m + a)/6 + 7} * ECADD + {(m + a)/6 + 4} * ECFRB (式62)
である。通常のTNAF5 を用いたスカラー倍計算において、必要な計算コストと同等である。したがって、通常のTNAF5 を用いたスカラー倍計算と同等の高速性を持ち、かつ、メモリ使用量に優れている。
In addition, the scalar multiplication in this embodiment is excellent in high speed. This is as follows. In the scalar multiplication using TNAF 5 for the points received just before the scalar multiplication, the necessary calculation cost is
{(m + a) / 6 + 7} * ECADD + {(m + a) / 6 + 7} * ECFRB (Formula 61)
It becomes. The calculation cost in the scalar multiplication described in Non-Patent Document 2 is
{(m + a) / 6 + 7} * ECADD + {(m + a) / 6 + 4} * ECFRB (Formula 62)
It is. It is equivalent to the necessary calculation cost in the normal scalar multiplication using TNAF 5 . Therefore, it has the same high speed as a scalar multiplication calculation using ordinary TNAF 5 and has excellent memory usage.

また、本実施例におけるスカラー倍計算では、各iに対して、jをランダムな順に並べることができる。ただし、dw [u[i]][j]は、スカラー値dをエンコードしたときの桁がj番目にu[i]または- u[i]となる数である。各iに対して、jをランダムな順に並べたとき、この順でスカラー倍計算を行うと、スカラー倍計算のランダム化を図ることができることは実施例1と同様である。 Further, in the scalar multiplication calculation in this embodiment, j can be arranged in random order for each i. However, d w [u [i]] [j] is a number whose digit is u [i] or −u [i] when the scalar value d is encoded. As in the first embodiment, when scalars are calculated in this order when j is arranged in a random order for each i, the scalar multiplications can be randomized.

また、実施例1と同様に、本実施例におけるスカラー倍計算方法は、非特許文献3に記載の楕円曲線やフロベニウス写像をもつ楕円曲線に対しても適用することができる。   As in the first embodiment, the scalar multiplication calculation method in the present embodiment can be applied to the elliptic curve described in Non-Patent Document 3 and the elliptic curve having the Frobenius map.

以上の通り、上記計算方法は、楕円曲線上の加算とは異なる第二の演算を有する楕円曲線に対し、メモリ使用量、及び、高速性に優れるという特徴がある。   As described above, the above calculation method is characterized by excellent memory usage and high speed with respect to an elliptic curve having a second operation different from the addition on the elliptic curve.

実施例3では、図7で示されるスカラー倍計算部115の機能ブロックを用いる。スカラー倍計算部115(図1の135)は、エンコード部702、実計算部703からなる。エンコード部702は、剰余取得部721、剰余変換部722、繰り返し判定部723、δ剰余変換部724、Φw 関数計算部725、格納部726からなる。実計算部703は、ビット値判定部731、加算部732、τ倍算部733、繰り返し判定部734、基底変換部735からなる。 In the third embodiment, the functional block of the scalar multiplication calculator 115 shown in FIG. 7 is used. The scalar multiplication calculation unit 115 (135 in FIG. 1) includes an encoding unit 702 and an actual calculation unit 703. The encoding unit 702 includes a residue acquisition unit 721, a residue conversion unit 722, an iterative determination unit 723, a δ residue conversion unit 724, a Φ w function calculation unit 725, and a storage unit 726. The actual calculation unit 703 includes a bit value determination unit 731, an addition unit 732, a τ multiplication unit 733, a repetition determination unit 734, and a base conversion unit 735.

スカラー倍計算部115がスカラー値d、及び、楕円曲線上の点Pから、楕円曲線におけるスカラー倍点d Pを計算する第3の計算方法を説明する。第3の計算方法では、任意の基底を用いて点Pを表現することができる。そのため、スカラー倍計算では、点Pの座標の表現に用いる基底を正規基底に限定する必要はない。ここでは、多項式基底を用いて説明する。   A third calculation method in which the scalar multiplication calculation unit 115 calculates the scalar multiplication point d P in the elliptic curve from the scalar value d and the point P on the elliptic curve will be described. In the third calculation method, the point P can be expressed using an arbitrary basis. Therefore, in the scalar multiplication calculation, it is not necessary to limit the basis used for expressing the coordinates of the point P to the normal basis. Here, a description will be given using a polynomial basis.

なお、実施例1、及び、実施例2と同様に、スカラー倍計算の直前に受け取った点のスカラー倍計算では、前計算テーブルを用いることなく、直接、スカラー倍点が計算できる。スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部702は、入力されたスカラー値dを数値列dw [j]にエンコードする。 As in the first and second embodiments, in the scalar multiplication of the points received immediately before the scalar multiplication, the scalar multiple can be calculated directly without using the pre-calculation table. When the scalar multiplication calculation unit 115 receives the scalar value d and the point P on the elliptic curve from the decoding processing unit 132, the encoding unit 702 encodes the input scalar value d into a numerical string d w [j].

スカラー値dを数値列dw [j]にエンコードする計算方法については、実施例と同様であり,その詳細は,非特許文献2に記載されている。 The calculation method for encoding the scalar value d into the numerical sequence d w [j] is the same as in the embodiment, and details thereof are described in Non-Patent Document 2.

本実施例では、w = 4、点Pは多項式基底で表わされているものとする。   In this embodiment, it is assumed that w = 4 and the point P is represented by a polynomial basis.

実計算部703は、数値列dw [j]を用いてスカラー倍点d Pを計算する。 The actual calculation unit 703 calculates the scalar multiple dP using the numerical sequence d w [j].

次にエンコード部702、実計算部703の行う各処理について説明する。   Next, each process performed by the encoding unit 702 and the actual calculation unit 703 will be described.

エンコード部702がスカラー値dをエンコードする方法は、実施例1、及び、実施例2と同様である。   The encoding unit 702 encodes the scalar value d in the same manner as in the first and second embodiments.

次に、図8を用いて、実計算部703がエンコードされたスカラー値、及び、楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。   Next, a method for calculating a scalar multiple in an elliptic curve from the encoded scalar value and a point on the elliptic curve will be described with reference to FIG.

Q、u、Rp 、dw [u]を入力し、Rp を(u[i] mod τw ) P、jを0、kを0でそれぞれ初期化し、基底変換部735は、点Rの多項式基底表現Rp を正規基底表現Rn に変換する(801)。 Q, u, R p , d w [u] are input, R p is initialized with (u [i] mod τ w ) P, j is set to 0, and k is set to 0, respectively. a polynomial basis representation R p into a regular basis representation R n of (801).

iに| dw[u][j] |を、Rn にτj-k Rn を、kにiをそれぞれ代入し、点Rの正規基底表現Rn を多項式基底表現Rp に変換する(811)。 the i | d w [u] [ j] | a, to R n tau jk R n, i and assigns each k, converts the normal basis representation R n of the point R in a polynomial basis representation R p (811 ).

繰り返し判定部734は、dw [u][j] > 0であるかどうかを判定する。条件が成立すれば、ステップ813へ行く。条件が成立しない場合、ステップ814へ行く(812)。 The repetition determination unit 734 determines whether d w [u] [j]> 0. If the condition is met, go to Step 813. If the condition is not satisfied, go to step 814 (812).

加算部732は、点Qと点Rp を加算し、その結果をQに格納する(813)。 Adding section 732 adds the point Q and the point R p, and stores the result in Q (813).

加算部732は、点Qと点-Rp を加算し、その結果をQに格納する(814)。 The adding unit 732 adds the point Q and the point −R p and stores the result in Q (814).

jにj + 1を代入する(815)。   j + 1 is substituted for j (815).

繰り返し判定部734は、dw [u][j] ≠Ωであるかどうかを判定する。条件が成立すれば、ステップ811へ行く。条件が成立しない場合、ステップ821へ行く(816)。 The iterative determination unit 734 determines whether d w [u] [j] ≠ Ω. If the condition is met, go to Step 811. If the condition is not satisfied, go to Step 821 (816).

実計算部703は、点Qを出力する(821)。
ステップ801からステップ821までの計算をi=0からi=3まで繰り返す。
The actual calculation unit 703 outputs the point Q (821).
The calculation from step 801 to step 821 is repeated from i = 0 to i = 3.

エンコード部702が行う処理により出力されるdw [j]は、式22、式23、式24をみたす。この理由は、実施例1と同様である。 D w [j] output by the processing performed by the encoding unit 702 satisfies Expression 22, Expression 23, and Expression 24. The reason is the same as in the first embodiment.

実計算部703が出力する点Qはスカラー倍点d Pに等しい。この理由は実施例1、及び、実施例2と同様である。   The point Q output from the actual calculation unit 703 is equal to the scalar multiple dP. The reason for this is the same as in the first and second embodiments.

スカラー倍計算部115は前計算部を具備する必要がない。この理由も実施例1、及び、実施例2と同様である。   The scalar multiplication calculation unit 115 does not need to include a pre-calculation unit. The reason for this is also the same as in the first and second embodiments.

また、本実施例におけるスカラー倍計算は高速性に優れる。これは、次の通りである。スカラー倍計算の直前に受け取った点に関するTNAF4 を用いたスカラー倍計算において、必要な計算コストは、
{(m + a)/5 + 3} * ECADD + {(m + a)/5 + 7} * ECFRB + {(m + a)/5 + 4} COB (式63)
となる。
非特許文献2に記載のスカラー倍計算における計算コストは、
{(m + a)/5 + 3} * ECADD + {(m + a) + 3} * ECFRB (式64)
である。
通常のTNAF4 を用いたスカラー倍計算において、必要な計算コストと同等である。ただし、COBは基底変換を表わす。したがって、通常のTNAF4 を用いたスカラー倍計算と同等の高速性を持ち、かつ、メモリ使用量に優れている。ここで、計算コストとは、スカラー倍計算に必要な演算(例えば、楕円曲線上の加算やτ倍算)の総数のことである。
In addition, the scalar multiplication in this embodiment is excellent in high speed. This is as follows. In the scalar multiplication using TNAF 4 for the points received just before the scalar multiplication, the necessary calculation cost is
{(m + a) / 5 + 3} * ECADD + {(m + a) / 5 + 7} * ECFRB + {(m + a) / 5 + 4} COB (Formula 63)
It becomes.
The calculation cost in the scalar multiplication described in Non-Patent Document 2 is
{(m + a) / 5 + 3} * ECADD + {(m + a) + 3} * ECFRB (Formula 64)
It is.
In the scalar multiplication calculation using ordinary TNAF 4 , it is equivalent to the necessary calculation cost. However, COB represents basis conversion. Therefore, it has the same high speed as the scalar multiplication using normal TNAF 4 and has excellent memory usage. Here, the calculation cost is the total number of operations necessary for scalar multiplication (for example, addition on an elliptic curve or τ multiplication).

なお、実施例2、及び、実施例3を組み合わせることによって、スカラー倍計算の直前に受け取った点のスカラー倍計算では、任意のウィンドウ幅w、及び、任意の基底を用いて、前計算テーブルを用いることなく、直接、スカラー倍点を計算することが可能である。この場合、スカラー倍計算では、図8、及び、図9を用いる。この理由は、実施例2と同様である。   In addition, by combining Example 2 and Example 3, in the scalar multiplication calculation of the point received immediately before the scalar multiplication calculation, an arbitrary window width w and an arbitrary base are used, and a pre-calculation table is obtained. It is possible to calculate the scalar multiple directly without using it. In this case, FIG. 8 and FIG. 9 are used in the scalar multiplication calculation. The reason is the same as in the second embodiment.

また、本実施例におけるスカラー倍計算では、各iに対して、jをランダムな順に並べることができる。ただし、dw [u[i]][j]は、スカラー値dをエンコードしたときの桁がj番目にu[i]または- u[i]となる数である。各iに対して、jをランダムな順に並べたとき、この順でスカラー倍計算を行うと、スカラー倍計算のランダム化を図ることができることは、実施例1、及び、実施例2と同様である。 Further, in the scalar multiplication calculation in this embodiment, j can be arranged in random order for each i. However, d w [u [i]] [j] is a number whose digit is u [i] or −u [i] when the scalar value d is encoded. For each i, when j is arranged in a random order, if scalar multiplication is performed in this order, the scalar multiplication can be randomized in the same manner as in the first and second embodiments. is there.

また、非特許文献2に記載されているように、正規基底、及び、多項式基底は、列ベクトルを、基底変換は行列を,それぞれ用いて表わされる。   Further, as described in Non-Patent Document 2, normal bases and polynomial bases are represented using column vectors, and basis transformations are represented using matrices.

ステップ811において、Rn にτj-k Rn を代入する処理は、上記列ベクトルのシフト演算、また点Rの正規基底表現Rn を多項式基底表現Rp に変換する処理は、上記列ベクトルと上記行列の積である。したがって、本実施例を実装の際、上記基底変換処理における列ベクトルと上記行列の積の計算では、列ベクトルの第一項から計算を開始するのではなく、上記シフト演算後に第一項となる項から計算を開始するように実装することによって、Rn にτj-k Rn を代入するシフト演算処理を省略することができる。これにより更なる高速化を図ってもよい。 In step 811, a process of substituting tau jk R n in R n, the shift operation of the column vectors, and the process of converting the normal basis representation R n of the point R in a polynomial basis representation R p is the column vector and the Matrix product. Therefore, when the embodiment is implemented, the calculation of the product of the column vector and the matrix in the basis conversion process does not start the calculation from the first term of the column vector, but becomes the first term after the shift operation. by implemented to start the calculation from the term, it is possible to omit the shift operation processing for substituting tau jk R n to R n. This may further increase the speed.

また、実施例1、及び、実施例2と同様に、本実施例におけるスカラー倍計算方法は、非特許文献3に記載の楕円曲線やフロベニウス写像をもつ楕円曲線に対しても適用することができる。   As in the first and second embodiments, the scalar multiplication method in this embodiment can be applied to the elliptic curve described in Non-Patent Document 3 and the elliptic curve having the Frobenius map. .

以上の通り、上記計算方法は、楕円曲線上の加算とは異なる第二の演算を有する楕円曲線に対し、メモリ使用量、及び、高速性に優れるという特徴がある。   As described above, the above calculation method is characterized by excellent memory usage and high speed with respect to an elliptic curve having a second operation different from the addition on the elliptic curve.

実施例では、図10で示されるスカラー倍計算部115の機能ブロックを用いる。スカラー倍計算部115(図1の135)は、実計算部1002からなる。実計算部1002は、剰余取得部1021、剰余変換部1022、繰り返し判定部1023、δ剰余変換部1024、Φw 関数計算部1025、ビット値判定部1031、加算部1032、τ倍算部1033からなる。 In the embodiment, the functional block of the scalar multiplication unit 115 shown in FIG. 10 is used. The scalar multiplication calculation unit 115 (135 in FIG. 1) includes an actual calculation unit 1002. The actual calculation unit 1002 includes a residue acquisition unit 1021, a residue conversion unit 1022, an iterative determination unit 1023, a delta residue conversion unit 1024, a Φ w function calculation unit 1025, a bit value determination unit 1031, an addition unit 1032, and a τ multiplication unit 1033. Become.

スカラー倍計算部115がスカラー値d、及び、楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する第4の計算方法を説明する。第4の計算方法では、スカラー値をエンコードすることなく、直接スカラー倍計算を行えるという特徴を持つ。そのため、実計算部1002はエンコード部を具備する必要がない。なお、実施例1、実施例2、及び、実施例3と同様に、前計算テーブルを用いずにスカラー倍計算を行えるという特徴がある。そのため、スカラー倍計算の直前に受け取った点のスカラー倍計算では、前計算テーブルを用いることなく、直接、スカラー倍点が計算できる。したがって、前計算テーブルを格納するメモリを節約することができる。本実施例では、w = 4、点Pは正規基底で表わされているものとする。   A fourth calculation method in which the scalar multiplication calculation unit 115 calculates the scalar multiplication point dP in the elliptic curve from the scalar value d and the point P on the elliptic curve will be described. The fourth calculation method has a feature that a scalar multiplication can be directly performed without encoding a scalar value. Therefore, the actual calculation unit 1002 does not need to include an encoding unit. As in the first, second, and third embodiments, there is a feature that scalar multiplication can be performed without using the pre-calculation table. Therefore, in the scalar multiplication of the point received immediately before the scalar multiplication calculation, the scalar multiplication point can be directly calculated without using the pre-calculation table. Therefore, the memory for storing the pre-calculation table can be saved. In the present embodiment, it is assumed that w = 4 and the point P is represented by a normal basis.

次に、実計算部1002の行う各処理について詳細に説明する。   Next, each process performed by the actual calculation unit 1002 will be described in detail.

図11を用いて、実計算部1002がスカラー値、楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。   A method in which the actual calculation unit 1002 calculates a scalar multiple point in an elliptic curve from a scalar value and a point on the elliptic curve will be described with reference to FIG.

点P,スカラー値dを入力する(1101)。   A point P and a scalar value d are input (1101).

dw [0]、…、dw [2w-1 - 1]にTNAFw (d modδ)を代入する(1102)。 TNAF w (d mod δ) is assigned to d w [0],..., d w [2 w−1 −1] (1102).

Qを無限遠点O、iを0で初期化する(1103)。   Q is initialized to infinity point O and i is initialized to 0 (1103).

繰り返し判定部1023は、i < 2w-1 であるかどうかを判定する。条件が成立すれば、ステップ1111へ行く。条件が成立しない場合、ステップ1121へ行く(1104)。 The iterative determination unit 1023 determines whether i <2 w−1 . If the condition is met, go to step 1111. If the condition is not satisfied, go to Step 1121 (1104).

vにu[i]を、Rに(v modτw ) Pを、QにQ + Σj sign(dw [v][j])*τ| dw[v][j] | Rをそれぞれ代入する(1111)。 Assign u [i] to v, (v modτ w ) P to R, and Q + Σ j sign (d w [v] [j]) * τ | dw [v] [j] | R to Q (1111).

iにi + 1を代入し、ステップ1104へ行く(1112)。   i + 1 is substituted for i, and the process goes to Step 1104 (1112).

実計算部1002は、点Qを出力する(1121)。   The actual calculation unit 1002 outputs the point Q (1121).

実施例2、及び、実施例4を組み合わせることによって、スカラー倍計算の直前に受け取った点のスカラー倍計算では、任意のウィンドウ幅wで、前計算テーブルを用いることなく、直接、スカラー倍点を計算することが可能である。この理由は、実施例1から実施例3と同様である。   By combining the embodiment 2 and the embodiment 4, in the scalar multiplication of the point received immediately before the scalar multiplication calculation, the scalar multiplication point can be directly set at an arbitrary window width w without using the previous calculation table. It is possible to calculate. The reason is the same as in the first to third embodiments.

また、実施例3、及び、実施例4を組み合わせることによって、スカラー倍計算の直前に受け取った点のスカラー倍計算では、任意のウィンドウ幅w、任意の基底を用いて点Pを表現することによって、前計算テーブルを用いることなく、直接、スカラー倍点が計算できる。これは次の通りである。   In addition, by combining Example 3 and Example 4, in the point scalar multiplication calculation received immediately before the scalar multiplication calculation, the point P is expressed using an arbitrary window width w and an arbitrary base. The scalar multiple can be directly calculated without using the pre-calculation table. This is as follows.

ここでは、図12で示されるスカラー倍計算部115の機能ブロックを用いる。スカラー倍計算部115(図1の135)は、実計算部1202からなる。実計算部1202は、剰余取得部1221、剰余変換部1222、繰り返し判定部1223、δ剰余変換部1224、Φw 関数計算部1225、ビット値判定部1231、加算部1232、τ倍算部1233、基底変換部1234からなる。 Here, the functional block of the scalar multiplication unit 115 shown in FIG. 12 is used. The scalar multiplication calculation unit 115 (135 in FIG. 1) includes an actual calculation unit 1202. The actual calculation unit 1202 includes a residue acquisition unit 1221, a residue conversion unit 1222, an iterative determination unit 1223, a delta residue conversion unit 1224, a Φ w function calculation unit 1225, a bit value determination unit 1231, an addition unit 1232, a τ multiplication unit 1233, The base conversion unit 1234 is included.

図13を用いて、実計算部1202がスカラー値、楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。   A method in which the actual calculation unit 1202 calculates a scalar multiple point in an elliptic curve from a scalar value and a point on the elliptic curve will be described with reference to FIG.

点P,スカラー値dを入力し、Qを無限遠点O、iを0で初期化する(1301)。   A point P and a scalar value d are input, Q is initialized to an infinite point O, and i is initialized to 0 (1301).

繰り返し判定部1223は、i < 2w-1 であるかどうかを判定する。条件が成立すれば、ステップ1311へ行く。条件が成立しない場合、ステップ1351へ行く(1302)。 The repetition determination unit 1223 determines whether i < 2w−1 . If the condition is met, go to Step 1311. If the condition is not satisfied, go to step 1351 (1302).

Rに(u[i] modτw )Pを、c0 + c1 τにd modδを、jに0を、kに0をそれぞれ代入する(1311)。 (U [i] mod τ w ) P is substituted for R, d mod δ is substituted for c 0 + c 1 τ, 0 is substituted for j, and 0 is substituted for k (1311).

繰り返し判定部1223は、c0 ≠0またはc1 ≠0であるかどうかを判定する。この2つの条件のうち、どちらか一方が成立すれば、ステップ1313へ行く。2つの条件がいずれも成立しない場合、ステップ1341へ行く(1312)。 The repetition determining unit 1223 determines whether c 0 ≠ 0 or c 1 ≠ 0. If either one of these two conditions is met, go to Step 1313. If neither of the two conditions is satisfied, the process goes to step 1341 (1312).

ステップ1312でいずれかの条件が成立する場合、vにc0 + tw * c1 mods 2w を代入し、ステップ1314へ行く(1313)。 If any of the conditions in step 1312 is satisfied, v assigns the c 0 + t w * c 1 mods 2 w in, go to step 1314 (1313).

繰り返し判定部1223は、|v| = u[i]であるかどうかを判定する。条件が成立する場合、ステップ1321へ行く。条件が成立しない場合、ステップ1325へ行く(1314)。   The iterative determination unit 1223 determines whether or not | v | = u [i]. If the condition is met, go to step 1321. If the condition is not satisfied, go to Step 1325 (1314).

Rにτj-k Rを、kにjをそれぞれ代入する(1321)。 Τ jk R is substituted for R and j is substituted for k (1321).

繰り返し判定部1223は、v > 0かどうかを判定する。条件が成立する場合、ステップ1323へ行く。条件が成立しない場合、ステップ1324へ行く(1322)。   The repetition determination unit 1223 determines whether v> 0. If the condition is met, go to Step 1323. If the condition is not satisfied, go to Step 1324 (1322).

加算部1232は、点Qと点Rを加算し、その結果をQに格納する(1323)。   The adding unit 1232 adds the point Q and the point R, and stores the result in Q (1323).

加算部1232は、点Qと点-Rを加算し、その結果をQに格納する(1324)。   The adding unit 1232 adds the point Q and the point -R, and stores the result in Q (1324).

繰り返し判定部1223は、vが奇数かどうかを判定する。条件が成立する場合、ステップ1331へ行く。条件が成立しない場合、ステップ1332へ行く(1325)。   The repetition determination unit 1223 determines whether v is an odd number. If the condition is met, go to Step 1331. If the condition is not satisfied, go to step 1332 (1325).

c0 にc0 - sign(v) * β|v| を、c1 にc1 - sign(v) * γ|v| をそれぞれ代入する(1331)。 The, c 1 to c 1 - sign (v) * γ | | v | sign (v) * β - to c 0 c 0 v | is substituted respectively (1331).

jにj + 1を、tにc0 、c0 にc1 + μc0 /2を、c1 に- t/2をそれぞれ代入する(1332)。 The j + 1 to j, a c 1 + μc 0/2 to c 0, c 0 to t, the c 1 - t / 2 is substituted, respectively (1332).

iにi + 1を、Rにτm-k Rを、それぞれ代入し、ステップ1302へ行く(1341)。 i + 1 is assigned to i and τ mk R is assigned to R, respectively, and the process goes to Step 1302 (1341).

実計算部1202は、点Qを出力する(1351)。   The actual calculation unit 1202 outputs the point Q (1351).

実計算部1202が出力する点Qはスカラー倍点d Pに等しい。この理由は、実施例1、実施例2、及び、実施例3と同様である。   The point Q output from the actual calculation unit 1202 is equal to the scalar multiple dP. The reason for this is the same as in Example 1, Example 2, and Example 3.

スカラー倍計算部115は前計算部を具備する必要がない。この理由も実施例1、実施例2、及び、実施例3と同様である。
また、本実施例におけるスカラー倍計算は高速性に優れる。この理由も実施例1、実施例2、及び、実施例3と同様である。
The scalar multiplication calculation unit 115 does not need to include a pre-calculation unit. The reason for this is the same as in the first, second, and third embodiments.
In addition, the scalar multiplication in this embodiment is excellent in high speed. The reason for this is the same as in the first, second, and third embodiments.

また、本実施例の実装は、実施例3と同様の方法を用いてシフト演算処理を省略するにより、更なる高速化を図ってもよい。   Further, the implementation of the present embodiment may further increase the speed by omitting the shift calculation process using the same method as in the third embodiment.

また、実施例1から実施例3と同様に、本実施例におけるスカラー倍計算方法は、非特許文献3に記載の楕円曲線やフロベニウス写像をもつ楕円曲線に対しても適用することができる。   As in the first to third embodiments, the scalar multiplication calculation method in the present embodiment can be applied to the elliptic curve described in Non-Patent Document 3 and the elliptic curve having the Frobenius map.

以上の通り、上記計算方法は、楕円曲線上の加算とは異なる第二の演算を有する楕円曲線に対し、メモリ使用量、及び、高速性に優れるという特徴がある。   As described above, the above calculation method is characterized by excellent memory usage and high speed with respect to an elliptic curve having a second operation different from the addition on the elliptic curve.

次に本発明を署名検証システムに適用する実施形態を、図14と図2を用いて説明する。   Next, an embodiment in which the present invention is applied to a signature verification system will be described with reference to FIGS.

図2の署名検証システムは、スマートカード1401と署名検証処理を行うコンピュータ1421とから成る。   The signature verification system in FIG. 2 includes a smart card 1401 and a computer 1421 that performs signature verification processing.

スマートカード1401は、図1のコンピュータA101と類似の構成を備え、CPU113やコプロセッサ114などの演算装置とが記憶部102に格納されているプログラムを実行することにより、データ処理部112ではなく、署名生成処理部1412を実現する。   The smart card 1401 has a configuration similar to that of the computer A101 in FIG. 1, and an arithmetic device such as the CPU 113 and the coprocessor 114 executes a program stored in the storage unit 102, thereby not the data processing unit 112, A signature generation processing unit 1412 is realized.

ただし、図1に示す外部記憶装置107、ディスプレイ108、キーボード109を備えなくてもよい。コンピュータ1421は、コンピュータA101と同様の構成を備え、CPU113がプログラムを実行することによりデータ処理部112ではなく、署名検証処理部1432を実現する。スカラー倍計算部1415と1435は、図1に示すスカラー倍計算部115または135と同様の機能を備える。   However, the external storage device 107, the display 108, and the keyboard 109 shown in FIG. The computer 1421 has the same configuration as the computer A101, and the signature verification processing unit 1432 is realized instead of the data processing unit 112 when the CPU 113 executes the program. The scalar multiplication calculators 1415 and 1435 have the same functions as the scalar multiplication calculator 115 or 135 shown in FIG.

なお、本実施例において、コンピュータ1421内の各プログラムは、あらかじめ、上記コンピュータ内の記憶部に格納されていても良いし、必要なときに、コンピュータ1421が利用可能な媒体を介して他の装置から上記記憶部に導入されてもよい。   In the present embodiment, each program in the computer 1421 may be stored in advance in the storage unit in the computer, or may be stored in another device via a medium that can be used by the computer 1421 when necessary. To the storage unit.

さらに、スマートカード1401内の各プログラムは、あらかじめ、上記スマートカード1401内の記憶部に格納されていても良いし、必要なときに、入出力インタフェースを介して接続するコンピュータ、または当該コンピュータが利用可能な媒体を介して上記記憶部に導入されてもよい。媒体とは、たとえば当該コンピュータに着脱可能な記憶媒体、または通信媒体(すなわちネットワークまたはネットワークを伝搬する搬送波)を指す。   Furthermore, each program in the smart card 1401 may be stored in advance in the storage unit in the smart card 1401, or when necessary, a computer connected via the input / output interface or the computer uses the program. The storage unit may be introduced via a possible 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).

図14の署名検証システムにおける署名生成と署名検証動作を、図2を参照して説明する。離散対数問題に基づくディジタル署名方法を楕円曲線上の離散対数問題に基づく方法に対応させて構成する楕円曲線ディジタル署名アルゴリズム(ECDSA)という署名方法がある。ECDSA署名については、たとえば非特許文献1に記載されている。   A signature generation and signature verification operation in the signature verification system of FIG. 14 will be described with reference to FIG. There is a signature method called an elliptic curve digital signature algorithm (ECDSA) that configures a digital signature method based on a discrete logarithm problem in correspondence with a method based on a discrete logarithm problem on an elliptic curve. The ECDSA signature is described in Non-Patent Document 1, for example.

コンピュータ1421は、ランダムに選んだ数値をチャレンジコード1442として、インタフェースを介してスマートカード1401に転送する。   The computer 1421 transfers the randomly selected numerical value as the challenge code 1442 to the smart card 1401 via the interface.

署名生成処理部1412(図2の112)は、チャレンジコード1442を受け付け、チャレンジコード1442のハッシュ値をとり、所定のビット長の数値fに変換する。   The signature generation processing unit 1412 (112 in FIG. 2) receives the challenge code 1442, takes the hash value of the challenge code 1442, and converts it into a numerical value f having a predetermined bit length.

署名生成処理部1412は、乱数uを生成し、記憶部1402(図2の102)に格納されている定数1404から読み出した(図2の205)楕円曲線上の定点Qとともにスカラー倍計算部1415(図2の115)へ送る(図2の206)。   The signature generation processing unit 1412 generates a random number u, and reads out from the constant 1404 stored in the storage unit 1402 (102 in FIG. 2) (205 in FIG. 2) together with the fixed point Q on the elliptic curve, a scalar multiplication calculation unit 1415 (115 in FIG. 2) (206 in FIG. 2).

スカラー倍計算部1415は、定点Q、乱数uによるスカラー倍点u Q=(xu ,yu )を計算し、計算されたスカラー倍点を署名生成処理部1412へ送る(図2の207)。
署名生成処理部1412は、送られたスカラー倍点を用いて署名の生成を行う。例えば、非特許文献1のECDSA署名であれば、
s = xu mod q (式65)
t = u-1 (f+ds) mod q (式66)
を計算することによりチャレンジコード1442に対応する署名(s, t)を得る(図2の208)。
The scalar multiplication unit 1415 calculates a scalar multiple u Q = (x u , y u ) based on the fixed point Q and the random number u, and sends the calculated scalar multiple to the signature generation processing unit 1412 (207 in FIG. 2). .
The signature generation processing unit 1412 generates a signature using the sent scalar multiple. For example, if it is the ECDSA signature of Non-Patent Document 1,
s = x u mod q (Equation 65)
t = u -1 (f + ds) mod q (Equation 66)
To obtain a signature (s, t) corresponding to the challenge code 1442 (208 in FIG. 2).

ここで、qは定点Qの位数、すなわち定点Qのq倍点q Qが無限遠点になり、qより小さな数値mに対する定点Qのm倍点m Qは無限遠点にはならない、というような数値のことである。   Here, q is the order of the fixed point Q, that is, the q-fold point q Q of the fixed point Q is an infinite point, and the m-fold point m Q of the fixed point Q for a numerical value m smaller than q is not an infinite point. It is such a numerical value.

スマートカード1401は、署名生成処理部1412で生成した署名1441を入出力インタフェース1410より出力し、インタフェースを介してコンピュータ1421へ転送する。
コンピュータ1421の署名検証処理部1432(図2の112)は、署名1441が入力される(図2の204)と、署名1441の数値s,tが適切な範囲内すなわち1≦s,t<qであるかを調べる。
The smart card 1401 outputs the signature 1441 generated by the signature generation processing unit 1412 from the input / output interface 1410 and transfers it to the computer 1421 through the interface.
When the signature 1441 is input (204 in FIG. 2), the signature verification processing unit 1432 (112 in FIG. 2) of the computer 1421 has a numerical value s, t within the appropriate range, that is, 1 ≦ s, t <q Find out if it is.

数値s,tが上記範囲内になければチャレンジコード1442に対する署名の検証結果として「無効」を出力し、スマートカード1401を拒絶する。数値s,tが上記範囲内にあれば、署名検証処理部1432は、
h = t-1 mod q (式67)
h1 = fh mod q (式68)
h2 = sh mod q (式69)
を計算する。
If the numerical values s and t are not within the above range, “invalid” is output as the signature verification result for the challenge code 1442, and the smart card 1401 is rejected. If the numerical values s and t are within the above range, the signature verification processing unit 1432
h = t -1 mod q (Formula 67)
h 1 = fh mod q (Formula 68)
h 2 = sh mod q (Formula 69)
Calculate

そして、記憶部1422(図2の102)に格納されている定数1424から読み出した(図2の205)公開鍵d Q及び定点Qと計算したh1 ,h2 をスカラー倍計算部1435(図2の115)へ送る(図2の206)。 Then, the scalar key calculator 1435 (Fig. 2) converts the calculated h 1 and h 2 with the public key dQ and the fixed point Q (205 in Fig. 2) read from the constant 1424 stored in the storage unit 1422 (102 in Fig. 2). 2 of 115) (206 of FIG. 2).

スカラー倍計算部1435は、定点Qとh1 によるスカラー倍点h1 Qと、公開鍵d Qとh2 によるスカラー倍点h2 d Qとを計算し、計算されたスカラー倍点を署名検証処理部1432へ送る(図2の207)。 The scalar multiplication unit 1435 calculates a scalar multiple h 1 Q based on the fixed points Q and h 1 and a scalar multiple h 2 d Q based on the public keys d Q and h 2 and verifies the calculated scalar multiple The data is sent to the processing unit 1432 (207 in FIG. 2).

署名検証処理部1432は、送られたスカラー倍点を用いて、署名検証処理を行う。例えば、ECDSAの署名検証であれば、点R
R = h1 Q+h2 d Q (式70)
を計算し、そのx座標をxR としたとき、
s' = xR mod q (式71)
を計算し、s'=sであればチャレンジコード1442に対する署名の検証結果として「有効」を出力し、スマートカード1401を認証し、受け入れる(図2の208)。
s'=sでなければ「無効」を出力し、スマートカードを拒絶する(図2の208)。
署名の生成と検証では、スカラー倍点を計算する。したがって、署名生成、及び、署名検証を行う際に、実施例1から実施例4までの何れか一つに記載のスカラー倍計算方法を用いることが可能である。
The signature verification processing unit 1432 performs signature verification processing using the sent scalar multiple. For example, for ECDSA signature verification, point R
R = h 1 Q + h 2 d Q (Equation 70)
And the x coordinate is x R ,
s' = x R mod q (Equation 71)
If s ′ = s, “valid” is output as the signature verification result for the challenge code 1442, and the smart card 1401 is authenticated and accepted (208 in FIG. 2).
If s ′ = s, “invalid” is output and the smart card is rejected (208 in FIG. 2).
For signature generation and verification, a scalar multiple is calculated. Therefore, when performing signature generation and signature verification, it is possible to use the scalar multiplication calculation method described in any one of the first to fourth embodiments.

署名の検証では式70より、検証する直前に受け取った点Qと公開鍵d Qによる多重スカラー倍点h1 Q+h2 d Qを計算する。そのため、非特許文献2の方法を用いる場合、式66を計算する前に前計算テーブルを作成する必要がある。しかし、実施例1から実施例4までの何れか一つに記載のスカラー倍計算方法を用いると前計算テーブルを作成する必要がなく、使用可能なメモリが制限された場合にもスカラー倍計算を高速に行うことができる。 In the signature verification, a multiple scalar multiple h 1 Q + h 2 d Q based on the point Q received immediately before the verification and the public key d Q is calculated from Equation 70. Therefore, when using the method of Non-Patent Document 2, it is necessary to create a pre-calculation table before calculating Formula 66. However, if the scalar multiplication calculation method described in any one of Example 1 to Example 4 is used, it is not necessary to create a pre-calculation table, and scalar multiplication calculation is performed even when usable memory is limited. It can be done at high speed.

次に本発明を鍵交換システムに適用する実施形態を説明する。本実施形態においては、図1のシステム構成が応用できる。   Next, an embodiment 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.

図1のデータ処理部112、132は、本実施形態においては、それぞれ鍵交換処理部112、132として機能する。鍵交換システムのコンピュータA101が、入力されたデータ143から共有情報の導出を行う場合の動作について図1、図2を参照して説明する。   The data processing units 112 and 132 in FIG. 1 function as the key exchange processing units 112 and 132, respectively, in this embodiment. The operation when the computer A101 of the key exchange system derives the shared information from the input data 143 will be described with reference to FIGS.

コンピュータ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)。   The data processing unit 132 (112 in FIG. 2) of the computer B121 reads the secret key b from the secret information 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 data 143 to the computer A101 via the network 142. 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 exchange processing unit 112 reads it from the storage unit 102 (FIG. 2). 205) The secret key a of the computer A101, which is the secret information 105, and the public key bQ of the computer B121 are sent to the scalar multiplication unit 115 (206 in FIG. 2).

スカラー倍計算部115は、秘密鍵dと、公開鍵bQによるスカラー倍点dbQを計算し、計算されたスカラー倍点を鍵交換処理部112へ送る(図2の207)。   The scalar multiplication calculator 115 calculates a scalar multiple dbQ based on the secret key d and the public key bQ, and sends the calculated scalar multiple to the key exchange processing unit 112 (207 in FIG. 2).

鍵交換処理部112は、送られたスカラー倍点を用いて共有情報の導出を行い、記憶部102に秘密情報105として格納する。例えば、スカラー倍点dbQのx座標を、共有情報とする。   The key exchange processing unit 112 derives shared information using the sent scalar multiple, and stores it as the secret information 105 in the storage unit 102. For example, the x coordinate of the scalar multiple dbQ is used as shared information.

次に、コンピュータ121が、入力されたデータ141から共有情報の導出を行う場合の動作について説明する。   Next, an operation when the computer 121 derives shared information from the input data 141 will be described.

コンピュータA101のデータ処理部112は、記憶部102の秘密情報105から秘密鍵dを読み出しコンピュータA101の公開鍵dQを計算する。そして、ネットワーク142を介して、公開鍵dQをデータ141としてコンピュータB121に転送する。   The data processing unit 112 of the computer A101 reads the secret key d from the secret information 105 of the storage unit 102 and calculates the public key dQ of the computer A101. Then, the public key dQ is transferred as data 141 to the computer B 121 via the network 142.

コンピュータB121の鍵交換処理部132(図2の112)はコンピュータA101の公開鍵dQの入力を受け付ける(図2の204)と、鍵交換処理部132は、記憶部122(図2の102)の定数125から読み出した(図2の205)秘密情報125であるコンピュータB121の秘密鍵bと、コンピュータA101の公開鍵dQとをスカラー倍計算部135(図2の115)へ送る(図2の206)。   When the key exchange processing unit 132 (112 in FIG. 2) of the computer B121 accepts the input of the public key dQ of the computer A101 (204 in FIG. 2), the key exchange processing unit 132 is stored in the storage unit 122 (102 in FIG. 2). The private key b of the computer B121 and the public key dQ of the computer A101 which are the secret information 125 read from the constant 125 (205 in FIG. 2) are sent to the scalar multiplication unit 135 (115 in FIG. 2) (206 in FIG. 2). ).

スカラー倍計算部135は、秘密鍵bと、公開鍵d Qによるスカラー倍点bd Qを計算し、計算されたスカラー倍点を鍵交換処理部132へ送る(図2の207)。
鍵交換処理部132は、送られたスカラー倍点を用いて共有情報の導出を行い、記憶部122に秘密情報125として格納する。例えば、スカラー倍点bd Qのx座標を、共有情報とする。ここで、数dbと数bdは数値として同じなので、点db Qと点bd Qは同じ点となり、同じ情報が導出されたことになる。
The scalar multiplication calculator 135 calculates a scalar multiple bd Q based on the secret key b and the public key d Q, and sends the calculated scalar multiple to the key exchange processor 132 (207 in FIG. 2).
The key exchange processing unit 132 derives shared information using the sent scalar multiple and stores it as the secret information 125 in the storage unit 122. For example, the x coordinate of the scalar multiple bd Q is used as shared information. Here, since the number db and the number bd are the same as numerical values, the point db Q and the point bd Q are the same point, and the same information is derived.

鍵共有では、受け取った点のスカラー倍点を計算する。したがって、鍵交換を行う際に、実施例1から実施例4までの何れか一つに記載のスカラー倍計算方法を用いることが可能である。   In key agreement, the scalar multiple of the received point is calculated. Therefore, when performing key exchange, it is possible to use the scalar multiplication calculation method described in any one of the first to fourth embodiments.

また、鍵共有では、鍵交換した際に受け取った点によるスカラー倍点を計算する。そのため、非特許文献2の方法を用いる場合、受け取った点のスカラー倍点を計算する前に前計算テーブルを作成する必要がある。しかし、実施例1から実施例4までの何れか一つに記載のスカラー倍計算方法を用いると前計算テーブルを作成する必要がない。   In key sharing, a scalar multiple is calculated based on the points received when exchanging keys. Therefore, when using the method of Non-Patent Document 2, it is necessary to create a pre-calculation table before calculating a scalar multiple of the received point. However, when the scalar multiplication calculation method described in any one of the first to fourth embodiments is used, it is not necessary to create a pre-calculation table.

ネットワーク142には、点d Qと点b Qが送信されるが、点db Q(もしくは点bd Q)を計算するには秘密鍵dもしくは秘密鍵bを用いなければならない。すなわち、秘密鍵dもしくは秘密鍵bを知らなければ、共有情報を得ることができない。このようにして得られた共有情報は、共通鍵暗号の秘密鍵として利用できる。   The point d Q and the point b Q are transmitted to the network 142, and the secret key d or the secret key b must be used to calculate the point db Q (or the point bd Q). That is, the shared information cannot be obtained without knowing the secret key d or the secret key b. The shared information obtained in this way can be used as a secret key for common key cryptography.

また、上記各実施形態における暗号化処理部、復号化処理部、署名生成処理部、署名検証処理部、鍵交換処理部は、専用のハードウェアを用いて行ってもよい。また、スカラー倍計算部をコプロセッサまたはそれ以外の専用ハードウェアで実現しても良い。また、データ処理部は、上記暗号化処理、復号化処理、署名生成処理、署名検証処理、鍵交換処理のうち、任意の一つ以上の処理を行えるように構成してもよい。   In addition, the encryption processing unit, the decryption processing unit, the signature generation processing unit, the signature verification processing 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. The data processing unit may be configured to perform any one or more of the encryption processing, decryption processing, signature generation processing, signature verification processing, and key exchange processing.

各実施形態におけるシステム構成図である。It is a system configuration diagram in each embodiment. 各実施形態における情報の受け渡しを示すシーケンス図である。It is a sequence diagram which shows delivery of the information in each embodiment. 実施例1、及び、実施例2の実施形態におけるスカラー倍計算部の構成図である。FIG. 10 is a configuration diagram of a scalar multiplication calculator in the embodiments of Example 1 and Example 2. 実施例1、実施例2、及び、実施例3におけるエンコード部の行うエンコード方法を示すフローチャート図である。FIG. 10 is a flowchart illustrating an encoding method performed by an encoding unit according to the first embodiment, the second embodiment, and the third embodiment. 実施例1、及び、実施例2における実計算部のスカラー倍点の計算方法を示すフローチャート図である。FIG. 6 is a flowchart illustrating a method of calculating a scalar multiple of an actual calculation unit according to the first embodiment and the second embodiment. 実施例2における実計算部のスカラー倍点の計算方法を示すフローチャート図である。FIG. 10 is a flowchart illustrating a method of calculating a scalar multiple of an actual calculation unit in the second embodiment. 実施例3の実施形態におけるスカラー倍計算部の構成図である。6 is a configuration diagram of a scalar multiplication calculation unit in the embodiment of Example 3. FIG. 実施例3における実計算部のスカラー倍点の計算方法を示すフローチャート図である。FIG. 10 is a flowchart illustrating a method of calculating a scalar multiple of an actual calculation unit in the third embodiment. 実施例3における実計算部のスカラー倍点の計算方法を示すフローチャート図である。FIG. 10 is a flowchart illustrating a method of calculating a scalar multiple of an actual calculation unit in the third embodiment. 実施例4の実施形態におけるスカラー倍計算部の構成図である。6 is a configuration diagram of a scalar multiplication calculation unit in the embodiment of Example 4. FIG. 実施例4における実計算部のスカラー倍点の計算方法を示すフローチャート図である。FIG. 10 is a flowchart illustrating a method of calculating a scalar multiple of an actual calculation unit in the fourth embodiment. 実施例4の実施形態におけるスカラー倍計算部の構成図である。6 is a configuration diagram of a scalar multiplication calculation unit in the embodiment of Example 4. FIG. 実施例4における実計算部のスカラー倍点の計算方法を示すフローチャート図である。FIG. 10 is a flowchart illustrating a method of calculating a scalar multiple of an actual calculation unit in the fourth embodiment. 署名検証システムを示す構成図である。It is a block diagram which shows a signature verification system. 従来技術と本発明によるスカラー倍計算方法の概念を説明する図である。It is a figure explaining the concept of the scalar multiplication calculation method by a prior art and this invention.

符号の説明Explanation of symbols

101、121、1421:コンピュータ、1401:スマートカード、102、122、1402、1422:記憶部、111、131、1411、1431:処理部、115、135、1415、1435:スカラー倍計算部、112、132:データ処理部、1412:署名生成処理部、1432:署名検証処理部、104、124、1404、1424:定数、105、125、1405、1425:秘密情報、110、130、1410、1430:入出力インタフェース、108、128、1428:ディスプレイ、109、129、1429:キーボード、142:ネットワーク、1442:チャレンジコード、141、143:データ、302:エンコード部、303:実計算部、321:剰余取得部、322:剰余変換部、323:繰り返し判定部、324:δ剰余変換部、325:Φ 関数計算部、326:格納部、331:ビット値判定部、332:加算部、333:τ倍算部、334:繰り返し判定部、702:エンコード部、703:実計算部、721:剰余取得部、722:剰余変換部、723:繰り返し判定部、724:δ剰余変換部、725:Φ 関数計算部、726:格納部、731:ビット値判定部、732:加算部、733:τ倍算部、734:繰り返し判定部、735:基底変換部、1002:実計算部、1021:剰余取得部、1022:剰余変換部、1023:繰り返し判定部、1024:δ剰余変換部、1025:Φ 関数計算部、1031:ビット値判定部、1032:加算部、1033:τ倍算部、1202:実計算部、1221:剰余取得部、1222:剰余変換部、1223:繰り返し判定部、1224:δ剰余変換部、1225:Φ 関数計算部、1231:ビット値判定部、1232:加算部、1233:τ倍算部、1234:基底変換部。
101, 121, 1421: Computer, 1401: Smart card, 102, 122, 1402, 1422: Storage unit, 111, 131, 1411, 1431: Processing unit, 115, 135, 1415, 1435: Scalar multiplication unit, 112, 132: Data processing unit, 1412: Signature generation processing unit, 1432: Signature verification processing unit, 104, 124, 1404, 1424: Constant, 105, 125, 1405, 1425: Confidential information, 110, 130, 1410, 1430: On Output interface, 108, 128, 1428: Display, 109, 129, 1429: Keyboard, 142: Network, 1442: Challenge code, 141, 143: Data, 302: Encoding unit, 303: Actual calculation unit, 321: Remainder acquisition unit , 322: residue conversion unit, 323: repetition determination unit, 324: delta residue conversion unit, 325: Φ w function calculation unit, 326: storage unit, 331: bit value determination unit, 332: addition unit, 333: τ multiplication 334: Repetition determination unit 702: Encoding unit 703: Actual calculation unit 721: Remainder acquisition unit 722: Remainder conversion unit 723: Repetition Determination unit, 724: [delta] residue transform unit, 725: [Phi w function calculating unit, 726: storage unit, 731: the bit value determination unit, 732: addition unit, 733: tau multiplication unit, 734: repetition determining unit, 735 : Basis conversion unit, 1002: actual calculation unit, 1021: residue acquisition unit, 1022: residue conversion unit, 1023: repetition determination unit, 1024: delta residue conversion unit, 1025: Φ w function calculation unit, 1031: bit value determination unit , 1032: addition unit, 1033: τ multiplication unit, 1202: actual calculation unit, 1221: remainder acquisition unit, 1222: residue conversion unit, 1223: iteration determination unit, 1224: delta residue conversion unit, 1225: Φ w function calculation Part, 1231: bit value determination part, 1232: addition part, 1233: τ multiplication part, 1234: basis conversion part.

Claims (11)

楕円曲線上の加算とは異なる第二の演算を実行することができる楕円曲線を用いて、スカラー値と前記楕円曲線上の点とからスカラー倍点を計算する楕円曲線暗号におけるスカラー倍計算装置であって、
前記スカラー値を数値列にエンコードするステップと、
前記数値列から0でない数を一つ選択するステップと、
前記選択した数と同じ絶対値をもつ桁において,前記スカラー倍点を求める演算を行うステップと,
0でなく,かつ,前記数値列を構成する数について,前記選択するステップと前記演算を行うステップを繰り返すステップと、
を実行する
ことを特徴とするスカラー倍計算装置。
A scalar multiplication unit in elliptic curve cryptography that calculates a scalar multiple from a scalar value and a point on the elliptic curve using an elliptic curve that can execute a second operation different from addition on the elliptic curve. There,
Encoding the scalar value into a numeric string;
Selecting one non-zero number from the numeric sequence;
Performing an operation to find the scalar multiple in a digit having the same absolute value as the selected number;
Repeating the step of selecting and the step of performing the calculation for numbers that are not 0 and that constitute the numeric sequence;
A scalar multiplication apparatus characterized by executing
請求項1に記載のスカラー倍計算装置であって、
前記エンコードするステップを実行するエンコード部と,
前記選択するステップと,前記計算するステップとを実行する実計算部と,からなる
ことを特徴とするスカラー倍計算装置。
The scalar multiplication apparatus according to claim 1,
An encoding unit for performing the encoding step;
A scalar multiplication calculation device comprising: an actual calculation unit that executes the selecting step and the calculating step.
請求項1に記載のスカラー倍計算装置であって、
前記楕円曲線はコブリッツ曲線であるスカラー倍計算装置。
The scalar multiplication apparatus according to claim 1,
The elliptic curve is a scalar multiplication calculator which is a Kobritz curve.
請求項1に記載のスカラー倍計算方法であって、
前記第二の演算はτ倍算であるスカラー倍計算装置。
The scalar multiplication method according to claim 1,
A scalar multiplication apparatus in which the second operation is τ multiplication.
請求項2に記載のスカラー倍計算装置であって、
実計算部は、さらに、基底変換するステップを実行する
ことを特徴とするスカラー倍計算装置。
The scalar multiplication apparatus according to claim 2, wherein
The real multiplication unit further executes a step of basis conversion.
請求項1に記載のスカラー倍計算装置であって、
前記数値列から0でない数を一つ選択するステップは、
前記数値列の各桁を構成する0以外でかつ未選択の数から数を1つ選択し、前記選択した数に対応する前計算を実行することにより前計算点を求め、前記前計算点をあらかじめ定められた前計算テーブルに格納する第一のステップからなり、
前記スカラー倍点を求める演算を行うステップは、
前記数値列の、前記選択した数と同じ絶対値を持つ数を持つ桁がある場合に,当該桁になるまで,前記前計算テーブルに格納されている前記前計算点に対して前記楕円曲線上の第二の演算を実行し、その結果を前記前計算テーブルの前記前計算点に上書きする第二のステップと、
前記数値列の、前記選択した数と同じ絶対値を持つ桁において,前記前計算テーブルに格納されている前記前計算点を利用して前記楕円曲線上の加算を実行する第三のステップと、
第二、第三のステップを繰り返す第四のステップと,からなり、
前記選択するステップと前記計算ステップを繰り返すステップは、
前記数値列の各桁を構成する0以外の未選択の数がある場合に,
前記第一から前記第四のステップを繰り返す第五のステップからなる
ことを特徴とするスカラー倍計算装置。
The scalar multiplication apparatus according to claim 1,
Selecting one non-zero number from the numeric sequence,
Select one number from non-zero and non-selected numbers constituting each digit of the numeric string, and obtain a previous calculation point by executing a pre-calculation corresponding to the selected number, It consists of the first step of storing in a pre-calculated table that has been determined in advance.
The step of calculating the scalar multiple includes
When there is a digit having a number having the same absolute value as the selected number in the numeric string, the elliptical curve is moved up to the previous calculation point stored in the previous calculation table until the digit is reached. A second step of executing the second operation of and overwriting the result on the previous calculation point of the previous calculation table;
A third step of performing addition on the elliptic curve using the previous calculation point stored in the previous calculation table in a digit having the same absolute value as the selected number in the numerical sequence;
A fourth step that repeats the second and third steps, and
The step of selecting and the step of repeating the calculation step include:
If there is an unselected number other than 0 that constitutes each digit of the numeric string,
A scalar multiplication apparatus comprising a fifth step in which the first to fourth steps are repeated.
請求項1に記載のスカラー倍計算装置であって、
前記エンコードするステップは、さらに、前記スカラー値dに対するΦ 関数の値を
計算するステップを含み、
前記Φ 関数は、Φ (d) = (dR+dT*tw mods 2w)で与えられる
ことを特徴とするスカラー倍計算装置。
The scalar multiplication apparatus according to claim 1,
The encoding step further includes calculating a value of a Φ w function for the scalar value d;
The scalar multiplication apparatus, wherein the Φ w function is given by Φ w (d) = (d R + d T * t w mods 2 w ).
データから署名データを生成する署名部と、前記署名データを作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する署名生成装置であって、
前記スカラー倍計算部は、請求項1に記載のスカラー倍計算装置を用いて,前記スカラー倍点を計算するステップを実行する
ことを特徴とする署名生成装置。
A signature generation apparatus comprising: a signature unit that generates signature data from data; and a scalar multiple calculation unit that calculates a scalar multiple necessary for creating the signature data,
2. The signature generation apparatus according to claim 1, wherein the scalar multiplication calculation unit executes the step of calculating the scalar multiple using the scalar multiplication apparatus according to claim 1.
データと署名データとから署名検証結果を出力する署名検証部と、前記署名検証結果を作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する署名検証装置であって、
前記スカラー倍計算部は、請求項1に記載のスカラー倍計算装置を用いて,前記スカラー倍点を計算するステップを実行する
ことを特徴とする署名検証装置。
A signature verification apparatus comprising: a signature verification unit that outputs a signature verification result from data and signature data; and a scalar multiple calculation unit that calculates a scalar multiple necessary for creating the signature verification result,
2. The signature verification apparatus according to claim 1, wherein the scalar multiplication calculation unit executes the step of calculating the scalar multiplication point using the scalar multiplication calculation apparatus according to claim 1.
データから暗号化データを生成する暗号部と、前記暗号化データを作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する暗号化装置であって、
前記スカラー倍計算部は、請求項1に記載のスカラー倍計算装置を用いて,前記スカラー倍点を計算するステップを実行する
ことを特徴とする暗号化装置。
An encryption device comprising: an encryption unit that generates encrypted data from data; and a scalar multiple calculation unit that calculates a scalar multiple necessary for creating the encrypted data,
The encryption device according to claim 1, wherein the scalar multiplication unit executes the step of calculating the scalar multiple using the scalar multiplication device according to claim 1.
暗号化データから復号化データを生成する復号部と、前記復号化データを作成するために必要なスカラー倍点を計算するスカラー倍計算部と、を有する復号化装置であって、
前記スカラー倍計算部は、請求項1に記載のスカラー倍計算装置を用いて,前記スカラー倍点を計算するステップを実行する
ことを特徴とする復号化装置。
A decryption device comprising: a decryption unit that generates decryption data from encrypted data; and a scalar multiple calculation unit that calculates a scalar multiple necessary for creating the decryption data,
The decoding device according to claim 1, wherein the scalar multiplication unit executes the step of calculating the scalar multiplication point using the scalar multiplication device according to claim 1.
JP2005052253A 2005-02-28 2005-02-28 Scalar multiplication apparatus and program for elliptic curve cryptography Expired - Fee Related JP4692022B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005052253A JP4692022B2 (en) 2005-02-28 2005-02-28 Scalar multiplication apparatus and program for elliptic curve cryptography

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005052253A JP4692022B2 (en) 2005-02-28 2005-02-28 Scalar multiplication apparatus and program for elliptic curve cryptography

Publications (2)

Publication Number Publication Date
JP2006235416A true JP2006235416A (en) 2006-09-07
JP4692022B2 JP4692022B2 (en) 2011-06-01

Family

ID=37043102

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005052253A Expired - Fee Related JP4692022B2 (en) 2005-02-28 2005-02-28 Scalar multiplication apparatus and program for elliptic curve cryptography

Country Status (1)

Country Link
JP (1) JP4692022B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009301070A (en) * 2009-09-30 2009-12-24 Okayama Univ Operating device for scalar multiplication and operating device for exponentiation
JP2009301071A (en) * 2009-09-30 2009-12-24 Okayama Univ Operating program for scalar multiplication and operating program for exponentiation

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001147640A (en) * 1999-11-22 2001-05-29 Toshiba Corp Method and device for basis basis conversion and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001147640A (en) * 1999-11-22 2001-05-29 Toshiba Corp Method and device for basis basis conversion and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JPN6010064698, 伯田恵輔,佐藤尚宜,高木剛, ""楕円曲線暗号におけるスカラー倍算高速化に関する考察"", コンピュータセキュリティシンポジウム2005論文集, 20051026, Vol.2005, No.13, Volume II of II, p.469−474, JP, 社団法人情報処理学会 *
JPN6010064699, Jerome A. Solinas, ""An Improved Algorithm for Arithmetic on a Family of Elliptic Curves"", Lecture Notes in Computer Science, Advances in Cryptology − CRYPTO’97, 199708, Vol.1294, p.357−371 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009301070A (en) * 2009-09-30 2009-12-24 Okayama Univ Operating device for scalar multiplication and operating device for exponentiation
JP2009301071A (en) * 2009-09-30 2009-12-24 Okayama Univ Operating program for scalar multiplication and operating program for exponentiation

Also Published As

Publication number Publication date
JP4692022B2 (en) 2011-06-01

Similar Documents

Publication Publication Date Title
JP4067818B2 (en) Elliptic curve cryptography apparatus, elliptic curve cryptography program, and elliptic curve cryptography calculation method
RU2376651C2 (en) Using isogenies to design cryptosystems
US7904498B2 (en) Modular multiplication processing apparatus
US7908641B2 (en) Modular exponentiation with randomized exponent
JP4137385B2 (en) Encryption method using public and private keys
CN109039640B (en) Encryption and decryption hardware system and method based on RSA cryptographic algorithm
JP4682852B2 (en) Cryptographic processing apparatus, cryptographic processing method, and computer program
Abdeldaym et al. Modified RSA algorithm using two public key and Chinese remainder theorem
Hutter et al. NaCl’s crypto_box in hardware
KR20020063793A (en) Power-residue calculating unit using montgomery algorithm
JP2003098962A (en) Method and device for calculating elliptic curve scalar multiple, and recording medium
JP4690819B2 (en) Scalar multiplication calculation method and scalar multiplication calculation apparatus in elliptic curve cryptography
JP4351987B2 (en) Montgomery conversion device, arithmetic device, IC card, encryption device, decryption device, and program
JPWO2006030496A1 (en) Elliptic curve cryptography calculation device, calculation method of calculation device using elliptic curve, and program for causing computer to execute scalar multiplication of points on elliptic curve
US20160072622A1 (en) Method and apparatus for scalar multiplication secure against differential power attacks
JP4423900B2 (en) Scalar multiplication calculation method, apparatus and program for elliptic curve cryptography
JP4692022B2 (en) Scalar multiplication apparatus and program for elliptic curve cryptography
JP2003255831A (en) Method and device for calculating elliptic curve scalar multiple
JP4502817B2 (en) Elliptic curve scalar multiplication method and apparatus
JP5038868B2 (en) Key sharing method, first device, second device, and program thereof
JP4783061B2 (en) Scalar multiplication unit for elliptic curve cryptography
JP5179933B2 (en) Data processing device
JP7406108B2 (en) Encryption/decryption system, encryption/decryption method, and encryption/decryption program
JP2004053814A (en) Elliptic curve cryptosystem device and elliptic curve cryptosystem operation method
KR20090090881A (en) Method and apparatus of elliptic curve cryptography processing in sensor mote and recording medium using it

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101029

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101228

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: 20110125

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: 20110207

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140304

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees