JP2022134466A - Multiplication device, multiplication method, and multiplication program - Google Patents

Multiplication device, multiplication method, and multiplication program Download PDF

Info

Publication number
JP2022134466A
JP2022134466A JP2021033600A JP2021033600A JP2022134466A JP 2022134466 A JP2022134466 A JP 2022134466A JP 2021033600 A JP2021033600 A JP 2021033600A JP 2021033600 A JP2021033600 A JP 2021033600A JP 2022134466 A JP2022134466 A JP 2022134466A
Authority
JP
Japan
Prior art keywords
multiplication
mask
value
values
integers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2021033600A
Other languages
Japanese (ja)
Other versions
JP7402191B2 (en
Inventor
和英 福島
Kazuhide Fukushima
晋作 清本
Shinsaku Kiyomoto
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.)
KDDI Corp
Original Assignee
KDDI 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 KDDI Corp filed Critical KDDI Corp
Priority to JP2021033600A priority Critical patent/JP7402191B2/en
Publication of JP2022134466A publication Critical patent/JP2022134466A/en
Application granted granted Critical
Publication of JP7402191B2 publication Critical patent/JP7402191B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

To provide a multiplication device, a multiplication method, and a multiplication program capable of preventing a side-channel attack and executing multiplication speedily.SOLUTION: A multiplication device 1 includes: a polynomial formulation part 11 for dividing two integers by each predetermined method and expressing them by polynomials; a sample point calculation part 12 for calculating values of a plurality of sample points for each of polynomials; a mask value generation part 13 for generating a random mask value for each of sample points; a multiplication processing part 14 for determining coefficients of a polynomial for expressing multiplication values of two integers by using masked sample points by adding a mask value and substituting a rule so as to calculate a masked multiplication value; a cumulative mask operation part 15 for calculating a cumulative value of mask values included in an operation result by the multiplication processing part 14 on the basis of the values of sample points and mask values; and a mask cancellation part 16 for canceling a mask by subtracting the cumulative value from the operation result by the multiplication processing part 14 and calculating a multiplication value of two integers.SELECTED DRAWING: Figure 1

Description

本発明は、サイドチャネル攻撃への対策を施した演算装置に関する。 The present invention relates to an arithmetic device that takes countermeasures against side-channel attacks.

従来、多倍長乗算において、乗算の回数を4分の3にするアルゴリズムとして、Karatsuba法が知られている(例えば、非特許文献1参照)。Karatsuba法を再帰的に適用することで、従来はO(n)であった乗算の計算量をO(n^log3)に削減できる。 Conventionally, in multiple precision multiplication, the Karatsuba method is known as an algorithm for reducing the number of multiplications to 3/4 (see, for example, Non-Patent Document 1). By recursively applying the Karatsuba method, the computational complexity of multiplication, which was conventionally O(n 2 ), can be reduced to O(n^log 2 3).

また、Karatsuba法を一般化したToom-Cook法も知られている(例えば、非特許文献2参照)。Toom-Cook法は、Karatsuba法の計算量をさらに削減し、乗算の計算量をO(n^log5)とできる。Toom-Cook法を活用することで、耐量子公開鍵暗号方式及び現行の公開鍵暗号方式の暗号化及び復号化処理において大部分を占める乗算処理が高速化される。 Also known is the Toom-Cook method, which is a generalization of the Karatsuba method (see, for example, Non-Patent Document 2). The Toom-Cook method further reduces the computational complexity of the Karatsuba method, and the computational complexity of multiplication can be O(n^log 3 5). By utilizing the Toom-Cook method, the speed of multiplication processing, which occupies most of the encryption and decryption processing of post-quantum public key cryptosystems and current public key cryptosystems, is increased.

現行の公開鍵暗号方式及び耐量子公開鍵暗号方式のアルゴリズムにおいては、鍵値と既知の値との乗算が行われる。このため、暗号方式のハードウェア実装において、乗算処理の消費電力を測定して乗算結果を推定するサイドチャネル攻撃により、鍵値が漏洩する可能性がある。この対策として、Karatsuba法に対しては、乱数によるマスキングを行い、サイドチャネル攻撃を防止する手法が提案されている(例えば、非特許文献3参照)。 Current public-key cryptography and quantum-safe public-key cryptography algorithms involve multiplying a key value with a known value. Therefore, in the hardware implementation of the cryptosystem, there is a possibility that the key value will be leaked by a side-channel attack that measures the power consumption of the multiplication process and estimates the multiplication result. As a countermeasure against this, a method has been proposed in which the Karatsuba method is masked with random numbers to prevent side-channel attacks (see, for example, Non-Patent Document 3).

