JP4783061B2 - Scalar multiplication unit for elliptic curve cryptography - Google Patents

Scalar multiplication unit for elliptic curve cryptography Download PDF

Info

Publication number
JP4783061B2
JP4783061B2 JP2005145449A JP2005145449A JP4783061B2 JP 4783061 B2 JP4783061 B2 JP 4783061B2 JP 2005145449 A JP2005145449 A JP 2005145449A JP 2005145449 A JP2005145449 A JP 2005145449A JP 4783061 B2 JP4783061 B2 JP 4783061B2
Authority
JP
Japan
Prior art keywords
unit
calculation
scalar
point
elliptic curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005145449A
Other languages
Japanese (ja)
Other versions
JP2006243690A (en
Inventor
カミーユ・ヴィオム
勝幸 桶屋
恵輔 伯田
剛 高木
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2005145449A priority Critical patent/JP4783061B2/en
Publication of JP2006243690A publication Critical patent/JP2006243690A/en
Application granted granted Critical
Publication of JP4783061B2 publication Critical patent/JP4783061B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/724Finite field arithmetic
    • G06F7/725Finite field arithmetic over elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7261Uniform execution, e.g. avoiding jumps, or using formulae with the same power profile

Landscapes

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

Description

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

楕円曲線暗号は、N. Koblitz, V. S. Millerにより提案された公開鍵暗号の一種である。公開鍵暗号には、公開鍵(Public Key)と呼ばれる一般公開してよい情報と、秘密鍵(Private Key)と呼ばれる秘匿しなければならない秘密情報がある。与えられたメッセージの暗号化や署名の検証には公開鍵を用い、与えられたメッセージの復号化や署名の生成には秘密鍵を用いる。   Elliptic curve cryptography is a kind of public key cryptography proposed by N. Koblitz, V. S. Miller. Public key cryptography includes information that can be opened 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 encrypting a given message and verifying a signature, and a secret key is used for decrypting a given message and generating a signature.

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

そして、同じ点同士による楕円曲線上の加法のことを、特に楕円曲線上の2倍算という。楕円曲線上の2点の加法は、次のようにして計算される。2点を通る直線を引くとその直線は楕円曲線と他の点において交わる。その交わった点とx軸に関して対称な点を、加法を行った結果の点とする。例えば、コブリッツ曲線の場合には、点(x,y)と点(x,y)の加算(x,y)=(x,y)+(x,y)は、下記(式1)〜(式3)を計算することにより得られる。 The addition on the elliptic curve by the same points is particularly called doubling on the elliptic curve. The addition of two points on the elliptic curve is calculated as follows. When a straight line passing through two points is drawn, the straight line intersects the elliptic curve at another point. The intersecting point and a point that is symmetric with respect to the x-axis are taken as points resulting from the addition. For example, in the case of a Kobritz curve, the addition (x 3 , y 3 ) = (x 1 , y 1 ) + (x 2 , y 2 ) of the point (x 1 , y 1 ) and the point (x 2 , y 2 ) ) Is obtained by calculating (Equation 1) to (Equation 3) below.

=λ+λ+x+x+a ・・・(式1)
=(x+x)λ+x+y ・・・(式2)
λ=(y+y)/(x+x) ・・・(式3)
ここで、コブリッツ曲線の定義方程式は、下記(式4)で与えられる。
x 3 = λ 2 + λ + x 1 + x 2 + a (Formula 1)
y 3 = (x 1 + x 3 ) λ + x 3 + y 1 (Expression 2)
λ = (y 1 + y 2 ) / (x 1 + x 2 ) (Formula 3)
Here, the definition equation of the Kobritz curve is given by the following (formula 4).

+xy=x+ax+1,(a=0 or 1) ・・・(式4)
すなわち、(式4)のx,yに、各々x,y(i=1,2,3)を代入した場合に、(式4)の等式が成り立つ。
y 2 + xy = x 3 + ax 2 +1, (a = 0 or 1) (Formula 4)
That is, 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倍算を行った結果の点とする。例えば、コブリッツ曲線の場合には、点(x,y)の2倍算(x,y)=2(x,y)=(x,y)+(x,y)は、(式1),(式2)及び下記(式5)を計算することにより得られる。 The doubling of the 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 intersecting point and a point that is symmetric with respect to the x-coordinate are taken as the result of doubling. For example, in the case of Koblitz curve, the point (x 1, y 1) of the doubling (x 3, y 3) = 2 (x 1, y 1) = (x 1, y 1) + (x 1, y 1 ) is obtained by calculating (Expression 1), (Expression 2), and (Expression 5) below.

λ=(y/x)+x ・・・(式5)
また、コブリッツ曲線上の点に対して、τ倍算(タウ倍算)と呼ばれる演算を行うことが可能である。点(x,y)に対するτ倍算とは、下記(式6)を計算することである。
λ = (y 1 / x 1 ) + x 1 (Formula 5)
In addition, an operation called τ multiplication (tau multiplication) can be performed on points on the Kobritz curve. The τ multiplication for the point (x 1 , y 1 ) is to calculate the following (formula 6).

(x,y)=τ(x,y)=(x ,y ) ・・・(式6)
また、下記(式7),(式8)が成り立つことが知られており、(式7)の性質により、τを、下記(式9)を満たす複素数と考えることができる。
(X 3 , y 3 ) = τ (x 1 , y 1 ) = (x 1 2 , y 1 2 ) (Expression 6)
Further, it is known that the following (formula 7) and (formula 8) hold, and τ can be considered as a complex number satisfying the following (formula 9) due to the property of (formula 7).

(x,x)+2(x,y)=μ(x,y) ・・・(式7)
μ=(−1) ・・・(式8)
τ+2=μτ ・・・(式9)
楕円曲線上のある点に対し、特定の回数だけ加法を行うことをスカラー倍といい、その結果をスカラー倍点、その回数のことをスカラー値という。
(X 4 , x 4 ) +2 (x, y) = μ (x 2 , y 2 ) (Expression 7)
μ = (− 1) a (Expression 8)
τ 2 + 2 = μτ (Equation 9)
Adding a certain number of times on an elliptic curve a specific number of times is called scalar multiplication, the result is called a scalar multiple, and the number of times is called a scalar value.

楕円曲線暗号において標準化団体が推奨する楕円曲線は、ランダムな標数2の楕円曲線、コブリッツ曲線、及び、標数が大きな素体上の楕円曲線である。   The elliptic curve recommended by the standardization body in elliptic curve cryptography is a random characteristic 2 elliptic curve, a Kobritz curve, and an elliptic curve on a prime field with a large characteristic.

楕円曲線上の離散対数問題の求解の困難性が理論的に確立されてきている一方で、実際の実装においては秘密鍵などの秘密情報に関連する情報、例えば計算時間や電力消費量などが暗号処理において漏洩する場合があり、その漏洩情報をもとに秘密情報を復元するといったサイドチャネル攻撃と呼ばれる攻撃法が提案されている。   While the difficulty of solving the discrete logarithm problem on an elliptic curve has been theoretically established, in an actual implementation, information related to secret information such as a secret key, such as calculation time and power consumption, is encrypted. An attack method called a side channel attack has been proposed in which there is a case of leak in processing, and secret information is restored based on the leaked information.

楕円曲線暗号に対して、標準化団体の推奨する楕円曲線については、例えば、非特許文献1に記載されている。   Non-patent document 1 describes, for example, an elliptic curve recommended by a standardization organization for elliptic curve cryptography.

楕円曲線暗号に対するサイドチャネル攻撃について、非特許文献2に記載されている。   Non-Patent Document 2 describes a side channel attack against elliptic curve cryptography.

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

楕円曲線暗号に対するサイドチャネル攻撃の防御法について、非特許文献3に記載されている。   Non-patent document 3 describes a side channel attack defense method against elliptic curve cryptography.

コブリッツ曲線におけるスカラー倍の高速計算手法について、非特許文献4に記載されている。また、正規基底については、例えば、非特許文献4に記載されている。
D. Johnson, A. Menezes, “The Elliptic Curve Digital Signature Algorithm (ECDSA)”, Technial Report CORR 99-34, Dept. of C&O, University of Waterloo, Canada.[平成17年2月1日検索],<URL>http://www.cacr.math.uwaterloo.ca/techreports/1999/corr99-34.pdf J.Coron, Resistance against Differential Power Analysis for Elliptic Curve Cryptosystems, Cryptographic Hardware and Embedded Systems: Proceedings of CHES'99, LNCS 1717, Springer-Verlag, (1999), pp.292-302. K.Okeya, T.Takagi, The Width-w NAF Method Provides Small Memory and Fast Elliptic Scalar Multiplications Secure against Side Channel Attacks, RSA conference cryptographer's track (CT-RSA 2003), LNCS 2612, Springer-Verlag, (2003), pp.328-343. J.A.Solinas, “Efficient Arithmetic on Koblitz Curves”, Designs, Codes and Cryptography, 19, (2000), pp.195-249.
Non-patent document 4 describes a high-speed calculation method for scalar multiplication in a Kobritz curve. Further, the normal basis is described in Non-Patent Document 4, for example.
D. Johnson, A. Menezes, “The Elliptic Curve Digital Signature Algorithm (ECDSA)”, Technial Report CORR 99-34, Dept. of C & O, University of Waterloo, Canada. [Search February 1, 2005], <URL> http://www.cacr.math.uwaterloo.ca/techreports/1999/corr99-34.pdf J. Coron, Resistance against Differential Power Analysis for Elliptic Curve Cryptosystems, Cryptographic Hardware and Embedded Systems: Proceedings of CHES'99, LNCS 1717, Springer-Verlag, (1999), pp.292-302. K.Okeya, T.Takagi, The Width-w NAF Method Provides Small Memory and Fast Elliptic Scalar Multiplications Secure against Side Channel Attacks, RSA conference cryptographer's track (CT-RSA 2003), LNCS 2612, Springer-Verlag, (2003), pp.328-343. JASolinas, “Efficient Arithmetic on Koblitz Curves”, Designs, Codes and Cryptography, 19, (2000), pp.195-249.

情報通信ネットワークの進展と共に電子情報に対する秘匿や認証の為の暗号技術は不可欠な要素となってきている。暗号技術に課せられる要件としては、安全性以外にも、処理速度や少ないメモリ使用量などがあるが、一般的に、安全性、処理速度、メモリ使用量の間にはトレードオフの関係があり、すべての要件を満たすことは難しい。他方、楕円曲線上の離散対数問題が非常に困難である為に、素因数分解の困難性を安全性の根拠にしている暗号と比べて、楕円曲線暗号では鍵長を比較的短くすることができる。   With the progress of information communication networks, encryption technology for secrecy and authentication of electronic information has become an indispensable element. 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. On the other hand, the discrete logarithm problem on the elliptic curve is very difficult, so that the key length can be made relatively short in the elliptic curve cryptosystem compared to the cipher that uses the difficulty of prime factorization as the basis of security. .

そのため、楕円曲線暗号では、計算能力、メモリ容量などのリソースが比較的少なくても暗号処理を行うことが可能である。しかしながら、スマートカード(ICカード等ともいう)等においては、利用可能なリソースは少なく、限られたリソース内で暗号処理を最適化する必要がある。前記非特許文献4などに記載されているように、コブリッツ曲線では、点のスカラー倍算についてはτ倍算を用いることによって高速演算が可能であることが知られており、スマートカードで用いるのに有効である。   For this reason, elliptic curve cryptography can perform cryptographic processing even when resources such as calculation capacity and memory capacity are relatively small. However, in a smart card (also referred to as an IC card) or the like, there are few resources that can be used, and it is necessary to optimize cryptographic processing within limited resources. As described in Non-Patent Document 4 and the like, in the Kobritz curve, it is known that high-speed calculation is possible by using τ multiplication for scalar multiplication of points. It is effective for.

前記非特許文献3の技術は、サイドチャネル攻撃を防ぐ方法として有効であり、コブリッツ曲線に対して適用できるが、τ倍算を用いた形では適用できない。   The technique of Non-Patent Document 3 is effective as a method for preventing a side channel attack and can be applied to a Kobritz curve, but cannot be applied in a form using τ multiplication.

また、前記非特許文献4の技術は、コブリッツ曲線での高速計算手法としては有効であるが、サイドチャネル攻撃を防ぐという点については考慮されていない。   Further, although the technique of Non-Patent Document 4 is effective as a high-speed calculation method using a Kobritz curve, it does not consider the point of preventing a side channel attack.

本発明は以上のような問題に鑑みてなされたものであり、その目的は、コブリッツ曲線に適用可能で、サイドチャネル攻撃を防ぐことができ、かつメモリ使用量及び処理高速性に優れた、楕円曲線暗号におけるスカラー倍を計算する技術を提供することにある。   The present invention has been made in view of the above problems, and its object is to apply to a Kobritz curve, to prevent a side channel attack, and to have an elliptical shape with excellent memory usage and processing speed. An object of the present invention is to provide a technique for calculating a scalar multiplication in curve cryptography.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、次のとおりである。前記目的を達成するために、本発明の楕円曲線暗号におけるスカラー倍を計算する技術は、以下に示す技術的手段を備えることを特徴とする。   Of the inventions disclosed in the present application, the outline of typical ones will be briefly described as follows. In order to achieve the above object, the technique for calculating the scalar multiplication in the elliptic curve cryptography of the present invention comprises the following technical means.

本発明のスカラー倍計算方法は、楕円曲線上の加算(第一の演算とする)と前記加算とは異なる第二の演算とを有する楕円曲線において、スカラー値と楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍を計算する方法であって、計算機資源を用いて、前記スカラー値を数値列にエンコードするステップと、前記楕円曲線上の点から前記スカラー値とは独立に前記前計算テーブル(後段の計算で使用するために前以て計算された値が格納された情報)を作成するステップと、前記エンコードした結果の数値列と前記前計算テーブルから、前記楕円曲線上の加算と第二の演算を、前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップとを有する処理を行う。   The scalar multiplication method of the present invention is an elliptic curve having an addition on the elliptic curve (first calculation) and a second calculation different from the addition, and the scalar multiplication from the scalar value and the point on the elliptic curve. A method of calculating a scalar multiplication in elliptic curve cryptography for calculating a point, wherein the scalar value is independent of the scalar value from the point on the elliptic curve by using a computer resource to encode the scalar value into a numerical sequence. A step of creating a pre-calculation table (information in which a value calculated in advance for use in a subsequent calculation) is stored, and from the encoded result numeric string and the pre-calculation table, the elliptic curve By performing the above addition and the second operation in a fixed order independent of the scalar value, a process including the step of calculating the scalar multiple is performed.

また、本発明のスカラー倍計算方法は、前記エンコードするステップは、前記スカラー値におけるΨ関数の値を計算するステップを含み、前記Ψ関数は、前記スカラー値d=x+xτに対して、Ψ(d)=(x+x*tw+1 mod w+1)−2で与えられる。ここで、wは、ウィンドウ幅と呼ばれる正の整数、x,xは、整数、tw+1は、コブリッツ曲線上の演算τを複素数とみなしたときにwによって定まる整数である。なお、これらの記号の詳細については非特許文献4にも記載されている。 In the scalar multiplication method of the present invention, the encoding step includes a step of calculating a value of a Ψ function in the scalar value, and the Ψ function is calculated with respect to the scalar value d = x R + x T τ. , Ψ w (d) = (x R + x T * t w + 1 mod 2 w + 1 ) −2 w . Here, w is a positive integer called a window width, x R and x T are integers, and t w + 1 is an integer determined by w when the operation τ on the Kobritz curve is regarded as a complex number. Details of these symbols are also described in Non-Patent Document 4.

また、本発明の他のスカラー倍計算方法は、楕円曲線演算において、スカラー値と楕円曲線上の点からスカラー倍点を計算する方法であって、計算機資源を用いて、前記楕円曲線上の点から前記前計算テーブルを作成するステップと、前記スカラー値及び前記前計算テーブルからスカラー倍点を計算するステップとを有する処理を行う。   Further, another scalar multiplication method of the present invention is a method of calculating a scalar multiple from a scalar value and a point on an elliptic curve in an elliptic curve calculation, and uses a computer resource to calculate the point on the elliptic curve. A process including the step of creating the pre-calculation table from the above and the step of calculating a scalar multiple from the scalar value and the pre-calculation table is performed.

以上のような手段により、コブリッツ曲線において適用可能で、サイドチャネル攻撃を防ぐことができる、かつメモリ使用量に優れた及び高速計算可能で処理高速性に優れた、楕円曲線暗号におけるスカラー倍計算方法を利用可能にする。また、このスカラー倍計算方法を用いた、暗号化処理、復号化処理、署名生成処理、署名検証処理、鍵交換などのデータ共有のためのデータ生成処理などを利用可能にする。また本発明は、演算装置や記憶装置などの計算機資源を備え、それら処理を行う装置、及び、それら処理を計算機に実行させるプログラムを提供する。   The scalar multiplication calculation method in elliptic curve cryptography that can be applied to the Kobritz curve by the above means, can prevent side channel attacks, has excellent memory usage, is capable of high-speed calculation, and is excellent in processing speed. Make available. In addition, data generation processing for data sharing such as encryption processing, decryption processing, signature generation processing, signature verification processing, and key exchange using the scalar multiplication method can be used. The present invention also provides an apparatus that includes computer resources such as an arithmetic device and a storage device, performs these processes, and a program that causes the computer to execute these processes.

本発明の方法、装置及びプログラムは、具体的には、以下のような特徴を有する。   Specifically, the method, apparatus and program of the present invention have the following features.

(1)楕円曲線上の加算と前記加算とは異なる第二の演算とを有する楕円曲線において、スカラー値及び前記楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算方法であって、前記スカラー値を数値列にエンコードするステップと、前記楕円曲線上の点から前記スカラー値とは独立に前計算テーブルを作成するステップと、前記数値列及び前記前計算テーブルから、前記楕円曲線上の加算と第二の演算を、前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップとを含むことを特徴とするスカラー倍計算方法。   (1) A scalar multiplication calculation method in elliptic curve cryptography, wherein a scalar multiple is calculated from a scalar value and a point on the elliptic curve in an elliptic curve having addition on the elliptic curve and a second operation different from the addition. The step of encoding the scalar value into a numerical sequence, the step of creating a pre-calculation table independently of the scalar value from the points on the elliptic curve, and the numerical sequence and the pre-calculation table, And a step of calculating the scalar multiple by performing addition on the elliptic curve and a second operation in a fixed order independently of the scalar value.

(2)楕円曲線上の加算と前記加算とは異なる第二の演算とを有する楕円曲線において、スカラー値及び前記楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算方法であって、前記楕円曲線上の点から前記スカラー値とは独立に前計算テーブルを作成するステップと、前記前計算テーブルから、前記楕円曲線上の加算と第二の演算を、前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップとを含むことを特徴とするスカラー倍計算方法。   (2) A scalar multiplication calculation method in elliptic curve cryptography for calculating a scalar multiple from a scalar value and a point on the elliptic curve in an elliptic curve having addition on the elliptic curve and a second operation different from the addition. A step of creating a pre-calculation table independently of the scalar value from a point on the elliptic curve, and addition and second operation on the elliptic curve from the pre-calculation table, the scalar value and And a step of calculating the scalar multiple by independently executing in a certain order.

(3)楕円曲線上の加算と前記加算とは異なる第二の演算とを有する楕円曲線において、あらかじめエンコードされたスカラー値、ウィンドウ幅、及び楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算方法であって、前記楕円曲線上の点から前記スカラー値とは独立に前計算テーブルを作成するステップと、前記前計算テーブルから、前記楕円曲線上の加算と第二の演算を、前記スカラー値とは独立に一定の順序で前記ウィンドウ幅に応じて実行することにより、前記スカラー倍点を計算するステップとを含むことを特徴とするスカラー倍計算方法。   (3) In an elliptic curve having addition on the elliptic curve and a second operation different from the addition, an elliptic that calculates a scalar multiple from a pre-encoded scalar value, a window width, and a point on the elliptic curve A method of scalar multiplication in curve cryptography, comprising the steps of creating a pre-calculation table independently from the scalar value from points on the elliptic curve, adding from the pre-calculation table on the elliptic curve and a second And a step of calculating the scalar multiplication point by executing an operation according to the window width in a fixed order independently of the scalar value.

(4)前記楕円曲線はコブリッツ曲線であることを特徴とするスカラー倍計算方法。   (4) The scalar multiplication method, wherein the elliptic curve is a Kobritz curve.

(5)前記第二の演算はτ倍算であることを特徴とするスカラー倍計算方法。   (5) A scalar multiplication calculation method, wherein the second operation is τ multiplication.

(6)前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップは、前記楕円曲線上の第二の演算をτとするとこの第二の演算τをあらかじめ定められた回数だけ実行する第一のステップと、前記楕円曲線上の加算を実行する第二のステップとを有し、前記第一と第二のステップを繰り返し行うことを特徴とするスカラー倍計算方法。   (6) The step of calculating the scalar multiple by executing in a fixed order independently of the scalar value is such that when the second operation on the elliptic curve is τ, the second operation τ is set in advance. A scalar multiplication calculation comprising: a first step for executing a predetermined number of times; and a second step for executing addition on the elliptic curve, wherein the first and second steps are repeated. Method.

(7)更に、前記スカラー値を数値列にエンコードするステップは、前記スカラー値におけるΨ関数の値を計算するステップを含み、前記Ψ関数は、前記スカラー値であるdに対して、Ψ(d)=(x+x*tw+1 mod w+1)−2で与えられることを特徴とするスカラー倍計算方法。 (7) Furthermore, the step of encoding the scalar value into a numerical sequence includes a step of calculating a value of a Ψ function in the scalar value, and the Ψ function is Ψ w ( d) = (x R + x T * t w + 1 mod 2 w + 1 ) −2 w is given by the scalar multiplication calculation method.

(8)前記前計算テーブルは、前記楕円曲線上の点であるPとあらかじめ定めた正の整数であるwとに対して、{P,3P,5P,……,(2−1)P}からなることを特徴とするスカラー倍計算方法。 (8) The pre-calculation table uses {P, 3P, 5P,..., (2 w −1) P for P that is a point on the elliptic curve and w that is a predetermined positive integer. } A scalar multiplication calculation method characterized by comprising:

(9)前記前計算テーブルは、前記楕円曲線上の点であるPとあらかじめ定めた正の整数であるwと前記楕円曲線上の第二の演算であるτとに対して、P±τP±τP±……±τw−1Pからなることを特徴とするスカラー倍計算方法。 (9) The pre-calculation table includes P ± τP ± for P which is a point on the elliptic curve, w which is a predetermined positive integer, and τ which is the second calculation on the elliptic curve. A scalar multiplication calculation method comprising τ 2 P ± …… ± τ w−1 P.

(10)前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップは、前記前計算テーブルから読み出した点をシフトするステップを含むことを特徴とするスカラー倍計算方法。   (10) The step of calculating the scalar multiple by executing in a fixed order independently of the scalar value includes a step of shifting the point read from the pre-calculation table. Method of calculation.

(11)前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップは、前記楕円曲線上の点から中間データを導出するステップと、前記中間データをシフトするステップとを含むことを特徴とするスカラー倍計算方法。   (11) The step of calculating the scalar multiple by executing in a certain order independent of the scalar value, deriving intermediate data from a point on the elliptic curve, and shifting the intermediate data And a scalar multiplication calculation method.

(12)前記前計算テーブルを作成するステップは、前記前計算テーブルに格納するデータを生成するステップと、前記生成したデータをランダム化するステップと、前記ランダム化したデータを前記前計算テーブルに格納するステップとを含むことを特徴とするスカラー倍計算方法。   (12) The step of creating the pre-calculation table includes generating data to be stored in the pre-calculation table, randomizing the generated data, and storing the randomized data in the pre-calculation table And a step of calculating the scalar multiplication.

(13)前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算するステップは、前記前計算テーブルに格納されている点を読み出すステップと、前記読み出した点をランダム化するステップと、前記ランダム化した点を前記前計算テーブルに書き込むステップとを含むことを特徴とするスカラー倍計算方法。   (13) The step of calculating the scalar multiple by executing in a fixed order independent of the scalar value is a step of reading a point stored in the pre-calculation table; And a step of writing the randomized points to the pre-calculation table.

(14)データからディジタル署名データを生成する署名生成方法であって、前記スカラー倍計算方法を用いてスカラー倍を計算するステップを有することを特徴とする署名生成方法。   (14) A signature generation method for generating digital signature data from data, comprising a step of calculating a scalar multiple using the scalar multiplication method.

(15)データからディジタル署名データを生成する署名生成方法であって、乱数倍計算部による処理ステップを有し、前記乱数倍計算部による処理ステップは、楕円曲線上の点から前計算テーブルを作成するステップと、あらかじめ定められた個数だけビットをランダムに選択し、前記ランダムに選択したビットから整数を生成するステップと、前記生成した整数から、楕円曲線上の加算と第二の演算を、前記整数とは独立に一定の順序で実行するステップと、前記整数を生成するステップ、及び、前記実行するステップを繰り返し行うステップと、前記繰り返し行うステップにより、乱数と前記楕円曲線上の点との乱数倍点を出力するステップとを有することを特徴とする署名生成方法。   (15) A signature generation method for generating digital signature data from data, comprising a processing step by a random number multiplication unit, wherein the processing step by the random number multiplication unit creates a pre-calculation table from points on an elliptic curve A step of randomly selecting a predetermined number of bits, generating an integer from the randomly selected bits, and adding the second arithmetic on the elliptic curve and the second operation from the generated integer, A random number between a random number and a point on the elliptic curve by executing in a certain order independent of the integer, generating the integer, repeating the executing step, and repeating the step And a step of outputting a double point.

(16)暗号化されたデータから復号化されたデータを生成する復号化方法であって、前記スカラー倍計算方法を用いてスカラー倍を計算するステップを有することを特徴とする復号化方法。   (16) A decryption method for generating decrypted data from encrypted data, comprising the step of calculating a scalar multiple using the scalar multiplication method.

(17)データから共有データを生成するデータ生成方法であって、前記スカラー倍計算方法を用いてスカラー倍を計算するステップを有することを特徴とするデータ生成方法。   (17) A data generation method for generating shared data from data, comprising the step of calculating a scalar multiplication using the scalar multiplication method.

(18)楕円曲線上の加算と前記加算とは異なる第二の演算τとを有する楕円曲線において、スカラー値及び楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算装置であって、前記スカラー値を数値列にエンコードするエンコード部と、前記楕円曲線上の点から前記スカラー値とは独立に前計算テーブルを作成する前計算部と、前記数値列及び前記前計算テーブルから、前記楕円曲線上の加算と第二の演算τを、前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算する実計算部とを具備することを特徴とするスカラー倍計算装置。   (18) A scalar multiplication calculator in elliptic curve cryptography that calculates a scalar multiple from a scalar value and a point on an elliptic curve in an elliptic curve having addition on the elliptic curve and a second operation τ different from the addition. An encoding unit that encodes the scalar value into a numerical sequence, a pre-calculation unit that creates a pre-calculation table independently of the scalar value from a point on the elliptic curve, the numerical sequence and the pre-calculation table And an actual calculation unit for calculating the scalar multiple by performing addition on the elliptic curve and the second operation τ in a certain order independent of the scalar value. A scalar multiplication calculator.

(19)楕円曲線上の加算と前記加算とは異なる第二の演算τとを有する楕円曲線において、スカラー値及び楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算装置であって、前記楕円曲線上の点から前記スカラー値とは独立に前計算テーブルを作成する前計算部と、前記前計算テーブルから前記楕円曲線上の加算と第二の演算τを、前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算する実計算部とを具備することを特徴とするスカラー倍計算装置。   (19) A scalar multiplication apparatus in elliptic curve cryptography for calculating a scalar multiple from a scalar value and a point on an elliptic curve in an elliptic curve having addition on the elliptic curve and a second operation τ different from the addition. A pre-calculation unit that creates a pre-calculation table independently from the scalar value from a point on the elliptic curve, an addition on the elliptic curve and a second operation τ from the pre-calculation table, and the scalar A scalar multiplication calculation device comprising: an actual calculation unit that calculates the scalar multiple by executing in a fixed order independently of a value.

(20)楕円曲線上の加算と前記加算とは異なる第二の演算τとを有する楕円曲線において、あらかじめエンコードされたスカラー値、ウィンドウ幅、及び楕円曲線上の点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算装置であって、前記楕円曲線上の点から前記スカラー値とは独立に前計算テーブルを作成する前計算部と、前記前計算テーブルから、前記楕円曲線上の加算と第二の演算τを、前記ウィンドウ幅に応じて前記スカラー値とは独立に一定の順序で実行することにより、前記スカラー倍点を計算する実計算部とを具備することを特徴とするスカラー倍計算装置。   (20) In an elliptic curve having an addition on the elliptic curve and a second operation τ different from the addition, a scalar multiple is calculated from a pre-encoded scalar value, a window width, and a point on the elliptic curve. A scalar multiplication calculation apparatus in elliptic curve cryptography, a pre-calculation unit that creates a pre-calculation table independently of the scalar value from a point on the elliptic curve, and addition on the elliptic curve from the pre-calculation table; A scalar multiplication unit, comprising: an actual calculation unit that calculates the scalar multiplication point by executing a second operation τ in a fixed order independent of the scalar value in accordance with the window width. Computing device.

(21)データからディジタル署名データを生成する署名生成処理部と、前記署名生成処理部より依頼されてスカラー倍を計算するスカラー倍計算部とを有する署名生成装置であって、前記スカラー倍計算部は、前記スカラー倍計算方法を用いてスカラー倍を計算するステップを有する処理を行うことを特徴とする署名生成装置。   (21) A signature generation apparatus including a signature generation processing unit that generates digital signature data from data, and a scalar multiplication calculation unit that is requested by the signature generation processing unit to calculate a scalar multiplication, the scalar multiplication calculation unit Performs a process including a step of calculating a scalar multiplication using the scalar multiplication calculation method.

(22)データからディジタル署名データを生成する署名生成装置であって、乱数倍計算部を有し、前記乱数倍計算部は、楕円曲線上の点から前計算テーブルを作成する前計算部と、あらかじめ定められた個数だけビットをランダムに選択し、前記ランダムに選択したビットから整数を生成するステップと、前記生成された整数から、楕円曲線上の加算と第二の演算を、前記整数とは独立に一定の順序で実行するステップと、前記整数を生成するステップ、及び、前記実行するステップを繰り返し行うステップと、前記繰り返し行うステップにより、乱数と前記楕円曲線上の点との乱数倍点を出力するステップを含む処理を行う実計算部とを有することを特徴とする署名生成装置。   (22) A signature generation device for generating digital signature data from data, comprising a random number multiplication calculation unit, wherein the random number multiplication calculation unit creates a pre-calculation table from points on an elliptic curve; Randomly selecting a predetermined number of bits, generating an integer from the randomly selected bits, adding from the generated integer to an elliptic curve, and performing a second operation, Independently executing in a fixed order, generating the integer, repeating the executing step, and repeating the step, a random multiple of a random number and a point on the elliptic curve is obtained. And a real calculation unit that performs processing including an output step.

(23)暗号化されたデータから復号化されたデータを生成する復号化処理部と、前記復号化処理部より依頼されてスカラー倍を計算するスカラー倍計算部とを有する復号化装置であって、前記スカラー倍計算部は、前記スカラー倍計算方法を用いてスカラー倍を計算するステップを有する処理を行うことを特徴とする復号化装置。   (23) A decryption device including a decryption processing unit that generates decrypted data from encrypted data, and a scalar multiplication calculation unit that is requested by the decryption processing unit and calculates a scalar multiplication. The decoding apparatus is characterized in that the scalar multiplication calculation unit performs a process including a step of calculating a scalar multiplication using the scalar multiplication calculation method.