A. Karatsuba and Y. Ofman, “Multiplication of many-digital numbers by automatic computers,” Doklady Akad. Nauk SSSR, vol. 145, pp. 293-294, 1962. Translation in Physics-Doklady, no. 7, pp. 595-596, 1963.A. Karatsuba and Y. Ofman, “Multiplication of many-digital numbers by automatic computers,” Doklady Akad. Nauk SSSR, vol. 145, pp. 293-294, 1962. Translation in Physics-Doklady, no. 7, pp. 595-596, 1963. M. Bodrato, and A. Zanoni, “Integer and Polynomial Multiplication: Towards Optimal Toom-Cook Matrices,” Proceedings of the ISSAC 2007 Conference. ACM press, New York (2007).M. Bodrato, and A. Zanoni, “Integer and Polynomial Multiplication: Towards Optimal Toom-Cook Matrices,” Proceedings of the ISSAC 2007 Conference. ACM press, New York (2007). C. Rebeiro and D. Mukhopadhyay, “Hybrid Masked Karatsuba Multiplier for GF(2233),” Proceedings of the 11th IEEE VLSI Design And Test Symposium, pp 379-387, August 8-11, 2007.C. Rebeiro and D. Mukhopadhyay, “Hybrid Masked Karatsuba Multiplier for GF(2233),” Proceedings of the 11th IEEE VLSI Design And Test Symposium, pp 379-387, August 8-11, 2007.

しかしながら、Karatsuba法を一般化した、より高速な乗算アルゴリズムであるToom-Cook法に対しては、従来のマスキングによる対策手法は適用できず、サイドチャネル攻撃への有効な対策手法がなかった。 However, for the Toom-Cook method, which is a faster multiplication algorithm generalized from the Karatsuba method, the conventional countermeasure method using masking cannot be applied, and there is no effective countermeasure method against side channel attacks.

本発明は、サイドチャネル攻撃を防ぎつつ、高速に乗算を実行できる乗算装置、乗算方法及び乗算プログラムを提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a multiplication device, a multiplication method, and a multiplication program capable of executing multiplication at high speed while preventing side channel attacks.

本発明に係る乗算装置は、2つの整数を、それぞれ所定の法で分割して多項式で表現する多項式化部と、前記多項式それぞれに対して、複数の標本点の値を算出する標本点算出部と、前記標本点のそれぞれに対して、ランダムなマスク値を生成するマスク値生成部と、前記マスク値を加算することによりマスクされた標本点を用いて、前記2つの整数の乗算値を表現する多項式の係数を決定し、前記法を代入することにより、マスクされた乗算値を算出する乗算処理部と、前記標本点の値及び前記マスク値に基づいて、前記乗算処理部による演算結果に含まれる前記マスク値の累積値を算出する累積マスク演算部と、前記乗算処理部による演算結果から前記累積値を減算することでマスクを解除し、前記2つの整数の乗算値を算出するマスク解除部と、を備える。 A multiplication device according to the present invention includes a polynomial expression unit that divides two integers by a predetermined modulus and expresses them as a polynomial, and a sample point calculation unit that calculates values of a plurality of sample points for each of the polynomials. and a mask value generating unit that generates a random mask value for each of the sample points, and a sample point masked by adding the mask values to express the multiplied value of the two integers. a multiplication unit that calculates a masked multiplication value by determining the coefficients of the polynomial and substituting the modulus; a cumulative mask calculation unit for calculating the cumulative value of the included mask values; and a mask cancellation for calculating the multiplication value of the two integers by subtracting the cumulative value from the calculation result of the multiplication processing unit. and

前記多項式化部は、前記2つの整数を、それぞれ変数xの1次式で表現し、前記標本点算出部は、前記変数xが-1,0,1の場合の標本点の値をそれぞれ算出してもよい。 The polynomial expression unit expresses the two integers by a linear expression of the variable x, and the sample point calculation unit calculates values of sample points when the variable x is -1, 0, and 1, respectively. You may

前記乗算処理部は、処理途中の演算において、乗算対象の整数を1次式に分割するToom-Cook法を再帰的に繰り返してもよい。 The multiplication processing unit may recursively repeat the Toom-Cook method of dividing the integer to be multiplied into linear expressions in the calculation during the processing.

本発明に係る乗算方法は、2つの整数を、それぞれ所定の法で分割して多項式で表現する多項式化ステップと、前記多項式それぞれに対して、複数の標本点の値を算出する標本点算出ステップと、前記標本点のそれぞれに対して、ランダムなマスク値を生成するマスク値生成ステップと、前記マスク値を加算することによりマスクされた標本点を用いて、前記2つの整数の乗算値を表現する多項式の係数を決定し、前記法を代入することにより、マスクされた乗算値を算出する乗算処理ステップと、前記標本点の値及び前記マスク値に基づいて、前記乗算処理ステップにおける演算結果に含まれる前記マスク値の累積値を算出する累積マスク演算ステップと、前記乗算処理ステップにおける演算結果から前記累積値を減算することでマスクを解除し、前記2つの整数の乗算値を算出するマスク解除ステップと、をコンピュータが実行する。 A multiplication method according to the present invention comprises a polynomial expression step of dividing two integers by a predetermined modulus and expressing them as a polynomial, and a sample point calculation step of calculating values of a plurality of sample points for each of the polynomials. and a mask value generation step of generating a random mask value for each of said sample points, and expressing a multiplication value of said two integers using masked sample points by adding said mask values. a multiplication processing step of calculating a masked multiplication value by determining the coefficients of the polynomial and substituting the modulus; a cumulative mask calculation step of calculating a cumulative value of the included mask values; and a mask cancellation of subtracting the cumulative value from the calculation result in the multiplication processing step to remove the mask and calculating a multiplication value of the two integers. A computer executes the steps.