(24)データから共有データを生成するデータ生成処理部と、前記データ生成処理部より依頼されてスカラー倍を計算するスカラー倍計算部とを有するデータ生成装置であって、前記データ生成処理部は、前記スカラー倍計算方法を用いてスカラー倍を計算するステップを有する処理を行うことを特徴とするデータ生成装置。   (24) A data generation device including a data generation processing unit that generates shared data from data, and a scalar multiplication calculation unit that is requested by the data generation processing unit to calculate a scalar multiplication, and the data generation processing unit includes: A data generation apparatus performing a process including a step of calculating a scalar multiplication using the scalar multiplication calculation method.

(25)前記スカラー倍計算方法による処理を計算機に実行させることを特徴とするプログラム。   (25) A program for causing a computer to execute processing according to the scalar multiplication calculation method.

(26)前記署名生成方法による処理を計算機に実行させることを特徴とするプログラム。   (26) A program for causing a computer to execute processing according to the signature generation method.

(27)前記復号化方法による処理を計算機に実行させることを特徴とするプログラム。   (27) A program that causes a computer to execute the process according to the decoding method.

(28)前記データ生成方法による処理を計算機に実行させることを特徴とするプログラム。   (28) A program that causes a computer to execute processing according to the data generation method.

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば以下のとおりである。本発明によれば、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃を防ぐことができ安全で、かつメモリ使用量及び処理高速性に優れた、楕円曲線演算によるメッセージ処理が可能になる。   Among the inventions disclosed in the present application, effects obtained by typical ones will be briefly described as follows. According to the present invention, it is possible to perform message processing by elliptic curve calculation, which can be applied to a Kobritz curve, can prevent a side channel attack, is safe, and has excellent memory usage and processing speed.

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一部には原則として同一符号を付し、その繰り返しの説明は省略する。図1〜図16は、本発明の各実施の形態を説明するための図である。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiment, and the repetitive description thereof will be omitted. 1-16 is a figure for demonstrating each embodiment of this invention.

<システム構成>
図1は、本発明の一実施の形態におけるスカラー倍計算装置であるコンピュータA101及びコンピュータB121と、これを含んで構成される情報処理システムの構成を示すものである。図1に示す構成は、各実施の形態で基本的に共通となる。本発明の実施の形態におけるスカラー倍計算装置は、本発明の実施の形態におけるスカラー倍計算方法に従ったスカラー倍計算処理を含んだ処理を実行するものであり、スカラー倍計算を用いた暗号化処理などを実行する。各コンピュータ(101,121)は、本発明の実施の形態におけるプログラムを実行することにより、スカラー倍計算処理を含む処理を行う。本情報処理システムは、スカラー倍計算方法を適用したコンピュータA101とコンピュータB121とがネットワーク142により接続されてなりネットワーク142を介してデータ・情報の授受を行う暗号通信システムを示している。
<System configuration>
FIG. 1 shows the configuration of a computer A 101 and a computer B 121 that are scalar multiplication apparatuses according to an embodiment of the present invention, and an information processing system that includes these. The configuration shown in FIG. 1 is basically common to each embodiment. A scalar multiplication calculation apparatus according to an embodiment of the present invention executes a process including a scalar multiplication calculation process according to a scalar multiplication calculation method according to an embodiment of the present invention, and performs encryption using scalar multiplication calculation. Execute processing. Each computer (101, 121) performs processing including scalar multiplication processing by executing the program according to the embodiment of the present invention. This information processing system shows an encryption communication system in which a computer A 101 and a computer B 121 to which a scalar multiplication method is applied are connected via a network 142 and exchange data and information via the network 142.

本暗号通信システムにおけるコンピュータA101でメッセージの暗号化を行うには、P+k(dQ)及びkQを計算して出力する。そして、暗号文を入力したコンピュータB121で暗号文の復号化を行うには、秘密鍵dと前記kQより−d(kQ)を計算し、入力された暗号文に対して、下記(式10)を計算して出力すればよい。 In order to encrypt a message by the computer A101 in this cryptographic communication system, P m + k (dQ) and kQ are calculated and output. Then, in order to decrypt the ciphertext by the computer B121 that has input the ciphertext, -d (kQ) is calculated from the secret key d and the kQ, and the following (formula 10) is calculated for the input ciphertext. Can be calculated and output.

(P+k(dQ))−d(kQ) ・・・(式10)
ここで、Pはメッセージ、kは乱数、dは秘密鍵を示す定数(スカラー値に対応する)、Qは定点、dQは公開鍵を示す点(スカラー倍点に対応する)である。コンピュータA101は、秘密鍵d、定点Q、公開鍵dQなどの情報を保持している。コンピュータB101は、秘密鍵dなどの情報を保持している。
(P m + k (dQ) ) - d (kQ) ··· ( Equation 10)
Here, P m is a message, k is a random number, d is a constant indicating a secret key (corresponding to a scalar value), Q is a fixed point, and dQ is a point indicating a public key (corresponding to a scalar multiple). The computer A101 holds information such as a secret key d, a fixed point Q, and a public key dQ. The computer B101 holds information such as a secret key d.

データ141は、コンピュータA101からコンピュータB121に送信される。データ143は、コンピュータB121からコンピュータA101に送信される。ネットワーク142には、データとして、前記P+k(dQ),kQのみが送信され、メッセージPを復元(復号化)するためには、kdQ、すなわちkQのd倍を計算する必要がある。ところが、秘密鍵dはネットワーク142には送信されないため、秘密鍵dを保持しているものだけが、メッセージPを復元できることになる。 Data 141 is transmitted from computer A101 to computer B121. The data 143 is transmitted from the computer B121 to the computer A101. Only P m + k (dQ), kQ is transmitted as data to the network 142. In order to restore (decode) the message P m , it is necessary to calculate kdQ, that is, d times kQ. However, the private key d is for the network 142 is not sent, only those holding the secret key d is becomes possible to recover the message P m.

コンピュータA101は、CPU113やコプロセッサ114などの演算装置、RAM103、ROM106や外部記憶装置107などの記憶装置、コンピュータ外部とのデータ入出力を行う入出力インタフェース110を装備しており、外部にはコンピュータA101をユーザが操作するための、出力装置であるディスプレイ108、入力装置であるキーボード109、その他図示しない着脱可能な可搬型記憶媒体の読み書き装置などが接続されている。   The 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 inputting / outputting data to / from the outside of the computer. A display 108 as an output device, a keyboard 109 as an input device, and other removable portable storage medium read / write devices (not shown) are connected to allow the user to operate A101.

更に、コンピュータA101は、RAM103、ROM106や外部記憶装置107などの記憶装置によって、記憶部102を実現している。CPU113やコプロセッサ114などの演算装置が、記憶部102に格納された本実施の形態のプログラムを実行することにより、処理部111として、データ処理部112、スカラー倍計算部115とそれらに含まれる各処理部を実現する。本実施の形態のプログラムは、スカラー倍計算方法に従った処理を行わせるための命令などが記述されたものである。データ処理部112は、各実施の形態に応じたメッセージ処理を行うもので、例えば実施の形態1においては暗号化処理部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. When the arithmetic unit such as the CPU 113 or the coprocessor 114 executes the program of the present embodiment stored in the storage unit 102, the data processing unit 112, the scalar multiplication calculation unit 115, and the processing unit 111 are included in them. Each processing unit is realized. The program according to the present embodiment describes an instruction for performing processing according to the scalar multiplication method. The data processing unit 112 performs message processing according to each embodiment. For example, in the first embodiment, the data processing unit 112 functions as the encryption processing unit 112 and encrypts an input message.

CPU113は、コンピュータA101全体の制御を行う。コプロセッサ114は、CPU113と協調して、特に数値演算を行う。各実施の形態では、これら2つの演算装置を利用してスカラー倍計算処理を含む目的の処理すなわち暗号化処理などを行う。ハードウェア構成としてはこれに限らずに、例えば1つのプロセッサを有する構成で目的の処理を行うようにすることも勿論可能である。また、PCなどの汎用コンピュータ上で本発明の実施の形態のプログラムを実行させて他の処理と共に目的の処理を行わせる構成や、目的の処理を専用に実行するコンピュータ構成などのいずれも可能である。前記目的の処理とは、スカラー倍計算処理や、スカラー倍計算処理を用いてなされる暗号化処理、復号化処理、署名生成処理、署名検証処理、及び鍵交換などのデータ共有のためのデータ生成処理などを指し、これらについては後述する実施の形態で説明される。   The CPU 113 controls the entire computer A101. The coprocessor 114 particularly performs numerical calculations in cooperation with the CPU 113. In each embodiment, these two arithmetic devices are used to perform a target process including a scalar multiplication process, that is, an encryption process. The hardware configuration is not limited to this, and it is of course possible to perform a target process with a configuration having one processor, for example. In addition, a configuration in which the program of the embodiment of the present invention is executed on a general-purpose computer such as a PC to perform a target process together with other processes, or a computer configuration in which the target process is executed exclusively is possible. is there. The purpose processing is scalar multiplication processing, data generation for data sharing such as encryption processing, decryption processing, signature generation processing, signature verification processing, and key exchange performed using scalar multiplication processing. This refers to processing and the like, which will be described in an embodiment described later.

スカラー倍計算部115は、データ処理部112からの依頼に従って、スカラー倍計算処理を含む処理を行う。スカラー倍計算部115は、実施の形態1などでは、暗号化処理部112で暗号化を行うのに必要なパラメータを計算する。   The scalar multiplication calculation unit 115 performs processing including scalar multiplication calculation processing in accordance with a request from the data processing unit 112. In the first embodiment, the scalar multiplication calculation unit 115 calculates parameters necessary for the encryption processing unit 112 to perform encryption.

記憶部102は、定数104、秘密情報105などを記憶している。定数104は、例えば楕円曲線の定義式や楕円曲線上の定点などである。秘密情報105は、秘匿しなければならない情報であり、例えば秘密鍵の情報である。   The storage unit 102 stores a constant 104, secret information 105, and the like. The constant 104 is, for example, an elliptic curve definition formula or a fixed point on the elliptic curve. The secret information 105 is information that must be concealed, for example, secret key information.

コンピュータB121は、コンピュータA101と同様のハードウェア構成を備える。コンピュータB121は、CPU133、コプロセッサ134、RAM123、ROM126、外部記憶装置127、入出力インタフェース130などを装備しており、外部にはディスプレイ128、キーボード129などが接続されている。なお、コンピュータB121をコンピュータA101と異なる構成として情報処理システムを構成することも可能である。   The computer B121 has the same hardware configuration as the computer A101. The computer B121 includes a CPU 133, a coprocessor 134, a RAM 123, a ROM 126, an external storage device 127, an input / output interface 130, and the like, and a display 128, a keyboard 129, and the like are connected to the outside. Note that the information processing system can be configured with the computer B121 different from the computer A101.

更に、コンピュータB121は、RAM123、ROM126や外部記憶装置127などの記憶装置によって、記憶部122を実現している。CPU133やコプロセッサ134などの演算装置が、記憶部122に格納された本実施の形態のプログラムを実行することにより、処理部131として、データ処理部132、スカラー倍計算部135とそれらに含まれる各処理部を実現する。データ処理部132は、各実施の形態に応じたメッセージ処理を行うもので、実施の形態1などにおいては復号化処理部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. When the arithmetic device such as the CPU 133 or the coprocessor 134 executes the program of the present embodiment stored in the storage unit 122, the data processing unit 132 and the scalar multiplication calculation unit 135 are included as the processing unit 131. Each processing unit is realized. The data processing unit 132 performs message processing according to each embodiment. In the first embodiment, the data processing unit 132 functions as the decryption processing unit 132, and the ciphertext (corresponding to the data 141) that is an encrypted message. )).

スカラー倍計算部135は、データ処理部132からの依頼に従って、スカラー倍計算処理を含む処理を行う。スカラー倍計算部135は、実施の形態1などでは、復号化処理部132で復号化を行うのに必要なパラメータを計算する。記憶部122は、定数124(例えば楕円曲線の定義式や楕円曲線上の定点である)、秘密情報125(例えば秘密鍵の情報である)などを記憶している。   The scalar multiplication calculation unit 135 performs processing including scalar multiplication calculation processing in accordance with a request from the data processing unit 132. In the first embodiment and the like, 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, secret key information), and the like.

なお、上記各プログラムは、あらかじめ、上記コンピュータ(101,121)内の記憶部(102,122)に格納されていても良いし、必要なときに、入出力インタフェース(110,130)と上記コンピュータ(101,121)が利用可能な媒体を介して、他の装置から上記記憶部(102,122)に導入されてもよい。上記利用可能な媒体とは、例えば、入出力インタフェース(110,130)に対して着脱/入出力が可能な記憶媒体、または通信媒体(すなわちネットワークまたはネットワークを伝搬する搬送波)を指す。   Each program may be stored in advance in the storage unit (102, 122) in the computer (101, 121), or when necessary, the input / output interface (110, 130) and the computer. (101, 121) may be introduced into the storage unit (102, 122) from another device via a usable medium. The usable medium refers to, for example, a storage medium that can be attached / detached to / from the input / output interface (110, 130), or a communication medium (that is, a network or a carrier wave that propagates through the network).

<暗号化シーケンス>
次に、図2は、コンピュータA101及びコンピュータB121の各処理部間での情報の受け渡しの様子を示したシーケンス図である。まず、図2を参照しながら、前記図1のコンピュータA101が、入力されたメッセージを暗号化する場合の動作について説明する。処理対象となるメッセージは、ディジタル化されたデータであればよく、テキスト、画像、映像、音などの種類は問わない。
<Encryption sequence>
FIG. 2 is a sequence diagram showing how information is transferred between the processing units of the computer A 101 and the computer B 121. First, the operation when the computer A101 in FIG. 1 encrypts an input message will be described with reference to FIG. The message to be processed may be any digitized data, and may be any type of text, image, video, sound, or the like.

コンピュータA101において、まず、データ処理部(すなわち暗号化処理部)112は、入出力インタフェース110を介して、入力メッセージ(ステップS204)に対応する平文メッセージを受け取ると、入力された平文メッセージのビット長が、あらかじめ定めたビット長か否かを判断する。所定のビット長より長い場合には、所定のビット長となるように平文メッセージを区切る。   In the computer A101, first, when the data processing unit (that is, the encryption processing unit) 112 receives the plaintext message corresponding to the input message (step S204) via the input / output interface 110, the bit length of the input plaintext message. Is determined to be a predetermined bit length. When it is longer than the predetermined bit length, the plaintext message is divided so as to have a predetermined bit length.

以下、所定のビット長に区切られている部分メッセージ(単にメッセージともいう)について説明する。暗号化処理部112は、メッセージのビット列によって表される数値をx座標(x)に持つ楕円曲線上の点Pのy座標の値(y)を計算する。コブリッツ曲線は(式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 value (y m ) of the y coordinate 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 m ). Since the Kobritz curve is expressed by (Equation 4), the value of the y coordinate can be obtained from this.

次に、暗号化処理部112は、乱数kを生成する。そして、記憶部102に格納されている定数104から読み出した公開鍵dQと点Qのx座標と(S205)、求めたy座標の値と生成した乱数kとを、スカラー倍計算部115へ送る(S206)。スカラー倍計算部115は、点Qのx座標、y座標の値、及び乱数kによるスカラー倍点(xd1,yd1)=kQと、公開鍵dQのx座標、y座標の値、及び乱数kによるスカラー倍点(xd2,yd2)=k(dQ)とを計算し、計算されたスカラー倍点を、暗号化処理部112へ送る(S207)。 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, the x coordinate of the point Q (S205), the obtained y coordinate value, and the generated random number k are sent to the scalar multiplication unit 115. (S206). The scalar multiplication calculator 115 calculates the x-coordinate and y-coordinate values of the point Q, and the scalar multiple (x d1 , y d1 ) = kQ based on the random number k, the x-coordinate and y-coordinate values of the public key dQ, and the random The scalar multiple by k (x d2 , y d2 ) = k (dQ) is calculated, and the calculated scalar multiple is sent to the encryption processing unit 112 (S207).

暗号化処理部112は、スカラー倍計算部115から送られたスカラー倍点を用いて、暗号化処理を行う。例えば、コブリッツ曲線では、kQとP+k(dQ)を計算する。すなわち、下記(式11)〜(式13)を計算し、暗号化されたメッセージxe1,xe2を得る。 The encryption processing unit 112 performs encryption processing using the scalar multiple sent from the scalar multiplication calculation unit 115. For example, in the Kobritz curve, kQ and P m + k (dQ) are calculated. That is, the following (formula 11) to (formula 13) are calculated to obtain encrypted messages x e1 and x e2 .

e1=xd1 ・・・(式11)
e2=λ+λ+x+xd2+a ・・・(式12)
λ=(y+yd2)/(x+xd2) ・・・(式13)
コンピュータA101は、暗号化処理部112で暗号化された1つ以上の部分メッセージから、暗号化された出力メッセージ(S208に対応する)を組み立てる。
x e1 = x d1 (Expression 11)
x e2 = λ 2 + λ + x 1 + x d2 + a (Formula 12)
λ = (y 1 + y d2 ) / (x 1 + x d2 ) (Expression 13)
The computer A101 assembles an encrypted output message (corresponding to S208) from one or more partial messages encrypted by the encryption processing unit 112.

コンピュータA101は、暗号化された出力メッセージを、前記図1のデータ141として入出力インタフェース110より出力し、ネットワーク142を介してコンピュータB121へ転送する。   The computer A 101 outputs the encrypted output message from the input / output interface 110 as the data 141 in FIG. 1 and transfers it to the computer B 121 via the network 142.

なお、図2における記憶部102からデータ処理部112への情報読み出し(S205)のタイミングは、スカラー倍計算部115へ当該情報を送る前であれば、入力メッセージ(S204)を受け付ける前であっても良い。   Note that the timing of reading information (S205) from the storage unit 102 to the data processing unit 112 in FIG. 2 is before the input message (S204) is received before the information is sent to the scalar multiplication unit 115. Also good.

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

コンピュータB121において、まず、復号化処理部132は、入出力インタフェース130を介して、暗号化されたデータ141が入力されると(S204)、入力された暗号化されたデータ141のビット長が、あらかじめ定めたビット長か否かを判断する。所定のビット長より長い場合には、所定のビット長となるように、暗号化されたデータ141を区切る。   In the computer B121, first, when the encrypted data 141 is input via the input / output interface 130 to the decryption processing unit 132 (S204), the bit length of the input encrypted data 141 is It is determined whether or not the bit length is predetermined. If it is longer than the predetermined bit length, the encrypted data 141 is divided so as to have a predetermined bit length.

以下、所定のビット長に区切られている部分データ(単にデータともいう)について説明する。データ141のビット列によって表される数値をx座標に持つ楕円曲線上のy座標の値を計算する。暗号化されたメッセージがxe1,xe2のビット列であり、コブリッツ曲線ではy座標の値ye1,ye2は、下記(式14),(式15)から得ることができる。 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 in the Kobritz curve can be obtained from the following (formula 14) and (formula 15).

e1 +xe1e1=xe1 +axe1 +1,a=0 or 1 ・・・(式14)
e2 +xe2e2=xe2 +axe2 +1,a=0 or 1 ・・・(式15)
復号化処理部132は、記憶部122(図2の102)に格納されている秘密情報125から読み出した秘密鍵dと(S205)、x座標、y座標の値(xe1,ye1)を、スカラー倍計算部135(図2の115)へ送る(S206)。スカラー倍計算部135は、x座標、y座標の値、秘密鍵dからスカラー倍点(xd3,yd3)=d(xe1,ye1)を計算する。スカラー倍計算部135は、計算されたスカラー倍点(xd3,yd3)を復号化処理部132へ送る(S207)。
y e1 2 + x e1 y e1 = x e1 3 + ax e1 2 +1, a = 0 or 1 (Equation 14)
y e2 2 + x e2 y e2 = x e2 3 + ax e2 2 +1, a = 0 or 1 (Equation 15)
The decryption processing unit 132 obtains the secret key d read from the secret information 125 stored in the storage unit 122 (102 in FIG. 2) and the values (x e1 , y e1 ) of the x coordinate and the y coordinate. Then, it is sent to the scalar multiplication calculator 135 (115 in FIG. 2) (S206). The scalar multiplication calculator 135 calculates a scalar multiplication point (x d3 , y d3 ) = d (x e1 , y e1 ) from the x-coordinate and y-coordinate values and the secret key d. The scalar multiplication calculation unit 135 sends the calculated scalar multiple (x d3 , y d3 ) to the decoding processing unit 132 (S207).

復号化処理部132は、スカラー倍計算部135から送られたスカラー倍点(xd3,yd3)を用いて、復号化処理を行う。例えば、暗号化されたメッセージが、xe1,xe2のビット列であり、コブリッツ曲線では、(P+k(dQ))−d(kQ)=(xe2,ye2)−(xd3,yd3)を計算することにより達成する。すなわち、下記(式16),(式17)を計算し、暗号化される前の部分メッセージxに相当するxf1を得る。 The decoding processing unit 132 performs a decoding process using the scalar multiple (x d3 , y d3 ) sent from the scalar multiplication calculating unit 135. For example, the encrypted message is a bit string of x e1 and x e2 , and in the Kobritz curve, (P m + k (dQ)) − d (kQ) = (x e2 , y e2 ) − (x d3 , y This is achieved by calculating d3 ). That is, the following (Expression 16) and (Expression 17) are calculated, and x f1 corresponding to the partial message x m before being encrypted is obtained.

f1=λ+λ+xe2+xd3+a ・・・(式16)
λ=(ye2+yd3)/(xe2+xd3) ・・・(式17)
コンピュータB121は、復号化処理部132で復号化された部分メッセージから平文メッセージを組み立て、出力メッセージ(S208)として、入出力インタフェース130を介して、ディスプレイ128などから出力する。
x f1 = λ 2 + λ + x e2 + x d3 + a (Expression 16)
λ = (y e2 + y d3 ) / (x e2 + x d3 ) (Expression 17)
The computer B 121 assembles a plaintext message from the partial message decrypted by the decryption processing unit 132 and outputs it as an output message (S 208) from the display 128 or the like via the input / output interface 130.

次に、コンピュータB121が復号化処理を行う場合における、スカラー倍計算部135の処理を、以下に示す各実施の形態において詳細に説明する。各実施の形態で、本発明の実施の形態における復号化装置として機能するコンピュータB121は、本発明の実施の形態における復号化方法に従った復号化処理を行う。   Next, the process of the scalar multiplication calculation unit 135 when the computer B121 performs the decoding process will be described in detail in each embodiment shown below. In each embodiment, the computer B121 functioning as the decoding device in the embodiment of the present invention performs a decoding process according to the decoding method in the embodiment of the present invention.

(実施の形態1)
本発明の実施の形態1におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図1〜図6を参照しながら説明する。
(Embodiment 1)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 1 of the present invention will be described with reference to FIGS.

図3は、実施の形態1で用いるスカラー倍計算部115の機能ブロック構成を示す。図3に示すスカラー倍計算部115(図1のコンピュータB121のスカラー倍計算部135に対応する)は、エンコード部302、前計算部303、実計算部304からなる。エンコード部302は、剰余取得部321、剰余変換部322、繰り返し判定部323、δ剰余変換部324、Ψ関数計算部325、格納部326からなる。前計算部303は、加算部331、2倍算部332、繰り返し判定部333からなる。実計算部304は、ビット値判定部341、加算部342、τ倍算部343、繰り返し判定344からなる。   FIG. 3 shows a functional block configuration of the scalar multiplication unit 115 used in the first embodiment. A scalar multiplication calculation unit 115 (corresponding to the scalar multiplication calculation unit 135 of the computer B121 in FIG. 1) includes an encoding unit 302, a previous calculation unit 303, and an actual calculation unit 304. 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 Ψ function calculation unit 325, and a storage unit 326. The pre-calculation unit 303 includes an addition unit 331, a multiplication unit 332, and a repetition determination unit 333. The actual calculation unit 304 includes a bit value determination unit 341, an addition unit 342, a τ multiplication unit 343, and a repetition determination 344.

実施の形態1で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する第1の計算方法を説明する。スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部302は、入力されたスカラー値dを数値列d[j]にエンコードする。 As a scalar multiplication calculation method used in the first embodiment, a first 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. 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].

これは、下記(式18)を満たす整数d’に対して、下記(式19),(式20)を満たすd[j]に、スカラー値dを変換することに相当する。 This is equivalent to converting the scalar value d into d w [j] satisfying the following (Expression 19) and (Expression 20) with respect to the integer d ′ satisfying the following (Expression 18).

dP=d’P ・・・(式18)
d’=d[2n]τ2n+d[2n−1]τ2n−1+……+d[j]τ+……+d[0] ・・・(式19)
−2<d[j]<2 ・・・(式20)
ここで、nはスカラー値dを2進表記した場合のビット長であり、wはあらかじめ定めた正の整数で、ウィンドウ幅と呼ばれる。計算時間(処理速度)を優先する場合はwを大きな値にする。メモリ使用量を小さくする場合はwを小さな値にする。
dP = d′ P (Equation 18)
d ′ = d w [2n] τ 2n + d w [2n−1] τ 2n−1 +... + d w [j] τ j +. + d w [0] (Equation 19)
−2 w <d w [j] <2 w (Equation 20)
Here, n is a bit length when the scalar value d is expressed in binary, and w is a predetermined positive integer, which is called a window width. When giving priority to the calculation time (processing speed), w is set to a large value. To reduce the memory usage, w is set to a small value.

前計算部303は、入力された楕円曲線上の点Pから、前計算テーブルを作成する。前計算テーブルは、{P,3P,5P,……,(2−1)P}により構成される。 The pre-calculation unit 303 creates a pre-calculation table from the input point P on the elliptic curve. The pre-calculation table is composed of {P, 3P, 5P,..., (2 w −1) P}.

実計算部304は、数値列d[j]にエンコードされたスカラー値と楕円曲線上の点Pから、前計算テーブルを用いてスカラー倍点dPを計算する。 The actual calculation unit 304 calculates a scalar multiple dP from the scalar value encoded in the numerical sequence d w [j] and the point P on the elliptic curve using the pre-calculation table.

次に、エンコード部302、前計算部303、実計算部304の行う各処理について詳細に説明する。まず、図4を用いて、エンコード部302がスカラー値dをエンコードする方法を説明する。図4は、エンコード部302でのエンコード処理を示すフロー図である。   Next, each process performed by the encoding unit 302, the pre-calculation unit 303, and the actual calculation unit 304 will be described in detail. First, a method in which the encoding unit 302 encodes the scalar value d will be described with reference to FIG. FIG. 4 is a flowchart showing the encoding process in the encoding unit 302.

まず、δ剰余変換部324は、変数d’にd mod δを代入する(ステップS401)。ただし、δとスカラー値dに対してd mod δの計算方法については、非特許文献4に記載されている。d’=d mod δは、下記(式21)なる形で表される。ここで、d,dは共に整数である。 First, the δ residue conversion unit 324 substitutes d mod δ for the variable d ′ (step S401). However, Non-Patent Document 4 describes a method for calculating d mod δ with respect to δ and the scalar value d. d ′ = d mod δ is represented by the following (formula 21). Here, d 0 and d 1 are both integers.

d’=d+dτ ・・・(式21)
次に、変数iを0で初期化する(S402)。繰り返し判定部323は、変数d’に対して、|Rpart(d’)|<2かつTpart(d’)=0であるかどうかを判定する(S403)。ここで、スカラー値d’=d+dτに対して、d’の実部分Rpart(d’)、及びτ部分Tpart(d’)は、下記(式22),(式23)で与えられる整数である。
d ′ = d 0 + d 1 τ (Expression 21)
Next, the variable i is initialized with 0 (S402). Repetition determining unit 323 'to, | rpart (d' variable d) | <2 w and determines whether Tpart (d ') = 0 ( S403). Here, with respect to the scalar value d ′ = d 0 + d 1 τ, the real part Rpart (d ′) and the τ part Tpart (d ′) of d ′ are given by the following (Expression 22) and (Expression 23). Is an integer.

Rpart(d’)=d ・・・(式22)
Tpart(d’)=d ・・・(式23)
前記ステップS403で2つの条件が共に成立すれば(TRUE)、ステップS421へ移る。上記いずれかの条件が成立しない場合(FALSE)、ステップS411へ移る。
Rpart (d ′) = d 0 (Formula 22)
Tpart (d ′) = d 1 (Equation 23)
If the two conditions are both satisfied in step S403 (TRUE), the process proceeds to step S421. If any of the above conditions is not satisfied (FALSE), the process proceeds to step S411.

前記ステップS411では、Ψ関数計算部325は、スカラー値d’の実部分Rpart(d’)の、2w+1による剰余をxに、スカラー値d’のτ部分Tpart(d’)の、2w+1による剰余をxに、それぞれ代入する。 In the step S411, [psi function calculating unit 325, the scalar value d 'solid portions of rpart (d') of the remainder by 2 w + 1 to x R, the scalar value d 'tau portion Tpart (d') of, 2 the remainder by w + 1 to x T, the values are.

Ψ関数計算部325は、下記(式24)を計算し変数uに格納する(S412)。なお記号*は乗算を表わす。   The Ψ function calculation unit 325 calculates (Equation 24) below and stores it in the variable u (S412). The symbol * represents multiplication.

Ψ(d’)=(x+x*tw+1 mod w+1)−2 ・・・(式24)
ここで、tw+1は、下記(式25)で与えられる整数であり、(式25)におけるUw+1は、下記(式26)で定まる整数である。
Ψ w (d ′) = (x R + x T * t w + 1 mod 2 w + 1 ) −2 w (Equation 24)
Here, tw + 1 is an integer given by (Expression 25) below, and U w + 1 in (Expression 25) is an integer determined by (Expression 26) below.