本発明に係る乗算プログラムは、前記乗算装置としてコンピュータを機能させるためのものである。 A multiplication program according to the present invention is for causing a computer to function as the multiplication device.

本発明によれば、サイドチャネル攻撃を防ぎつつ、高速に乗算を実行できる。 According to the present invention, multiplication can be executed at high speed while preventing side channel attacks.

実施形態における乗算装置の機能構成を示す図である。It is a figure which shows the functional structure of the multiplier in embodiment. 通常のToom-Cook法のアルゴリズムを示す図である。FIG. 10 is a diagram showing an algorithm of a normal Toom-Cook method; 実施形態における乗算装置により改良されたToom-Cook法のアルゴリズムを示す図である。FIG. 10 is a diagram showing an algorithm of the Toom-Cook method improved by the multiplication device in the embodiment;

以下、本発明の実施形態の一例について説明する。
本実施形態の乗算方法では、Toom-Cook法において、乱数によるマスキングを適用した値の乗算を行うことで、サイドチャネル攻撃による乗算結果の推定を防ぐ。また、演算結果に対するマスク値を並行して計算し減算することで、正しい乗算結果が復元される。
An example of an embodiment of the present invention will be described below.
In the multiplication method of the present embodiment, in the Toom-Cook method, multiplication of values masked with random numbers is performed to prevent estimation of multiplication results due to side channel attacks. Also, by calculating the mask value for the operation result in parallel and subtracting it, the correct multiplication result is restored.

図1は、本実施形態における乗算装置1の機能構成を示す図である。
乗算装置1は、サーバ装置又はパーソナルコンピュータ等の情報処理装置(コンピュータ)であり、制御部10及び記憶部20の他、各種データの入出力デバイス及び通信デバイス等を備える。
FIG. 1 is a diagram showing the functional configuration of a multiplier 1 according to this embodiment.
The multiplication device 1 is an information processing device (computer) such as a server device or a personal computer, and includes a control unit 10 and a storage unit 20, input/output devices for various data, communication devices, and the like.

制御部10は、乗算装置1の全体を制御する部分であり、記憶部20に記憶された各種プログラムを適宜読み出して実行することにより、本実施形態における各機能を実現する。制御部10は、CPUであってよい。 The control unit 10 is a part that controls the entire multiplication device 1, and implements each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 20. FIG. The control unit 10 may be a CPU.

記憶部20は、ハードウェア群を乗算装置1として機能させるための各種プログラム、及び各種データ等の記憶領域であり、ROM、RAM、フラッシュメモリ又はハードディスクドライブ(HDD)等であってよい。具体的には、記憶部20は、本実施形態の各機能を制御部10に実行させるためのプログラム(乗算プログラム)の他、処理途中の各種データ等を記憶する。 The storage unit 20 is a storage area for various programs and various data for causing the hardware group to function as the multiplication device 1, and may be a ROM, RAM, flash memory, hard disk drive (HDD), or the like. Specifically, the storage unit 20 stores a program (multiplication program) for causing the control unit 10 to execute each function of the present embodiment, as well as various data during processing.

制御部10は、多項式化部11と、標本点算出部12と、マスク値生成部13と、乗算処理部14と、累積マスク演算部15と、マスク解除部16とを備える。 The control unit 10 includes a polynomial expression unit 11 , a sample point calculation unit 12 , a mask value generation unit 13 , a multiplication processing unit 14 , a cumulative mask calculation unit 15 and a mask removal unit 16 .

多項式化部11は、乗算対象の2つの整数を、それぞれ所定の法で分割して多項式(例えば、1次式)で表現する。
例えば、法Q=100とすると、整数1234は、「12Q+34」と変形でき、多項式表現は、「12x+34」となる。
The polynomial expression unit 11 divides two integers to be multiplied by a predetermined modulus and expresses them in a polynomial expression (for example, a linear expression).
For example, if the modulus Q=100, the integer 1234 can be transformed into "12Q+34", and the polynomial expression is "12x+34".

標本点算出部12は、2つの整数を表す多項式それぞれに対して、複数の標本点の値を算出する。
例えば、多項式a(x)=12x+34に対して、x=-1,0,1の標本点の値は、それぞれ、a(-1)=-12+34=22,a(0)=34,a(1)=12+34=46となる。
なお、標本点の取り方は任意であるが、変数xの値として、絶対値の小さい整数が選択されることが好ましい。1次式に対しては、例えば、x=-1,0,1の3点が用いられる。
The sample point calculator 12 calculates values of a plurality of sample points for each polynomial representing two integers.
For example, for the polynomial a(x)=12x+34, the sample point values at x=-1, 0, 1 are a(-1)=-12+34=22, a(0)=34, a( 1)=12+34=46.
Note that the method of taking the sample points is arbitrary, but it is preferable to select an integer with a small absolute value as the value of the variable x. For the linear expression, for example, three points of x=-1, 0, 1 are used.

マスク値生成部13は、標本点のそれぞれに対して、ランダムなマスク値を生成する。
例えば、標本値a(-1)=22に対して、マスク値生成部13は、マスク値として乱数(例えば、12)を生成し、マスクされた標本値a’(-1)=22+12=34を提供する。
The mask value generator 13 generates a random mask value for each sample point.
For example, for a sample value a(-1)=22, the mask value generator 13 generates a random number (for example, 12) as the mask value, and the masked sample value a'(-1)=22+12=34. I will provide a.

乗算処理部14は、マスク値を加算することによりマスクされた標本点を用いて、2つの整数の乗算値を表現する多項式R(例えば、2次式)の係数を、連立方程式の求解により決定し、法Qを代入することにより、マスクされた乗算値を算出する。 The multiplication processing unit 14 uses the sample points masked by adding the mask values to determine the coefficients of a polynomial R (for example, quadratic) representing the multiplication value of two integers by solving simultaneous equations. and substituting the modulo Q to calculate the masked multiplication value.

累積マスク演算部15は、標本点の値及びマスク値に基づいて、乗算処理部14による演算結果に含まれるマスク値の累積値を算出する。
つまり、累積マスク演算部15は、2つの整数による本来の正しい乗算結果に対して、マスク値に起因して累積される余剰な値のみを、前述の連立方程式から求まる理論式に基づいて算出する。
The cumulative mask calculation unit 15 calculates the cumulative value of the mask values included in the calculation result of the multiplication processing unit 14 based on the values of the sample points and the mask values.
That is, the cumulative mask calculation unit 15 calculates only the surplus values accumulated due to the mask value with respect to the original correct multiplication result by two integers, based on the theoretical formula obtained from the aforementioned simultaneous equations. .

マスク解除部16は、乗算処理部14による演算結果からマスク値の累積値を減算することでマスクを解除し、2つの整数による本来の正しい乗算値を算出する。 The mask removing unit 16 removes the mask by subtracting the cumulative value of the mask value from the calculation result of the multiplication processing unit 14, and calculates the original correct multiplication value of the two integers.

次に、本実施形態における乗算方法の詳細な手順を示す。ここでは、法をQとし、次の2つの整数a,bの乗算を行う場合の例を示す。
a=aQ+a
b=bQ+b
Next, detailed procedures of the multiplication method in this embodiment will be described. Here, an example in which the modulo is Q and the following two integers a and b are multiplied will be shown.
a = a 1 Q + a 0
b=b 1 Q+b 0

2つの整数の多項式表現は、それぞれ、
a(x)=ax+a
b(x)=bx+b
となり、乗算結果Rの多項式表現は、
R(x)=a(x)b(x)=R+Rx+R
となる。
The polynomial representations of the two integers are, respectively,
a (x)=a1x+ a0
b( x )= b1x +b0
and the polynomial representation of the multiplication result R is
R ( x)= a (x)b(x)= R2x2 +R1x+ R0
becomes.

ここで、例えば、x=-1,0,1に対する標本点の値(標本値)を計算すると、
a(-1)=-a+a
a(0)=a
a(1)=a+a
b(-1)=-b+b
b(0)=b
b(1)=b+b
である。
例えば、Q=100とすると、整数1234は、「12Q+34」と変形でき、多項式表現は、「12x+34」となる。この場合、標本値として、a(-1)=-a+a=-12+34=22,a(0)=a=34,a(1)=a+a=46が得られる。
Here, for example, when the sample point values (sample values) for x=-1, 0, 1 are calculated,
a(−1)=−a 1 +a 0
a( 0 )=a0
a( 1 )=a1+ a0
b(−1)=−b 1 +b 0
b( 0 )=b0
b( 1 ) = b1+b0
is.
For example, if Q=100, the integer 1234 can be transformed into "12Q+34" and the polynomial expression becomes "12x+34". In this case, a(-1)=-a 1 +a 0 =-12+34=22, a(0)=a 0 =34, and a(1)=a 1 +a 0 =46 are obtained as sample values.

これら6つの標本値に対し、それぞれマスク値として、
a(-1),ma(0),ma(1),ma(-1),ma(0),ma(1)
をランダムに生成して加算すると、マスクされた標本値として、
a’(-1)=a(-1)+ma(-1)
a’(0)=a(0)+ma(0)
a’(1)=a(1)+ma(1)
b’(-1)=b(-1)+mb(-1)
b’(0)=b(0)+mb(0)
b’(1)=b(1)+mb(1)
が得られる。
As a mask value for each of these six sample values,
m a(−1) , m a(0) , m a(1) , m a(−1) , m a(0) , m a(1)
Randomly generated and added, as a masked sample value,
a'(-1)=a(-1)+m a(-1)
a'(0)=a(0)+m a(0)
a'(1)=a(1)+m a(1)
b'(-1)=b(-1)+m b(-1)
b′(0)=b(0)+m b(0)
b'(1)=b(1)+m b(1)
is obtained.