w+1=2Uw+1 −1 mod 2w+1 ・・・(式25)
=0,U=1,Uw+1=μU−2Uw−1 ・・・(式26)
次に、格納部326は、d[i],d[i+1],……,d[i+w-1]に、それぞれ、u,0,0,……,0を格納する(S413)。次に、Ψ関数計算部325は、(d’−u)/τを計算し、その結果をd’に格納する(S414)。次に、変数iをw増加させ、ステップS403へ戻る(S415)。
t w + 1 = 2U w U w + 1 −1 mod 2 w + 1 (Equation 25)
U 0 = 0, U 1 = 1, U w + 1 = μU w −2U w−1 (Equation 26)
Next, the storage unit 326 stores u, 0, 0,..., 0 in d w [i], d w [i + 1],..., D w [i + w−1], respectively. (S413). Then, [psi function calculating unit 325, (d'-u) / τ w is calculated, and stores the result in the d '(S414). Next, the variable i is increased by w, and the process returns to step S403 (S415).

一方、ステップS421では、格納部326は、d[i],d[i+1],……,d[n+w+a+2]に、それぞれ、Rpart(d’),0,0,……,0を格納する。次に、エンコード部302は、d[n+w+a+2],……,d[0]を、実計算部304へ出力する(S422)。 On the other hand, in step S421, the storage unit 326, d w [i], d w [i + 1], ......, a d w [n + w + a + 2], respectively, Rpart (d '), 0 , 0,..., 0 are stored. Next, the encoding unit 302 outputs d w [n + w + a + 2],..., D w [0] to the actual calculation unit 304 (S422).

なお、前記ステップS414で、τでの除算を行うには、次のようにすればよい。d’を入力とすると、τでの除算結果d’/τは、下記(式27)で与えられる。   In order to perform division by τ in step S414, the following may be performed. When d ′ is input, the division result d ′ / τ by τ is given by the following (formula 27).

d’/τ=Tpart(d’)+Rpart(d’)(μ−τ)/2 ・・・(式27)
また、変数iの上限がn+w+a+2となる理由は以下の通りである。スカラー値d’を(式19)のように変換した際、変数iがn+a+3以下になることが、非特許文献3に記載されている。このスカラー値d’の変換後の桁数はwの倍数になっていなければならない。そのため、w個の数値列d[i],d[i+1],……,d[i+w-1]を組にしていくと、上位の桁数がw個より少ない可能性があり、その一番少ない場合はn+a+3桁目だけが残るという可能性である。従って、スカラー値d’を(式19)のように変換した際、変数iの値の上限はn+w+a+2となることがわかる。
d ′ / τ = Tpart (d ′) + Rpart (d ′) (μ−τ) / 2 (Equation 27)
The reason why the upper limit of the variable i is n + w + a + 2 is as follows. Non-Patent Document 3 describes that when the scalar value d ′ is converted as shown in (Equation 19), the variable i is n + a + 3 or less. The number of digits after conversion of this scalar value d ′ must be a multiple of w. Therefore, if w numeric strings d w [i], d w [i + 1],..., D w [i + w−1] are paired, the number of upper digits can be less than w. There is a possibility that only the n + a + 3rd digit remains in the smallest case. Therefore, when the scalar value d ′ is converted as shown in (Equation 19), the upper limit of the value of the variable i is n + w + a + 2.

次に、図5を用いて、前計算部303が楕円曲線上の点から前計算テーブルを作成する方法を説明する。図5は、前計算部303での前計算テーブルの作成処理を示すフロー図である。   Next, a method in which the pre-calculation unit 303 creates a pre-calculation table from points on the elliptic curve will be described with reference to FIG. FIG. 5 is a flowchart showing a pre-calculation table creation process in the pre-calculation unit 303.

まず、2倍算部332は、点Pを2倍し、その結果を2Pに格納する(S501)。なお2倍算を関数ECDBLで表している。次に、変数jに初期値1を代入する(S502)。次に、繰り返し判定部333により、jが2より小さいかどうかを判定する(S503)。j<2の場合は(TRUE)、ステップS504へ移る。j≧2の場合は(FALSE)、ステップS511へ移る。 First, the doubling unit 332 doubles the point P and stores the result in 2P (S501). Note that doubling is represented by the function ECDBL. Next, the initial value 1 is substituted into the variable j (S502). Next, the repetition determining unit 333, j is determined whether 2 w less (S503). In the case of j <2 w moves to the (TRUE), step S504. In the case of j ≧ 2 w moves to the (FALSE), step S511.

ステップS504では、加算部331は、点jPと点2Pを加算し、その結果を(j+2)Pに格納する。なお加算を関数ECADDで表わしている。次に、変数jを2増加させ、ステップS503へ戻る(S505)。   In step S504, the adding unit 331 adds the point jP and the point 2P, and stores the result in (j + 2) P. Note that the addition is represented by the function ECADD. Next, the variable j is incremented by 2, and the process returns to step S503 (S505).

一方、ステップS511では、{P,3P,……,(2−1)P}を前計算テーブルとして出力する。 On the other hand, in step S511, {P, 3P,..., (2 w −1) P} is output as a pre-calculation table.

上記処理において、加算は(式1)〜(式3)を用いて、2倍算は(式1),(式2),(式5)を用いて、それぞれ計算される。なお、加算及び2倍算の計算には、これらの式を用いる以外にも、公知技術である射影座標やヤコビアン座標における計算公式を用いることもできる。   In the above processing, addition is calculated using (Expression 1) to (Expression 3), and doubling is calculated using (Expression 1), (Expression 2), and (Expression 5). In addition to the calculation of addition and doubling, a calculation formula in projective coordinates or Jacobian coordinates, which is a known technique, can be used.

また、楕円曲線上の点Q=(x,y)に対して、楕円曲線上の加算に関する逆元の点−Qは、コブリッツ曲線の場合、−Q=(x,x+y)と表されるため、点Qの座標が与えられていれば容易に計算できる。そのため、点{P,3P,……,(2−1)P}のみを前計算テーブルとして格納する。その後の実計算部304が行う計算で必要となる点{−P,−3P,……,−(2−1)P}については、それら格納された点から導出すればよいので、前計算テーブルには格納する必要はない。なお、上記点{−P,−3P,……,−(2−1)P}の導出を省くために、それら点のy座標の値のみを前計算テーブルに格納しておいてもよい。 Further, in contrast to the point Q = (x, y) on the elliptic curve, the inverse point -Q relating to the addition on the elliptic curve is expressed as -Q = (x, x + y) in the case of the Kobritz curve. If the coordinates of the point Q are given, it can be easily calculated. Therefore, only the points {P, 3P,..., (2 w −1) P} are stored as the pre-calculation table. Since the points {−P, −3P,..., − (2 w −1) P} necessary for the subsequent calculation performed by the actual calculation unit 304 may be derived from the stored points, There is no need to store it in the table. In order to omit the derivation of the points {−P, −3P,..., − (2 w −1) P}, only the y-coordinate values of these points may be stored in the pre-calculation table. .

なお、前計算部303の行う前計算テーブルの作成処理は、点{P,3P,……,(2−1)P}が計算されればよい。そのため、非特許文献である、Cohen, H., A course in computational algebraic number theory, GTM138, Springer -Verlag, (1993)の481ページに記載されているモンゴメリトリックによる逆元演算共通化方法を用いて、楕円曲線演算で必要となる逆元演算の計算の共通化を行うことにより、高速化を図ってもよい。 Note that the pre-calculation table creation process performed by the pre-calculation unit 303 only needs to calculate the points {P, 3P,..., (2 w −1) P}. Therefore, using the non-patent literature Cohen, H., A course in computational algebraic number theory, GTM138, Springer-Verlag, (1993), page 481, Montgomeric's inverse element commonization method is used. The speed may be increased by sharing the calculation of the inverse element calculation required for the elliptic curve calculation.

また、点Pが固定点である場合、前計算部303の行う前計算テーブルの作成処理は、ただ一度行えばよい。そのため、一旦、点{P,3P,……,(2−1)P}を計算すれば、それ以降のスカラー倍計算では、点{P,3P,……,(2−1)P}を再計算する必要はない。 When the point P is a fixed point, the pre-calculation table creation process performed by the pre-calculation unit 303 only needs to be performed once. Therefore, once the point {P, 3P, ......, ( 2 w -1) P} be calculated and the subsequent scalar multiplication, the point {P, 3P, ......, ( 2 w -1) P } Need not be recalculated.

最後に、図6を用いて、実計算部304が、エンコードされたスカラー値、楕円曲線上の点及び前計算テーブルから、楕円曲線におけるスカラー倍点を計算する方法を説明する。図6は、実計算部304でのスカラー倍点の計算処理を示すフロー図である。   Finally, a method in which the actual calculation unit 304 calculates the scalar multiple in the elliptic curve from the encoded scalar value, the point on the elliptic curve, and the previous calculation table will be described with reference to FIG. FIG. 6 is a flowchart showing a scalar multiple calculation process in the actual calculation unit 304.

まず、実計算部304は、変数cに、初期値n+w+a+2を代入する(S601)。次に、繰り返し判定部344は、d[c]が0か非0かを判定する(S602)。d[c]が0の場合はステップS603へ移る。d[c]が0でなければステップS611へ移る。 First, the actual calculation unit 304 substitutes the initial value n + w + a + 2 for the variable c (S601). Next, the repetition determining unit 344 determines whether d w [c] is 0 or non-zero (S602). If d w [c] is 0, the process proceeds to step S603. If d w [c] is not 0, the process proceeds to step S611.

ステップS603では、変数cを1減少させ、ステップS602へ戻る。   In step S603, the variable c is decreased by 1, and the process returns to step S602.

一方、ステップS611では、点Qに、d[c]Pを代入する。次に、変数jに、初期値c−1を代入する(S612)。次に、繰り返し判定部344は、jが0より小さいかどうかを判定する。jが0より小さい場合はステップS621へ移る。jが0以上の場合はステップS614へ移る(S613)。 On the other hand, in step S611, d w [c] P is substituted for the point Q. Next, the initial value c-1 is substituted into the variable j (S612). Next, the repetition determination unit 344 determines whether j is smaller than zero. If j is smaller than 0, the process proceeds to step S621. When j is 0 or more, the process proceeds to step S614 (S613).

ステップS614では、τ倍算部343は、点Qをτ倍し、点Qに再び格納する。次に、繰り返し判定部344は、d[j]が0か非0かを判定する(S615)。d[j]が0の場合はステップS617へ移る。d[j]が0でなければステップS616へ移る。 In step S614, the τ multiplication unit 343 multiplies the point Q by τ and stores it again at the point Q. Next, the repetition determining unit 344 determines whether d w [j] is 0 or non-zero (S615). If d w [j] is 0, the process proceeds to step S617. If d w [j] is not 0, the process proceeds to step S616.

ステップS616では、加算部342は、点Qとd[j]Pを加算する。ただし、d[j]が負の場合は(−d[j])Pのy座標を反転したものを用いて加算を行う。そして加算の結果を点Qに格納し、ステップS617へ移る。 In step S616, the adding unit 342 adds the point Q and d w [j] P. However, when d w [j] is negative, addition is performed using the inverted y coordinate of (−d w [j]) P. Then, the result of addition is stored at point Q, and the process proceeds to step S617.

なお、d[j]が0でない場合は、d[j]は(式20)を満たす奇数である。そのため、d[j]Pもしくは(−d[j])Pのいずれかが、前計算テーブルに必ず存在する。 When d w [j] is not 0, d w [j] is an odd number that satisfies (Equation 20). Therefore, either d w [j] P or (−d w [j]) P always exists in the pre-calculation table.

ステップS617では、変数jを1減少させ、ステップS613へと戻る。一方、ステップS621では、点Qを出力する。処理は以上である。   In step S617, the variable j is decreased by 1, and the process returns to step S613. On the other hand, in step S621, the point Q is output. This is the end of the process.

以上の処理において、エンコード部302が行う処理により出力される数値列d[j]は、(式18)〜(式20)を満たす。この理由は次の通りである。 In the above processing, the numerical sequence d w [j] output by the processing performed by the encoding unit 302 satisfies (Equation 18) to (Equation 20). The reason is as follows.

前記図4のステップS401でd’にd mod δを代入している。そのため、適当な数kを用いてd’=d+kδと表わすことができる。他方、コブリッツ曲線上ではδPは無限遠点となることが知られており、そのため(式18)が成立する。   In step S401 of FIG. 4, d mod δ is substituted for d ′. Therefore, d ′ = d + kδ can be expressed using an appropriate number k. On the other hand, it is known that δP is a point at infinity on the Kobritz curve, so (Equation 18) holds.

ステップS403からステップS415のループにおいて、j回目のd’の値をd’[j]、uの値をu[j]とおく。すなわち、ステップS414で、下記(式28)が計算される。   In the loop from step S403 to step S415, the j'th d 'value is set to d' [j], and the u value is set to u [j]. That is, in step S414, the following (formula 28) is calculated.

d’[j+1]=(d’[j]−u[j])/τ ・・・(式28)
0回目のループでは、下記(式29)となる。1回目のループでは、下記(式30)となる。以下同様にして、j回目のループでは、下記(式31)となる。
d ′ [j + 1] = (d ′ [j] −u [j]) / τ w (Equation 28)
In the 0th loop, the following (formula 29) is obtained. In the first loop, the following (Equation 30) is obtained. Similarly, in the j-th loop, the following (formula 31) is obtained.

d’=d’[0] ・・・(式29)
d’=d’[1]τ+u[0] ・・・(式30)
d’=(……(d’[j]τ+u[j])τ+……+u[1])τ+u[0] ・・・(式31)
[jw]以外のd[i]には0が割り当てられていることに注意すれば、d’が(式19)を満たすことがわかる。
d ′ = d ′ [0] (Equation 29)
d ′ = d ′ [1] τ w + u [0] (Equation 30)
d ′ = (…… (d ′ [j] τ w + u [j]) τ w + …… + u [1]) τ w + u [0] (Equation 31)
If it is noted that d w [i] other than d w [jw] is assigned 0, it can be seen that d ′ satisfies (Equation 19).

ステップS412で計算されるu[j]は、下記(式32)の範囲となることは容易にわかる。   It can be easily understood that u [j] calculated in step S412 falls within the following range (formula 32).

−2<u[j]<2 ・・・(式32)
従って、0以外のd[i]はu[j]が割り当てられる。従って、(式20)を満たす。
-2 w <u [j] <2 w (Expression 32)
Accordingly, u [j] is assigned to d w [i] other than 0. Therefore, (Equation 20) is satisfied.

また、エンコード部302が行う処理で計算されるu[j]はj=0を除きすべて奇数となる。この理由は次の通りである。   Further, u [j] calculated in the process performed by the encoding unit 302 is all odd except for j = 0. The reason is as follows.

前記ステップS411で、Rpart(d’[j])が奇数であれば、tw+1は偶数であることから、u[j]は奇数となる。一方、ステップS414で、d’[j+1]=(d’[j]−u[j])/τが計算される。下記(式33)が成り立つため、Rpart(d’[j+1])は奇数となる。 If Rpart (d ′ [j]) is an odd number in step S411, tw + 1 is an even number, and u [j] is an odd number. On the other hand, in step S414, d '[j + 1 ] = (d' [j] -u [j]) / τ w is calculated. Since the following (formula 33) holds, Rpart (d ′ [j + 1]) is an odd number.

d’[j]−((d’[j] mod τ)−τ) mod τw+1=τ ・・・(式33)
従って、j=0を除き、u[j]はすべて奇数である。
d ′ [j] − ((d ′ [j] mod τ w ) −τ w ) mod τ w + 1 = τ w (Expression 33)
Therefore, except for j = 0, u [j] are all odd numbers.

なお、u[0]も奇数とするためには、スカラー値dの実部分Rpart(d)が奇数であればよい。そのためには、入力されたスカラー値dの実部分Rpart(d)が偶数の時は、d+1をあらためてスカラー値nとしてエンコードする。すなわち、dを奇数に変換する。そして、スカラー倍点nPを計算する。下記(式34)が成り立つため、nPから点Pを引き、その値をスカラー倍点dPとして出力すればよい。   In order to make u [0] odd, the real part Rpart (d) of the scalar value d may be odd. For this purpose, when the real part Rpart (d) of the input scalar value d is an even number, d + 1 is re-encoded as the scalar value n. That is, d is converted to an odd number. Then, a scalar multiple nP is calculated. Since the following (formula 34) holds, the point P is subtracted from nP, and the value may be output as the scalar multiple dP.

nP=(d+1)P=dP+P ・・・(式34)
また、入力されたdの実部分Rpart(d)が奇数の時は、d+τをあらためてスカラー値nとしてエンコードし、下記(式35)を利用して、スカラー倍点dPを求めてもよい。この場合、dがいずれの場合も、行う処理が一致するという利点がある。
nP = (d + 1) P = dP + P (Formula 34)
When the real part Rpart (d) of the input d is an odd number, d + τ may be encoded again as a scalar value n, and the scalar multiple dP may be obtained using the following (Equation 35). In this case, there is an advantage that the processing to be performed is the same in any case of d.

nP=(d+τ)P=dP+τP ・・・(式35)
また、実計算部304が出力する点Qはスカラー倍点dPに等しい。この理由は次の通りである。
nP = (d + τ) P = dP + τP (Equation 35)
Further, the point Q output from the actual calculation unit 304 is equal to the scalar multiple dP. The reason is as follows.

前記図6のステップS613において、点Qが、下記(式35)と表されるとする。ここで、cはd[i]≠0を満たす最大のiである。 In step S613 of FIG. 6, the point Q is represented by the following (formula 35). Here, c is the maximum i that satisfies d w [i] ≠ 0.

(d[c]τc−j−1+d[c−1]τc−j−2+……+d[j+1])P ・・・(式36)
このとき、次にステップS613に来る時も点Qは(式36)を満たすことを以下で示す。点Qは、ステップS614でτ倍され、d[j]が0でなければステップS616でd[j]Pが加算される。そのためステップS616の直後では、点Qの値は、下記(式37)となる。
(D w [c] τ c−j−1 + d w [c−1] τ c−j−2 +... + D w [j + 1]) P (Expression 36)
At this time, it will be shown below that the point Q satisfies (Equation 36) also when it comes to step S613 next time. The point Q is multiplied by τ in step S614, and d w [j] P is added in step S616 if d w [j] is not zero. Therefore, immediately after step S616, the value of the point Q is as follows (Formula 37).

(d[c]τc−j+d[c−1]τc−j−1+……+d[j+1]τ+d[j])P ・・・(式37)
従って、d[j]=0の時も含めて、ステップS617の直前で、点Qは(式37)を満たす。ステップS617でjが1減少するので、(式37)のjにj+1を代入すると(式36)になる。すなわち、次にステップS613に来る時も点Qは(式36)を満たす。
(D w [c] τ c−j + d w [c−1] τ c−j−1 +... + D w [j + 1] τ + d w [j]) P (Expression 37)
Therefore, the point Q satisfies (Expression 37) immediately before step S617, including when d w [j] = 0. Since j decreases by 1 in step S617, substituting j + 1 for j in (Expression 37) yields (Expression 36). That is, the point Q satisfies (Equation 36) when it comes to step S613 next time.

j>cに対するd[j]の値は0であるので、ステップS621で出力される点Qの値は、下記(式38)に等しい。 Since the value of d w [j] for j> c is 0, the value of the point Q output in step S621 is equal to the following (formula 38).

(d[c]τ+d[c−1]τc−1+……+d[1]τ+d[0])P ・・・(式38)
実計算部304に入力されるスカラー値は、エンコード部302によりエンコードされたd[j]であるので、そのd[j]は(式20)を満たす。従って、Q=dPである。
(D w [c] τ c + d w [c−1] τ c−1 +... + D w [1] τ + d w [0]) P (Equation 38)
Since the scalar value input to the actual calculation unit 304 is d w [j] encoded by the encoding unit 302, the d w [j] satisfies (Equation 20). Therefore, Q = dP.

また、上記スカラー倍計算方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由は次の通りである。   The scalar multiplication method is also effective for a defense method against side channel attacks. The reason is as follows.

エンコード部302によりスカラー値dは数値列d[i]にエンコードされる。i=n+w+a+2からi=0までd[i]を左から右に並べた数値列d[n+w+a+2]……d[0]は、下記(式39)のようなパターンで表わされる。 The encoding unit 302 encodes the scalar value d into a numerical string d w [i]. A numerical sequence d w [n + w + a + 2] …… d w [0] in which d w [i] is arranged from left to right from i = n + w + a + 2 to i = 0 is as shown in the following (formula 39). It is represented by a pattern.

|0……0x|0……0x|……|0……0x| ・・・(式39)
ここで、各xは各々非0の値であり、それぞれ上記u[j]に対応する。記号|はパターンにおけるブロックの区切りを示す。ブロック|0……0x|はw個の値であり、“0……0”は値がw−1個連続することを示す。
| 0 …… 0x | 0 …… 0x | …… | 0 …… 0x | (Formula 39)
Here, each x is a non-zero value and corresponds to the above u [j]. The symbol | indicates a block delimiter in the pattern. The block | 0... 0x | is w values and “0... 0” indicates that w−1 values are continuous.

実計算部304がスカラー倍点を計算する際に、ステップS613〜S617の繰り返し処理において、ブロック|0……0x|に対応する楕円曲線演算は、|T……TA|、すなわちw−1回のTの後にAとなる。ただし、Tはτ倍算を、AはECADD(楕円曲線上の加算)をそれぞれ表わす。従って、すべてのスカラー値に対して、実行する楕円曲線演算は、下記(式40)のように固定されている。   When the real calculation unit 304 calculates the scalar multiple, in the iterative process of steps S613 to S617, the elliptic curve calculation corresponding to the block | 0... 0x | is | T. A after T. However, T represents τ multiplication and A represents ECADD (addition on an elliptic curve). Therefore, the elliptic curve calculation to be executed for all scalar values is fixed as shown in (Equation 40) below.

|T……TA|T……TA|……|T……TA| ・・・(式40)
そのため、(式40)のみからは、スカラー値dに関する情報を引き出すことができない。すなわちサイドチャネル攻撃に対する防御性を有している。
| T …… TA | T …… TA | …… | T …… TA | (Formula 40)
Therefore, information relating to the scalar value d cannot be extracted from (Equation 40) alone. That is, it has protection against side channel attacks.

なお、実施の形態1に関して、非特許文献2に記載されているランダム化射影座標を併用してスカラー倍計算を行うこと(処理1とする)、スカラー倍計算を高速に行うために、前計算テーブルのサイズを大きくしてスカラー倍計算を行うこと(処理2とする)、及び、前計算テーブルに格納されている点が読み出されるたびに、再びランダム化して、前計算テーブルに書き込むこと(処理3とする)のいずれを行ってもよい。上記ランダム化を用いる処理によって、前計算テーブルに対する格納データがランダム化される。   In addition, with respect to the first embodiment, in order to perform scalar multiplication calculation using the randomized projection coordinates described in Non-Patent Document 2 together (processing 1) and to perform scalar multiplication calculation at high speed, Performing scalar multiplication by increasing the size of the table (referred to as processing 2), and re-randomizing and writing to the previous calculation table each time a point stored in the previous calculation table is read (processing) 3) may be performed. The storage data for the pre-calculation table is randomized by the process using the randomization.

以上の通り、上記第1の計算方法は、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、メモリ使用量及び処理高速性にも優れるという特徴及び効果がある。   As described above, the first calculation method can be applied to the Kobritz curve and does not give useful information for the side channel attack, so it is resistant to the side channel attack, and the memory usage and processing speed are improved. There is a feature and an effect that it is excellent.

(実施の形態2)
本発明の実施の形態2におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図1〜図3,図7,図8を参照しながら説明する。実施の形態2では、前記図3で示されるスカラー倍計算部115の機能ブロック構成を用いる。実施の形態2におけるスカラー倍計算部115(図1のスカラー倍計算部135に対応する)は、実施の形態1と同様の処理部を有する構成である。ただし、実施の形態2では、前計算部303において前記2倍算部332ではなくτ倍算部332を具備するものとする。
(Embodiment 2)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 2 of the present invention will be described with reference to FIGS. 1 to 3, 7, and 8. In the second embodiment, the functional block configuration of the scalar multiplication calculator 115 shown in FIG. 3 is used. The scalar multiplication calculation unit 115 (corresponding to the scalar multiplication calculation unit 135 in FIG. 1) in the second embodiment is configured to include a processing unit similar to that in the first embodiment. However, in the second embodiment, the pre-calculation unit 303 includes the τ multiplication unit 332 instead of the doubling unit 332.

実施の形態2で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する第2の計算方法を説明する。第2の計算方法では、2倍算を用いずに加算とτ倍算を用いて前計算テーブルを作成できるという特徴がある。そのため、前計算部303は、2倍算部を具備する必要がない。   As a scalar multiplication calculation method used in the second embodiment, a second 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 second calculation method is characterized in that a pre-calculation table can be created using addition and τ multiplication without using doubling. Therefore, the pre-calculation unit 303 does not need to include a doubling unit.

スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部702は、入力されたスカラー値dを数値列d[j]にエンコードする。ただし、実施の形態2では、d[j]は(式19)ではなく、下記(式41)を満たす。ただし(式41)の各符号はすべての組み合わせを表わす(すなわち正負いずれをとってもよい)ものとする。 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 702 encodes the input scalar value d into a numerical string d w [j]. However, in Embodiment 2, d w [j] satisfies the following (Expression 41) instead of (Expression 19). However, each symbol in (Expression 41) represents all combinations (that is, either positive or negative may be taken).

[j]=±1±τ±τ±……±τw−1 ・・・(式41)
前計算部303は、入力された楕円曲線上の点Pから、前計算テーブルを作成する。前計算テーブルは、P±τP±Pτ±……±τw−1Pより構成される。
d w [j] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 (Formula 41)
The pre-calculation unit 303 creates a pre-calculation table from the input point P on the elliptic curve. The pre-calculation table is composed of P ± τP ± Pτ 2 ± …… ± τ w−1 P.

実計算部304は、エンコードされたスカラー値と楕円曲線上の点Pから、前計算テーブルを用いてスカラー倍点dPを計算する。   The actual calculation unit 304 calculates a scalar multiple dP from the encoded scalar value and the point P on the elliptic curve using the pre-calculation table.

次に、エンコード部302、前計算部303、実計算部304の行う各処理について詳細に説明する。まず、図7を用いて、エンコード部302がスカラー値dをエンコードする方法を説明する。図7は、エンコード部302でのエンコード処理を示すフロー図である。   Next, each process performed by the encoding unit 302, the pre-calculation unit 303, and the actual calculation unit 304 will be described in detail. First, a method in which the encoding unit 302 encodes the scalar value d will be described with reference to FIG. FIG. 7 is a flowchart showing the encoding process in the encoding unit 302.

まず、変数iを0で初期化する(S701)。次に、δ剰余変換部324は、変数d’にd mod δを代入し、変数cにRpart(d’)、変数cにTpart(d’)をそれぞれ代入する(S702)。 First, the variable i is initialized with 0 (S701). Next, the δ residue conversion unit 324 substitutes d mod δ for the variable d ′, substitutes Rpart (d ′) for the variable c 0, and Tpart (d ′) for the variable c 1 (S 702).

繰り返し判定部323は、条件{c +μc+2c ≧4/7*2}であるかどうかを判定する(S703)。これは、数c+cτを数τで割ったときに商が0かどうかを判定している。この判定で上記条件が成立するのであれば(TRUE)、ステップS704へ移る。上記条件が成立しないのであれば(FALSE)、ステップS711へ移る。 The repetition determining unit 323 determines whether or not the condition {c 0 2 + μc 0 c 1 + 2c 1 2 ≧ 4/7 * 2 w } is satisfied (S703). This determines whether the quotient is 0 when the number c 0 + c 1 τ is divided by the number τ w . If the above condition is satisfied in this determination (TRUE), the process proceeds to step S704. If the above condition is not satisfied (FALSE), the process proceeds to step S711.

ステップS704では、Ψ関数計算部325は、Ψ(c+cτ)を計算し、その結果をuに格納する。更にuをd[i]に、sign(u)をsに、|u|をuに、それぞれ代入し、変数iを1増加させる。ここで、sign(u)は、uの符号である。 In step S704, the Ψ function calculation unit 325 calculates Ψ w (c 0 + c 1 τ) and stores the result in u. Further, u is substituted for d w [i], sign (u) is substituted for s, | u | is substituted for u, and variable i is incremented by one. Here, sign (u) is the sign of u.

次に、cにc−s*b[(u−1)/2]を、cにc−s*b[(u−1)/2]を、それぞれ代入する(S705)。ここで、b,bは、それぞれ以下の条件を満たす整数である。各β=1+(−1)j(1)τ+(−1)j(2)τ+……+(−1)j(w−1)τw−1{j=(j(w−1)……j(0)),j(i)=0 or 1}に対して、βは、適当な数b0,j,b1,jを用いてβ=b0,j+b1,jτと表すことができる。u=Ψ)とおき、u>0であれば、u=(u−1)/2を満たすjが存在するので、このjに対してb=b0,j,b=b1,jとおく。u<0であれば、u=(−u−1)/2を満たすjが存在するので、このjに対してb=−b0,j,b=−b1,jとおく。 Then, c 0 to c 0 -s * b 0 [( u-1) / 2] a, c 1 -s * b 1 to c 1 a [(u-1) / 2 ], the values are (S705 ). Here, b 0 and b 1 are integers that satisfy the following conditions, respectively. Each β j = 1 + (− 1) j (1) τ + (− 1) j (2) τ 2 +... + (− 1) j (w−1) τ w−1 {j = (j (w− 1)... J (0)) 2 , j (i) = 0 or 1}, β j is determined by using the appropriate numbers b 0, j , b 1, j and β j = b 0, j + B 1, j τ. If u j = Ψ wj ), and u j > 0, there is j satisfying u = (u j −1) / 2, so that b 0 = b 0, j , B 1 = b 1, j . If u j <0, there exists j satisfying u = (− u j −1) / 2, so that b 0 = −b 0, j , b 1 = −b 1, j deep.

繰り返し判定部323は、j≦wかどうかを判定する(S706)。j≦wであれば(TRUE)、ステップS707へ移る。j>wであれば(FALSE)、ステップS703へ戻る。   The repetition determination unit 323 determines whether j ≦ w is satisfied (S706). If j ≦ w (TRUE), the process proceeds to step S707. If j> w (FALSE), the process returns to step S703.

ステップS707では、変数cにc+μc/2を、変数cに−c/2を、それぞれ代入する。 At step S707, the a c 1 + μc 0/2 to a variable c 0, a -c 0/2 to the variable c 1, the values are.

ステップS711では、ステップS703〜S707のループを繰り返し行う度にステップS704で計算されるΨ(c+cτ)をd[i]に格納する。 In step S711, Ψ w (c 0 + c 1 τ) calculated in step S704 is stored in d w [i] each time the loop of steps S703 to S707 is repeated.

ステップS712では、エンコード部302は、{d[c],……,d[0]}を出力する。ここで、cはd[j]≠0を満たす最大のjである。 In step S712, the encoding unit 302 outputs {d w [c],..., D w [0]}. Here, c is the maximum j that satisfies d w [j] ≠ 0.

変数iの値の上限がi+w−1となる理由は、実施の形態1と同様である。   The reason why the upper limit of the value of variable i is i + w−1 is the same as in the first embodiment.

次に、図8を用いて、前計算部303が楕円曲線上の点から前計算テーブルを作成する方法を説明する。図8は、前計算部303での前計算テーブル作成処理を示すフロー図である。   Next, a method in which the pre-calculation unit 303 creates a pre-calculation table from points on the elliptic curve will be described with reference to FIG. FIG. 8 is a flowchart showing pre-calculation table creation processing in the pre-calculation unit 303.

前計算部303は、まず、変数Rに楕円曲線上の点Pを代入する(S801)。次に、変数iに初期値1を代入し、また集合Sに空集合{}を代入する(S802)。次に、繰り返し判定部333は、iがwより小さいかどうかを判定する(S803)。この条件が成立する場合は、ステップS804へ移る。条件が成立しない場合は、ステップS811へ移る。   The pre-calculation unit 303 first substitutes the point P on the elliptic curve for the variable R (S801). Next, the initial value 1 is substituted for the variable i, and the empty set {} is substituted for the set S (S802). Next, the repetition determination unit 333 determines whether i is smaller than w (S803). If this condition is satisfied, the process moves to step S804. If the condition is not satisfied, the process proceeds to step S811.

ステップS804では、Rのすべての点Qに対して加算部331、τ倍算部332によりP±τQを計算し、集合Sと2点P±τQを集合Sに代入する。次に、SをRに格納する(S805)。次に、変数iを1増加させ(S806)、ステップS803へ戻る。   In step S804, P ± τQ is calculated by the adder 331 and the τ multiplier 332 for all points Q of R, and the set S and the two points P ± τQ are substituted into the set S. Next, S is stored in R (S805). Next, the variable i is incremented by 1 (S806), and the process returns to step S803.

一方、ステップS811では、繰り返し判定部333により、ステップS803でiがw以上の場合、楕円曲線上の点の集合Rを前計算テーブルとして出力する。   On the other hand, in step S811, the repetition determination unit 333 outputs a set R of points on the elliptic curve as a pre-calculation table when i is greater than or equal to w in step S803.

スカラー倍計算部115で行われる演算は、τ倍算と加算のみであり、比較的処理の重い2倍算を用いずに前計算テーブルを作成できる。   The operations performed by the scalar multiplication calculation unit 115 are only τ multiplication and addition, and a pre-calculation table can be created without using relatively heavy doubling.