乗算装置1は、これらのマスクされた標本値a’(),b’()と、乗算結果を表す多項式の値R’()とを用いて、通常のToom-Cook法と同様に、次の連立方程式を解き、係数R’,R’,R’を求める。
R’(-1)=R’-R’+R’=a’(-1)b’(-1)
R’(0)=R’=a’(0)b’(0)
R’(1)=R’+R’+R’=a’(1)b’(1)
これにより、マスクされた乗算結果R’(Q)=R’+R’Q+R’が得られる。
Multiplication device 1 uses these masked sample values a'() and b'() and polynomial value R'() representing the result of multiplication to perform the following in the same manner as in the normal Toom-Cook method: Solve the simultaneous equations to find the coefficients R' 2 , R' 1 and R' 0 .
R'(- 1 )= R'2 -R'1+ R'0 =a'(-1)b'(-1)
R'( 0 )=R'0=a'(0)b'(0)
R'( 1 )= R'2 +R'1+ R'0 =a'(1)b'(1)
This gives the masked multiplication result R' ( Q) = R'2Q2 + R'1Q +R'0.

一方で、乗算結果に対するマスク値M=R’(Q)-R(Q)は、上記の標本値及びマスク値に基づいて、

Figure 2022134466000002
と計算できる。ただし、
Figure 2022134466000003
である。
乗算装置1は、Toom-Cook法の出力R’(Q)からマスク値Mを減算することにより、乗算結果R(Q)=(aQ+a)(bQ+b)を得る。 On the other hand, the mask value M=R'(Q)-R(Q) for the multiplication result is given by
Figure 2022134466000002
can be calculated as however,
Figure 2022134466000003
is.
The multiplier 1 obtains the multiplication result R(Q)=(a 1 Q+a 0 )(b 1 Q+b 0 ) by subtracting the mask value M from the output R′(Q) of the Toom-Cook method.

図2は、通常のToom-Cook法のアルゴリズムを示す図である。
ステップS1において、乗算の入力である2つの整数a,bは、分割多項式化され、多項式a(x),b(x)が求められる。
FIG. 2 is a diagram showing an ordinary Toom-Cook method algorithm.
In step S1, two integers a and b, which are multiplication inputs, are divided into polynomials to obtain polynomials a(x) and b(x).

ステップS2において、多項式a(x),b(x)は、それぞれ複数の標本点で評価され、標本値が取得される。 At step S2, the polynomials a(x) and b(x) are each evaluated at a plurality of sample points to obtain sample values.

ステップS3において、標本値毎の乗算により、乗算結果を表す多項式の値が算出される。 In step S3, the value of the polynomial expressing the multiplication result is calculated by multiplication for each sample value.

ステップS4において、乗算結果を表す多項式の係数が、ステップS3の計算結果を用いた連立方程式により決定される。 In step S4, the coefficients of the polynomial representing the multiplication result are determined by simultaneous equations using the calculation results of step S3.

ステップS5において、ステップS4の多項式は、ステップS1における分割時の法を代入することにより評価され、2つの整数の乗算結果が出力される。 In step S5, the polynomial of step S4 is evaluated by substituting the modulus of the split in step S1, and the result of multiplying the two integers is output.

図3は、本実施形態における乗算装置1により改良されたToom-Cook法のアルゴリズムを示す図である。
なお、破線枠内が従来のアルゴリズム(図2)に対して新たに追加された部分であり、サイドチャネル攻撃へのマスキングによる対策が適用されている。
FIG. 3 is a diagram showing the algorithm of the Toom-Cook method improved by the multiplier 1 in this embodiment.
It should be noted that the part inside the dashed line frame is a part newly added to the conventional algorithm (FIG. 2), and a countermeasure by masking against side channel attacks is applied.

ステップS1において、多項式化部11は、従来と同様に、乗算の入力である2つの整数a,bを分割多項式化し、多項式a(x),b(x)を求める。 In step S1, the polynomial generator 11 converts two integers a and b, which are inputs for multiplication, into divided polynomials to find polynomials a(x) and b(x), as in the conventional art.

ステップS2において、標本点算出部12は、従来と同様に、多項式a(x),b(x)を、それぞれ複数の標本点で評価し、標本値を取得する。 In step S2, the sample point calculator 12 evaluates each of the polynomials a(x) and b(x) at a plurality of sample points to obtain sample values, as in the conventional case.

ステップS11において、マスク値生成部13は、標本値毎に、マスク値としての乱数を生成する。 In step S11, the mask value generator 13 generates a random number as a mask value for each sample value.

ステップS12において、乗算処理部14は、標本値それぞれにマスク値を加算することによりマスキングを行い、マスクされた標本値を得る。 In step S12, the multiplication processing unit 14 performs masking by adding a mask value to each sample value to obtain a masked sample value.

ステップS3において、乗算処理部14は、従来と同様に、標本値毎の乗算により、乗算結果を表す多項式の値を算出する。標本値がマスクされていることにより、算出された多項式の値もマスクされている。 In step S3, the multiplication processing unit 14 calculates the polynomial value representing the multiplication result by multiplication for each sample value, as in the conventional case. By masking the sample values, the calculated polynomial values are also masked.

ステップS4において、乗算処理部14は、従来と同様に、乗算結果を表す多項式の係数を、ステップS3の計算結果を用いた連立方程式により決定する。これにより、マスクされた乗算結果が多項式表現される。 In step S4, the multiplication processing unit 14 determines the coefficients of the polynomial expression representing the multiplication results by simultaneous equations using the calculation results in step S3, as in the conventional case. Thereby, the masked multiplication result is represented by a polynomial expression.

ステップS5において、乗算処理部14は、従来と同様に、ステップS4の多項式を、ステップS1における分割時の法を代入することにより評価し、マスクされた乗算結果を得る。 In step S5, the multiplication processing unit 14 evaluates the polynomial in step S4 by substituting the modulus at the time of division in step S1 to obtain a masked multiplication result, as in the conventional case.

ステップS13において、累積マスク演算部15は、標本値及びマスク値を用いて、乗算結果に対する累積マスク値を算出する。 In step S13, the cumulative mask calculator 15 uses the sample value and the mask value to calculate a cumulative mask value for the multiplication result.

ステップS14において、マスク解除部16は、ステップS5の乗算結果から累積マスク値を減算してアンマスキングを行い、2つの整数a,bの乗算結果を出力する。 In step S14, the mask removing unit 16 performs unmasking by subtracting the accumulated mask value from the multiplication result of step S5, and outputs the multiplication result of the two integers a and b.

本実施形態によれば、乗算装置1は、2つの整数値の乗算を行うにあたり、Toom-Cook法における乗算処理の対象となる標本値に対し、乱数によるマスク値を加算することでマスキングを行うとともに、標本値及びマスク値から乗算結果に対する累積マスク値を計算する。そして、乗算装置1は、Toom-Cook法による計算結果に含まれている累積マスク値を減算することで、本来の正しい乗算結果を復元する。
したがって、乗算装置1は、Toom-Cook法を用いた乗算処理において、マスキングによりサイドチャネル攻撃を防ぎつつ、高速に乗算を実行できる。
この結果、現行の公開鍵暗号、さらには耐量公開鍵暗号のハードウェア実装において、消費電力等の測定を行うことで鍵値を推測するサイドチャネル攻撃を防止することができる。
According to this embodiment, the multiplication device 1 performs masking by adding a mask value based on a random number to a sample value to be multiplied by the Toom-Cook method when performing multiplication of two integer values. Also, a cumulative mask value for the multiplication result is calculated from the sample value and the mask value. Then, the multiplication device 1 restores the original correct multiplication result by subtracting the accumulated mask value included in the calculation result by the Toom-Cook method.
Therefore, in multiplication processing using the Toom-Cook method, the multiplication device 1 can execute multiplication at high speed while preventing side channel attacks by masking.
As a result, it is possible to prevent side-channel attacks in which key values are estimated by measuring power consumption and the like in hardware implementations of current public key cryptography and even robust public key cryptography.

乗算装置1は、2つの整数を、それぞれ変数xの1次式で表現し、変数xが-1,0,1の場合の標本点の値をそれぞれ算出する。
これにより、乗算装置1は、演算式を簡潔にして処理負荷を低減できる。
Multiplication device 1 expresses two integers by a linear expression of variable x, and calculates sample point values when variable x is -1, 0, and 1, respectively.
As a result, the multiplication device 1 can simplify the arithmetic expression and reduce the processing load.

なお、これにより、例えば、より安全な公開鍵暗号を用いたインターネット通信を実現できることから、国連が主導する持続可能な開発目標(SDGs)の目標9「レジリエントなインフラを整備し、持続可能な産業化を推進するとともに、イノベーションの拡大を図る」に貢献することが可能となる。 As a result, for example, it is possible to realize Internet communication using more secure public key cryptography, so it will be possible to achieve Goal 9 of the Sustainable Development Goals (SDGs) led by the United Nations. It will be possible to contribute to "promoting innovation and expanding innovation".

以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述した実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Moreover, the effects described in the above-described embodiments are merely enumerations of the most suitable effects produced by the present invention, and the effects of the present invention are not limited to those described in the embodiments.

例えば、公開鍵暗号方式において、鍵長が長いことによる処理負荷を低減するために、乗算装置1は、分割多項式化を再帰的に実行してもよい。すなわち、乗算処理部14は、処理途中の演算において、乗算対象の整数を1次式に分割するToom-Cook法を再帰的に繰り返してもよい。 For example, in public key cryptography, the multiplication device 1 may recursively perform division polynomials in order to reduce the processing load due to a long key length. That is, the multiplication processing unit 14 may recursively repeat the Toom-Cook method of dividing the integer to be multiplied into linear expressions in the calculation during the processing.