また、点−P±τP±Pτ±……±τw−1Pを前計算テーブルには格納する必要がない理由も実施の形態1と同様であり、点−P±τP±Pτ±……±τw−1Pの導出を省くために、それら点のy座標の値のみを前計算テーブルに格納しておいてもよい。 Further, the reason why the point −P ± τP ± Pτ 2 ±... ± τ w−1 P need not be stored in the pre-calculation table is the same as in the first embodiment, and the point −P ± τP ± Pτ 2 ±. ...... In order to omit the derivation of ± τ w−1 P, only the y coordinate values of those points may be stored in the pre-calculation table.

なお、前計算部303の行う前計算テーブルの作成処理は、点P±τP±Pτ±……±τw−1Pが計算されればよい。そのため、モンゴメリトリックによる逆元演算共通化方法を用いて、楕円曲線演算で必要となる逆元演算の計算の共通化を行うことにより、高速化を図ってもよい。 Note that the pre-calculation table creation process performed by the pre-calculation unit 303 only needs to calculate the points P ± τP ± Pτ 2 ±... ± τ w−1 P. For this reason, it is possible to increase the speed by using the inverse element calculation commonization method by Montgomeric to share the calculation of the inverse element calculation required for the elliptic curve calculation.

また、点Pが固定点である場合、点P±τP±Pτ±……±τw−1Pを再計算する必要がない理由も実施の形態1と同様である。前計算テーブル作成処理を、モンゴメリトリックを用いて、楕円曲線演算で必要となる逆元演算の計算の共通化を行うことにより、高速化を図ってもよいことも、第1の計算方法と同様である。 Further, when the point P is a fixed point, the reason why the point P ± τP ± Pτ 2 ±... ± τ w−1 P need not be recalculated is the same as in the first embodiment. Similar to the first calculation method, the pre-calculation table creation process may be speeded up by using Montgomery trick to share the calculation of the inverse element calculation required for the elliptic curve calculation. It is.

最後に、実計算部304が、エンコードされたスカラー値と楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。実計算部304が行う処理は、実施の形態1と同様の処理である。   Finally, a method will be described in which the actual calculation unit 304 calculates a scalar multiple in the elliptic curve from the encoded scalar value and the point on the elliptic curve. The process performed by the actual calculation unit 304 is the same process as in the first embodiment.

エンコード部302が行う処理により出力されるd[j]は、(式18),(式20),(式41)を満たす。(式18)が成立する理由は、実施の形態1と同様である。ステップS703〜S707のループにおいて、i回目に出力される値をc0,i+c1,iτとする。その出力された値c0,i+c1,iτに対して、下記(式42)とおき、ステップS706〜S707のループにおいて、b,bの値をそれぞれb0,i,b1,i、とおき、u[i]=Ψ(b0,i+b1,iτ),s[i]=sign(u[i])とおく。ここで、sign(u[i])は、u[i]の符号を表すものである。 D w [j] output by the process performed by the encoding unit 302 satisfies (Expression 18), (Expression 20), and (Expression 41). The reason why (Equation 18) is satisfied is the same as in the first embodiment. In the loop of steps S703 to S707, the value output for the i-th time is c 0, i + c 1, i τ. With respect to the output values c 0, i + c 1, i τ, the following (formula 42) is set, and the values of b 0 , b 1 are respectively set to b 0, i , b 1 in the loop of steps S706 to S707. , I , and u [i] = [Psi] w (b0, i + b1 , i [tau]) and s [i] = sign (u [i]). Here, sign (u [i]) represents the sign of u [i].

Ψ(c0,i+c1,iτ)=d[i+1] ・・・(式42)
ステップS706〜S707のループにおいて、下記(式43)が計算される。(式43)を変形すると、下記(式44)が成り立つ。
Ψ w (c 0, i + c 1, i τ) = d w [i + 1] (Formula 42)
In the loop of steps S706 to S707, the following (formula 43) is calculated. When (Equation 43) is modified, the following (Equation 44) is established.

0,i+1+c1,i+1τ={(c0,i+c1,iτ)−s[i]((|u[i]|−1)/2)*(b0,i+b1,iτ)}/τ ・・・(式43)
(c0,i+c1,iτ)τ=(c0,i+1+c1,i+1τ)−s[i]((|u[i]|−1)/2)*(b0,i+b1,iτ) ・・・(式44)
(式42)と(式44)を用いると、d’が(式18)を満たすことがわかる。
c 0, i + 1 + c 1, i + 1 τ = {(c 0, i + c 1, i τ) −s [i] ((| u [i] | −1) / 2) * (b 0, i + b 1, i τ)} / τ w (Equation 43)
(C 0, i + c 1, i τ) τ w = (c 0, i + 1 + c 1, i + 1 τ) −s [i] ((| u [i] | −1) / 2) * (b 0, i + B 1, i τ) (Formula 44)
Using (Expression 42) and (Expression 44), it can be seen that d ′ satisfies (Expression 18).

ステップS711においてΨ(c+cτ)をd[i]に代入しており、Ψ(c+cτ)=(c+c*tw+1mod 2w+1)−2は、|c+c*tw+1mod 2w+1|<2w+1を満たすので、d[i]は(式41)を満たす。 In step S711, Ψ w (c 0 + c 1 τ) is substituted for d w [i], and Ψ w (c 0 + c 1 τ) = (c 0 + c 1 * t w + 1 mod 2 w + 1 ) −2 w is , | C 0 + c 1 * t w + 1 mod 2 w + 1 | <2 w + 1 , d w [i] satisfies (Equation 41).

実計算部304が出力する点Qはスカラー倍点dPに等しい。この理由は次の通りである。実施の形態1の実計算部304の行う処理と同様の処理を行う。   The point Q output from the actual calculation unit 304 is equal to the scalar multiple dP. The reason is as follows. The same processing as that performed by the actual calculation unit 304 of the first embodiment is performed.

前記ステップS613において点Qが、下記(式45)と表されるとする。   In step S613, it is assumed that the point Q is expressed as (Equation 45) below.

(d[c]τc−j−1+d[c−1]τc−j−2+……+d[j+1])P ・・・(式45)
このとき、次にステップS613に来る時も点Qは(式45)を満たすことを以下で示す。点QはステップS614でτ倍され、d[j]が0でなければステップS616でd[j]Pが加えられる。そのためステップS616の直後では、点Qの値は、下記(式46)となる。
(D w [c] τ c−j−1 + d w [c−1] τ c−j−2 +... + D w [j + 1]) P (Equation 45)
At this time, it will be shown below that the point Q satisfies (Equation 45) also when it comes to step S613 next time. The point Q is multiplied by τ in step S614, and d w [j] P is added in step S616 unless d w [j] is 0. Therefore, immediately after step S616, the value of the point Q is as follows (formula 46).

(d[c]τc−j+d[c−1]τc−j−1+……+d[j+1]τ+d[j])P ・・・(式46)
従って、d[j]=0の時も含めて、ステップS617の直前で、点Qは(式46)を満たす。ステップS617でjが1減少するので、(式46)のjにj+1を代入すると(式45)になる。すなわち、次にステップS613に来る時も点Qは(式45)を満たす。j>cに対するd[j]の値は0であるので、ステップS621で出力される点Qの値は、下記(式47)に等しい。
(D w [c] τ c−j + d w [c−1] τ c−j−1 +... + D w [j + 1] τ + d w [j]) P (Expression 46)
Therefore, the point Q satisfies (Equation 46) immediately before step S617, including when d w [j] = 0. Since j decreases by 1 in step S617, substituting j + 1 for j in (Expression 46) yields (Expression 45). That is, the point Q satisfies (Equation 45) the next time it comes to step S613. Since the value of d w [j] for j> c is 0, the value of the point Q output in step S621 is equal to the following (formula 47).

(d[c]τ+d[c−1]τc−j+……+d[1]τ+d[0])P ・・・(式47)
実計算部304に入力されるスカラー値は、エンコード部302によりエンコードされたd[j]であるので、そのd[j]は(式41)を満たす。従って、Q=dPである。
(D w [c] τ c + d w [c−1] τ c−j +... + D w [1] τ + d w [0]) P (Equation 47)
Since the scalar value input to the actual calculation unit 304 is d w [j] encoded by the encoding unit 302, the d w [j] satisfies (Equation 41). Therefore, Q = dP.

また、上記第2の計算方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由は次の通りである。エンコード部302によりスカラー値dは数値列d[i]にエンコードされる。この数値列d[i]はd[i]=±1±τ±τ±……±τw−1を満たす。 The second calculation method is also effective for a defense method against side channel attacks. The reason is as follows. The encoding unit 302 encodes the scalar value d into a numerical string d w [i]. This numerical sequence d w [i] satisfies d w [i] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 .

すると、実計算部304がスカラー倍点を計算する際に、前記ステップS613〜S617の繰り返し処理に対応する楕円曲線演算は、|T……TA|、すなわちw−1回のTの後にAとなる。ただし、Tはτ倍算を、AはECADDをそれぞれ表わす。これはd[i]がd[j]=±1±τ±τ±……±τw−1を満たすことより従う。 Then, when the actual calculation unit 304 calculates a scalar multiple, the elliptic curve calculation corresponding to the iterative processing of steps S613 to S617 is | T... TA |, that is, A after w-1 times T. Become. However, T represents τ multiplication and A represents ECADD. This follows that d w [i] satisfies d w [j] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 .

従って、すべてのスカラー値に対して、実行する楕円曲線演算は実施の形態1と同様に、下記(式48)と固定されている。そのため、(式48)のみからは、スカラー値dに関する情報を引き出すことができない。   Therefore, the elliptic curve calculation to be executed is fixed to the following (formula 48) as in the first embodiment for all scalar values. Therefore, information relating to the scalar value d cannot be extracted from (Equation 48) alone.

|T……TA|T……TA|……|T……TA| ・・・(式48)
なお、実施の形態2において、前記処理1〜処理3を用いてよいことも、実施の形態1と同様である。
| T …… TA | T …… TA | …… | T …… TA | (Formula 48)
In the second embodiment, the processes 1 to 3 may be used as in the first embodiment.

以上の通り、上記第2の計算方法は、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、メモリ使用量及び処理高速性に優れるという特徴がある。   As described above, the second calculation method can be applied to the Kobritz curve and does not give useful information for the side channel attack, so it is resistant to the side channel attack, and the memory usage and processing speed are improved. It is characterized by being excellent.

(実施の形態3)
本発明の実施の形態3におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図1,図2,図9,図10を参照しながら説明する。実施の形態3では、図9で示されるスカラー倍計算部115の機能ブロック構成を用いる。実施の形態3におけるスカラー倍計算部115(図1のスカラー倍計算部135に対応する)は、前計算部902、実計算部903からなる。前計算部902は、加算部921、τ倍算部922、繰り返し判定部923からなる。実計算部903は、剰余取得部931、剰余変換部932、繰り返し判定部933、δ剰余変換部934、Ψ関数計算部935、ビット値判定部936、加算部937、τ倍算部938からなる。
(Embodiment 3)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 3 of the present invention will be described with reference to FIGS. 1, 2, 9, and 10. FIG. In the third embodiment, the functional block configuration of the scalar multiplication calculator 115 shown in FIG. 9 is used. The scalar multiplication calculation unit 115 (corresponding to the scalar multiplication calculation unit 135 in FIG. 1) in the third embodiment includes a previous calculation unit 902 and an actual calculation unit 903. The pre-calculation unit 902 includes an addition unit 921, a τ multiplication unit 922, and a repetition determination unit 923. The actual calculation unit 903 includes a residue acquisition unit 931, a residue conversion unit 932, an iterative determination unit 933, a δ residue conversion unit 934, a Ψ function calculation unit 935, a bit value determination unit 936, an addition unit 937, and a τ multiplication unit 938. .

実施の形態3で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する第3の計算方法を説明する。第3の計算方法では、スカラー値をエンコードした値を格納することなく、直接、スカラー倍算を計算できるという特徴がある。楕円曲線上の点P=(x,y)は、x,yをあらかじめ正規基底を用いて表しておけば、τ倍した点τ(P)は点Pの線形表現を左に1ビット分だけシフトした値、τ−1倍した点τ−1(P)は点Pの線形表現を右に1ビット分だけシフトした値になる。 As a scalar multiplication calculation method used in the third embodiment, a third 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 third calculation method is characterized in that scalar multiplication can be directly calculated without storing a value obtained by encoding a scalar value. If the point P = (x, y) on the elliptic curve is expressed in advance by using a normal basis, x, y is the point τ (P) multiplied by τ, and the linear representation of the point P is left by one bit. The shifted value, τ −1 times the point τ −1 (P), is a value obtained by shifting the linear representation of the point P to the right by one bit.

これより、点τjw(d[i]P)を計算するためには、まず、前計算テーブルから点d[i]Pを呼び出し、点d[i]Pのx座標、y座標の値をそれぞれ左にiwビット分だけシフトさせればよい。従って、点Qを無限遠点Oで初期化し、点Qに点τjw(d[i]P)を足して、その値を点Qに代入するという操作を続けることによって、前記図3の格納部326のような格納部に値を格納することなく、直接、スカラー倍算を計算できる。これより、スカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する際に、エンコード結果を格納するメモリを節約することができる。そのため、実計算部903は、格納部を具備する必要がない。 From this, in order to calculate the point τ jw (d w [i] P), first, the point d w [i] P is called from the previous calculation table, and the x and y coordinates of the point d w [i] P are calculated. Is shifted to the left by iw bits. Accordingly, by initializing the point Q at the infinity point O, adding the point τ jw (d w [i] P) to the point Q, and substituting the value into the point Q, the operation of FIG. Scalar multiplication can be directly calculated without storing values in a storage unit such as the storage unit 326. Thus, when calculating the scalar multiple dP in the elliptic curve from the scalar value d and the point P on the elliptic curve, it is possible to save the memory for storing the encoding result. Therefore, the actual calculation unit 903 does not need to include a storage unit.

スカラー倍計算部115が復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、実計算部903は、数値列d[i]を計算する。このd[i]は実施の形態2で定義したd[i]と等しい。 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 actual calculation unit 903 calculates a numerical sequence d w [i]. This d w [i] is equal to d w [i] defined in the second embodiment.

次に、前計算部902、実計算部903の行う各処理について詳細に説明する。前計算部902が楕円曲線上の点から、前計算テーブルを作成する方法は、実施の形態2と同様である。   Next, each process performed by the pre-calculation unit 902 and the actual calculation unit 903 will be described in detail. The method for creating the pre-calculation table from the points on the elliptic curve by the pre-calculation unit 902 is the same as in the second embodiment.

次に、図10を用いて、実計算部903がスカラー値と楕円曲線上の点から前計算テーブルを用いて、楕円曲線におけるスカラー倍点を計算する方法を説明する。図10は、実計算部903でのスカラー倍点の計算処理を示すフロー図である。   Next, a method in which the actual calculation unit 903 calculates a scalar multiple in an elliptic curve using a pre-calculation table from a scalar value and a point on the elliptic curve will be described with reference to FIG. FIG. 10 is a flowchart showing a scalar multiple calculation process in the actual calculation unit 903.

実計算部903は、まず、変数iを0で初期化し、Qに無限遠点Oを代入する(S1001)。次に、Ψ関数計算部935は、変数d’にd mod δを代入し、cにd’の実部分Rpart(d’)を、cにd’のτ部分Tpart(d’)をそれぞれ代入する(S1002)。 First, the actual calculation unit 903 initializes the variable i with 0, and substitutes the infinity point O for Q (S1001). Next, the Ψ function calculation unit 935 substitutes d mod δ for the variable d ′, the real part Rpart (d ′) of d ′ in c 0, and the τ part Tpart (d ′) of d ′ in c 1. Each is substituted (S1002).

次に、繰り返し判定部933は、条件{c +μc+2c ≧4/7*2}であるかどうかを判定する。条件が成立すれば(TRUE)、ステップS1004へ移る。条件が成立しない場合は(FALSE)、ステップS1011へ移る(S1003)。 Next, the repetition determination unit 933 determines whether or not the condition {c 0 2 + μc 0 c 1 + 2c 1 2 ≧ 4/7 * 2 w }. If the condition is satisfied (TRUE), the process proceeds to step S1004. If the condition is not satisfied (FALSE), the process proceeds to step S1011 (S1003).

ステップS1004では、剰余変換部932は、Ψ(c+cτ)をd[i]に格納する。更に加算部937、τ倍算部938は、Q+τiw(d[i]P)を計算し、その値をQに、sign(d[i])をsに、|d[i]|をd[i]に、それぞれ代入して、変数iを1増加させる。次に、(c−s*b[(d[i]−1)/2],c−s*b[(d[i]−1)/2])を、(c,c)に代入する(S1005)。 In step S1004, the remainder conversion unit 932 stores Ψ w (c 0 + c 1 τ) in d w [i]. Further, the adding unit 937 and the τ multiplying unit 938 calculate Q + τ iw (d w [i] P), set the value to Q, sign (d w [i]) to s, | d w [i] | Is substituted for d w [i], and the variable i is incremented by one. Next, (c 0 −s * b 0 [(d w [i] −1) / 2], c 1 −s * b 1 [(d w [i] −1) / 2]) 0 , c 1 ) (S1005).

次に、繰り返し判定部933は、j≦wかどうかを判定する(S1006)。j≦wの場合(TRUE)、ステップS1007へ移る。j>wの場合(FALSE)、ステップS1003へ移る。   Next, the repetition determination unit 933 determines whether j ≦ w is satisfied (S1006). If j ≦ w (TRUE), the process proceeds to step S1007. If j> w (FALSE), the process proceeds to step S1003.

ステップS1007では、c+μc/2,−c/2をそれぞれc,cに代入し、S1006に戻る。 In step S1007, c 1 + μc 0/ 2, substituting -c 0/2 to c 0, c 1, respectively, the flow returns to S1006.

一方、ステップS1011では、実計算部903は、点Q=dPを出力する。   On the other hand, in step S1011, the actual calculation unit 903 outputs the point Q = dP.

また、変数iの値の上限がi+w−1となる理由は、実施の形態1及び2と同様である。また、実計算部903が行う処理により計算されるd[i]が、(式18),(式19),(式41)を満たす理由も実施の形態2と同様である。 The reason why the upper limit of the value of variable i is i + w−1 is the same as in the first and second embodiments. The reason why d w [i] calculated by the processing performed by the actual calculation unit 903 satisfies (Expression 18), (Expression 19), and (Expression 41) is the same as that of the second embodiment.

また、実計算部903が出力する点Qはスカラー倍点dPに等しい。この理由は次の通りである。   Further, the point Q output from the actual calculation unit 903 is equal to the scalar multiple dP. The reason is as follows.

前記ステップS1004において点Qが、下記(式49)と表されるとする。   In step S1004, the point Q is represented by the following (formula 49).

(d[0]τ+d[1]τi+1+……+d[i]τ2i)P ・・・(式49)
このとき、次にステップS1004に来る時も点Qは(式49)を満たすことを以下で示す。ステップS1003〜S1007のループにおいて、i回目の直後では、点Qは(式49)を満たす。また、ステップS1003でiにi+1が代入されている。
(D w [0] τ i + d w [1] τ i + 1 +... + D w [i] τ 2i ) P (Equation 49)
At this time, it will be shown below that the point Q satisfies (Equation 49) also when it comes to step S1004 next time. In the loop of steps S1003 to S1007, immediately after the i-th time, the point Q satisfies (Equation 49). In step S1003, i + 1 is substituted for i.

従って、ステップS1004の直後で出力される点Qの値は、下記(式50)であり、(式50)を整理すると、下記(式51)である。   Therefore, the value of the point Q output immediately after step S1004 is the following (formula 50).

(d[0]+d[1]τ+……+d[i]τ)P+(d[i+1]τi+1)P ・・・(式50)
(d[0]+d[1]τ+……+d[i]τi+1)P ・・・(式51)
従って、i+1回目にステップS1004に来る時も点Qは(式49)を満たす。
(D w [0] + d w [1] τ +... + D w [i] τ i ) P + (d w [i + 1] τ i + 1 ) P (Equation 50)
(D w [0] + d w [1] τ +... + D w [i] τ i + 1 ) P (Equation 51)
Therefore, the point Q also satisfies (Equation 49) when it comes to step S1004 for the (i + 1) th time.

ステップS1003〜S1007のループを抜け出すときのiの値をc’とする。このとき、点Qの値は、下記(式52)を満たす。   Let c 'be the value of i when exiting the loop of steps S1003 to S1007. At this time, the value of the point Q satisfies the following (formula 52).

(d[0]+d[1]τ+……+d[i]τc’)P ・・・(式52)
一方、前記実施の形態2におけるスカラー値のエンコードを示す図7でのステップS703〜S707のループは、エンコードにおいては実施の形態3のステップS1003〜S1007までの操作と同様の操作を行っている。従って、下記(式53)が成り立つ。
(D w [0] + d w [1] τ +... + D w [i] τ c ′ ) P (Formula 52)
On the other hand, the loop of steps S703 to S707 in FIG. 7 showing the encoding of the scalar value in the second embodiment performs the same operations as the operations from steps S1003 to S1007 in the third embodiment. Therefore, the following (Formula 53) holds.

c’=c ・・・(式53)
これより実施の形態3で出力される点Qは実施の形態2の実計算部304の出力する値と等しい。従って、Q=dPである。
c ′ = c (Formula 53)
Thus, the point Q output in the third embodiment is equal to the value output from the actual calculation unit 304 of the second embodiment. Therefore, Q = dP.

また、上記第3の計算方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由は以下の通りである。   The third calculation method is also effective for a defense against a side channel attack. The reason is as follows.

実計算部903により、スカラー値dから、数値列d[i]を計算する。この数値列d[i]はd[i]=±1±τ±τ±……±τw−1を満たす。また、実計算部903はスカラー倍点を計算する際に、ステップS1003〜S1007の繰り返し処理に対応する楕円曲線演算は、|T……TA|、すなわちiw−1回のTの後にAとなる。ただし、Tはτ倍算を、AはECADDをそれぞれ表わす。これはd[i]がd[i]=±1±τ±τ±……±τw−1を満たすことより従う。 The actual calculation unit 903 calculates a numerical sequence d w [i] from the scalar value d. This numerical sequence d w [i] satisfies d w [i] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 . Further, when the real calculation unit 903 calculates a scalar multiple, the elliptic curve calculation corresponding to the repetition processing of steps S1003 to S1007 is | T... TA |, that is, A after iw-1 times T. . However, T represents τ multiplication and A represents ECADD. This follows from the fact that d w [i] satisfies d w [i] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 .

従って、すべてのスカラー値に対して、実行する楕円曲線演算は、実施の形態1及び2と同様に、下記(式54)と固定されている。そのため、(式54)のみからは、スカラー値dに関する情報を引き出すことができない。   Therefore, the elliptic curve calculation to be executed for all scalar values is fixed as the following (formula 54) as in the first and second embodiments. Therefore, information relating to the scalar value d cannot be extracted from (Equation 54) alone.

|T……TA|T……TA|……|T……TA| ・・・(式54)
なお、実施の形態3において、前記処理1〜処理3を用いてよいことも、実施の形態1及び2と同様である。
| T …… TA | T …… TA | …… | T …… TA | (Formula 54)
In the third embodiment, the processes 1 to 3 may be used as in the first and second embodiments.

以上の通り、上記第3の計算方法は、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、メモリ使用量及び処理高速性に優れるという特徴がある。   As described above, the third calculation method can be applied to the Kobritz curve and does not give useful information to the side channel attack, so it is resistant to the side channel attack, and the memory usage and processing speed are improved. It is characterized by being excellent.

(実施の形態4)
本発明の実施の形態4におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図1,図2,図9,図11を参照しながら説明する。
(Embodiment 4)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 4 of the present invention will be described with reference to FIGS. 1, 2, 9, and 11. FIG.

実施の形態4では、前記図9で示されるスカラー倍計算部115の機能ブロックを用いる。実施の形態4におけるスカラー倍計算部115(図1のスカラー倍計算部135に対応する)の構成は、実施の形態3と同様である。   In the fourth embodiment, the functional block of the scalar multiplication calculator 115 shown in FIG. 9 is used. The configuration of scalar multiplication calculator 115 (corresponding to scalar multiplication calculator 135 in FIG. 1) in the fourth embodiment is the same as that in the third embodiment.

実施の形態4で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する第4の計算方法を説明する。第4の計算方法では、第3の計算方法と同様に、スカラー値をエンコードした値を格納することなく、直接、スカラー倍算を計算できるという特徴がある。点τ−iw(Q)を計算するためには、点Qのx座標、y座標の値をあらかじめ正規基底を用いて表しておけば、点Qの各座標の値を右にwビット分だけシフトさせればよい。 As a scalar multiplication calculation method used in the fourth embodiment, 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. Similar to the third calculation method, the fourth calculation method has a feature that scalar multiplication can be directly calculated without storing a value obtained by encoding a scalar value. In order to calculate the point τ −iw (Q), if the values of the x-coordinate and y-coordinate of the point Q are expressed in advance using a normal basis, the value of each coordinate of the point Q is shifted to the right by w bits. What is necessary is just to shift.

従って、点Qを無限遠点Oで初期化し、前計算テーブルから点d[i]Pを呼び出し、点τ−iw(Q)に点d[i]Pを足して、その値を点Qに代入するという操作を続けることによって、格納部に値を格納することなく、直接、スカラー倍算を計算できる。これより、スカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する際に、エンコード結果を格納するメモリを節約することができる。そのため、実計算部902は、格納部を具備する必要がない。 Therefore, point Q is initialized at infinity point O, point d w [i] P is called from the previous calculation table, point d w [i] P is added to point τ −iw (Q), and the value is By continuing the operation of substituting for Q, scalar multiplication can be directly calculated without storing the value in the storage unit. Thus, when calculating the scalar multiple dP in the elliptic curve from the scalar value d and the point P on the elliptic curve, it is possible to save the memory for storing the encoding result. Therefore, the actual calculation unit 902 does not need to include a storage unit.

実施の形態3と実施の形態4の違いは以下の通りである。実施の形態3では、前計算テーブルから読み出された点の各座標の値をiwビット分だけシフトするのに対し、実施の形態4では、ワークメモリにある点Q(中間データに相当する)の各座標の値をwビット分だけシフトさせればよい。これにより、シフトさせる回数を節約することができる。   The differences between the third embodiment and the fourth embodiment are as follows. In the third embodiment, the value of each coordinate of the point read from the previous calculation table is shifted by iw bits, whereas in the fourth embodiment, the point Q (corresponding to intermediate data) in the work memory. It is sufficient to shift the value of each coordinate by w bits. Thereby, the frequency | count of shifting can be saved.

次に前計算部902、実計算部903の行う各処理について詳細に説明する。前計算部902が楕円曲線上の点から、前計算テーブルを作成する方法は、実施の形態2及び3と同様である。   Next, each process performed by the pre-calculation unit 902 and the actual calculation unit 903 will be described in detail. The method in which the pre-calculation unit 902 creates the pre-calculation table from the points on the elliptic curve is the same as in the second and third embodiments.

次に、図11を用いて、実計算部903がスカラー値と楕円曲線上の点から前計算テーブルを用いて、楕円曲線におけるスカラー倍点を計算する方法を説明する。図11は、実計算部903でのスカラー倍点の計算処理を示すフロー図である。   Next, a method in which the real calculation unit 903 calculates a scalar multiple point in an elliptic curve from a scalar value and a point on the elliptic curve using a pre-calculation table will be described with reference to FIG. FIG. 11 is a flowchart showing a scalar multiple calculation process in the actual calculation unit 903.

実計算部903は、まず、変数iを0で初期化し、Qに無限遠点Oを代入する(S1101)。次に、Ψ関数計算部935は、変数d’にd mod δを代入し、cにd’の実部分Rpart(d’)を、cにd’のτ部分Tpart(d’)をそれぞれ代入する(S1102)。 First, the actual calculation unit 903 initializes the variable i with 0, and substitutes the infinity point O for Q (S1101). Next, the Ψ function calculation unit 935 substitutes d mod δ for the variable d ′, the real part Rpart (d ′) of d ′ in c 0, and the τ part Tpart (d ′) of d ′ in c 1. Each is substituted (S1102).

次に、繰り返し判定部933により条件{c +μc+2c ≧ 4/7*2}であるかどうかを判定する(S1103)。条件が成立すれば(TRUE)、ステップS1104へ移る。条件が成立しない場合は(FALSE)、ステップS1111へ移る。 Next, it is determined whether or not the condition {c 0 2 + μc 0 c 1 + 2c 1 2 ≧ 4/7 * 2 w } is satisfied by the repetition determination unit 933 (S1103). If the condition is satisfied (TRUE), the process proceeds to step S1104. If the condition is not satisfied (FALSE), the process proceeds to step S1111.

ステップS1104では、Ψ関数計算部935は、Ψ(c+cτ)をd[i]に格納する。更に加算部937、τ倍算部938は、τ−w(Q)+d[i]Pを計算し、その値をQに、sign(d[i])をsに、|d[i]|をd[i]に、それぞれ代入して、変数iを1増加させる。次に、(c,c)に、(c−s*b[(d[i]−1)/2],c−s*b[(d[i]−1)/2])を代入する(S1105)。 In step S1104, the Ψ function calculation unit 935 stores Ψ w (c 0 + c 1 τ) in d w [i]. Further, the adding unit 937 and the τ multiplying unit 938 calculate τ −w (Q) + d w [i] P, set the value to Q, sign (d w [i]) to s, | d w [ i] | is substituted for d w [i], and the variable i is incremented by one. Next, (c 0 , c 1 ) is changed to (c 0 −s * b 0 [(d w [i] −1) / 2], c 1 −s * b 1 [(d w [i] −1). ) / 2]) is substituted (S1105).

次に、繰り返し判定部933は、j≦wかどうかを判定する(S1106)。j≦wの場合は(TRUE)、ステップS1107へ移る。j>wの場合は(FALSE)、ステップS1103へ移る。   Next, the repetition determining unit 933 determines whether j ≦ w is satisfied (S1106). If j ≦ w (TRUE), the process proceeds to step S1107. If j> w (FALSE), the process proceeds to step S1103.

ステップS1107では、(c+μc/2,−c/2)を(c,c)に代入し、S1106に戻る。 In step S1107, substituted in (c 1 + μc 0/2 , -c 0/2) and (c 0, c 1), the flow returns to S1106.

一方、ステップS1111では、実計算部903は、点Q=dPを出力する。   On the other hand, in step S <b> 1111, the actual calculation unit 903 outputs a point Q = dP.

また、変数iの値の上限がi+w−1となる理由は実施の形態3と同様である。また、実計算部903が行う処理により出力されるd[i]が、(式18),(式19),(式41)を満たす理由も、実施の形態2及び3と同様である。 The reason why the upper limit of the value of the variable i is i + w−1 is the same as in the third embodiment. The reason why d w [i] output by the process performed by the actual calculation unit 903 satisfies (Equation 18), (Equation 19), and (Equation 41) is the same as in Embodiments 2 and 3.

また、実計算部903が出力する点Qはスカラー倍点dPに等しい。この理由は次の通りである。   Further, the point Q output from the actual calculation unit 903 is equal to the scalar multiple dP. The reason is as follows.

前記ステップS1104において点Qが、下記(式55)と表されるとする。   In step S1104, the point Q is represented by the following (formula 55).