また、整数の多項式表現は、1次式には限られず、2次以上であってもよい。この場合、乗算結果を表す多項式の次数も増加し、例えば、2次式×2次式の場合、乗算結果を表す多項式は4次式となり、5個の係数を決定するために標本点が10個選択される。 Moreover, the polynomial expression of integers is not limited to a linear expression, and may be a second-order or higher expression. In this case, the degree of the polynomial expression representing the multiplication result also increases. selected.

乗算装置1による乗算方法は、ソフトウェアにより実現される。ソフトウェアによって実現される場合には、このソフトウェアを構成するプログラムが、情報処理装置(コンピュータ)にインストールされる。また、これらのプログラムは、CD-ROMのようなリムーバブルメディアに記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。さらに、これらのプログラムは、ダウンロードされることなくネットワークを介したWebサービスとしてユーザのコンピュータに提供されてもよい。 The multiplication method by the multiplication device 1 is implemented by software. When it is implemented by software, a program constituting this software is installed in an information processing device (computer). Further, these programs may be recorded on removable media such as CD-ROMs and distributed to users, or may be distributed by being downloaded to users' computers via a network. Furthermore, these programs may be provided to the user's computer as a web service through the network without being downloaded.

1 乗算装置
10 制御部
11 多項式化部
12 標本点算出部
13 マスク値生成部
14 乗算処理部
15 累積マスク演算部
16 マスク解除部
20 記憶部
1 multiplication unit 10 control unit 11 polynomial expression unit 12 sample point calculation unit 13 mask value generation unit 14 multiplication processing unit 15 cumulative mask calculation unit 16 mask cancellation unit 20 storage unit

Claims (5)

2つの整数を、それぞれ所定の法で分割して多項式で表現する多項式化部と、
前記多項式それぞれに対して、複数の標本点の値を算出する標本点算出部と、
前記標本点のそれぞれに対して、ランダムなマスク値を生成するマスク値生成部と、
前記マスク値を加算することによりマスクされた標本点を用いて、前記2つの整数の乗算値を表現する多項式の係数を決定し、前記法を代入することにより、マスクされた乗算値を算出する乗算処理部と、
前記標本点の値及び前記マスク値に基づいて、前記乗算処理部による演算結果に含まれる前記マスク値の累積値を算出する累積マスク演算部と、
前記乗算処理部による演算結果から前記累積値を減算することでマスクを解除し、前記2つの整数の乗算値を算出するマスク解除部と、を備える乗算装置。
a polynomialization unit that divides two integers by a predetermined modulus and expresses them as polynomials;
a sample point calculation unit that calculates values of a plurality of sample points for each of the polynomials;
a mask value generator that generates a random mask value for each of the sample points;
determining the coefficients of a polynomial representing the multiplication of the two integers using the sample points masked by adding the mask values, and calculating the masked multiplication by substituting the modulus; a multiplication unit;
a cumulative mask calculation unit that calculates a cumulative value of the mask values included in the calculation result of the multiplication unit based on the values of the sample points and the mask values;
and a mask removing unit that removes the mask by subtracting the cumulative value from the calculation result of the multiplication processing unit, and calculates the multiplication value of the two integers.
前記多項式化部は、前記2つの整数を、それぞれ変数xの1次式で表現し、
前記標本点算出部は、前記変数xが-1,0,1の場合の標本点の値をそれぞれ算出する請求項1に記載の乗算装置。
The polynomial expression unit expresses the two integers with a linear expression of the variable x,
2. The multiplication device according to claim 1, wherein said sample point calculator calculates values of sample points when said variable x is -1, 0 and 1, respectively.
前記乗算処理部は、処理途中の演算において、乗算対象の整数を1次式に分割するToom-Cook法を再帰的に繰り返す請求項1又は請求項2に記載の乗算装置。 3. The multiplication device according to claim 1, wherein the multiplication processing unit recursively repeats the Toom-Cook method of dividing an integer to be multiplied into linear expressions in an operation during processing. 2つの整数を、それぞれ所定の法で分割して多項式で表現する多項式化ステップと、
前記多項式それぞれに対して、複数の標本点の値を算出する標本点算出ステップと、
前記標本点のそれぞれに対して、ランダムなマスク値を生成するマスク値生成ステップと、
前記マスク値を加算することによりマスクされた標本点を用いて、前記2つの整数の乗算値を表現する多項式の係数を決定し、前記法を代入することにより、マスクされた乗算値を算出する乗算処理ステップと、
前記標本点の値及び前記マスク値に基づいて、前記乗算処理ステップにおける演算結果に含まれる前記マスク値の累積値を算出する累積マスク演算ステップと、
前記乗算処理ステップにおける演算結果から前記累積値を減算することでマスクを解除し、前記2つの整数の乗算値を算出するマスク解除ステップと、をコンピュータが実行する乗算方法。
a polynomialization step of dividing each of the two integers by a predetermined modulus and expressing them as a polynomial;
a sample point calculation step of calculating values of a plurality of sample points for each of the polynomials;
a mask value generation step of generating a random mask value for each of the sample points;
determining the coefficients of a polynomial representing the multiplication of the two integers using the sample points masked by adding the mask values, and calculating the masked multiplication by substituting the modulus; a multiplication step;
a cumulative mask calculation step of calculating a cumulative value of the mask values included in the calculation result of the multiplication step based on the values of the sample points and the mask values;
A multiplication method in which a computer executes a mask removal step of removing the mask by subtracting the cumulative value from the calculation result in the multiplication step, and calculating the multiplication value of the two integers.
請求項1から請求項3のいずれかに記載の乗算装置としてコンピュータを機能させるための乗算プログラム。 A multiplication program for causing a computer to function as the multiplication device according to any one of claims 1 to 3.
JP2021033600A 2021-03-03 2021-03-03 Multiplication device, multiplication method and multiplication program Active JP7402191B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021033600A JP7402191B2 (en) 2021-03-03 2021-03-03 Multiplication device, multiplication method and multiplication program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021033600A JP7402191B2 (en) 2021-03-03 2021-03-03 Multiplication device, multiplication method and multiplication program