(τ−iw(d[0])+τ−(i−1)w(d[1])+……+τ−w(d[i−1])+d[i])P ・・・(式55)
このとき、次にステップS1104に来る時も点Qは(式55)を満たすことを以下で示す。ステップS1103〜S1107のループにおいて、i回目の直後では、点Qは(式55)を満たす。また、ステップS1103でiにi+1が代入されている。
−iw (d w [0]) + τ − (i−1) w (d w [1]) + …… + τ −w (d w [i−1]) + d w [i]) P (Formula 55)
At this time, it will be shown below that the point Q satisfies (Equation 55) also when it comes to step S1104 next time. In the loop of steps S1103 to S1107, the point Q satisfies (Expression 55) immediately after the i-th time. In step S1103, i + 1 is substituted for i.

また、ステップS1104でiにi+1が代入されている。従って、ステップS1104の直後で出力される点Qの値は、下記(式56)であり、(式56)を整理すると、下記(式57)となる。従って、i+1回目にステップS1104に来る時も点Qは(式55)を満たす。   In step S1104, i + 1 is substituted for i. Therefore, the value of the point Q output immediately after step S1104 is the following (formula 56), and (formula 57) is obtained by arranging (formula 56). Therefore, the point Q satisfies (Expression 55) even when it comes to step S1104 for the (i + 1) th time.

τ−w−iw(d[0])+τ−(i−1)w(d[1])+……+τ−w(d[i−1])+d[i])P+(d[i+1])P ・・・(式56)
(τ−(i+1)w(d[0])+τ−iw(d[1])+……+τ−w(d[i])+d[i+1])P ・・・(式57)
ステップS1103〜S1107のループを抜け出すときのiの値をc’とする。このとき、点Qの値は、下記(式58)を満たす。
τ −w−iw (d w [0]) + τ − (i−1) w (d w [1]) + …… + τ −w (d w [i−1]) + d w [i]) P + (d w [i + 1]) P (Formula 56)
(Τ - (i + 1) w (d w [0]) + τ -iw (d w [1]) + ...... + τ -w (d w [i]) + d w [i + 1]) P ··· ( Equation 57 )
Let c ′ be the value of i when exiting the loop of steps S1103 to S1107. At this time, the value of the point Q satisfies the following (formula 58).

(τ−cw(d[0])+τ−(c−1)w(d[1])+……+τ−w(d[c−1])+d[c])P ・・・(式58)
一方、前記実施の形態2におけるスカラー値のエンコードを示す図7でのステップS703〜S707のループは、エンコードにおいては実施の形態4と同様の操作を行っている。従って、下記(式59)が成り立つ。
−cw (d w [0]) + τ − (c−1) w (d w [1]) +... + Τ −w (d w [c−1]) + d w [c]) P (Formula 58)
On the other hand, the loop of steps S703 to S707 in FIG. 7 showing the encoding of the scalar value in the second embodiment performs the same operation as in the fourth embodiment. Therefore, the following (formula 59) holds.

c’=c ・・・(式59)
これより実施の形態4で出力される点Qは実施の形態2の実計算部304の出力する値と等しい。従って、Q=dPである。
c ′ = c (Formula 59)
Thus, the point Q output in the fourth embodiment is equal to the value output from the actual calculation unit 304 of the second embodiment. Therefore, Q = dP.

また、上記第4の計算方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由は以下の通りである。   The fourth calculation method is also effective for a defense against a side channel attack. The reason is as follows.

実計算部903により、スカラー値dから、数値列d[i]を計算する。この数値列d[i]はd[i]=±1±τ±τ±……±τw−1を満たす。また、実計算部903はスカラー倍点を計算する際に、ステップS1103〜S1107の繰り返し処理に対応する楕円曲線演算は、|T……TA|、すなわちw−1回のTの後にAとなる。ただし、Tはτ倍算を、AはECADDをそれぞれ表わす。これはd[i]がd[i]=±1±τ±τ±……±τw−1を満たすことより従う。 The actual calculation unit 903 calculates a numerical sequence d w [i] from the scalar value d. This numerical sequence d w [i] satisfies d w [i] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 . Further, when the real calculation unit 903 calculates a scalar multiple, the elliptic curve calculation corresponding to the repetition processing of steps S1103 to S1107 is | T... TA |, that is, A after w-1 times T. . However, T represents τ multiplication and A represents ECADD. This follows from the fact that d w [i] satisfies d w [i] = ± 1 ± τ ± τ 2 ± …… ± τ w−1 .

従って、すべてのスカラー値に対して、実行する楕円曲線演算は、実施の形態1及び2と同様に、下記(式60)と固定されている。そのため、(式60)のみからは、スカラー値dに関する情報を引き出すことができない。   Therefore, the elliptic curve calculation to be executed for all scalar values is fixed as (Equation 60) below, as in the first and second embodiments. Therefore, information relating to the scalar value d cannot be extracted from (Equation 60) alone.

|T……TA|T……TA|……|T……TA| ・・・(式60)
なお、実施の形態4において、前記処理1〜処理3を用いてよいことも、実施の形態1、2及び3と同様である。
| T …… TA | T …… TA | …… | T …… TA | (Formula 60)
In the fourth embodiment, the processes 1 to 3 may be used as in the first, second, and third embodiments.

以上の通り、上記第4の計算方法は、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、メモリ使用量及び処理高速性に優れるという特徴がある。   As described above, the fourth calculation method can be applied to the Kobritz curve and does not give useful information for the side channel attack, so it is resistant to the side channel attack, and the memory usage and the processing speed are improved. It is characterized by being excellent.

(実施の形態5)
本発明の実施の形態5におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図1〜図4を参照しながら説明する。
(Embodiment 5)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 5 of the present invention will be described with reference to FIGS.

実施の形態5では、前記図3で示されるスカラー倍計算部115の機能ブロックを用いる。実施の形態5におけるスカラー倍計算部115(図1のスカラー倍計算部135に対応する)の構成は、実施の形態1及び2と同様である。   In the fifth embodiment, the functional block of the scalar multiplication calculator 115 shown in FIG. 3 is used. The configuration of scalar multiplication calculator 115 (corresponding to scalar multiplication calculator 135 in FIG. 1) in the fifth embodiment is the same as in the first and second embodiments.

実施の形態5で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d及び楕円曲線上の点Pから、楕円曲線におけるスカラー倍点dPを計算する第5の計算方法を説明する。第5の計算方法では、サイドチャネル攻撃に対する防御法として有効なコブリッツ曲線以外の楕円曲線のスカラー倍計算方法を説明する。   As a scalar multiplication calculation method used in the fifth embodiment, a fifth 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. In the fifth calculation method, a scalar multiplication method for elliptic curves other than the Kobritz curve, which is effective as a defense against side channel attacks, will be described.

上記のような楕円曲線の例として、下記(式61)という定義式を持つ楕円曲線を考える。   As an example of the elliptic curve as described above, an elliptic curve having the following definition formula (Formula 61) is considered.

=x−b(b≠0) ・・・(式61)
この楕円曲線上の点に対して、フロベニウス写像τと呼ばれる演算を行うことが可能である。点(x,y)に対するフロベニウス写像τとは、下記(式62)を計算することである。τを、下記(式63)を満たす虚部が正である複素数と考えることができる。
y 2 = x 3 −b (b ≠ 0) (Formula 61)
An operation called Frobenius map τ can be performed on the points on the elliptic curve. The Frobenius map τ for the point (x 1 , y 1 ) is to calculate the following (formula 62). τ can be considered as a complex number having a positive imaginary part that satisfies the following (Equation 63).

(x,y)=τ(x,y)=(x ,y ) ・・・(式62)
τ−tτ+7=0 ・・・(式63)
ここで、複素数a+bi(ここでiは虚数単位)の虚部とは実数bのことであり、tは楕円曲線におけるトレースと呼ばれる整数である。ただし、tw+1は、下記(式64)で与えられる整数であり、Uw+1は、下記(式65)で定まる整数である。
(X 3 , y 3 ) = τ (x 1 , y 1 ) = (x 1 7 , y 1 7 ) (Expression 62)
τ 2 −tτ + 7 = 0 (Expression 63)
Here, the imaginary part of the complex number a + bi (where i is an imaginary unit) is a real number b, and t is an integer called a trace in an elliptic curve. However, tw + 1 is an integer given by (Expression 64) below, and U w + 1 is an integer determined by (Expression 65) below.

w+1=7Uw+1 −1 mod 7w+1 ・・・(式64)
=0,U=1,Uw+1=tU−7Uw−1 ・・・(式65)
実施の形態1において、スカラー値dを数値列d[i]にエンコードする操作は、スカラー値dを、余りが出るまでτで割り続けることに相当する。従って、スカラー値dがτで割り算を行うことができれば、コブリッツ曲線以外の楕円曲線のスカラー倍計算においてサイドチャネル攻撃に対する防御法を構成することができるということになる。
t w + 1 = 7 U w U w + 1 −1 mod 7 w + 1 (Formula 64)
U 0 = 0, U 1 = 1, U w + 1 = tU w −7U w−1 (Expression 65)
In the first embodiment, the operation of encoding the scalar value d into the numerical sequence d w [i] corresponds to continuing to divide the scalar value d by τ w until a remainder is obtained. Therefore, if it is possible to scalar value d performs division by tau w, thus being able to constitute a protection method against side channel attacks in the scalar multiplication of an elliptic curve other than Koblitz curve.

スカラー倍計算部115が、復号化処理部132からスカラー値dと楕円曲線上の点Pを受け取ると、エンコード部302は、入力されたスカラー値dを数値列d[i]にエンコードする。これは、下記(式66)を満たす整数d’に対して、下記(式67),(式68)を満たすd[i]に、スカラー値dを変換することに相当する。 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 [i]. This is equivalent to converting the scalar value d into d w [i] satisfying the following (Expression 67) and (Expression 68) with respect to the integer d ′ satisfying the following (Expression 66).

dP=d’P ・・・(式66)
d’=d[2n]τ2n+d[2n−1]τ2n−1+……+d[i]τ+……+d[0] ・・・(式67)
−7<d[i]<7 ・・・(式68)
前計算部303は、入力された楕円曲線上の点Pから、前計算テーブルを作成する。前計算テーブルは{P,2P,……,(7−1)P}により構成される。ただし、点kP(k=7,7,……,7w−1)は前計算テーブルには含まれていない。
dP = d′ P (Formula 66)
d ′ = d w [2n] τ 2n + d w [2n−1] τ 2n−1 +... + d w [i] τ i +... + d w [0] (Expression 67)
−7 w <d w [i] <7 w (Formula 68)
The pre-calculation unit 303 creates a pre-calculation table from the input point P on the elliptic curve. The pre-calculation table is composed of {P, 2P,..., (7 w −1) P}. However, the point kP (k = 7, 7 2 ,..., 7 w−1 ) is not included in the previous calculation table.

実計算部304は、エンコードされたスカラー値と楕円曲線上の点Pから、前計算テーブルを用いてスカラー倍点dPを計算する。   The actual calculation unit 304 calculates a scalar multiple dP from the encoded scalar value and the point P on the elliptic curve using the pre-calculation table.

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

エンコード部302がスカラー値dをエンコードする方法は、実施の形態1と同様である。ただし、前記ステップS401において、δは、下記(式69)を満たす数であり、ここでmは、拡大次数と呼ばれる整数である。   The encoding unit 302 encodes the scalar value d in the same manner as in the first embodiment. However, in step S401, δ is a number that satisfies the following (formula 69), where m is an integer called an expansion order.

δ=(τ−1)/(τ−1) ・・・(式69)
d mod δの計算方法は以下の通りである。δは(式69)を用いることによって、下記(式70)と変形することができる。ここで、δ,δは整数である。
δ = (τ m −1) / (τ−1) (Equation 69)
The calculation method of d mod δ is as follows. δ can be transformed to the following (Equation 70) by using (Equation 69). Here, δ 0 and δ 1 are integers.

δ=δ+δτ ・・・(式70)
スカラー値dは、下記(式71)と書くことができる。ここで、d,dは整数である。
δ = δ 0 + δ 1 τ (Expression 70)
The scalar value d can be written as (Equation 71) below. Here, d 0 and d 1 are integers.

d=d+dτ ・・・(式71)
このとき、dmod δは、下記(式72)を満たす数である。
d = d 0 + d 1 τ (Expression 71)
At this time, dmod δ is a number satisfying the following (formula 72).

d mod δ=r+rτ ・・・(式72)
ただし、r,rはそれぞれ下記(式73),(式74)を満たす整数であり、q,qは下記(式75),(式76)を満たす数である。
d mod δ = r 0 + r 1 τ (Expression 72)
However, r 0 and r 1 are integers satisfying the following (Expression 73) and (Expression 74), respectively, and q 0 and q 1 are numbers satisfying the following (Expression 75) and (Expression 76).

=d−δ+7δ ・・・(式73)
=d−δ−δ−tδ ・・・(式74)
= Round(λ) ・・・(式75)
= Round(λ) ・・・(式76)
ここで、λ,λは、λ=g/N,λ=g/Nを満たす数(有理数)であり、数λに対してRound(λ)は、λ+1/2を超えない最大の整数である。また、g,g,Nは、それぞれ下記(式77),(式78),(式79)で与えられる整数である。
r 0 = d 0 −δ 0 q 0 + 7δ 1 q 1 (Expression 73)
r 1 = d 1 −δ 1 q 0 −δ 0 q 1 −tδ 1 q 1 (Expression 74)
q 0 = Round (λ 0 ) (Expression 75)
q 1 = Round (λ 1 ) (Formula 76)
Here, λ 0 and λ 1 are numbers (rational numbers) satisfying λ 0 = g 0 / N and λ 1 = g 1 / N, and Round (λ) exceeds λ + 1/2 with respect to the number λ. There is no maximum integer. G 0 , g 1 , and N are integers given by the following (formula 77), (formula 78), and (formula 79), respectively.

=dδ+tdδ+7dδ ・・・(式77)
=dδ−dδ ・・・(式78)
N=δ +tδδ+7δ ・・・(式79)
また、前記ステップS403の分岐条件は、|Rpart(d’)|<2及びTpart(d’)=0ではなく、|Rpart(d’)|<7及びTpart(d’)=0である。ステップS411は、Rpart(d’) mod 2w+1をxに代入、及びTpart(d’) mod 2w+1をxに代入ではなく、Rpart(d’) mod 7w+1をxに代入、Tpart(d’) mod 7w+1をxに代入する。ステップS412では、(x+x*tw+1mod 2w+1)−2をuに代入ではなく、(x+x*tw+1mod 7w+1)−7をuに代入する。
g 0 = d 0 δ 0 + td 0 δ 1 + 7d 1 δ 1 (Expression 77)
g 1 = d 1 δ 0 -d 0 δ 1 (Formula 78)
N = δ 0 2 + tδ 0 δ 1 + 7δ 1 2 (Equation 79)
The branch condition of the step S403 is, | Rpart (d ') | <2 w and Tpart (d') = instead 0, | Rpart (d ') | <7 w and Tpart (d') = 0 is there. Step S411 is, Rpart (d ') substituting mod 2 w + 1 to x R, and Tpart (d') rather than substitutes mod 2 w + 1 to x T, Rpart (d ') substituting the mod 7 w + 1 to x R, Tpart (d ') the mod 7 w + 1 is substituted for x T. In step S412, (x R + x T * t w + 1 mod 2 w + 1) and -2 w rather than substituted into u, substituting (x R + x T * t w + 1 mod 7 w + 1) -7 w to u.

ここで、tw+1は、下記(式80)で与えられる整数であり、Uw+1は、下記(式81)で定まる整数である。 Here, tw + 1 is an integer given by (Expression 80) below, and U w + 1 is an integer determined by (Expression 81) below.

w+1=7Uw+1 −1 mod 7w+1 ・・・(式80)
=0,U=1,Uw+1=tU−7Uw−1 ・・・(式81)
前計算部303が楕円曲線上の点から前計算テーブルを作成する方法は、実施の形態1と同様である。ただし、前記ステップS503の分岐条件は、j<2ではなく、j<7である。
t w + 1 = 7 U w U w + 1 −1 mod 7 w + 1 (Equation 80)
U 0 = 0, U 1 = 1, U w + 1 = tU w −7U w−1 (Equation 81)
The method by which the pre-calculation unit 303 creates the pre-calculation table from the points on the elliptic curve is the same as in the first embodiment. However, the branch condition in step S503 is not j <2 w but j <7 w .

また、実計算部S304が、エンコードされたスカラー値、楕円曲線上の点及び前計算テーブルから、楕円曲線におけるスカラー倍点を計算する方法も、実施の形態1と同様である。ただし、実施の形態5におけるτ倍算部343のτは、(式9)ではなく、(式63)を満たす。エンコード部302が行う処理により出力されるd[i]は、(式66),(式67),(式68)を満たす。(式66),(式67)が成立する理由は、実施の形態1と同様である。 The method in which the actual calculation unit S304 calculates the scalar multiple in the elliptic curve from the encoded scalar value, the point on the elliptic curve, and the previous calculation table is the same as in the first embodiment. However, τ of the τ multiplication unit 343 in the fifth embodiment satisfies (Expression 63) instead of (Expression 9). The d w [i] output by the processing performed by the encoding unit 302 satisfies (Expression 66), (Expression 67), and (Expression 68). The reason why (Expression 66) and (Expression 67) are satisfied is the same as in the first embodiment.

前記ステップS412で計算されるu[j]は、下記(式82)の範囲となることは容易にわかる。従って、0以外のd[i]はu[j]が割り当てられる。従って、(式68)を満たす。 It can be easily understood that u [j] calculated in step S412 falls within the following range (formula 82). Accordingly, u [j] is assigned to d w [i] other than 0. Therefore, (Equation 68) is satisfied.

−7<u[j]< 7 ・・・(式82)
エンコード部302が行う処理で計算されるu[j]は、j=0を除きすべて7の倍数となり、実計算部304が出力する点Qはスカラー倍点dPに等しい。この理由も実施の形態1と同様である。また、上記第5の計算方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由も実施の形態1と同様である。
−7 w <u [j] <7 w (Expression 82)
U [j] calculated by the processing performed by the encoding unit 302 is a multiple of 7 except for j = 0, and the point Q output from the actual calculation unit 304 is equal to the scalar multiple dP. The reason for this is the same as in the first embodiment. The fifth calculation method is also effective for a defense against a side channel attack. The reason for this is the same as in the first embodiment.

実施の形態5において、前記処理1〜処理3を用いてよいことも、実施の形態1〜4と同様である。   In the fifth embodiment, the processes 1 to 3 may be used as in the first to fourth embodiments.

前記(式61)以外の楕円曲線の例を挙げる。楕円曲線Eを、非特許文献である、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.に記載の楕円曲線とすると、点P、スカラー値dに対するスカラー倍算dPは、下記(式83)を計算すればよいことが知られている。   Examples of elliptic curves other than the above (formula 61) are given. Elliptic curve E is a non-patent document, 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 Assuming that the elliptic curve is described in of Lecture Notes in Computer Science, 190-200. Springer, 2001., it is known that the scalar multiplication dP for the point P and the scalar value d may be calculated by the following (formula 83). ing.

dP=kP+kΨP ・・・(式83)
ここで、k,kは、0から√nまでの範囲にある正の整数、ΨはEの自己準同型写像、nは点Pの位数である。整数k,kに対して(式83)の操作を繰り返し行うことによって、スカラー値dを実施の形態1〜4のいずれか一つに記載の形に変換できる。このとき、すべてのスカラー値に対して、実行する楕円曲線演算は、下記(式84)と固定されている。ただし、Ψは自己準同型演算を表わす。そのため、(式84)のみからは、スカラー値dに関する情報を引き出すことができない。
dP = k 1 P + k 2 ΨP (Expression 83)
Here, k 1 and k 2 are positive integers in the range from 0 to √n, Ψ is a self-homogeneous map of E, and n is the order of the point P. By repeatedly performing the operation of (Expression 83) on the integers k 1 and k 2 , the scalar value d can be converted into the form described in any one of the first to fourth embodiments. At this time, the elliptic curve calculation to be executed for all scalar values is fixed as (Equation 84) below. Where Ψ represents a self-homogeneous operation. Therefore, information relating to the scalar value d cannot be extracted from (Equation 84) alone.

|Ψ……ΨA|Ψ……ΨA|……|Ψ……ΨA| ・・・(式84)
以上の通り、上記第5の計算方法は、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、コブリッツ曲線以外の楕円曲線に対しても適用可能であり、メモリ使用量及び処理高速性に優れるという特徴がある。
| Ψ …… ΨA | Ψ …… ΨA | …… | Ψ …… ΨA | (formula 84)
As described above, the fifth calculation method is not resistant to side channel attacks because it does not give useful information for side channel attacks, and can be applied to elliptic curves other than Kobritz curves. It is characterized by excellent amount and high processing speed.

(実施の形態6)
本発明の実施の形態6におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図1,図2,図9,図12を参照しながら説明する。
(Embodiment 6)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 6 of the present invention will be described with reference to FIGS. 1, 2, 9, and 12. FIG.

実施の形態6では、前記図9で示されるスカラー倍計算部115の機能ブロックを用いる。実施の形態6におけるスカラー倍計算部115(図1のスカラー倍計算部135に対応する)の構成は、実施の形態3及び4と同様である。ただし、実施の形態6では、前記図9における前計算部902のτ倍算部922ではなく2倍算部922を具備するものとする。   In the sixth embodiment, the functional block of the scalar multiplication calculator 115 shown in FIG. 9 is used. The configuration of scalar multiplication calculation section 115 (corresponding to scalar multiplication calculation section 135 in FIG. 1) in the sixth embodiment is the same as in the third and fourth embodiments. However, in the sixth embodiment, it is assumed that the doubling unit 922 is provided instead of the τ multiplication unit 922 of the previous calculation unit 902 in FIG.

実施の形態6で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d、楕円曲線上の点P、及び、ウィンドウ幅wから、楕円曲線におけるスカラー倍点dPを計算する第6の計算方法を説明する。第6の計算方法では、スカラー値dはバイナリτ進表現で格納されているとする。ここで、スカラー値dのバイナリτ進表現とは、下記(式85),(式86)なる表現のことである。   As a scalar multiplication calculation method used in the sixth embodiment, the scalar multiplication calculation unit 115 calculates the scalar multiplication point dP in the elliptic curve from the scalar value d, the point P on the elliptic curve, and the window width w. A method will be described. In the sixth calculation method, it is assumed that the scalar value d is stored in binary τ-adic representation. Here, the binary τ-adic expression of the scalar value d is an expression of the following (Expression 85) and (Expression 86).

d=d[n+a−1]τn+a−1+d[n+a−2]τn+a−2+……+d[i]τ+……+d[0] ・・・(式85)
[i]=0またはd[i]=1 ・・・(式86)
このとき、スカラー値dのバイナリ表現は、通常のバイナリ表現と同様に、メモリに格納しやすく、スカラー値dを他の表現に変換しやすいという特徴を持つ。また、スカラー倍点dPの計算毎にウィンドウ幅wを変更することが可能である。
d = d w [n + a−1] τ n + a−1 + d w [n + a−2] τ n + a−2 + …… + d w [i] τ i + …… + d w [0] (Expression 85)
d w [i] = 0 or d w [i] = 1 (Expression 86)
At this time, the binary representation of the scalar value d is characterized in that it can be easily stored in a memory and the scalar value d can be easily converted into another representation, like the normal binary representation. Further, it is possible to change the window width w every time the scalar multiple dP is calculated.

処理速度とメモリ使用量の間にはトレードオフの関係があるから、状況に合わせたウィンドウ幅の選択を可能にする。   Since there is a trade-off relationship between processing speed and memory usage, it is possible to select a window width according to the situation.

また、実施の形態6における楕円曲線上のスカラー倍計算において、スカラー値dはバイナリτ進表現で格納されているから、最上位ビットから最下位ビットに向けて(left-to-right)処理を行うことを可能にする。   Further, in the scalar multiplication on the elliptic curve in the sixth embodiment, the scalar value d is stored in binary τ-adic representation, so the processing from the most significant bit to the least significant bit (left-to-right) is performed. Make it possible to do.

次に、前計算部902、実計算部903の行う各処理について詳細に説明する。前計算部902が楕円曲線上の点Pから前計算テーブルを作成する方法は、実施の形態1及び5と同様である。   Next, each process performed by the pre-calculation unit 902 and the actual calculation unit 903 will be described in detail. The method by which the pre-calculation unit 902 creates the pre-calculation table from the point P on the elliptic curve is the same as in the first and fifth embodiments.

図12を用いて、実計算部903がバイナリτ進表現で格納されているスカラー値、楕円曲線上の点、前計算テーブル、及び、ウィンドウ幅wから、楕円曲線におけるスカラー倍点を計算する方法を説明する。図12は、実計算部903のスカラー倍点の計算処理を示すフロー図である。   Using FIG. 12, the real calculation unit 903 calculates a scalar multiple in an elliptic curve from a scalar value stored in binary τ-adic representation, a point on the elliptic curve, a previous calculation table, and a window width w. Will be explained. FIG. 12 is a flowchart showing the scalar multiple calculation process of the actual calculation unit 903.

まず、実計算部903は、点Qを楕円曲線Eの無限遠点O、変数iをm+a―1で初期化する(S1201)。次に、繰り返し判定部933は、i>wであるかどうかを判定する(S1202)。i>wの場合は(TRUE)、ステップS1203へ移る。i≦wの場合は(FALSE)、ステップS1221へ移る。   First, the actual calculation unit 903 initializes the point Q with the infinity point O of the elliptic curve E and the variable i with m + a−1 (S1201). Next, the repetition determining unit 933 determines whether i> w is satisfied (S1202). If i> w (TRUE), the process proceeds to step S1203. If i ≦ w (FALSE), the process proceeds to step S1221.

ステップS1203では、変数jに初期値1を代入する。次に、繰り返し判定部933は、j≦wであるかどうかを判定する(S1204)。j≦wである場合は(TRUE)、ステップS1205へ移る。j>wの場合は(FALSE)、ステップS1211へ移る。ステップS1205では、τ倍算部938は、点Qをτ倍し、点Qに格納する。   In step S1203, the initial value 1 is substituted into the variable j. Next, the repetition determination unit 933 determines whether j ≦ w is satisfied (S1204). If j ≦ w (TRUE), the process proceeds to step S1205. If j> w (FALSE), the process proceeds to step S1211. In step S1205, the τ multiplication unit 938 multiplies the point Q by τ and stores it at the point Q.

ステップS1211では、uに、(1+Σdi-w+j(tw+1−2Uj−1))mod 2w+1 −2を代入する。 In step S1211, (1 + Σd i−w + j (t w + 1 U j −2U j−1 )) mod 2 w + 1 −2 w is substituted for u i .

次に、繰り返し判定部933は、u>0であるかどうかを判定する(S1212)。u>0の場合は(TRUE)、ステップS1213へ移る。u≦0の場合は(FALSE)、ステップS1214へ移る。 Next, the repetition determination unit 933 determines whether u i > 0 (S1212). If u i > 0 (TRUE), the process proceeds to step S1213. If u i ≦ 0 (FALSE), the process proceeds to step S1214.

ステップS1213では、加算部937は、点Qと前計算テーブル上の点uPを加算し、点Qに格納する。一方、ステップS1213では、加算部937は、点Qから前計算テーブル上の点−uPを減算し、点Qに格納する。次に、ステップS1215dで、iにi−wを代入する。 In step S1213, the adding unit 937 adds the point Q and the point u i P on the previous calculation table, and stores the result in the point Q. On the other hand, in step S <b> 1213, the adding unit 937 subtracts the point −u i P on the previous calculation table from the point Q, and stores it at the point Q. Next, i-w is substituted into i in step S1215d.

一方、ステップS1211では、繰り返し判定部933は、j≦iであるかどうかを判定する。j≦iの場合は(TRUE)、ステップS1222へ移る。j>iの場合は(FALSE)、ステップS1231へ移る。ステップS1222で、τ倍算部938は、点Qをτ倍し、点Qに格納する。   On the other hand, in step S1211, the repetition determination unit 933 determines whether j ≦ i. If j ≦ i (TRUE), the process proceeds to step S1222. If j> i (FALSE), the process proceeds to step S1231. In step S1222, the τ multiplication unit 938 multiplies the point Q by τ and stores it at the point Q.

ステップS1231では、uに、(1+Σd(ti+1−2Uj−1))mod 2i+1 −2を代入する。次に、繰り返し判定部933は、u>0であるかどうかを判定する(S1232)。u>0の場合は(TRUE)、ステップS1233へ移る。u≦0の場合は(FALSE)、ステップS1234へ移る。 In step S1231, (1 + Σd i (t i + 1 U j −2U j−1 )) mod 2 i + 1 −2 i is substituted for u 0 . Next, the repetition determination unit 933 determines whether u 0 > 0 is satisfied (S1232). If u 0 > 0 (TRUE), the process proceeds to step S1233. If u 0 ≦ 0 (FALSE), the process proceeds to step S1234.

ステップS1233では、加算部937は、点Qと前計算テーブル上の点uPを加算し、点Qに格納する。一方、ステップS1234では、加算部937は、点Qから前計算テーブル上の点−uPを減算し、点Qに格納する。 In step S1233, the addition unit 937 adds the point Q and the point u 0 P on the previous calculation table, and stores the result in the point Q. On the other hand, in step S <b> 1234, the adding unit 937 subtracts the point −u 0 P on the previous calculation table from the point Q and stores it at the point Q.

次に、繰り返し判定部933は、d=0であるかどうかを判定する(S1235)。d=0の場合は(TRUE)、ステップS1236へ移る。d≠0の場合は(FALSE)、ステップS1237へ移る。 Next, the repetition determining unit 933 determines whether d 0 = 0 (S1235). If d 0 = 0 (TRUE), the process proceeds to step S1236. If d 0 ≠ 0 (FALSE), the process proceeds to step S1237.

ステップS1236では、加算部937は、点Qと点−Pを加算し、点Qに格納する。一方、ステップS1237では、加算部937は、点Qと点−τPを加算し、点Qに格納する。そして、ステップS1241で、実計算部903は、点Qを出力する。   In step S1236, the adding unit 937 adds the point Q and the point -P and stores the result in the point Q. On the other hand, in step S <b> 1237, the adding unit 937 adds the point Q and the point −τP and stores it at the point Q. In step S1241, the actual calculation unit 903 outputs the point Q.

上記第6の計算方法は、サイドチャネル攻撃に対する防御法に関しても有効である。この理由は以下の通りである。   The sixth calculation method is also effective for a defense against a side channel attack. The reason is as follows.

ステップS1211で、uに(1+Σdi−w+j(tw+1−2Uj−1))mod 2w+1−2を代入し、ステップS1231で、uに(1+Σd(ti+1−2Uj−1))mod 2i+1−2を代入している。 In step S1211, the u i (1 + Σd i- w + j (t w + 1 U j -2U j-1)) by substituting mod 2 w + 1 -2 w, at step S1231, the u 0 (1 + Σd j ( t i + 1 U j - 2U j-1 )) mod 2 i + 1 -2 i is substituted.

i=m+a−1からi=0までuを左から右に並べた数値列um+a−1……uは、下記(式87)のようなパターンで表わされる。 A numerical sequence u m + a−1 ... u 0 in which u i is arranged from left to right from i = m + a−1 to i = 0 is represented by the following pattern (formula 87).

|0……0x|0……0x|……|0……0x| ・・・(式87)
ここで各xは各々非0の値であり、それぞれ上記u[j]に対応する。ここで“0……0”は、j≠0のとき、w−1個連続し、j=0のとき、高々w−1個連続する。
| 0 …… 0x | 0 …… 0x | …… | 0 …… 0x | (Expression 87)
Here, each x is a non-zero value and corresponds to the above u [j]. Here, “0... 0” continues for w−1 when j ≠ 0, and continues for w−1 at most when j = 0.

実計算部903がスカラー倍点を計算する際に、ステップS1204〜S1215の繰り返し処理において、ブロック|0……0x|に対応する楕円曲線演算は、|T……TA|、すなわちw−1回のTの後にAとなる。ただし、Tはτ倍算を、AはECADDをそれぞれ表わす。   When the real calculation unit 903 calculates a scalar multiple, in the iterative processing of steps S1204 to S1215, the elliptic curve calculation corresponding to the block | 0... 0x | is | T. A after T. However, T represents τ multiplication and A represents ECADD.

従って、すべてのスカラー値に対して、実行する楕円曲線演算は、実施の形態1及び2と同様に、下記(式88)と固定されている。そのため、(式88)のみからは、スカラー値dに関する情報を引き出すことができない。   Therefore, the elliptic curve calculation to be executed for all scalar values is fixed as in the following (Equation 88) as in the first and second embodiments. Therefore, information relating to the scalar value d cannot be extracted from (Equation 88) alone.

|T……TA|T……TA|……|T……TA| ・・・(式88)
なお、実施の形態6において、前記処理1〜処理3を用いてよいことも、実施の形態1〜3と同様である。
| T …… TA | T …… TA | …… | T …… TA | (Formula 88)
In the sixth embodiment, the processes 1 to 3 may be used as in the first to third embodiments.

以上の通り、上記第6の計算方法は、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、メモリ使用量及び処理高速性に優れるという特徴がある。   As described above, the sixth calculation method can be applied to the Kobritz curve and does not give useful information for the side channel attack. It is characterized by being excellent.

(実施の形態7)
本発明の実施の形態7におけるスカラー倍計算方法、スカラー倍計算装置及びプログラムについて、図3,図13〜図15,図21,図22を参照しながら説明する。
(Embodiment 7)
A scalar multiplication calculation method, scalar multiplication calculation apparatus, and program according to Embodiment 7 of the present invention will be described with reference to FIGS. 3, 13 to 15, 21, and 22.

実施の形態7では、前記図3で示されるスカラー倍計算部115の機能ブロックを用いる。実施の形態7におけるスカラー倍計算部115(図1のスカラー倍計算部135に対応する)の構成は、実施の形態1,2及び5と同様である。   In the seventh embodiment, the functional block of the scalar multiplication unit 115 shown in FIG. 3 is used. The configuration of scalar multiplication unit 115 (corresponding to scalar multiplication unit 135 in FIG. 1) in the seventh embodiment is the same as in the first, second, and fifth embodiments.

実施の形態7で用いるスカラー倍計算方法として、スカラー倍計算部115がスカラー値d、楕円曲線上の点P、ウィンドウ幅wから楕円曲線におけるスカラー倍点dPを計算する第7の計算方法を説明する。第7の計算方法では、スカラー値dを、下記(式89)を満たすd[i]に対して、(式85)を満たすようにエンコードする。 As a scalar multiplication calculation method used in the seventh embodiment, a seventh calculation method in which the scalar multiplication calculator 115 calculates a scalar value d, a point P on the elliptic curve, and a scalar multiple dP in the elliptic curve from the window width w will be described. To do. In the seventh calculation method, the scalar value d is encoded so as to satisfy (Expression 85) with respect to d w [i] that satisfies the following (Expression 89).

[i]=1 または d[i]=−1 ・・・(式89)
その際、前計算部303は、定点Pから下記(式90)で示す点を計算する。
d w [i] = 1 or d w [i] = − 1 (formula 89)
At that time, the pre-calculation unit 303 calculates a point represented by the following (formula 90) from the fixed point P.

τw−1P±τw−2P±……±τP±P ・・・(式90)
実計算部304は、(式85),(式89)を満たすスカラー値d、及び、(式90)を満たす前計算テーブル{τw−1P±τw−2P±……±τP±P}から、スカラー倍点dPを計算する。
τ w-1 P ± τ w-2 P ± …… ± τP ± P (Equation 90)
The actual calculation unit 304 includes scalar values d satisfying (Expression 85) and (Expression 89) and a pre-calculation table {τ w−1 P ± τ w−2 P ±... ± τP ± satisfying (Expression 90). A scalar multiple dP is calculated from P}.

実施の形態6と実施の形態7との違いは以下の通りである。実施の形態6では、スカラー値をエンコードした際、(式85)において、各d[i]は、(式86)を満たすのに対し、実施の形態7では、スカラー値をエンコードした際、(式85)において、各d[i]は、(式89)を満たす。 Differences between the sixth embodiment and the seventh embodiment are as follows. In the sixth embodiment, when a scalar value is encoded, each d w [i] in (Expression 85) satisfies (Expression 86), whereas in the seventh embodiment, when a scalar value is encoded, In (Expression 85), each d w [i] satisfies (Expression 89).

実施の形態6と実施の形態7では、前計算テーブルに格納されている点が異なり、実施の形態6と比較して実施の形態7における前計算テーブルはより高速に作成することが可能であり、スカラー倍計算の更なる高速化を図ることができる。   The sixth embodiment and the seventh embodiment are different in that they are stored in the pre-calculation table, and the pre-calculation table in the seventh embodiment can be created faster than the sixth embodiment. Further, it is possible to further speed up the scalar multiplication.

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

まず、図13を用いて、エンコード部302がスカラー値dを、(式85),(式89)を満たすようにエンコードする方法を説明する。   First, a method in which the encoding unit 302 encodes the scalar value d so as to satisfy (Expression 85) and (Expression 89) will be described with reference to FIG.

エンコード部302は、dを入力する(S1301)。次に、δ剰余変換部324は、d mod δを計算し、d mod δの実部分をcに、d mod δのτ部分をcに、それぞれ代入する(S1302)。次に、iに0を代入する(S1303)。 The encoding unit 302 inputs d (S1301). Next, the δ residue conversion unit 324 calculates d mod δ and substitutes the real part of d mod δ for c 0 and the τ part of d mod δ for c 1 (S1302). Next, 0 is substituted for i (S1303).

次に、ステップS1304で、繰り返し判定部323は、|c|≠1またはc≠0であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS1311へ移る。条件が成立しない場合(FALSE)、ステップS1321へ移る。 Next, in step S1304, the repetition determination unit 323 determines whether | c 0 | ≠ 1 or c 1 ≠ 0. When the condition is satisfied (TRUE), the process proceeds to step S1311. If the condition is not satisfied (FALSE), the process proceeds to step S1321.

ステップS1311では、剰余取得部321は、(c+2μc mod 4)−2を計算し、uに代入する。次に、uをd[i]に代入し、iにi+1を代入する(S1312)。次に、cにc−uを代入する(S1313)。次に、tにcを、cにc+μc/2を、cに−t/2を、それぞれ代入し、ステップS1304へ戻る(S1314)。 In step S1311, the remainder acquisition unit 321 calculates (c 0 +2 μc 1 mod 4) −2 and substitutes it for u. Next, u is substituted into d 1 [i], and i + 1 is substituted into i (S1312). Next, c 0 -u is substituted for c 0 (S1313). Then, the c 0 to t, the c 1 + μc 0/2 to c 0, a -t / 2 to c 1, substituting respectively, returns to the step S1304 (S1314).

一方、ステップS1321では、cをd[i]に代入する(S1321)。次に、エンコード部302は、d[i],……,d[0]を出力する(S1322)。 On the other hand, in step S1321, substitutes c 0 to d 1 [i] (S1321) . Next, the encoding unit 302 outputs d 1 [i],..., D 1 [0] (S1322).

次に、図14を用いて、前計算部303が楕円曲線上の点から前計算テーブルを作成する概要を説明する。ただし、本実施の形態において、前記332で、2倍算部ではなく、τ倍算部を具備するものとする。   Next, an outline in which the pre-calculation unit 303 creates a pre-calculation table from points on the elliptic curve will be described with reference to FIG. However, in the present embodiment, it is assumed that the 332 includes not a doubling unit but a τ multiplying unit.

ステップS1401において、R[0]にPを代入する。w=1のときは、ここで終了する。 In step S1401, P is substituted for R 1 [0]. When w = 1, the process ends here.

ステップS1402において、R[1]にτR[0]+R[0]を、R[0]にτR[0]−R[0]を、それぞれ代入する。w=2のときは、ここで終了する。このとき、R[1]=τP+P,R[0]=τP−Pである。 In step S1402, the τR 1 [0] + R 1 [0] to R 2 [1], the τR 1 [0] -R 1 [ 0] to R 2 [0], the values are. When w = 2, the process ends here. At this time, R 2 [1] = τP + P and R 2 [0] = τP−P.

ステップS1403において、R[1||u]にτ[0]+R[u]を、R[0||~u]にτ[0]−R[u]を、それぞれ代入する。なお、図14中の上付きバー付きの記号Xを、本文中では記号“~X”で表す。w=3のときは、ここで終了する。wの値が一般の場合は、上記の計算方法をwまで続ける。ステップS1404,S1405は、w=4,5の場合を示すもので、同様に計算される。なお、記号“||”は、ビット列の結合を表す。また、上付きバー付きの記号、例えば上付きバー付きのuは、uのビット反転を表す。また、ここでu,l,l等は、各々1ビットの値で、0,1の値をとる。例えば、S1403におけるR3[0||~u]の場合、u=0,1に対して、各々R[01],R[00]を表し、その値は、右辺にu=0,1を各々代入した値がR[01],R[00]に格納される。 In step S1403, R 3 [1 || u 0] to τ 2 R 1 [0] + R 2 a [u 0], R 3 [ 0 || ~ u 0] to τ 2 R 1 [0] -R 2 [u 0 ] is substituted for each. Note that the symbol X with a superscript bar in FIG. 14 is represented by the symbol “˜X” in the text. When w = 3, the process ends here. When the value of w is general, the above calculation method is continued until w. Steps S1404 and S1405 indicate cases where w = 4 and 5, and are calculated in the same manner. The symbol “||” represents a combination of bit strings. Also, a symbol with a superscript bar, for example, u 0 with a superscript bar represents bit inversion of u 0 . Here, u 0 , l 0 , l 1, etc. are each 1-bit values and take values of 0 and 1. For example, in the case of R3 [0 || ˜u 0 ] in S1403, for u 0 = 0 and 1, R 3 [01] and R 3 [00] are represented, respectively, and the values of u 0 = Values obtained by substituting 0 and 1 are stored in R 3 [01] and R 3 [00].

次に、図21,図22を用いて、前計算部303が楕円曲線上の点から前計算テーブルを作成する方法を説明する。   Next, a method in which the pre-calculation unit 303 creates a pre-calculation table from points on an elliptic curve will be described with reference to FIGS.

前計算部303は、楕円曲線上の点P及びウィンドウ幅wを入力する(S2101)。次に、ステップS2103で、PをR[0]に代入する(S2102)。次に、繰り返し判定部323は、w=1であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS2104へ移る。条件が成立しない場合(FALSE)、ステップS2111へ移る。 The pre-calculation unit 303 inputs the point P on the elliptic curve and the window width w (S2101). In step S2103, P is substituted into R 1 [0] (S2102). Next, the repetition determination unit 323 determines whether or not w = 1. If the condition is met (TRUE), the process proceeds to step S2104. If the condition is not satisfied (FALSE), the process proceeds to step S2111.

ステップS2104では、前計算部303は、点R[0]を出力する(S2104)。 In step S2104, the pre-calculation unit 303 outputs the point R 1 [0] (S2104).

ステップS2111では、加算部331とτ倍算部332は、τR[0]+R[0]を計算し、その結果をR[1]に代入する。また、加算部331とτ倍算部332は、τR[0]−R[0]を計算し、その結果をR[0]に代入する。以下のステップS2122,S2113,S2202〜S2206,S2212〜S2219等では、加算部331とτ倍算部332により計算する。 In step S2111, the addition unit 331 and the τ multiplication unit 332 calculate τR 1 [0] + R 1 [0], and substitute the result into R 2 [1]. Further, the adding unit 331 and the τ multiplication unit 332 calculate τR 1 [0] −R 1 [0], and substitute the result into R 2 [0]. In the following steps S2122, S2113, S2202 to S2206, S2212 to S2219, etc., calculation is performed by the adder 331 and the τ multiplier 332.

次に、繰り返し判定部323は、w=2であるかどうかを判定する(S2112)。条件が成立する場合(TRUE)、ステップS2113へ移る。条件が成立しない場合(FALSE)、ステップS2121へ移る。   Next, the repetition determining unit 323 determines whether w = 2 (S2112). When the condition is satisfied (TRUE), the process proceeds to step S2113. If the condition is not satisfied (FALSE), the process proceeds to step S2121.

ステップS2113では、前計算部303は、点R[0],R[1]を出力する。 In step S2113, the pre-calculation unit 303 outputs points R 2 [0] and R 2 [1].

一方、ステップS2121では、繰り返し判定部323は、w=3または5であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS2122へ移る。条件が成立しない場合(FALSE−A)、図22のステップS2201へ移る。   On the other hand, in step S <b> 2121, the repetition determination unit 323 determines whether w = 3 or 5 is satisfied. When the condition is satisfied (TRUE), the process proceeds to step S2122. If the condition is not satisfied (FALSE-A), the process proceeds to step S2201 in FIG.

ステップS2122では、加算部331とτ倍算部332は、τ[0]+R[0]を計算し、その結果をR[10]に代入する。また、τ[0]−R[0]を計算し、その結果をR[01]に代入する。次に、同様に、τ[0]+R[1]を計算し、その結果をR[11]に代入する。また、τ[0]−R[1]を計算し、その結果をR[00]に代入する(S2123)。 In step S2122, the adding unit 331 and the τ multiplication unit 332 calculate τ 2 R 1 [0] + R 2 [0], and substitute the result into R 3 [10]. Further, τ 2 R 1 [0] −R 2 [0] is calculated, and the result is substituted into R 3 [01]. Next, similarly, τ 2 R 1 [0] + R 2 [1] is calculated, and the result is substituted into R 3 [11]. Also, τ 2 R 1 [0] −R 2 [1] is calculated, and the result is substituted into R 3 [00] (S2123).

次に、繰り返し判定部323は、w=3であるかどうかを判定する(S2124)。条件が成立する場合(TRUE)、ステップS2125へ移る。条件が成立しない場合(FALSE−A)、図22のステップ2201へ移る。   Next, the repetition determining unit 323 determines whether w = 3 (S2124). When the condition is satisfied (TRUE), the process proceeds to step S2125. If the condition is not satisfied (FALSE-A), the process proceeds to step 2201 in FIG.

ステップS2125では、前計算部303は、点R[11],R[00],R[10],R[01]を出力し、終了する。 In step S2125, the pre-calculation unit 303 outputs the points R 3 [11], R 3 [00], R 3 [10], R 3 [01] and ends.

図22のS2201において、繰り返し判定部323は、w=4であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS2202へ移る。条件が成立しない場合(FALSE)、ステップS2211へ移る。   In S2201 of FIG. 22, the repetition determination unit 323 determines whether w = 4. If the condition is met (TRUE), the process proceeds to step S2202. If the condition is not satisfied (FALSE), the process proceeds to step S2211.

S2202では、加算部331とτ倍算部332は、τ[1]+R[0]を計算し、その結果をR[110]に代入する。また、τ[1]−R[0]を計算し、その結果をR[101]に代入する。次に、τ[1]+R[1]を計算してその結果をR[111]に代入し、また、τ[1]−R[1]を計算してその結果をR[100]に代入する(S2203)。次に、τ[0]+R[0]を計算してその結果をR[010]に代入し、また、τ[0]−R[0]を計算してその結果をR[001]に代入する(S2204)。次に、τ[0]+R[1]を計算してその結果をR[011]に代入し、また、τ[0]−R[1]を計算してその結果をR[000]に代入する(S2205)。 In S2202, the addition unit 331 and the τ multiplication unit 332 calculate τ 2 R 2 [1] + R 2 [0], and substitute the result into R 4 [110]. Further, τ 2 R 2 [1] −R 2 [0] is calculated, and the result is substituted into R 4 [101]. Next, τ 2 R 2 [1] + R 2 [1] is calculated and the result is substituted into R 4 [111], and τ 2 R 2 [1] −R 2 [1] is calculated. The result is substituted into R 4 [100] (S2203). Next, τ 2 R 2 [0] + R 2 [0] is calculated and the result is substituted into R 4 [010], and τ 2 R 2 [0] −R 2 [0] is calculated. The result is substituted into R 4 [001] (S2204). Next, τ 2 R 2 [0] + R 2 [1] is calculated and the result is substituted into R 4 [011], and τ 2 R 2 [0] −R 2 [1] is calculated. The result is substituted into R 4 [000] (S2205).

次に、前計算部303は、点R[000],R[001],R[010],R[011],R[100],R[101],R[110],R[111]を出力し、終了する(S2206)。 Next, the pre-calculation unit 303 calculates points R 4 [000], R 4 [001], R 4 [010], R 4 [011], R 4 [100], R 4 [101], R 4 [110]. ], R 4 [111] are output and the process ends (S2206).

一方、ステップS2211で、繰り返し判定部323は、w=5であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS2212へ移る。条件が成立しない場合(FALSE)、終了する。   On the other hand, in step S2211, the repetition determination unit 323 determines whether w = 5. When the condition is satisfied (TRUE), the process proceeds to step S2212. If the condition is not satisfied (FALSE), the process ends.

ステップS2212では、加算部331とτ倍算部332は、τ[1]+R[11]を計算し、その結果をR[1111]に代入する。また、τ[1]−R[11]を計算し、その結果をR[1000]に代入する。次に、τ[1]+R[10]を計算してその結果をR[1110]に代入し、また、τ[1]−R[10]を計算してその結果をR[1001]に代入する(S2213)。次に、τ[1]+R[01]を計算してその結果をR[1101]に代入し、また、τ[1]−R[01]を計算してその結果をR[1010]に代入する(S2214)。次に、τ[1]+R[01]を計算してその結果をR[1101]に代入し、また、τ[1]−R[01]を計算してその結果をR[1010]に代入する(S2215)。次に、τ[0]+R[11]を計算してその結果をR[0111]に代入し、また、τ[0]−R[11]を計算してその結果をR[0000]に代入する(S2216)。次に、τ[0]+R[10]を計算してその結果をR[0110]に代入し、また、τ[0]−R[10]を計算してその結果をR[0001]に代入する(S2217)。次に、τ[0]+R[01]を計算してその結果をR[0101]に代入し、また、τ[0]−R[01]を計算してその結果をR[0010]に代入する(S2218)。次に、τ[0]+R[00]を計算してその結果をR[0100]に代入し、また、τ[0]−R[00]を計算してその結果をR[0011]に代入する(S2219)。 In step S2212, the adding unit 331 and the τ multiplication unit 332 calculate τ 3 R 2 [1] + R 3 [11], and substitute the result into R 5 [1111]. Also, τ 3 R 2 [1] −R 3 [11] is calculated, and the result is substituted into R 5 [1000]. Next, τ 3 R 2 [1] + R 3 [10] is calculated and the result is substituted into R 5 [1110], and τ 3 R 2 [1] −R 3 [10] is calculated. The result is substituted into R 5 [1001] (S2213). Next, τ 3 R 2 [1] + R 3 [01] is calculated and the result is substituted into R 5 [1101], and τ 3 R 2 [1] −R 3 [01] is calculated. The result is substituted into R 5 [1010] (S2214). Next, τ 3 R 2 [1] + R 3 [01] is calculated and the result is substituted into R 5 [1101], and τ 3 R 2 [1] −R 3 [01] is calculated. The result is substituted into R 5 [1010] (S2215). Next, τ 3 R 2 [0] + R 3 [11] is calculated and the result is substituted into R 5 [0111], and τ 3 R 2 [0] −R 3 [11] is calculated. The result is substituted into R 5 [0000] (S2216). Next, τ 3 R 2 [0] + R 3 [10] is calculated and the result is substituted into R 5 [0110], and τ 3 R 2 [0] −R 3 [10] is calculated. The result is substituted into R 5 [0001] (S2217). Next, τ 3 R 2 [0] + R 3 [01] is calculated and the result is substituted into R 5 [0101], and τ 3 R 2 [0] −R 3 [01] is calculated. The result is substituted into R 5 [0010] (S2218). Next, τ 3 R 2 [0] + R 3 [00] is calculated and the result is substituted into R 5 [0100], and τ 3 R 2 [0] −R 3 [00] is calculated. The result is substituted into R 5 [0011] (S2219).

次に、前計算部303は、点{R[0000],R[0001],R[0010],R[0011],R[0100],R[0101],R[0110],R[0111],R[1000],R[1001],R[1010],R[1011],R[1100],R[1101],R[1110],R[1111]}を出力し、終了する(S2120)。 Next, the pre-calculation unit 303 calculates points {R 5 [0000], R 5 [0001], R 5 [0010], R 5 [0011], R 5 [0100], R 5 [0101], R 5 [ 0110], R 5 [0111], R 5 [1000], R 5 [1001], R 5 [1010], R 5 [1011], R 5 [1100], R 5 [1101], R 5 [1110] , R 5 [1111]} is output and the process ends (S2120).

最後に、図15を用いて、実計算部304が、エンコードされたスカラー値と楕円曲線上の点から、楕円曲線におけるスカラー倍点を計算する方法を説明する。   Finally, a method in which the actual calculation unit 304 calculates a scalar multiple in the elliptic curve from the encoded scalar value and a point on the elliptic curve will be described with reference to FIG.

まず、実計算部304は、d[i],……,d[0],w,P,R[0],……,R[2w−1−1]を入力する(S1501)。次に、Qに無限遠点Oを、jにiを、それぞれ代入する(S1502)。次に、繰り返し判定部344は、j>w−1であるかどうかを判定する(S1503)。条件が成立する場合(TRUE)、ステップS1511へ移る。条件が成立しない場合(FALSE)、ステップS1515へ移る。 First, the actual calculation unit 304 inputs d 1 [i], ..., d 1 [0], w, P, R w [0], ..., R w [2 w-1 -1] ( S1501). Next, an infinite point O is substituted for Q, and i is substituted for j (S1502). Next, the repetition determination unit 344 determines whether j> w−1 (S1503). When the condition is satisfied (TRUE), the process proceeds to step S1511. If the condition is not satisfied (FALSE), the process proceeds to step S1515.

ステップS1511では、uに、(1/2)*(1−(−1)s*d1[j−1])2w−2+(1/2)*(1−(−1)s*d1[j−2])2w−3+……+(1/2)*(1−(−1)s*d1[j−w+1])2を代入する。 In step S1511, u is changed to (1/2) * (1-(-1) s * d1 [j-1] ) 2 w-2 + (1/2) * (1-(-1) s * d1. [j-2] ) 2 w-3 +... + (1/2) * (1-(-1) s * d1 [j-w + 1] ) 2 0 is substituted.

次に、加算部342とτ倍算部343は、τQ+d[j]*R[u]を計算し、その結果をQに代入する(S1512)。次に、jにj−wを代入し、ステップS1503へ戻る(S1513)。 Next, the adding unit 342 and the τ multiplication unit 343 calculate τ w Q + d 1 [j] * R w [u], and substitute the result into Q (S1512). Next, j-w is substituted for j, and the process returns to step S1503 (S1513).

一方、ステップS1515では、繰り返し判定部344は、j≧0であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS1521へ移る。条件が成立しない場合(FALSE)、ステップS1531へ移る。   On the other hand, in step S1515, the repetition determining unit 344 determines whether j ≧ 0. If the condition is met (TRUE), the process proceeds to step S1521. If the condition is not satisfied (FALSE), the process proceeds to step S1531.

ステップS1521では、加算部342とτ倍算部343は、τQ+d[j]*Pを計算し、その結果をQに代入する。次に、jにj−1を代入し、ステップS1515へ戻る(S1522)。ステップS1531では、実計算部304は、Qを出力し、終了する。 In step S1521, the adding unit 342 and the τ multiplication unit 343 calculate τQ + d 1 [j] * P and substitute the result into Q. Next, j-1 is substituted for j, and the process returns to step S1515 (S1522). In step S1531, the actual calculation unit 304 outputs Q and ends.

上記エンコード方法において、各桁d[i]は、(式89)を満たす。この理由は、以下の通りである。楕円曲線暗号において、秘密鍵dは奇数を用いる。ステップS1304〜S1314のループにおいて、整数cは常に奇数であることを説明する。 In the encoding method, each digit d 1 [i] satisfies (Equation 89). The reason for this is as follows. In elliptic curve cryptography, an odd number is used as the secret key d. In the loop of steps S1304~S1314, explaining that integer c 0 is always odd.

整数a,bに対して、「a+bτがτで割り切れる」⇔「aは偶数」であり、「a+bτがτで割り切れる」⇔「a≡2b mod 4」であることが、非特許文献4に記載されている。ここで、“⇔”は、同値関係を表わす記号である。 Integer a, with respect to b, "a + Bitau is divisible by tau" ⇔ is "a is an even number", it is "a + Bitau is divisible by tau 2" ⇔ "A≡2b mod 4" is, in Non-Patent Document 4 Are listed. Here, “⇔” is a symbol representing an equivalence relationship.

ステップS1311で、u=(c+2μcmod 4)−2を計算し、ステップS1313で、cにc−uを代入している。ここで、a=(c+2μcmod 4)−2,b=cとおくと、a mod 4 ≡ −2μc+2 mod 4である。ところが、−2μc+2 mod 4 ≡ 2c mod 4は成立しない。これより、a mod 4 ≡ 2b mod 4は成立しないことがわかる。従って、ステップS1313終了後のc,cに関して、c+cτはτで割り切れるが、τでは割り切れないことがわかる。さらに、(c+2μcmod 4)=1または3であることもわかる。u=(c+2μc mod 4)−2であるから、(式85)の各桁d[i]は、1または−1である。以上から(式85)の各桁d[i]は、(式89)を満たす。 In step S1311, u = (c 0 +2 μc 1 mod 4) −2 is calculated, and c 0 −u is substituted for c 0 in step S1313. Here, if a = (c 0 +2 μc 1 mod 4) −2 and b = c 1 , a mod 4 ≡−2 μc 1 +2 mod 4. However, −2 μc 1 +2 mod 4 ≡ 2c 1 mod 4 does not hold. From this, it is understood that a mod 4 ≡ 2b mod 4 does not hold. Therefore, with respect to c 0 and c 1 after the end of step S1313, it can be seen that c 0 + c 1 τ is divisible by τ, but is not divisible by τ 2 . It can also be seen that (c 0 +2 μc 1 mod 4) = 1 or 3. Since u = (c 0 +2 μc 1 mod 4) −2, each digit d 1 [i] in (Expression 85) is 1 or −1. From the above, each digit d 1 [i] in (Expression 85) satisfies (Expression 89).

上記前計算テーブル作成方法は、実施の形態6と比較して高速に実行可能である。この理由は以下の通りである。   The pre-calculation table creation method can be executed faster than the sixth embodiment. The reason is as follows.

実施の形態6では、前記図9における前計算部902はτ倍算部922ではなく2倍算部922を具備しているのに対し、実施の形態7では、前記図3における前計算部303はτ倍算部332を具備しており、楕円曲線上の2倍算と比較して、楕円曲線上のτ倍算は高速に計算できる。また、楕円曲線上の2点に対する楕円加算,楕円減算を同時に計算している。従って、上記前計算テーブル作成方法は、実施の形態6と比較して高速に実行可能である。   In the sixth embodiment, the pre-calculation unit 902 in FIG. 9 includes a doubling unit 922 instead of the τ multiplication unit 922, whereas in the seventh embodiment, the pre-calculation unit 303 in FIG. Includes a τ multiplication unit 332, and τ multiplication on an elliptic curve can be calculated faster than doubling on an elliptic curve. Also, ellipse addition and ellipse subtraction for two points on the elliptic curve are calculated simultaneously. Therefore, the pre-calculation table creation method can be executed at high speed as compared with the sixth embodiment.

上記スカラー倍計算方法は、サイドチャネル攻撃に対する防御法に関して有効である。この理由は以下の通りである。   The above scalar multiplication calculation method is effective as a defense method against a side channel attack. The reason is as follows.

ステップS1503〜S1513の繰り返し処理において、実行される楕円曲線演算は、下記(式91)と固定されている。ここで、Tは、w−1個連続している。   In the repetitive processing of steps S1503 to S1513, the elliptic curve calculation to be executed is fixed as (Equation 91) below. Here, T is continuous by w−1.

|T……TA|T……TA|……|T……TA| ・・・(式91)
ステップS1515〜S1522の繰り返し処理において、実行される楕円曲線演算は、下記(式92)と固定されている。ただし、(式92)で、Tは、高々w−1個連続している。
| T …… TA | T …… TA | …… | T …… TA | (Formula 91)
In the repetition processing of steps S1515 to S1522, the elliptic curve calculation to be executed is fixed as the following (formula 92). However, in (Equation 92), T is continuous at most w−1.

|T……TA| ・・・(式92)
従って、実計算部304で、すべてのスカラー値に対して、実行する楕円曲線演算は、下記(式93)と固定されているため、(式93)のみからは、スカラー値に関する情報を引き出すことができない。すなわちサイドチャネル攻撃に対する防御法を有している。ただし、(式93)において、最下位ブロック以外でTはw個連続し、最下位ブロックでTは高々w−2個連続する。
| T …… TA | (Formula 92)
Accordingly, since the elliptic curve calculation to be executed for all scalar values in the actual calculation unit 304 is fixed as (Equation 93) below, information on the scalar value is extracted from only (Equation 93). I can't. That is, it has a defense method against side channel attacks. However, in (Equation 93), T continues for w blocks other than the lowest block, and T continues for at most w-2 in the lowest block.

|T……TA|T……T|……|T……TA|T……TA| ・・・(式93)
以上の通り、上記第7の計算方法は、コブリッツ曲線に対して適用可能で、サイドチャネル攻撃に有用な情報を与えないのでサイドチャネル攻撃に対して耐性があり、メモリ使用量及び処理高速性に優れるという特徴がある。
| T …… TA | T …… T | …… | T …… TA | T …… TA |
As described above, the seventh calculation method can be applied to the Kobritz curve and does not give useful information for the side channel attack, so it is resistant to the side channel attack, and the memory usage and processing speed are improved. It is characterized by being excellent.

<署名検証システム(1)>
次に、本発明を署名検証システムに適用した実施の形態について説明する。まず、図2,図16を参照して、本発明の実施の形態8における署名生成方法、署名生成装置及びプログラムについて説明する。図16は、実施の形態8の署名検証システム(1)の構成を示し、この署名検証システムは、本発明の実施の形態における署名生成方法に従った署名生成処理を行う署名生成装置と、署名検証処理を行う署名検証装置とを含んで構成される。各々の装置は、前述した実施の形態1〜7のいずれか1つにおけるスカラー倍計算装置に従った処理を行うスカラー倍計算部を具備している。特に図16に示す署名検証システムは、本発明の実施の形態における署名生成装置であるスマートカード1601と、署名検証装置であるコンピュータ1621とからなる。コンピュータ1621は、署名検証処理をプログラムの実行によって行う。スマートカード1601は、コンピュータ1621での署名検証処理に対応した署名生成処理を、プログラムの実行によって行う。コンピュータ1621とスマートカード1601の間で、データ・情報の授受が行われる。
<Signature verification system (1)>
Next, an embodiment in which the present invention is applied to a signature verification system will be described. First, a signature generation method, signature generation apparatus, and program according to Embodiment 8 of the present invention will be described with reference to FIGS. FIG. 16 shows the configuration of the signature verification system (1) according to the eighth embodiment. This signature verification system includes a signature generation apparatus that performs a signature generation process according to the signature generation method according to the embodiment of the present invention, and a signature. And a signature verification device that performs verification processing. Each apparatus includes a scalar multiplication calculator that performs processing according to the scalar multiplication apparatus according to any one of the first to seventh embodiments. In particular, the signature verification system shown in FIG. 16 includes a smart card 1601 that is a signature generation apparatus according to an embodiment of the present invention, and a computer 1621 that is a signature verification apparatus. The computer 1621 performs signature verification processing by executing a program. The smart card 1601 performs signature generation processing corresponding to signature verification processing in the computer 1621 by executing a program. Data and information are exchanged between the computer 1621 and the smart card 1601.