Publications (2)

Publication Number Publication Date
JP2022134466A true JP2022134466A (en) 2022-09-15
JP7402191B2 JP7402191B2 (en) 2023-12-20

Family

ID=83231438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021033600A Active JP7402191B2 (en) 2021-03-03 2021-03-03 Multiplication device, multiplication method and multiplication program

Country Status (1)

Country Link
JP (1) JP7402191B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006201641A (en) 2005-01-24 2006-08-03 Mitsubishi Electric Corp Nonlinear arithmetic unit, encryption processor, nonlinear arithmetic method, and nonlinear arithmetic program
JP4585372B2 (en) 2005-05-02 2010-11-24 日本電信電話株式会社 Pairing calculation device, pairing calculation method, and pairing calculation program
JP5294787B2 (en) 2008-10-10 2013-09-18 ルネサスエレクトロニクス株式会社 Data processing apparatus and data processing method
US9143325B2 (en) 2012-12-14 2015-09-22 Microsoft Technology Licensing, Llc Masking with shared random bits
US9959429B2 (en) 2013-03-15 2018-05-01 Cryptography Research, Inc. Asymmetrically masked multiplication
KR20230172043A (en) 2017-04-11 2023-12-21 더 가버닝 카운슬 오브 더 유니버시티 오브 토론토 A homomorphic processing unit for accelerating secure computations under homomorphic encryption
EP3474484A1 (en) 2017-10-17 2019-04-24 Koninklijke Philips N.V. Cryptographic device with updatable shared matrix

Also Published As

Publication number Publication date
JP7402191B2 (en) 2023-12-20

Similar Documents

Publication Publication Date Title
Bernstein et al. On the correct use of the negation map in the Pollard rho method
Bos et al. On the Security of 1024-bit RSA and 160-bit Elliptic Curve Cryptography
Strenzke et al. Side channels in the McEliece PKC
Petit et al. On polynomial systems arising from a Weil descent
JP5182364B2 (en) Cryptographic processing method with tamper resistance against side channel attack
JP2019515353A (en) Countermeasures against Safe-Error Fault Injection Attack on Cryptographic Power-up Algorithm
JP7273753B2 (en) Arithmetic transformation processing device, Arithmetic transformation processing method and program
Oliveira et al. Fast point multiplication algorithms for binary elliptic curves with and without precomputation
JP2011510579A (en) Countermeasure method and device for asymmetric cryptosystem using signature diagram
JP6916770B2 (en) Concealment calculation device, concealment calculation method and concealment calculation program
Putranto et al. Depth-optimization of quantum cryptanalysis on binary elliptic curves
Aono et al. On the optimality of lattices for the Coppersmith technique
JP7402191B2 (en) Multiplication device, multiplication method and multiplication program
JP2005195829A (en) Method for power remainder calculation in decoding or signature creation
Reyes et al. A performance comparison of elliptic curve scalar multiplication algorithms on smartphones
Boudot On improving integer factorization and discrete logarithm computation using partial triangulation
Al-Khaleel et al. Fpga implementation of an ecc processor using edwards curves and dft modular multiplication
Robert et al. Efficient Fixed-base exponentiation and scalar multiplication based on a multiplicative splitting exponent recoding
CN117254909B (en) Computing method, system and storage medium for rapidly generating high-probability primitive root
Aranha et al. Efficient software implementation of laddering algorithms over binary elliptic curves
JP3966714B2 (en) Cryptographic processing method, program thereof, and recording medium thereof
Sasdrich et al. Closing the gap in RFC 7748: implementing Curve448 in hardware
JP2006201641A (en) Nonlinear arithmetic unit, encryption processor, nonlinear arithmetic method, and nonlinear arithmetic program
Meier Constant-Time Big Numbers (for Go)
Benger et al. A note on the behaviour of the number field sieve in the medium prime case: smoothness of norms

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230306

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231110

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231114

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231208

R150 Certificate of patent or registration of utility model

Ref document number: 7402191

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150