スマートカード1601は、CPU1613、コプロセッサ1614、RAM1603、ROM1606、入出力インタフェース1610を備える。実施の形態1などと同様に、RAM1603は、定数1604、秘密情報1605を記憶している。   The smart card 1601 includes a CPU 1613, a coprocessor 1614, a RAM 1603, a ROM 1606, and an input / output interface 1610. Similar to the first embodiment, the RAM 1603 stores a constant 1604 and secret information 1605.

コンピュータ1621は、CPU1633、コプロセッサ1634、RAM1623、ROM1626、外部記憶装置1627、入出力インタフェース1630を備える。実施の形態1などと同様に、RAM1623は、定数1624、秘密情報1625を記憶している。   The computer 1621 includes a CPU 1633, a coprocessor 1634, a RAM 1623, a ROM 1626, an external storage device 1627, and an input / output interface 1630. As in the first embodiment, the RAM 1623 stores a constant 1624 and secret information 1625.

ここでスマートカードとは、プロセッサを含むIC(集積回路)を搭載した、可搬型のカード形状の装置を指している。本例では、スマートカード1601は、プロセッサとしてCPU1613及びコプロセッサ1614と、メモリとしてRAM1603及びROM1606とを搭載した装置である。   Here, the smart card refers to a portable card-shaped device on which an IC (integrated circuit) including a processor is mounted. In this example, the smart card 1601 is a device that includes a CPU 1613 and a coprocessor 1614 as processors, and a RAM 1603 and a ROM 1606 as memories.

スマートカード1601は、前記図1に示すコンピュータA101と類似の構成を備え、CPU1613やコプロセッサ1614などの演算装置が、記憶部1602に格納されているプログラムを実行することにより、処理部1611として、データ処理部112ではなく署名生成処理部1612を実現する。ただし、図13に示すように、スマートカード1601では、前記図1に示す外部記憶装置107、ディスプレイ108、キーボード109などを備えなくてもよい。   The smart card 1601 has a configuration similar to that of the computer A101 shown in FIG. 1, and an arithmetic device such as the CPU 1613 and the coprocessor 1614 executes a program stored in the storage unit 1602, thereby obtaining a processing unit 1611. The signature generation processing unit 1612 is realized instead of the data processing unit 112. However, as shown in FIG. 13, the smart card 1601 may not include the external storage device 107, the display 108, the keyboard 109, and the like shown in FIG.

コンピュータ1621は、コンピュータA101と同様の構成を備え、CPU1613が記憶部1622に格納されているプログラムを実行することにより、処理部1631として、データ処理部112ではなく署名検証処理部1632を実現する。各スカラー倍計算部1615,1635は、図1に示す各スカラー倍計算部115,135と同様の機能を備える。署名生成処理部1612と署名検証処理部1632とで対応した処理が行われる。   The computer 1621 has the same configuration as the computer A101, and the CPU 1613 executes the program stored in the storage unit 1622, thereby realizing the signature verification processing unit 1632 instead of the data processing unit 112 as the processing unit 1631. The scalar multiplication calculators 1615 and 1635 have the same functions as the scalar multiplication calculators 115 and 135 shown in FIG. The signature generation processing unit 1612 and the signature verification processing unit 1632 perform corresponding processing.

なお、本実施の形態において、コンピュータ1621内の各プログラムは、あらかじめ、コンピュータ1621内の記憶部1622に格納されていてもよいし、必要なときに、コンピュータ1621が利用可能な媒体を介して他の装置から記憶部1622に導入されてもよい。更に、スマートカード1601内の各プログラムは、あらかじめ、スマートカード1601内の記憶部1602に格納されていてもよいし、必要なときに、入出力インタフェース1610を介して接続するコンピュータ、または当該コンピュータが利用可能な媒体を介して記憶部1602に導入されてもよい。前記利用可能な媒体とは、例えば当該コンピュータに着脱可能な記憶媒体、または通信媒体(すなわちネットワークまたはネットワークを伝搬する搬送波)を指す。   Note that in this embodiment, each program in the computer 1621 may be stored in advance in the storage unit 1622 in the computer 1621 or may be stored via a medium that can be used by the computer 1621 when necessary. May be introduced into the storage unit 1622. Further, each program in the smart card 1601 may be stored in advance in the storage unit 1602 in the smart card 1601, or when necessary, a computer connected via the input / output interface 1610, or the computer It may be introduced into the storage unit 1602 via an available medium. The usable 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).

前記図2を参照しながら、図16に示す署名検証システムにおける署名生成と署名検証の動作を説明する。図2のデータ処理部112は、署名生成処理部1612、署名検証処理部1632に対応する。同様に、スカラー倍計算部115は、各スカラー倍計算部1615,1635に対応し、記憶部102は、各記憶部1602,1622に対応する。   Operations of signature generation and signature verification in the signature verification system shown in FIG. 16 will be described with reference to FIG. The data processing unit 112 in FIG. 2 corresponds to the signature generation processing unit 1612 and the signature verification processing unit 1632. Similarly, the scalar multiplication calculator 115 corresponds to each of the scalar multiplication calculators 1615 and 1635, and the storage unit 102 corresponds to each of the storage units 1602 and 1622.

図16において、コンピュータ1621とスマートカード1601の間で、所定のディジタル署名アルゴリズムに基づく処理を行う。離散対数問題に基づくディジタル署名方法を楕円曲線上の離散対数問題に基づく方法に対応させて構成する楕円曲線ディジタル署名アルゴリズム(ECDSA)という署名方法がある。この方法を用いるECDSA署名については、例えば、非特許文献1に記載されている。   In FIG. 16, processing based on a predetermined digital signature algorithm is performed between a computer 1621 and a smart card 1601. 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 using this method is described in Non-Patent Document 1, for example.

まず、コンピュータ1621は、ランダムに選んだ数値をチャレンジコード1642として入出力インタフェース1630より出力し、インタフェースを介してスマートカード1601に転送する。   First, the computer 1621 outputs a randomly selected numerical value as a challenge code 1642 from the input / output interface 1630 and transfers it to the smart card 1601 via the interface.

スマートカード1601は、入出力インタフェース1610を介してチャレンジコード1642を受け取る。署名生成処理部1612(図2の112)は、チャレンジコード1642を受け付け、受け取ったチャレンジコード1642のハッシュ値をとり、所定のビット長の数値fに変換する。   Smart card 1601 receives challenge code 1642 via input / output interface 1610. The signature generation processing unit 1612 (112 in FIG. 2) receives the challenge code 1642, takes the hash value of the received challenge code 1642, and converts it into a numerical value f having a predetermined bit length.

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

そして、スカラー倍計算部1615は、定点Q、乱数uによるスカラー倍点uQ=(x,y)を計算し、計算されたスカラー倍点uQを署名生成処理部1612へ送る(S207)。 The scalar multiplication unit 1615, a fixed point Q, scalar by the random number u multiplied point uQ = (x u, y u) was calculated, and sends the calculated scalar-multiplied point uQ to the signature generation processing unit 1612 (S207).

そして、署名生成処理部1612は、送られたスカラー倍点uQを用いて署名(ディジタル署名データ)の生成を行う。例えば、前記ECDSA署名に従った処理を行う場合であれば、下記(式94),(式95)を計算することにより、チャレンジコード1642に対応する署名(s,t)を得る(S208)。   Then, the signature generation processing unit 1612 generates a signature (digital signature data) using the sent scalar multiple uQ. For example, if processing according to the ECDSA signature is performed, a signature (s, t) corresponding to the challenge code 1642 is obtained by calculating the following (formula 94) and (formula 95) (S208).

s=x mod q ・・・(式94)
t=u−1(f+ds) mod q ・・・(式95)
ここで、qは定点Qの位数、すなわち、定点Qのq倍点qQが無限遠点になり、qより小さな数値mに対する定点Qのm倍点mQは無限遠点にはならない、というような数値のことである。
s = x u mod q (Equation 94)
t = u −1 (f + ds) mod q (Equation 95)
Here, q is the order of the fixed point Q, that is, the q point qQ of the fixed point Q is an infinite point, and the m times point mQ of the fixed point Q for a numerical value m smaller than q is not an infinite point. It is a serious number.

スマートカード1601は、署名生成処理部1612で生成した署名1641を、入出力インタフェース1610より出力し、インタフェースを介してコンピュータ1621へ転送する。   The smart card 1601 outputs the signature 1641 generated by the signature generation processing unit 1612 from the input / output interface 1610 and transfers it to the computer 1621 via the interface.

コンピュータ1621の署名検証処理部1632(図2の112)は、署名1641が入力されると(S204)、署名1641の数値s,tが適切な範囲内すなわち1≦s<q,1≦t<qであるかを調べる。   When the signature 1641 is input to the signature verification processing unit 1632 (112 in FIG. 2) of the computer 1621 (S204), the numerical values s and t of the signature 1641 are within an appropriate range, that is, 1 ≦ s <q, 1 ≦ t < Check if q.

数値s,tが上記範囲内になければ、チャレンジコード1642に対する署名1641についての検証結果として「無効」を出力し、スマートカード1601を拒絶する。数値s,tが上記範囲内にあれば、署名検証処理部1632は、下記(式96),(式97),(式98)を計算する。   If the numerical values s and t are not within the above range, “invalid” is output as the verification result for the signature 1641 for the challenge code 1642 and the smart card 1601 is rejected. If the numerical values s and t are within the above ranges, the signature verification processing unit 1632 calculates the following (Expression 96), (Expression 97), and (Expression 98).

h=t−1 mod q ・・・(式96)
=fh mod q ・・・(式97)
=sh mod q ・・・(式98)
そして、署名検証処理部1632は、記憶部1622(図2の102)に格納されている定数1624から読み出した公開鍵dQ及び定点Qと(S205)、計算したh,hとを、スカラー倍計算部1635(図2の115)へ送る(S206)。
h = t −1 mod q (Equation 96)
h 1 = fh mod q (formula 97)
h 2 = sh mod q (formula 98)
Then, the signature verification processing unit 1632 converts the public key dQ and fixed point Q read from the constant 1624 stored in the storage unit 1622 (102 in FIG. 2) (S205) and the calculated h 1 and h 2 into a scalar. The result is sent to the multiplication unit 1635 (115 in FIG. 2) (S206).

スカラー倍計算部1635は、定点Qとhによるスカラー倍点hQと、公開鍵dQとhによるスカラー倍点hdQとを計算し、計算されたスカラー倍点を署名検証処理部1632へ送る(S207)。 The scalar multiplication calculator 1635 calculates the scalar multiple h 1 Q based on the fixed points Q and h 1 and the scalar multiple h 2 dQ based on the public keys dQ and h 2 , and the calculated scalar multiple is the signature verification processing unit. 1632 (S207).

署名検証処理部1632は、送られたスカラー倍点を用いて、署名検証処理を行う。例えば、ECDSA署名における署名検証であれば、下記(式99)で表わす点Rを計算し、そのx座標をxとしたとき、下記(式100)で表わすs’を計算する。 The signature verification processing unit 1632 performs signature verification processing using the sent scalar multiple. For example, if the signature verification of ECDSA signature, compute the point R expressed by the following (Equation 99), when the x-coordinate was x R, compute the s' represented by the following equation (100).

R=hQ+hdQ ・・・(式99)
s'=xmod q ・・・(式100)
そして、s’=sであれば、チャレンジコード1643に対する署名1641についての検証結果として「有効」を出力し、スマートカード1601を認証し受け入れる(S208)。また、s’=sでなければ、検証結果として「無効」を出力し、スマートカード1601を拒絶する(S208)。
R = h 1 Q + h 2 dQ (Formula 99)
s ′ = x R mod q (Equation 100)
If s ′ = s, “valid” is output as the verification result of the signature 1641 for the challenge code 1643, and the smart card 1601 is authenticated and accepted (S208). If s ′ = s is not satisfied, “invalid” is output as the verification result, and the smart card 1601 is rejected (S208).

署名生成や署名検証では、楕円曲線上の点のスカラー倍算を計算する。従って、本実施の形態において、署名生成を行う際に、前記第1〜第7の計算方法または実施の形態1〜7のスカラー倍計算装置のいずれかを用いることが可能である。   In signature generation and signature verification, scalar multiplication of points on an elliptic curve is calculated. Therefore, in the present embodiment, when generating a signature, it is possible to use any of the first to seventh calculation methods or the scalar multiplication apparatus of the first to seventh embodiments.

次に、署名生成処理部1612が署名生成を行うときのスカラー倍計算について詳細に説明する。   Next, scalar multiplication calculation when the signature generation processing unit 1612 generates a signature will be described in detail.

署名生成の場合、スカラー倍計算部1615は、定点Q、乱数uによるスカラー倍点uQ=(x,y)を計算し、計算されたスカラー倍点を署名生成処理部1612へ送る。このとき、定点Q、乱数uによるスカラー倍点uQの計算では、まず、乱数uを生成し、uをエンコードした後、定点Qのスカラー倍点を計算する。 In the case of signature generation, the scalar multiple calculation unit 1615 calculates a scalar multiple uQ = (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 1612. At this time, in the calculation of the scalar multiple uQ using the fixed point Q and the random number u, first, the random number u is generated, u is encoded, and then the scalar multiple of the fixed point Q is calculated.

次に示す実施の形態9,10(署名検証システム(2),(3))では、署名生成処理部1612が行う署名生成処理を示すものであり、乱数生成と乱数倍点uQの計算を同時に行う。従って、乱数uのエンコード処理を行う必要がない。   The following ninth and tenth embodiments (signature verification systems (2) and (3)) show the signature generation processing performed by the signature generation processing unit 1612. The random number generation and the calculation of the random number multiple uQ are performed simultaneously. Do. Therefore, there is no need to perform encoding processing of the random number u.

<署名検証システム(2)>
次に、本発明の他の実施の形態9における署名生成方法、署名生成装置及びプログラムについて、図16〜図18及び図20を参照しながら説明する。実施の形態9の署名検証システム(2)では、前記図16で示す署名検証システムの構成における署名生成装置であるスマートカード1601の構成と、図17で示される署名生成処理部1612の機能ブロックを用いる。本署名検証システム(2)において、本実施の形態の署名生成装置であるスマートカード1601は、署名生成処理をプログラムの実行により行う。スマートカード1601は、乱数生成部とスカラー倍計算部とをあわせた構成であり、乱数生成と乱数倍点の計算を同時に行うので、図16に示すスカラー倍計算部1615を具備する必要はない。図18は、署名生成処理部1612での計算処理を示すフロー図である。本署名検証システム(2)における署名生成と署名検証の動作のシーケンス図として、前記図2ではなく図20を用いる。
<Signature verification system (2)>
Next, a signature generation method, a signature generation apparatus, and a program according to another embodiment 9 of the present invention will be described with reference to FIGS. 16 to 18 and FIG. In the signature verification system (2) of the ninth embodiment, the configuration of the smart card 1601, which is the signature generation device in the configuration of the signature verification system shown in FIG. 16, and the functional block of the signature generation processing unit 1612 shown in FIG. Use. In the signature verification system (2), the smart card 1601, which is the signature generation apparatus of the present embodiment, performs signature generation processing by executing a program. The smart card 1601 has a configuration in which a random number generation unit and a scalar multiplication unit are combined, and performs random number generation and calculation of random number multiple points at the same time. Therefore, it is not necessary to include the scalar multiplication unit 1615 shown in FIG. FIG. 18 is a flowchart showing calculation processing in the signature generation processing unit 1612. FIG. 20 is used instead of FIG. 2 as a sequence diagram of signature generation and signature verification operations in the signature verification system (2).

図17において、署名生成処理部1612は、乱数倍計算部1701からなる。乱数倍計算部1701は、前計算部1702、実計算部1703からなる。前計算部1702は、加算部1721、2倍算部1722、繰り返し判定部1723からなる。実計算部1703は、剰余取得部1731、剰余変換部1732、繰り返し判定部1733、格納部1734、ランダムビット生成部1735、Ψ関数計算部1736、ビット値判定部1737、加算部1738、τ倍算部1739からなる。   In FIG. 17, the signature generation processing unit 1612 includes a random number multiplication calculation unit 1701. The random number multiplication calculation unit 1701 includes a pre-calculation unit 1702 and an actual calculation unit 1703. The pre-calculation unit 1702 includes an adder 1721, a doubling unit 1722, and a repeat determination unit 1723. The actual calculation unit 1703 includes a residue acquisition unit 1731, a residue conversion unit 1732, a repetition determination unit 1733, a storage unit 1734, a random bit generation unit 1735, a Ψ function calculation unit 1736, a bit value determination unit 1737, an addition unit 1738, and τ multiplication. Part 1739.

図20において、スマートカード1601の署名生成処理部1612は、コンピュータ1621からのチャレンジコード1642を受け付ける(S2004)。署名生成処理部1612は、記憶部1602から楕円曲線上の定点を読み出し(S2005)、楕円曲線上の点を乱数倍計算部1701に渡す(S2006)。乱数倍計算部1701は、乱数、及び、乱数倍点を計算して署名生成処理部1612に渡す(S2007)。署名生成処理部1612は、乱数及び乱数倍点をもとに署名1641を生成してコンピュータ1621へ送る。   In FIG. 20, the signature generation processing unit 1612 of the smart card 1601 receives the challenge code 1642 from the computer 1621 (S2004). The signature generation processing unit 1612 reads a fixed point on the elliptic curve from the storage unit 1602 (S2005), and passes the point on the elliptic curve to the random number multiplication unit 1701 (S2006). The random number multiplication unit 1701 calculates a random number and a random number multiple point, and passes them to the signature generation processing unit 1612 (S2007). The signature generation processing unit 1612 generates a signature 1641 based on the random number and the random number multiple and sends it to the computer 1621.

本実施の形態では、ベースポイントと呼ばれる楕円曲線上の点Qから、署名(s,t)を計算する計算方法を説明する。   In the present embodiment, a calculation method for calculating a signature (s, t) from a point Q on an elliptic curve called a base point will be described.

前計算部1702は、入力された楕円曲線上の点Qから、前計算テーブルを作成する。前計算部1702が楕円曲線上の点から前計算テーブルを作成する方法は、実施の形態1、5及び6と同様である。   The precalculation unit 1702 creates a precalculation table from the input point Q on the elliptic curve. The method by which the precalculation unit 1702 creates the precalculation table from the points on the elliptic curve is the same as in the first, fifth, and sixth embodiments.

実計算部1703と署名生成処理部1612は、ベースポイントと呼ばれる楕円曲線上の点Qから乱数k、及び、スカラー倍点kQを計算する。署名生成処理部1612は、乱数k、及び、スカラー倍点kGから署名(s,t)を生成する。ただし、本実施の形態では、乱数kを直接生成せず、乱数生成後、その乱数kをエンコードしたり、メモリに格納したりすることなく、直接、ベースポイントQのスカラー倍kQを計算することができる。   The actual calculation unit 1703 and the signature generation processing unit 1612 calculate a random number k and a scalar multiple kQ from a point Q on an elliptic curve called a base point. The signature generation processing unit 1612 generates a signature (s, t) from the random number k and the scalar multiple kG. However, in the present embodiment, the random number k is not directly generated, and after the random number is generated, the scalar k kQ of the base point Q is directly calculated without encoding or storing the random number k. Can do.

次に、署名生成処理部1612の行う各処理について詳細に説明する。図18を用いて、楕円曲線上のベースポイントQから乱数k及び楕円曲線上の点kQを計算する方法を説明する。   Next, each process performed by the signature generation processing unit 1612 will be described in detail. A method of calculating the random number k and the point kQ on the elliptic curve from the base point Q on the elliptic curve will be described with reference to FIG.

署名生成処理部1612は、まず、Qに楕円曲線上の無限遠点O、c,cに0、iにm+a−1を、それぞれ代入する(S1801)。次に、繰り返し判定部1733によりi>wであるかどうかを判定する(S1802)。i>wの場合(TRUE)、ステップS1803へ移る。i≦wの場合(FALSE)、ステップS1821へ移る。 The signature generation processing unit 1612 first substitutes Q for infinity point O on the elliptic curve, 0 for c 0 and c 1 , and m + a−1 for i (S 1801). Next, it is determined by the repetition determination unit 1733 whether i> w is satisfied (S1802). If i> w (TRUE), the process proceeds to step S1803. If i ≦ w (FALSE), the process proceeds to step S1821.

ステップS1803では、ランダムビット生成部1735は、集合{±1,±3,……±(2−1)}に属するw個のランダムな整数d,di−1,……,di−w+1を選ぶ。次に、uに、(1+Σdi−w+j(tw+1−2Uj−1))mod 2w+1−2を代入する(S1804)。次に、jに1を代入する(S1805)。 In step S1803, the random bit generation unit 1735 causes the w random integers d i , d i−1 ,..., D i belonging to the set {± 1, ± 3,... ± (2 w −1)}. Select -w + 1 . Next, (1 + Σd i−w + j (t w + 1 U j −2U j−1 )) mod 2 w + 1 −2 w is substituted for u i (S1804). Next, 1 is substituted into j (S1805).

次に、繰り返し判定部1733によりj≦wであるかどうかを判定する(S1806)。j≦wの場合(TRUE)、ステップS1811へ移る。j>wの場合(FALSE)、ステップS1812へ移る。   Next, it is determined by the repetition determination unit 1733 whether j ≦ w is satisfied (S1806). If j ≦ w (TRUE), the process proceeds to step S1811. If j> w (FALSE), the process proceeds to step S1812.

ステップS1811では、QにτQ、(c,c)に(−2c,c+μc)をそれぞれ代入する。 In step S1811, τQ is substituted for Q, and (−2c 1 , c 0 + μc 1 ) is substituted for (c 0 , c 1 ).

ステップS1812では、繰り返し判定部1733によりu>0であるかどうかを判定する。u>0の場合(TRUE)、ステップS1813へ移る。u≦0の場合、ステップS1814へ移る。 In step S1812, the repetition determination unit 1733 determines whether u i > 0. When u i > 0 (TRUE), the process proceeds to step S1813. If u i ≦ 0, the process proceeds to step S1814.

ステップS1813では、加算部1738は、QにQ+uPを代入する。ステップS1814では、加算部1738は、QにQ−(−uP)を代入する。次に、ステップS1815で、cにc+u、iにi−wをそれぞれ代入し、ステップS1802へ戻る。 In step S1813, the addition unit 1738 substitutes Q + u i P for Q. In step S1814, the addition unit 1738 substitutes Q − (− u i P) for Q. Next, in step S1815, i-w were respectively substituted into c 0 + u 0, i to c 0, the process returns to step S1802.

一方、ステップS1821では、ランダムビット生成部1735は、集合{±1,±3,……±(2−1)}に属するi+1個のランダムな整数d,di−1,……,d,dを選ぶ。次に、uに、(1+Σd(ti+1−2Uj−1))mod 2i+1−2を代入する(S1822)。次に、jに1を代入する(S1823)。 On the other hand, in step S1821, the random bit generation unit 1735 causes the i + 1 random integers d i , d i-1 , ..., belonging to the set {± 1, ± 3,... ± (2 w −1)}. Select d 1 and d 0 . Next, (1 + Σd j (t i + 1 U j −2U j−1 )) mod 2 i + 1 −2 i is substituted for u 0 (S1822). Next, 1 is substituted into j (S1823).

次に、繰り返し判定部1733によりj≦iであるかどうかを判定する(S1824)。j≦iの場合(TRUE)、ステップS1825へ移る。j>iの場合、ステップS1831へ移る。   Next, it is determined whether or not j ≦ i by the repetition determination unit 1733 (S1824). If j ≦ i (TRUE), the process proceeds to step S1825. If j> i, the process moves to step S1831.

ステップS1825では、QにτQ、(c,c)に(−2c,c+μc)をそれぞれ代入する。 In step S1825, τQ is substituted for Q, and (−2c 1 , c 0 + μc 1 ) is substituted for (c 0 , c 1 ).

ステップS1831では、繰り返し判定部1733によりu>0であるかどうかを判定する。u>0の場合(TRUE)、ステップS1832へ移る。u≦0の場合(FALSE)、ステップS1833へ移る。 In step S1831, the repetition determination unit 1733 determines whether u 0 > 0. If u 0 > 0 (TRUE), the process proceeds to step S1832. If u 0 ≦ 0 (FALSE), the process moves to step S1833.

ステップS1832では、加算部1438は、QにQ+uPを代入する。ステップS1833では、加算部1438は、QにQ−(−uP)を代入する。次に、ステップS1534で、cにc+uを代入する。 In step S1832, the adding unit 1438 substitutes Q + u 0 P for Q. In step S1833, the adding unit 1438 substitutes Q − (− u 0 P) for Q. Next, c 0 + u 0 is substituted for c 0 in step S1534.

次に、繰り返し判定部1733によりd=0であるかどうかを判定する(S1834)。d=0の場合(TRUE)、ステップS1836へ移る。d≠0の場合(FALSE)、ステップS1837へ移る。 Next, it is determined whether or not d 0 = 0 by the repetition determination unit 1733 (S1834). If d 0 = 0 (TRUE), the process moves to step S1836. If d 0 ≠ 0 (FALSE), the process moves to step S1837.

ステップS1836では、QにQ−P、cにc−1をそれぞれ代入する。ステップS1837では、QにQ−τP、cにc−1をそれぞれ代入する。次に、ステップS1838で、kに(c+cτ) mod #Eを代入する。ここで、#Eは、楕円曲線E上の点全体の個数である。 In step S1836, if the values are the c 0 -1 to Q-P, c 0 to Q. In step S1837, if the values are the c 1 -1 Q-τP, the c 1 to Q. Next, in step S1838, (c 0 + c 1 τ) mod #E is substituted for k. Here, #E is the total number of points on the elliptic curve E.

そして、ステップS1841で、実計算部1703は、乱数kと点Qを出力する。   In step S1841, the actual calculation unit 1703 outputs the random number k and the point Q.

本実施の形態における乱数倍計算部1701は、前記図1のスカラー倍計算部115または135と同様の機能を備えるので、サイドチャネル攻撃を防ぐことができる、かつ処理速度やメモリ使用量をカスタマイズすることができるスカラー倍計算を実行できる。そのためスマートカード1601が署名生成処理を行う際に、またコンピュータ1621が署名検証処理を行う際に、サイドチャネル攻撃を防ぐことができる。   Since the random number multiplication unit 1701 in this embodiment has the same function as the scalar multiplication unit 115 or 135 in FIG. 1, a side channel attack can be prevented and the processing speed and memory usage can be customized. A scalar multiplication calculation can be performed. Therefore, when the smart card 1601 performs signature generation processing and when the computer 1621 performs signature verification processing, a side channel attack can be prevented.

<署名検証システム(3)>
次に、本発明の他の実施の形態10における署名生成方法、署名生成装置及びプログラムについて、図4,図16,図17,図19〜図22を参照しながら説明する。本実施の形態10の署名検証システム(3)でも、前記図16で示す署名検証システムの構成における署名生成装置であるスマートカード1601の構成と、図17で示される署名生成処理部1612の機能ブロックを用いる。本署名検証システム(3)においても、署名生成装置であるスマートカード1601は、署名生成処理をプログラムの実行により行う。スマートカード1601は、乱数生成部とスカラー倍計算部とをあわせた構成であり、乱数生成と乱数倍点の計算を同時に行うので、図16に示すスカラー倍計算部1615を具備する必要はない。図19は、署名生成処理部1612での計算処理を示すフロー図である。本署名検証システム(3)における署名生成と署名検証の動作のシーケンス図として、前記図2ではなく図20を用いる。
<Signature verification system (3)>
Next, a signature generation method, a signature generation apparatus, and a program according to another embodiment 10 of the present invention will be described with reference to FIGS. 4, 16, 17, and 19 to 22. Also in the signature verification system (3) of the tenth embodiment, the configuration of the smart card 1601 as the signature generation device in the configuration of the signature verification system shown in FIG. 16 and the functional block of the signature generation processing unit 1612 shown in FIG. Is used. Also in the signature verification system (3), the smart card 1601, which is a signature generation device, performs signature generation processing by executing a program. The smart card 1601 has a configuration in which a random number generation unit and a scalar multiplication unit are combined, and performs random number generation and calculation of random number multiple points at the same time. Therefore, it is not necessary to include the scalar multiplication unit 1615 shown in FIG. FIG. 19 is a flowchart showing calculation processing in the signature generation processing unit 1612. FIG. 20 is used instead of FIG. 2 as a sequence diagram of signature generation and signature verification operations in the signature verification system (3).

前記署名検証システム(2)と本署名検証システム(3)の違いは以下の通りである。署名検証システム(2)と署名検証システム(3)では、前計算テーブルに格納されている点が異なり、署名検証システム(2)と比較して署名検証システム(3)における前計算テーブルはより高速に作成することが可能であり、乱数によるスカラー倍計算の更なる高速化を図ることができる。   Differences between the signature verification system (2) and the signature verification system (3) are as follows. The signature verification system (2) and the signature verification system (3) differ in that they are stored in the pre-calculation table, and the pre-calculation table in the signature verification system (3) is faster than the signature verification system (2). It is possible to further increase the speed of scalar multiplication by random numbers.

本署名検証システム(3)においても、ベースポイントQから、署名(s,t)を計算する計算方法を説明する。   A calculation method for calculating the signature (s, t) from the base point Q also in the signature verification system (3) will be described.

前計算部1702は、入力された楕円曲線上の点Qから、前計算テーブルを作成する。前計算部1702が楕円曲線上の点から前計算テーブルを作成する方法は、実施の形態7と同様である。   The precalculation unit 1702 creates a precalculation table from the input point Q on the elliptic curve. The method by which the precalculation unit 1702 creates the precalculation table from the points on the elliptic curve is the same as in the seventh embodiment.

実計算部1703と署名生成処理部1612は、ベースポイントと呼ばれる楕円曲線上の点Qから乱数d、及び、スカラー倍点dQを計算する。署名生成処理部1612は、乱数d、及び、スカラー倍点dQから署名(s,t)を生成する。ただし、本署名検証システム(3)でも、乱数dを直接生成せず、乱数生成後、その乱数dをエンコードしたり、メモリに格納したりすることなく、直接、ベースポイントQのスカラー倍点dQを計算することができる。次に、署名生成処理部1612の行う各処理について詳細に説明する。図19を用いて、楕円曲線上のベースポイントQから乱数d及び楕円曲線上の点dQを計算する方法を説明する。   The actual calculation unit 1703 and the signature generation processing unit 1612 calculate a random number d and a scalar multiple dQ from a point Q on an elliptic curve called a base point. The signature generation processing unit 1612 generates a signature (s, t) from the random number d and the scalar multiple dQ. However, even in the signature verification system (3), the random number dQ is not directly generated, and after the random number is generated, the random number d is directly encoded without being encoded or stored in the memory. Can be calculated. Next, each process performed by the signature generation processing unit 1612 will be described in detail. A method of calculating the random number d and the point dQ on the elliptic curve from the base point Q on the elliptic curve will be described with reference to FIG.

まず、実計算部1703は、P,R[0],……,R[2w−1−1]を入力する(S1901)。次に、Qに無限遠点Oを、jにm+a−1を、それぞれ代入する(S1902)。次に、繰り返し判定部1733は、j>w−1であるかどうかを判定する(S1903)。条件が成立する場合(TRUE)、ステップS1911へ移る。条件が成立しない場合(FALSE)、ステップS1941へ移る。 First, the actual calculation unit 1703 inputs P, R w [0],..., R w [2 w−1 −1] (S1901). Next, an infinite point O is substituted for Q and m + a-1 is substituted for j (S1902). Next, the repetition determination unit 1733 determines whether j> w−1 is satisfied (S1903). When the condition is satisfied (TRUE), the process proceeds to step S1911. If the condition is not satisfied (FALSE), the process proceeds to step S1941.

ステップS1911では、ランダムビット生成部1735は、各ランダムビットd[w−1],d[w−2],……,d[0]を生成し、w−1をkに代入する。次に、繰り返し判定部1733は、k≧0であるかどうかを判定する(S1912)。条件が成立する場合(TRUE)、ステップS1921へ移る。条件が成立しない場合(FALSE)、ステップS1931へ移る。 In step S1911, the random bit generation unit 1735 generates the random bits d 1 [w−1], d 1 [w-2],..., D 1 [0], and substitutes w−1 for k. . Next, the repetition determination unit 1733 determines whether or not k ≧ 0 (S1912). When the condition is satisfied (TRUE), the process proceeds to step S1921. If the condition is not satisfied (FALSE), the process proceeds to step S1931.

ステップS1921では、tにcを、cに−2c−(−1)d1[k]を、cに2μ(t+c)を、kにk−1を、それぞれ代入し、ステップS1912へ戻る。 In step S1921, the c 0 to t, -2c to c 0 1 - (- 1) d1 to [k], the 2μ (t + c 1) to c 1, a k-1 to k, assigns each step S1912 Return to.

ステップS1931では、uにd[w−2]2w−2+……+d[0]2を代入する。次に、加算部1738とτ倍算部1739は、τQ+d[w−1]*R[u]を計算し、その結果をQに代入する(S1932)。次に、jにj−wを代入し、ステップS1903へ戻る(S1933)。 In step S1931, d 1 [w−2] 2 w−2 +... + D 1 [0] 2 0 is substituted for u. Next, the adding unit 1738 and the τ multiplication unit 1739 calculate τ w Q + d 1 [w−1] * R w [u], and substitute the result into Q (S1932). Next, j-w is substituted for j, and the process returns to step S1903 (S1933).

一方、ステップS1941では、繰り返し判定部1733は、j≧0であるかどうかを判定する。条件が成立する場合(TRUE)、ステップS1942へ移る。条件が成立しない場合(FALSE)、ステップS1951へ移る。   On the other hand, in step S1941, the repetition determination unit 1733 determines whether j ≧ 0. When the condition is satisfied (TRUE), the process proceeds to step S1942. If the condition is not satisfied (FALSE), the process proceeds to step S1951.

ステップS1943では、ランダムビット生成部1735は、ランダムビットdを生成する。次に、tにcを、cに−2c+(−1)d1を、cにt+μcを、それぞれ代入する(S1943)。次に、加算部1738とτ倍算部1739は、τQ+d*Pを計算し、その結果をQに代入する(S1944)。次に、jにj−1を代入し、ステップS1941へ戻る(S1945)。 In step S1943, the random bit generator 1735 generates a random bit d 1. Then, the c 0 to t, -2c 1 + to c 0 - a (1) d1, the t + [mu] c 1 to c 1, the values are (S1943). Next, the addition unit 1738 and the τ multiplication unit 1739 calculate τQ + d 1 * P and substitute the result into Q (S1944). Next, j-1 is substituted for j, and the process returns to step S1941 (S1945).

ステップS1951では、実計算部1703は、乱数d=c+cτ mod q,乱数倍点Qを出力する。 In step S1951, the actual calculation unit 1703 outputs a random number d = c 0 + c 1 τ mod q, a random number multiple point Q.

上記前計算テーブル作成方法は、署名検証システム(2)と比較して高速に実行可能である。この理由は、実施の形態7と同様である。   The pre-calculation table creation method can be executed faster than the signature verification system (2). The reason is the same as in the seventh embodiment.

本実施の形態における乱数倍計算部1701は、前記図1のスカラー倍計算部115または135と同様の機能を備えるので、上記計算方法と同様にサイドチャネル攻撃を防ぐことができる、かつ処理速度やメモリ使用量をカスタマイズすることができるスカラー倍計算を実行できる。そのためスマートカード1601が署名生成処理を行う際に、またコンピュータ1621が署名検証処理を行う際に、サイドチャネル攻撃を防ぐことができる。   Since the random number multiplication unit 1701 in the present embodiment has the same function as the scalar multiplication unit 115 or 135 of FIG. 1, it can prevent a side channel attack as in the above calculation method, Performs scalar multiplication that can customize memory usage. Therefore, when the smart card 1601 performs signature generation processing and when the computer 1621 performs signature verification processing, a side channel attack can be prevented.

<鍵交換システム>
次に、本発明を鍵交換システムに適用した実施の形態11について説明する。図1,図2を参照して、本発明の実施の形態11におけるデータ生成方法、データ生成装置及びプログラムについて説明する。本実施の形態11においては、前記図1の情報処理システム構成が鍵交換システムの構成として応用できる。本鍵交換システムは、本発明の実施の形態におけるデータ生成装置であるコンピュータA101とコンピュータB121を含んで構成される。コンピュータA101及びコンピュータB121は、本発明の実施の形態におけるデータ生成方法に従ったデータ生成処理を、プログラムに従って実行する。
<Key exchange system>
Next, an eleventh embodiment in which the present invention is applied to a key exchange system will be described. With reference to FIGS. 1 and 2, a data generation method, a data generation apparatus, and a program according to Embodiment 11 of the present invention will be described. In the eleventh embodiment, the information processing system configuration of FIG. 1 can be applied as a key exchange system configuration. The key exchange system is configured to include a computer A101 and a computer B121, which are data generation apparatuses according to the embodiment of the present invention. The computer A 101 and the computer B 121 execute data generation processing according to the data generation method in the embodiment of the present invention according to a program.

図1のデータ処理部112,132は、本実施の形態においては、それぞれ鍵交換処理部112,132として機能する。また、鍵交換処理部112,132としての機能以外に、前述した暗号化や復号化などの機能を備えてもよい。鍵交換システムのコンピュータA101が、コンピュータB121側から入力されたデータ143からコンピュータB121との共有情報の導出を行う場合のデータ生成処理を含む動作について説明する。   The data processing units 112 and 132 in FIG. 1 function as the key exchange processing units 112 and 132, respectively, in the present embodiment. In addition to the functions as the key exchange processing units 112 and 132, functions such as encryption and decryption described above may be provided. An operation including a data generation process when the computer A101 of the key exchange system derives shared information with the computer B121 from the data 143 input from the computer B121 side will be described.

コンピュータB121のデータ処理部132(図2の112に対応する)は、記憶部122(図2の102に対応する)の秘密情報125から秘密鍵bを読み出して、コンピュータB121の公開鍵bQを計算する。そして、ネットワーク142を介して、公開鍵bQをデータ143としてコンピュータA101に転送する。   The data processing unit 132 (corresponding to 112 in FIG. 2) of the computer B121 reads the secret key b from the secret information 125 of the storage unit 122 (corresponding to 102 in FIG. 2), and calculates the public key bQ of the computer B121. To do. Then, the public key bQ is transferred as data 143 to the computer A101 via the network 142.

コンピュータA101の鍵交換処理部112(図2の112に対応する)は、コンピュータB121の公開鍵bQの入力を受け付ける(S204)。鍵交換処理部112は、コンピュータB121の公開鍵bQを入力すると、記憶部102から読み出した秘密情報105であるコンピュータA101の秘密鍵dと(S205)、コンピュータB121の公開鍵bQとを、スカラー倍計算部115へ送る(S206)。   The key exchange processing unit 112 (corresponding to 112 in FIG. 2) of the computer A101 receives the input of the public key bQ of the computer B121 (S204). When the key exchange processing unit 112 receives the public key bQ of the computer B121, the secret key d of the computer A101, which is the secret information 105 read from the storage unit 102 (S205), and the public key bQ of the computer B121 are scalar multiplied. The data is sent to the calculation unit 115 (S206).

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

鍵交換処理部112は、送られたスカラー倍点dbQを用いて共有情報の導出を行い、記憶部102に秘密情報105として格納する。例えば、スカラー倍点dbQのx座標を、共有情報とする。   The key exchange processing unit 112 derives shared information using the sent scalar multiple dbQ, 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.

次に、コンピュータB121が、コンピュータA101側から入力されたデータ141からコンピュータA101との共有情報の導出を行う場合のデータ生成処理を含む動作について説明する。   Next, an operation including data generation processing when the computer B121 performs derivation of shared information with the computer A101 from the data 141 input from the computer A101 side 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の入力を受け付ける(S204)。コンピュータA101の公開鍵dQを入力すると、鍵交換処理部132は、記憶部122(図2の102)の秘密情報125から読み出したコンピュータB121の秘密鍵bと(S205)、コンピュータA101の公開鍵dQとを、スカラー倍計算部135(図2の115)へ送る(S206)。   The key exchange processing unit 132 (112 in FIG. 2) of the computer B121 receives the input of the public key dQ of the computer A101 (S204). When the public key dQ of the computer A101 is input, the key exchange processing unit 132 receives the secret key b of the computer B121 read from the secret information 125 of the storage unit 122 (102 in FIG. 2) (S205), and the public key dQ of the computer A101. Are sent to the scalar multiplication unit 135 (115 in FIG. 2) (S206).

スカラー倍計算部135は、秘密鍵bと、公開鍵dQによるスカラー倍点bdQを計算し、計算されたスカラー倍点bdQを鍵交換処理部132へ送る(S207)。   The scalar multiplication unit 135 calculates a scalar multiple bdQ based on the secret key b and the public key dQ, and sends the calculated scalar multiple bdQ to the key exchange processing unit 132 (S207).

鍵交換処理部132は、送られたスカラー倍点bdQを用いて共有情報の導出を行い、記憶部122に秘密情報125として格納する。例えば、スカラー倍点bdQのx座標を、共有情報とする。ここで、数dbと数bdは数値として同じなので、点dbQと点bdQは同じ点となり、同じ情報がコンピュータA101とB121で導出されたことになる。   The key exchange processing unit 132 derives shared information using the sent scalar multiple bdQ, and stores the shared information as the secret information 125 in the storage unit 122. For example, the x coordinate of the scalar multiple bdQ is used as shared information. Here, since the number db and the number bd are the same as numerical values, the point dbQ and the point bdQ are the same point, and the same information is derived by the computers A101 and B121.

ネットワーク142には、点dQと点bQが送信されるが、点dbQ(もしくは点bdQ)を計算するには秘密鍵dもしくは秘密鍵bを用いなければならない。すなわち、秘密鍵dもしくは秘密鍵bを知らなければ、共有情報を得ることができない。   A point dQ and a point bQ are transmitted to the network 142. To calculate the point dbQ (or the point bdQ), the secret key d or the secret key b must be used. That is, the shared information cannot be obtained without knowing the secret key d or the secret key b.

このようにして得られた共有情報は、共通鍵暗号の秘密鍵として利用できる。本実施の形態においても、スカラー倍計算部115,135は、前述した実施の形態1〜7のいずれか1つのスカラー倍算を適用して同じ特徴を備えるので、サイドチャネル攻撃を防ぐことができる。   The shared information obtained in this way can be used as a secret key for common key cryptography. Also in the present embodiment, the scalar multiplication calculators 115 and 135 have the same characteristics by applying any one of the scalar multiplications of the first to seventh embodiments described above, and thus can prevent side channel attacks. .

また、前述した各実施の形態におけるデータ処理部、すなわち、暗号化処理部、復号化処理部、署名生成処理部、署名検証処理部、及び鍵交換処理部などについては、専用のハードウェアを用いて構成して各処理を行う形態としてもよい。また、スカラー倍計算部をコプロセッサまたはそれ以外の専用ハードウェアで実現した形態としてもよい。また、データ処理部は、前記暗号化、復号化、署名生成、署名検証、鍵交換のためのデータ生成などの処理のうち、任意の一つ以上の処理を行えるように構成した形態としてもよい。   In addition, dedicated data is used for the data processing units in the above-described embodiments, that is, the encryption processing unit, the decryption processing unit, the signature generation processing unit, the signature verification processing unit, and the key exchange processing unit. It is good also as a form which configures and performs each process. 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 processes such as encryption, decryption, signature generation, signature verification, and data generation for key exchange. .

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることは言うまでもない。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.

本発明は、暗号化などの各種セキュリティ技術に利用可能である。   The present invention can be used for various security technologies such as encryption.

本発明の一実施の形態におけるスカラー倍計算装置を含んで構成される情報処理システムの構成を示す図である。It is a figure which shows the structure of the information processing system comprised including the scalar multiplication apparatus in one embodiment of this invention. 本発明の各実施の形態において各処理部間での情報の受け渡しの様子を示すシーケンス図である。It is a sequence diagram which shows the mode of the delivery of the information between each process part in each embodiment of this invention. 本発明の実施の形態1,2,5及び7において、スカラー倍計算部の機能ブロック構成を示す図である。In Embodiment 1, 2, 5, and 7 of this invention, it is a figure which shows the functional block structure of a scalar multiplication calculation part. 本発明の実施の形態1及び5において、エンコード部の行うエンコード方法を示すフロー図である。In Embodiment 1 and 5 of this invention, it is a flowchart which shows the encoding method which an encoding part performs. 本発明の実施の形態1,5,6及び本発明の一実施の形態における署名生成装置において、前計算部の前計算テーブル作成処理を示すフロー図である。It is a flowchart which shows the pre-calculation table preparation process of the pre-calculation part in the signature generation apparatus in Embodiment 1,5,6 of this invention and one embodiment of this invention. 本発明の実施の形態1,2及び5において、実計算部のスカラー倍点の計算方法を示すフロー図である。In Embodiment 1, 2, and 5 of this invention, it is a flowchart which shows the calculation method of the scalar multiple of a real calculation part. 本発明の実施の形態2において、エンコード部の行うエンコード方法を示すフロー図である。In Embodiment 2 of this invention, it is a flowchart which shows the encoding method which an encoding part performs. 本発明の実施の形態2,3及び4において、前計算部の前計算テーブル作成処理を示すフロー図である。In Embodiment 2, 3 and 4 of this invention, it is a flowchart which shows the pre-calculation table preparation process of a pre-calculation part. 本発明の実施の形態3,4及び6において、スカラー倍計算部の機能ブロック構成を示す図である。In Embodiment 3, 4, and 6 of this invention, it is a figure which shows the functional block structure of a scalar multiplication calculation part. 本発明の実施の形態3において、実計算部のスカラー倍点の計算方法を示すフロー図である。In Embodiment 3 of this invention, it is a flowchart which shows the calculation method of the scalar multiple of a real calculation part. 本発明の実施の形態4において、実計算部のスカラー倍点の計算方法を示すフロー図である。In Embodiment 4 of this invention, it is a flowchart which shows the calculation method of the scalar multiple of a real calculation part. 本発明の実施の形態6において、実計算部のスカラー倍点の計算方法を示すフロー図である。In Embodiment 6 of this invention, it is a flowchart which shows the calculation method of the scalar multiple of a real calculation part. 本発明の実施の形態7において、エンコード部の行うエンコード方法を示すフロー図である。In Embodiment 7 of this invention, it is a flowchart which shows the encoding method which an encoding part performs. 本発明の実施の形態7、及び、本発明の一実施の形態における署名生成装置において、前計算部の前計算テーブル作成処理を示す概要図である。It is a schematic diagram which shows the pre-calculation table preparation process of the pre-calculation part in Embodiment 7 of this invention and the signature production | generation apparatus in one embodiment of this invention. 本発明の実施の形態7において、実計算部のスカラー倍点の計算方法を示すフロー図である。In Embodiment 7 of this invention, it is a flowchart which shows the calculation method of the scalar multiple of a real calculation part. 本発明の一実施の形態における署名生成装置を用いて構成される署名検証システムの構成を示す図である。It is a figure which shows the structure of the signature verification system comprised using the signature production | generation apparatus in one embodiment of this invention. 本発明の一実施の形態における署名生成装置において、署名生成処理部における乱数倍計算部の機能ブロック構成を示す図である。FIG. 3 is a diagram illustrating a functional block configuration of a random number multiplication unit in a signature generation processing unit in the signature generation device according to one embodiment of the present invention. 本発明の実施の形態9における署名生成装置において、署名に必要な乱数生成及び乱数によるスカラー倍算の計算方法を示すフロー図である。It is a flowchart which shows the calculation method of the random number generation required for a signature, and the scalar multiplication by a random number in the signature generation apparatus in Embodiment 9 of this invention. 本発明の実施の形態10における署名生成装置において、署名に必要な乱数生成及び乱数によるスカラー倍算の計算方法を示すフロー図である。It is a flowchart which shows the calculation method of the scalar multiplication by the random number generation required for a signature, and a random number in the signature generation apparatus in Embodiment 10 of this invention. 本発明の一実施の形態における署名生成装置を用いて構成される署名検証システムにおいて、各処理部間での情報の受け渡しを示すシーケンス図である。It is a sequence diagram which shows delivery of the information between each process part in the signature verification system comprised using the signature production | generation apparatus in one embodiment of this invention. 本発明の実施の形態7において、前計算部の前計算テーブル作成処理を示すフロー図(その1)である。In Embodiment 7 of this invention, it is a flowchart (the 1) which shows the precomputation table creation process of the precomputation part. 本発明の実施の形態7において、前計算部の前計算テーブル作成処理を示すフロー図(その2)である。In Embodiment 7 of this invention, it is a flowchart (the 2) which shows the pre-calculation table preparation process of a pre-calculation part.

符号の説明Explanation of symbols

101,121,1621…コンピュータ、1601…スマートカード、102,122,1602,1622…記憶部、111,131,1611,1631…処理部、115,135,1615,1635…スカラー倍計算部、112,132…データ処理部、1612…署名生成処理部、1632…署名検証処理部、104,124,1604,1624…定数、105,125,1605,1625…秘密情報、110,130,1610,1630…入出力インタフェース、108,128,1628…ディスプレイ、109,129,1629…キーボード、142…ネットワーク、1642…チャレンジコード、141,143…データ、302…エンコード部、303…前計算部、304…実計算部、321…剰余取得部、322…剰余変換部、323…繰り返し判定部、324…δ剰余変換部、325…Ψ関数計算部、326…格納部、331…加算部、332…2倍算部、333…繰り返し判定部、341…ビット値判定部、342…加算部、343…τ倍算部、344…繰り返し判定部、902…前計算部、903…実計算部、921…加算部、922…τ倍算部、923…繰り返し判定部、931…剰余取得部、932…剰余変換部、933…繰り返し判定部、934…δ剰余変換部、935…Ψ関数計算部、936…ビット値判定部、937…加算部、938…τ倍算部、1701…乱数倍計算部、1702…前計算部、1703…実計算部、1721…加算部、1722…2倍算部、1723…繰り返し判定部、1731…剰余取得部、1732…剰余変換部、1733…繰り返し判定部、1734…格納部、1735…ランダムビット生成部、1736…Ψ関数計算部、1737…ビット値判定部、1738…加算部、1739…τ倍算部。   101, 121, 1621 ... computer, 1601 ... smart card, 102, 122, 1602, 1622 ... storage unit, 111, 131, 1611, 1631 ... processing unit, 115, 135, 1615, 1635 ... scalar multiplication unit, 112, 132 ... Data processing unit, 1612 ... Signature generation processing unit, 1632 ... Signature verification processing unit, 104, 124, 1604, 1624 ... Constant, 105, 125, 1605, 1625 ... Secret information, 110, 130, 1610, 1630 ... Input Output interface, 108, 128, 1628 ... display, 109, 129, 1629 ... keyboard, 142 ... network, 1642 ... challenge code, 141, 143 ... data, 302 ... encoding unit, 303 ... pre-calculation unit, 304 ... actual calculation unit , 321 ... residue acquisition unit, 22: residue conversion unit, 323 ... repetition determination unit, 324 ... delta residue conversion unit, 325 ... Ψ function calculation unit, 326 ... storage unit, 331 ... addition unit, 332 ... doubling unit, 333 ... repetition determination unit, 341 ... Bit value determination unit, 342 ... Addition unit, 343 ... τ multiplication unit, 344 ... Repetition determination unit, 902 ... Pre-calculation unit, 903 ... Real calculation unit, 921 ... Addition unit, 922 ... τ multiplication unit, 923 ... Iterative determination unit, 931 ... residue acquisition unit, 932 ... residue conversion unit, 933 ... repetition determination unit, 934 ... delta residue conversion unit, 935 ... Ψ function calculation unit, 936 ... bit value determination unit, 937 ... addition unit, 938 ... τ multiplication unit, 1701 ... random number multiplication calculation unit, 1702 ... previous calculation unit, 1703 ... real calculation unit, 1721 ... addition unit, 1722 ... doubling calculation unit, 1723 ... repetition determination unit, 1731 ... remainder acquisition unit, 1732 ... Remainder conversion , 1733... Repeat determination unit, 1734... Storage unit, 1735... Random bit generation unit, 1736... Ψ function calculation unit, 1737... Bit value determination unit, 1738.

Claims (1)

楕円曲線において、スカラー値、及び、前記楕円曲線上の入力点からスカラー倍点を計算する、楕円曲線暗号におけるスカラー倍計算装置であって、
メモリ部と、加算部と、引算部と、τ倍算部と、前記スカラー値を数値列にエンコードするエンコード部と、前記入力点から前計算テーブルを作成する前計算部と、前記エンコードした数値列と前記前計算テーブルとから前記スカラー倍点を計算する実計算部と、を具備し、
前記加算部は、前記楕円曲線上の二つの点を加算することを特徴とし、
前記引算部は、前記楕円曲線上の二つの点を引算することを特徴とし、
前記τ倍算部は、前記楕円曲線上の点(x,y)から(x,y)を出力する第一の計算を実行することを特徴とし、
前記τ倍算部を用いて、前記第一の計算を実行して、前記メモリ部に前記第一の計算の出力を格納する第一の処理部と、
前記加算部を用いて、前記メモリ部に格納されている点と前記入力点を加算する第二の処理部と、
前記引算部を用いて、前記メモリ部に格納されている点と前記入力点を引算する第三の処理部と、を有し、
前記前計算部は、前記第一の処理部と前記第二の処理部と前記第三の処理部の処理を予め定められた回数繰り返すことを特徴とし、
前記τ倍算部を用いて、前記第一の計算を予め定められた回数繰り返して、前記メモリ部に前記第一の計算の出力を格納する第四の処理部と、
前記エンコードした数値列の数値を読んで、前記読んだ数値から、前記前計算テーブル点を選択して、前記加算部を用いて、前記メモリ部に格納されている点と前記選択した点を加算する第五の処理部と、を有し、
前記実計算部は、前記第四の処理部と前記第五の処理部の処理分の処理を繰り返し、
前記エンコード部は、
前記スカラー値を第一数値と第二数値に分割する分割部と、
前記第一数値と第二数値から、第三数値を計算するΨ関数の計算部と、
前記スカラー値を更新する更新部と、
前記分割部と前記Ψ関数の計算部と前記更新部の処理を繰り返すエンコード計算部と、を具備し、
前記メモリ部に格納された前記スカラー値をd、前記第一数値をd 、前記第二数値をd 、としたとき、前記分割部は、前記メモリ部に格納された前記スカラー値(d)から、d’=(d mod δ)=d +d τを満たすように前記第一数値(d )と第二数値(d )に分割し、
wを正の整数、x を整数、x を整数、t w+1 を前記楕円曲線上の演算τを複素数とみなした場合にwによって定まる整数、としたとき、前記Ψ関数は、前記第一数値(d )と前記第二数値(d )を入力(ただしd=x +x τ)し、出力される前記第三数値をΨ(d)=(d +d w+1 mod 2 w+1 )−2 とする関数であり、
前記Ψ関数の計算部は、前記第二数値と予め定められた第四数値との乗算結果と、前記第一数値とを加算し、前記加算された数値から、予め定められた第五数値を引算し、
前記更新部は、前記スカラー値から前記第三数値を減算した結果を予め定められた第六数値で除算するため、
前記更新部は、前記減算として、前記引算部を用いて、前記メモリ部に格納されている前記スカラー値から、前記第三数値を減算し、その計算結果を前記メモリ部に格納し、前記除算として、前記分割部を用いて、前記引算部が前記メモリ部に格納した前記スカラー値を前記第一数値と前記第二数値に分割し、前記第二数値と予め定められた所定の値との乗算結果を1ビット右シフトした値を前記メモリ部に格納する第六の処理部を有し、前記第六の処理部の処理分の処理をw回繰り返すこと、を特徴とするスカラー倍計算装置。
In an elliptic curve, a scalar multiple and a scalar multiple calculation device in elliptic curve cryptography that calculates a scalar multiple from an input point on the elliptic curve,
A memory unit, an addition unit, a subtraction unit, a τ multiplication unit, an encoding unit that encodes the scalar value into a numerical sequence, a pre-calculation unit that creates a pre-calculation table from the input points, and the encoded A real calculation unit for calculating the scalar multiple from the numerical sequence and the previous calculation table,
The addition unit adds two points on the elliptic curve,
The subtraction unit subtracts two points on the elliptic curve,
The τ multiplication unit performs a first calculation that outputs (x 2 , y 2 ) from a point (x, y) on the elliptic curve,
A first processing unit that performs the first calculation using the τ multiplication unit and stores the output of the first calculation in the memory unit;
A second processing unit that adds the points stored in the memory unit and the input points using the adding unit;
Using the subtraction unit, a point stored in the memory unit and a third processing unit for subtracting the input point;
The pre-calculation unit repeats the processes of the first processing unit, the second processing unit, and the third processing unit a predetermined number of times,
Using the τ multiplication unit, repeating the first calculation a predetermined number of times, and storing the output of the first calculation in the memory unit;
Read the numerical value of the encoded numerical sequence, select a point of the pre-calculation table from the read numerical value, and use the adding unit to store the point stored in the memory unit and the selected point A fifth processing unit to add,
The real calculation unit to repeat the fourth processing unit and the processing content of the processing of the fifth processing unit,
The encoding unit is
A dividing unit for dividing the scalar value into a first numerical value and a second numerical value;
From the first numerical value and the second numerical value, a Ψ function calculation unit for calculating a third numerical value,
An updating unit for updating the scalar value;
An encoding calculation unit that repeats the processing of the dividing unit, the Ψ function calculating unit, and the updating unit;
When the scalar value stored in the memory unit is d, the first numerical value is d 0 , and the second numerical value is d 1 , the dividing unit is configured to store the scalar value (d ) To be divided into the first numerical value (d 0 ) and the second numerical value (d 1 ) so as to satisfy d ′ = (d mod δ) = d 0 + d 1 τ ,
When w is a positive integer, x R is an integer, x T is an integer, and t w + 1 is an integer determined by w when the operation τ on the elliptic curve is regarded as a complex number, the Ψ function is numerical (d 0) and the second numerical value input to (d 1) and (where d = x R + x T τ ), the third number output Ψ (d) = (d R + d T t w + 1 mod 2 w + 1 ) −2 w .
The calculation unit of the Ψ function adds a multiplication result of the second numerical value and a predetermined fourth numerical value and the first numerical value, and determines a predetermined fifth numerical value from the added numerical value. Subtract,
The updating unit divides the result of subtracting the third numerical value from the scalar value by a predetermined sixth numerical value,
The update unit subtracts the third numerical value from the scalar value stored in the memory unit using the subtraction unit as the subtraction, stores the calculation result in the memory unit, and As the division, the division unit is used to divide the scalar value stored in the memory unit by the subtraction unit into the first numerical value and the second numerical value, and the second numerical value and a predetermined predetermined value. And a sixth processing unit for storing a value obtained by shifting the multiplication result by 1 bit to the right in the memory unit , and repeating the processing for the processing of the sixth processing unit w times Computing device.
JP2005145449A 2005-02-04 2005-05-18 Scalar multiplication unit for elliptic curve cryptography Expired - Fee Related JP4783061B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005145449A JP4783061B2 (en) 2005-02-04 2005-05-18 Scalar multiplication unit for elliptic curve cryptography

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2005028414 2005-02-04
JP2005028414 2005-02-04
JP2005145449A JP4783061B2 (en) 2005-02-04 2005-05-18 Scalar multiplication unit for elliptic curve cryptography

Publications (2)

Publication Number Publication Date
JP2006243690A JP2006243690A (en) 2006-09-14
JP4783061B2 true JP4783061B2 (en) 2011-09-28

Family

ID=37050120

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005145449A Expired - Fee Related JP4783061B2 (en) 2005-02-04 2005-05-18 Scalar multiplication unit for elliptic curve cryptography

Country Status (1)

Country Link
JP (1) JP4783061B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2011148558A1 (en) 2010-05-28 2013-07-25 日本電気株式会社 Signature generation apparatus, signature method, and signature generation program
JP5975682B2 (en) * 2012-03-06 2016-08-23 キヤノン株式会社 Arithmetic apparatus, arithmetic method, and program

Also Published As

Publication number Publication date
JP2006243690A (en) 2006-09-14

Similar Documents

Publication Publication Date Title
US8111826B2 (en) Apparatus for generating elliptic curve cryptographic parameter, apparatus for processing elliptic curve cryptograph, program for generating elliptic curve cryptographic parameter, and program for processing elliptic cyptograph
CN109039640B (en) Encryption and decryption hardware system and method based on RSA cryptographic algorithm
KR101233682B1 (en) Calculating apparatus and method for elliptic curve cryptography
Dawahdeh et al. A new modification for menezes-vanstone elliptic curve cryptosystem
Oliveira et al. Fast point multiplication algorithms for binary elliptic curves with and without precomputation
Harb et al. FPGA implementation of the ECC over GF (2m) for small embedded applications
JP4690819B2 (en) Scalar multiplication calculation method and scalar multiplication calculation apparatus in elliptic curve cryptography
Shohdy et al. Hardware Implementation of Efficient Modified Karatsuba Multiplier Used in Elliptic Curves.
CN109756335A (en) A kind of rank is the public key encryption decryption method of the finite field multiplier group of Mersenne Prime
KR100457177B1 (en) Serial-Parallel Multiplier to Multiply Two Elements in the Finite Field
JP4626148B2 (en) Calculation method of power-residue calculation in decryption or signature creation
JP2007187908A (en) Modular exponentiation calculation device and method having tolerance to side-channel attack
JP4783061B2 (en) Scalar multiplication unit for elliptic curve cryptography
Gutub Preference of efficient architectures for GF (p) elliptic curve crypto operations using multiple parallel multipliers
JP4423900B2 (en) Scalar multiplication calculation method, apparatus and program for elliptic curve cryptography
Al-Haija et al. Cost-effective design for binary Edwards elliptic curves crypto-processor over GF (2N) using parallel multipliers and architectures
Gokul et al. Performance comparison of multipliers based on Square and Multiply and montgomery algorithms
Bansal et al. Implementation of modular exponentiation using montgomery algorithms
Gutub Fast 160-bits GF (p) elliptic curve crypto hardware of high-radix scalable multipliers
JP4692022B2 (en) Scalar multiplication apparatus and program for elliptic curve cryptography
Muchtadi-Alamsyah et al. Implementation of elliptic curve25519 in cryptography
Agarwal et al. Elliptic Curves: An Efficient and Secure Encryption Scheme in Modern Cryptography
Muhaya et al. Applying hessian curves in parallel to improve elliptic curve scalar multiplication hardware
Han et al. Some analysis of radix-r representations
JP2005316038A (en) Scalar multiple computing method, device, and program in elliptic curve cryptosystem

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070802

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100119

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100323

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100528

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100921

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101119

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110524

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20110530

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

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

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

Free format text: PAYMENT UNTIL: 20140715

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees