JP7073295B2 - Concealment calculation device, concealment calculation method and concealment calculation program - Google Patents

Concealment calculation device, concealment calculation method and concealment calculation program Download PDF

Info

Publication number
JP7073295B2
JP7073295B2 JP2019061680A JP2019061680A JP7073295B2 JP 7073295 B2 JP7073295 B2 JP 7073295B2 JP 2019061680 A JP2019061680 A JP 2019061680A JP 2019061680 A JP2019061680 A JP 2019061680A JP 7073295 B2 JP7073295 B2 JP 7073295B2
Authority
JP
Japan
Prior art keywords
variable
polynomial
ciphertext
calculation
function
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.)
Active
Application number
JP2019061680A
Other languages
Japanese (ja)
Other versions
JP2020160353A (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.)
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 JP2019061680A priority Critical patent/JP7073295B2/en
Publication of JP2020160353A publication Critical patent/JP2020160353A/en
Application granted granted Critical
Publication of JP7073295B2 publication Critical patent/JP7073295B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、2変数関数の秘匿計算装置、秘匿計算方法及び秘匿計算プログラムに関する。 The present invention relates to a secret calculation device for a two-variable function, a secret calculation method, and a secret calculation program.

従来、暗号化したまま平文の計算を行う秘密計算の手法が提案されている。
例えば、非特許文献1~3では、入力の整数がビット値に変換された状態、つまり平文がビット値の場合(以下、bit-wiseと表現する)に、完全準同型暗号方式による暗号文上での四則演算アルゴリズム(秘匿加算、秘匿減算、秘匿乗算、秘匿除算)が提案されている。
また、非特許文献4では、入力の整数がビット値に変換されず、つまり平文が整数値の場合(以下、integer-wiseと表現する)に、完全準同型暗号方式による暗号文上での2値比較演算のアルゴリズムが提案されている。
さらに、非特許文献5では、加法準同型暗号を用いた二者間プロトコルでの秘匿除算方法が提案されている。
Conventionally, a secret calculation method has been proposed in which plaintext is calculated while being encrypted.
For example, in Non-Patent Documents 1 to 3, when the input integer is converted into a bit value, that is, when the plaintext is a bit value (hereinafter, referred to as bit-wise), the code is written by a completely quasi-isomorphic encryption method. The four plaintext algorithms (secret addition, secret subtraction, secret multiplication, secret division) have been proposed.
Further, in Non-Patent Document 4, when the input integer is not converted into a bit value, that is, when the plaintext is an integer value (hereinafter referred to as an integer-wise), 2 on the ciphertext by the fully homomorphic encryption method is used. An algorithm for value comparison operation has been proposed.
Further, Non-Patent Document 5 proposes a secret division method in a two-way protocol using additive homomorphic encryption.

Yao Chen and Guang Gong. Integer arithmetic over ciphertext and homomorphic data aggregation. In 2015 IEEE Conference on Communications and Network Security (CNS), pages 628-632, Sept 2015.Yao Chen and Guang Gong. Integer arithmetic over ciphertext and homomorphic data aggregation. In 2015 IEEE Conference on Communications and Network Security (CNS), pages 628-632, Sept 2015. Chen Xu, Jingwei Chen, Wenyuan Wu, and Yong Feng. Homomorphically encrypted arithmetic operations over the integer ring. In Feng Bao, Liqun Chen, Robert H. Deng, and Guojun Wang, editors, Information Security Practice and Experience, pages 167-181, Springer, 2016.Chen Xu, Jingwei Chen, Wenyuan Wu, and Young Feng. Homomorphically encrypted arithmetic operations over the integer ring. In Feng Bao, Liquun Chen, Robert H. Deng, and Guojun Wang, editors, Information Security Practice and Experience, pages 167-181, Springer, 2016. Jingwei Chen, Yong Feng, Yang Liu, and Wenyuan Wu. Faster binary arithmetic operations on encrypted integers. In the 7th International Workshop on Computer Science and Engineering, 2017.Jingwei Chen, Young Feng, Yang Liu, and Wenyuan Wu. Faster arithmetic operations on encrypted integers. In the 7th International Workshop on Computer Science and Engineering, 2017. H. Narumanchi, D. Goyal, N. Emmadi, and P. Gauravaram. Performance analysis of sorting of the data: Integer-wise comparison vs bit-wise comparison. In 2017 IEEE 31st International Conference on Advanced Information Networking and Applications (AINA), pages 902-908, March 2017.H. Narumanchi, D.M. Goyal, N.M. Emmadi, and P.M. Gauravaram. Performance analysis of sorting of the data: Integer-wise comparison vs bit-wise comparison. In 2017 IEEE 31st International Conference on Advanced Information Networking and Applications (AINA), pages 902-908, March 2017. Morten Dahl, Chao Ning, and Tomas Toft. On secure two-party integer division. In Angelos D. Keromytis, editor, Financial Cryptography and Data Security, pages 164-178. Springer, 2012.Morten Dahl, Chao Ning, and Tomas Toft. On secure two-party integer division. In Angelos D. Keromytis, editor, Financial Cryptography and Data Security, pages 164-178. Springer, 2012.

ところで、integer-wiseの秘匿計算は、入力の整数を2進数のビット毎に暗号化する必要がないため、暗号化の回数がbit-wiseに比べて少なく有利となる。また、例えばbit-wiseの加減算は、2進数演算における繰り上げの処理等、完全準同型暗号において処理速度のネックとなる乗算を用いた処理が必要になる。一方、integer-wiseの加減算では、乗算を用いることなく暗号文同士を足し合わせることができるため高速である。
このように、integer-wiseでの秘匿計算が望まれる一方で、次のような課題が存在する。
By the way, in the confidential calculation of integer-wise, since it is not necessary to encrypt the input integer for each bit of the binary number, the number of times of encryption is smaller than that of bit-wise, which is advantageous. Further, for example, bit-wise addition / subtraction requires processing using multiplication, which is a bottleneck in processing speed in fully homomorphic encryption, such as carry processing in binary arithmetic. On the other hand, the addition / subtraction of integer-wise is fast because the ciphertexts can be added together without using multiplication.
As described above, while confidential calculation by integer-wise is desired, the following problems exist.

例えば、非特許文献4において、integer-wiseの2値比較演算のアルゴリズムが提案されているが、計算量及び乗算回路の深さのために、bit-wiseでの演算に比べて低速である。また、除算は、2値比較演算をサブモジュールとし、2値比較と減算とを繰り返すことで実現可能だが、2値比較を繰り返すことで、さらに低速となっていた。
また、前述の非特許文献5の秘匿除算方法では、割られる数がl-bitの整数であるのに対し、割る数がlog l-bitの整数であるという制限を加えることで高速化を図っているが、割る数がl-1以下の整数に限られてしまい、汎用性に欠けていた。
このように、完全準同型暗号でのinteger-wiseの高速な除算アルゴリズム、さらには、任意の2変数関数に適用できるinteger-wiseの高速な秘匿計算アルゴリズムは提案されていなかった。
For example, Non-Patent Document 4 proposes an algorithm for integer-wise binary comparison operation, but it is slower than bit-wise operation due to the amount of calculation and the depth of the multiplication circuit. Further, the division can be realized by using the binary comparison operation as a submodule and repeating the binary comparison and the subtraction, but the speed is further reduced by repeating the binary comparison.
Further, in the above-mentioned concealment division method of Non-Patent Document 5, the speed is increased by adding a restriction that the number to be divided is an integer of l-bit, whereas the number to be divided is an integer of log l-bit. However, the number of divisions is limited to integers of l-1 or less, and it lacks versatility.
As described above, a high-speed integer-wise division algorithm with fully homomorphic encryption, and a high-speed integer-wise concealment calculation algorithm applicable to any two-variable function have not been proposed.

本発明は、2変数関数の秘匿計算を汎用的に、かつ、高速に行える秘匿計算装置、秘匿計算方法及び秘匿計算プログラムを提供することを目的とする。 An object of the present invention is to provide a secret calculation device, a secret calculation method, and a secret calculation program capable of performing secret calculation of a two-variable function in a general and high-speed manner.

本発明に係る秘匿計算装置は、平文の空間内で、第1変数及び第2変数を入力とする2変数関数における前記第2変数を前記空間内の定数に固定したときの、前記第1変数に応じた関数値を多項式補間により定義した第1多項式の係数を、前記定数それぞれについて記憶する第1記憶部と、前記第1変数の値及び前記第2変数の値をそれぞれ準同型暗号方式により暗号化した、第1暗号文及び第2暗号文の入力を受け付ける入力部と、前記準同型暗号方式による暗号文の空間内で、前記第1暗号文の冪乗を計算する秘匿冪乗演算部と、前記第2変数を前記定数のいずれかに固定し、前記第1多項式の係数と前記第1暗号文の冪乗との内積により、前記第1多項式の値を算出する秘匿関数演算部と、前記第2暗号文の暗号化前の平文と前記定数とが異なる場合に0となる判定値を暗号文で算出する秘匿等号演算部と、前記第2変数が取り得る前記空間内の一部の定数毎の前記秘匿関数演算部による算出結果、及び前記秘匿等号演算部による算出結果の積を総和することにより、前記第1暗号文及び前記第2暗号文を入力とした前記2変数関数の値を出力する出力部と、を備える。 The secret computing device according to the present invention is the first variable when the second variable in a two-variable function having the first variable and the second variable as inputs is fixed to a constant in the space in a plain text space. The first storage unit that stores the coefficient of the first polymorphic code that defines the function value according to the above constants for each of the constants, and the value of the first variable and the value of the second variable are stored by a quasi-identical encryption method. An input unit that accepts the input of the first and second encrypted texts, and a secret power calculation unit that calculates the power of the first cryptographic text in the space of the encrypted text by the quasi-same type encryption method. And a secret function calculation unit that fixes the second variable to one of the constants and calculates the value of the first polypoly by the internal product of the coefficient of the first polymorphism and the cube of the first cipher statement. , A secret equal number calculation unit that calculates a determination value that becomes 0 when the plain text before encryption of the second encrypted text and the constant are different from each other, and one in the space that the second variable can take. By summing up the product of the calculation result by the concealment function calculation unit and the calculation result by the concealment equivalence calculation unit for each constant of the unit, the first cipher sentence and the second cipher sentence are input to the two variables. It has an output unit that outputs the value of the function.

前記第1記憶部は、前記一部の定数についてのみ、前記第1多項式の係数を記憶してもよい。 The first storage unit may store the coefficients of the first polynomial only for some of the constants.

前記秘匿計算装置は、前記第2変数が前記定数と等しい場合に1となり、異なる場合に0となる関数を多項式補間により定義した第2多項式の係数を、前記定数それぞれについて記憶する第2記憶部を備え、前記秘匿冪乗演算部は、前記第2暗号文の冪乗をさらに計算し、秘匿等号演算部は、前記第2多項式の係数と前記第2暗号文の冪乗との内積により、前記第2多項式の値を、前記判定値の暗号文として算出してもよい。 The secret calculation device stores the coefficients of the second polynomial, which defines a function that becomes 1 when the second variable is equal to the constant and 0 when the second variable is different, by polynomial interpolation, for each of the constants. The secret power calculation unit further calculates the power of the second code, and the secret power calculation unit is based on the inner product of the coefficient of the second polynomial and the power of the second code. , The value of the second polynomial may be calculated as a code statement of the determination value.

前記第2記憶部は、前記一部の定数についてのみ、前記第2多項式の係数を記憶してもよい。 The second storage unit may store the coefficients of the second polynomial only for some of the constants.

前記第2記憶部は、前記第2変数が取り得る値の空間に応じた次数で前記第2多項式を定義し、前記秘匿冪乗演算部は、前記第2暗号文の冪乗を、前記第1暗号文の冪乗よりも低い前記次数まで計算してもよい。 The second storage unit defines the second polynomial with an order corresponding to a space of values that the second variable can take, and the concealed exponentiation calculation unit determines the exponentiation of the second ciphertext. 1 The order may be calculated to be lower than the power of the ciphertext.

前記2変数関数は、前記第1変数を被除数、前記第2変数を除数とする除算であってもよい。 The two-variable function may be a division in which the first variable is a divisor and the second variable is a divisor.

本発明に係る秘匿計算方法は、平文の空間内で、第1変数及び第2変数を入力とする2変数関数における前記第2変数を前記空間内の定数に固定したときの、前記第1変数に応じた関数値を多項式補間により定義した第1多項式の係数を、前記定数それぞれについて記憶する第1記憶ステップと、前記第1変数の値及び前記第2変数の値をそれぞれ準同型暗号方式により暗号化した、第1暗号文及び第2暗号文の入力を受け付ける入力ステップと、前記準同型暗号方式による暗号文の空間内で、前記第1暗号文の冪乗を計算する秘匿冪乗演算ステップと、前記第2変数を前記定数のいずれかに固定し、前記第1多項式の係数と前記第1暗号文の冪乗との内積により、前記第1多項式の値を算出する秘匿関数演算ステップと、前記第2暗号文の暗号化前の平文と前記定数とが異なる場合に0となる判定値を暗号文で算出する秘匿等号演算ステップと、前記第2変数が取り得る前記空間内の一部の定数毎の前記秘匿関数演算ステップにおける算出結果、及び前記秘匿等号演算ステップにおける算出結果の積を総和することにより、前記第1暗号文及び前記第2暗号文を入力とした前記2変数関数の値を出力する出力ステップと、をコンピュータが実行する。 The secret calculation method according to the present invention is the first variable when the second variable in a two-variable function having the first variable and the second variable as inputs is fixed to a constant in the space in a plain text space. The first storage step in which the coefficient of the first polymorphic code in which the function value corresponding to the above is defined by polymorphic interpolation is stored for each of the constants, and the value of the first variable and the value of the second variable are stored by a quasi-isomorphic encryption method, respectively. An input step that accepts the input of the first encrypted text and the second cipher, and a secret power calculation step that calculates the power of the first cipher in the space of the cipher by the quasi-same cryptographic method. And a secret function calculation step in which the second variable is fixed to one of the constants and the value of the first polypoly is calculated by the internal product of the coefficient of the first polypoly and the cube of the first cipher. , A secret equalization calculation step for calculating a determination value that becomes 0 when the plain text before encryption of the second encrypted text and the constant are different from each other, and one in the space that the second variable can take. By summing up the product of the calculation result in the concealment function calculation step and the calculation result in the concealment equivalence calculation step for each constant of the unit, the first cipher sentence and the second cipher sentence are input to the two variables. The computer performs an output step that outputs the value of the function.

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

本発明によれば、2変数関数の秘匿計算を汎用的に、かつ、高速に行える。 According to the present invention, the concealment calculation of a two-variable function can be performed universally and at high speed.

実施形態に係る秘匿計算装置の機能構成を示すブロック図である。It is a block diagram which shows the functional structure of the concealment calculation apparatus which concerns on embodiment. 実施形態に係る秘匿冪乗演算のアルゴリズムを例示するフローチャートである。It is a flowchart which illustrates the algorithm of the secret exponentiation operation which concerns on embodiment. 実施形態に係る秘匿定数等号演算を実行する前の事前計算アルゴリズムを例示するフローチャートである。It is a flowchart which illustrates the pre-calculation algorithm before executing the concealment constant equal sign operation which concerns on embodiment. 実施形態に係る秘匿定数等号演算のアルゴリズムを例示するフローチャートである。It is a flowchart which illustrates the algorithm of the concealment constant equal sign operation which concerns on embodiment. 実施形態に係る秘匿定数関数演算を実行する前の事前計算アルゴリズムを例示するフローチャートである。It is a flowchart which illustrates the pre-calculation algorithm before executing the concealment constant function operation which concerns on embodiment. 実施形態に係る秘匿定数関数演算のアルゴリズムを例示するフローチャートである。It is a flowchart which illustrates the algorithm of the concealment constant function operation which concerns on embodiment. 実施形態に係る秘匿2変数関数演算のアルゴリズムを示す図である。It is a figure which shows the algorithm of the secret two-variable function operation which concerns on embodiment. 実施形態に係る秘匿2変数関数演算を秘匿除算演算に適用した場合の実行速度を、制限の有無で比較した実験結果を示す図である。It is a figure which shows the experimental result which compared the execution speed when the secret two-variable function operation which concerns on embodiment is applied to a secret division operation, with or without limitation. 実施形態に係る部分集合による制限を設けない場合の、準同型乗算の深さと準同型演算の呼び出し回数とを示す図である。It is a figure which shows the depth of the homomorphic multiplication and the number of calls of the homomorphic operation when the limitation by the subset which concerns on embodiment is not provided. 実施形態に係る部分集合による制限を設けた場合の、準同型乗算の深さと準同型演算の呼び出し回数とを示す図である。It is a figure which shows the depth of the homomorphic multiplication and the number of calls of the homomorphic operation when the limitation by the subset which concerns on embodiment is provided.

以下、本発明の実施形態の一例について説明する。
図1は、本実施形態に係る秘匿計算装置1の機能構成を示すブロック図である。
秘匿計算装置1は、サーバ装置又はパーソナルコンピュータ等の情報処理装置(コンピュータ)であり、制御部10及び記憶部20の他、各種データの入出力デバイス及び通信デバイス等を備える。
Hereinafter, an example of the embodiment of the present invention will be described.
FIG. 1 is a block diagram showing a functional configuration of the secret calculation device 1 according to the present embodiment.
The secret calculation 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, as well as various data input / output devices and communication devices.

制御部10は、秘匿計算装置1の全体を制御する部分であり、記憶部20に記憶された各種プログラムを適宜読み出して実行することにより、本実施形態における各機能を実現する。制御部10は、CPUであってよい。 The control unit 10 is a part that controls the entire secret calculation device 1, and realizes each function in the present embodiment by appropriately reading and executing various programs stored in the storage unit 20. 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 making the hardware group function as the secret calculation device 1, and may be a ROM, RAM, flash memory, hard disk (HDD), or the like. Specifically, the storage unit 20 stores a program (confidential calculation program) for causing the control unit 10 to execute each function of the present embodiment and data in the middle of execution.

さらに、記憶部20は、素数pを法とする平文の空間Z内で、第1変数及び第2変数を入力とする2変数関数gにおける第2変数を定数に固定したときの、第1変数に応じた関数値を多項式補間により定義した第1多項式の係数ベクトルを、定数それぞれについて記憶する。
本実施形態では、第2変数(例えば、除算における割る数)の空間は、Zの部分集合に限定される。したがって、この部分集合が予め固定されている場合には、定数毎の第1多項式の係数ベクトルは、Z内の一部の定数についてのみ記憶されてもよい。なお、計算の度に部分集合が変更される場合には、係数ベクトルは、Z内の全ての定数について記憶される。
Further, the storage unit 20 is the first when the second variable in the two-variable function g having the first variable and the second variable as inputs is fixed to a constant in the space Zp of the plain sentence modulo the prime number p. The coefficient vector of the first polynomial in which the function value corresponding to the variable is defined by polynomial interpolation is stored for each constant.
In this embodiment, the space of the second variable (eg, the number to divide in division) is limited to a subset of Z p . Therefore, if this subset is fixed in advance, the coefficient vector of the first polynomial for each constant may be stored only for some constants in Zp . If the subset is changed each time the calculation is performed, the coefficient vector is stored for all the constants in Zp .

また、記憶部20は、平文の空間Z内で、ある変数が定数と等しい場合に1となり、異なる場合に0となる関数を多項式補間により定義した第2多項式の係数ベクトルを、定数それぞれについて記憶する。
本実施形態では、この関数の入力となる第2変数の空間は、Zの部分集合に限定される。したがって、この部分集合が予め固定されている場合には、定数毎の第2多項式の係数ベクトルは、Z内の一部の定数についてのみ記憶されてもよく、さらに、第2多項式は、第1多項式に比べて、部分集合の大きさに応じた次数に低減されてもよい。なお、計算の度に部分集合が変更される場合には、係数ベクトルは、Z内の全ての定数について記憶され、第2多項式の次数は、第1多項式の次数と同じくp-1となる。
Further, the storage unit 20 sets the coefficient vector of the second polynomial, which defines a function that becomes 1 when a variable is equal to a constant and 0 when it is different, by polynomial interpolation in the space Zp of the plain text for each constant. Remember.
In this embodiment, the space of the second variable that is the input of this function is limited to the subset of Zp . Therefore, if this subset is fixed in advance, the coefficient vector of the second polynomial for each constant may be stored only for some constants in Zp , and the second polynomial is the second polynomial. Compared with one polynomial, the degree may be reduced according to the size of the subset. When the subset is changed every time the calculation is performed, the coefficient vector is stored for all the constants in Zp , and the degree of the second polynomial is p-1 like the degree of the first polynomial. ..

制御部10は、入力部11と、秘匿冪乗演算部12と、秘匿関数演算部13と、秘匿等号演算部14と、出力部15とを備える。 The control unit 10 includes an input unit 11, a concealed exponentiation calculation unit 12, a concealment function calculation unit 13, a concealment equal sign calculation unit 14, and an output unit 15.

入力部11は、2変数関数gにおける第1変数の値a及び第2変数の値bをそれぞれ準同型暗号方式により暗号化した、第1暗号文C及び第2暗号文Cの入力を受け付ける。 The input unit 11 inputs the input of the first ciphertext C a and the second ciphertext C b in which the value a of the first variable and the value b of the second variable in the two-variable function g are encrypted by the homomorphic encryption method, respectively. accept.

秘匿冪乗演算部12は、準同型暗号方式による暗号文の空間内で、第1暗号文Cの冪乗列ベクトル(C,C ,C ,・・・,C p-1)、及び第2暗号文Cの冪乗列ベクトル(C,C ,C ,・・・,C |S|-1)を計算する。なお、|S|は、第2変数の取り得る値からなる集合Sの大きさであり、|S|<pとする。 The concealed exponentiation calculation unit 12 is a exponentiation vector of the first exponentiation C a (C a , C a 2 , C a 3 , ..., C a p -1 ) and the exponentiation vector (C b , C b 2 , C b 3 , ..., C b | S | -1 ) of the second cipher sentence C b are calculated. Note that | S | is the size of the set S consisting of possible values of the second variable, and | S | <p.

秘匿関数演算部13は、第2変数を定数のいずれかに固定し、記憶部20に予め記憶された第1多項式の係数ベクトルと、第1暗号文Cの冪乗を並べたベクトルとの内積により、第1多項式の値を算出する。 The secret function calculation unit 13 fixes the second variable to one of the constants, and the coefficient vector of the first polynomial stored in advance in the storage unit 20 and the vector in which the power of the first code sentence Ca is arranged. The value of the first polynomial is calculated from the inner product.

秘匿等号演算部14は、第2暗号文Cの暗号化前の平文bと定数とが異なる場合に0となる判定値を暗号文で算出する。
具体的には、秘匿等号演算部14は、記憶部20に予め記憶された第2多項式の係数ベクトルと、第2暗号文Cの冪乗を並べたベクトルとの内積により、第2多項式の値を、判定値の暗号文として算出する。
The secret equal sign calculation unit 14 calculates a determination value of 0 in the ciphertext when the plaintext b before encryption and the constant of the second ciphertext C b are different.
Specifically, the concealment equality arithmetic unit 14 is a second polynomial based on the inner product of the coefficient vector of the second polynomial stored in advance in the storage unit 20 and the vector obtained by arranging the powers of the second ciphertext C b . The value of is calculated as a ciphertext of the determination value.

出力部15は、Zの部分空間である第2変数が取り得る値の集合Sに含まれる定数毎の、秘匿関数演算部13による算出結果、及び秘匿等号演算部14による算出結果の積を総和することにより、第1暗号C文及び第2暗号文Cを入力とした2変数関数の値g(C,C)を出力する。 The output unit 15 is a product of the calculation result by the concealment function calculation unit 13 and the calculation result by the concealment equality calculation unit 14 for each constant included in the set S of the values that the second variable, which is a subspace of Z p , can take. By summing up, the value g (C a , C b ) of the two-variable function with the first code C a statement and the second code C b as inputs is output.

以下、任意の2変数関数に適用できる、integer-wiseの秘匿計算方法の手順を詳述する。
ここで、pを素数、平文の空間をZ、暗号文の空間を多項式環Rとする。また、平文a,b∈Zを完全準同型暗号方式により暗号化した暗号文をC,Cとする。
Hereinafter, the procedure of the integer-wise concealment calculation method applicable to any two-variable function will be described in detail.
Here, p is a prime number, plaintext space is Zp , and ciphertext space is polynomial ring Rp . Further, let C a and C b be ciphertexts in which plaintexts a and b ∈ Z p are encrypted by a completely homomorphic encryption method.

図2は、本実施形態に係る秘匿2変数関数演算アルゴリズムを構成するサブモジュールの1つである秘匿冪乗演算Pows(C,p)のアルゴリズムを例示するフローチャートである。 FIG. 2 is a flowchart illustrating an algorithm of secret power operation Powers (Ca, p), which is one of the submodules constituting the secret two-variable function calculation algorithm according to the present embodiment.

秘匿冪乗演算Pows(C,p)は、秘匿冪乗演算部12により実行され、第1変数aの暗号文C、及び平文の空間の大きさ(法)pを引数とし、C及びCそれぞれの冪乗を、暗号文同士の乗算を用いて計算し、冪乗列ベクトルC pow:=(C,C ,C ,・・・,C p-1)及びC pow:=(C,C ,C ,・・・,C l-1)を返す。 The concealed exponentiation operation Powers (C a , p) is executed by the concealed exponentiation arithmetic unit 12, with the cipher statement C a of the first variable a and the size (method) p of the plain sentence as arguments, and C a . The powers of each of the powers and C b are calculated using the multiplication of the ciphers, and the power sequence vector C a power : = (C a , C a 2 , C a 3 , ..., C a p-1 ). ) And C b power : = (C a , C a 2 , C a 3 , ..., C a l-1 ) are returned.

ステップS1において、秘匿冪乗演算部12は、log pを超えない最大の整数lを算出する。
ステップS2において、秘匿冪乗演算部12は、インデックスiを0からl-1までインクリメントしながら、ループ処理を行う。
ステップS3において、秘匿冪乗演算部12は、インデックスjを1から2までインクリメントしながら、ループ処理を行う。
In step S1, the concealed exponentiation calculation unit 12 calculates the maximum integer l that does not exceed log p.
In step S2, the concealed exponentiation calculation unit 12 performs loop processing while incrementing the index i from 0 to l-1.
In step S3, the concealed exponentiation calculation unit 12 performs loop processing while incrementing the index j from 1 to 2i.

ステップS4において、秘匿冪乗演算部12は、暗号文Cの(2+j)乗を、Cの2乗とCのj乗との準同型乗算(FHE.Mult)により算出する。
この処理が繰り返されることにより、Cの2乗から2乗までが算出される。
In step S4, the concealed power calculation unit 12 calculates the (2i + j ) power of the ciphertext Ca by homomorphic multiplication ( FHE.Mult ) of the 2i power of C and the j power of Ca. ..
By repeating this process, Ca is calculated from the square to the square of 2 l .

ステップS5において、秘匿冪乗演算部12は、2がp-1より小さいか否かを判定する。この判定がYESの場合、処理はステップS6に移り、判定がNOの場合、処理はステップS8に移る。 In step S5, the concealed exponentiation calculation unit 12 determines whether or not 2 l is smaller than p-1. If this determination is YES, the process proceeds to step S6, and if the determination is NO, the process proceeds to step S8.

ステップS6において、秘匿冪乗演算部12は、インデックスjを1からp-1-2までインクリメントしながら、ループ処理を行う。
ステップS7において、秘匿冪乗演算部12は、暗号文Cの(2+j)乗を、Cの2乗とCのj乗との準同型乗算(FHE.Mult)により算出する。
この処理が繰り返されることにより、Cの(2+1)乗から(p-1)乗までが算出される。
In step S6, the concealed exponentiation calculation unit 12 performs loop processing while incrementing the index j from 1 to p-1-2 l .
In step S7, the concealed power calculation unit 12 calculates the (2 l + j) power of the ciphertext Ca by homomorphic multiplication ( FHE . Multi) of the 2 l power of Ca and the j power of Ca. ..
By repeating this process, Ca is calculated from the (2 l + 1) power to the (p-1) power.

ステップS8において、秘匿冪乗演算部12は、暗号文暗号文Cの冪乗列ベクトル(C,C ,C ,・・・,C p-1)を出力する。 In step S8, the concealed exponentiation calculation unit 12 outputs the exponentiation vector of the ciphertext C a (C a , C a 2 , C a 3 , ..., C a p-1 ).

本アルゴリズムにおいて、乗算の深さはO(log(p))に抑えられる。例えば、p=17の場合、C =C×C,C =C ×C ,C =C ×C ,C 16=C ×C のように計算でき、乗算の深さは、log(16)=4である。 In this algorithm, the depth of multiplication is suppressed to O (log (p)). For example, when p = 17, C a 2 = C a x C a , C a 4 = C a 2 x C a 2 , C a 8 = C a 4 x C a 4 and C a 16 = C a 8 x It can be calculated as C a8, and the depth of multiplication is log (16) = 4 .

図3は、本実施形態に係る秘匿2変数関数演算アルゴリズムを構成するサブモジュールの1つである秘匿定数等号演算ConstEq(C pow,y)を実行する前の事前計算アルゴリズムを例示するフローチャートである。 FIG. 3 is a flowchart illustrating a pre-calculation algorithm before executing ConstEq ( Capow , y), which is one of the submodules constituting the concealed two-variable function calculation algorithm according to the present embodiment. Is.

ステップS11において、秘匿等号演算部14は、定数yとの等号演算の1変数関数g(x)=1(x=yのとき),0(x≠yのとき)を定義し、全てのx,y∈Zについて、データ点g(x)を取得する。 In step S11, the concealment equal sign calculation unit 14 defines a one-variable function gy (x) = 1 (when x = y ) and 0 (when x ≠ y) of the equal sign operation with the constant y. Get the data point gy (x) for all x, y ∈ Z p .

ステップS12において、秘匿等号演算部14は、インデックスiを0からp-1までインクリメントしながら、ループ処理を行う。
ステップS13において、秘匿等号演算部14は、多項式補間により、全てのx∈Zに対してf(x)=g(x)を満たす多項式f(x):Z→Zの係数ベクトルafi ConstEqを求める。
この処理が繰り返されることにより、全てのy∈Zに対して、多項式f(x)の係数ベクトルafy ConstEqが求まる。
In step S12, the secret equal sign calculation unit 14 performs loop processing while incrementing the index i from 0 to p-1.
In step S13, the concealment equal sign arithmetic unit 14 performs polynomial equi (x): Z p → Z p that satisfies fi (x) = g i ( x ) for all x ∈ Z p by polynomial interpolation. The coefficient vector a fi ConstEq of is obtained.
By repeating this process, the coefficient vector a fyConstEq of the polynomial f y (x) can be obtained for all y ∈ Z p .

ステップS14において、秘匿等号演算部14は、全てのy∈Zに対する係数ベクトルafy ConstEqを、定数行列として記憶部20(第2記憶部)に保存する。 In step S14, the concealment equal sign calculation unit 14 stores the coefficient vector a fyConstEq for all y Z p in the storage unit 20 (second storage unit) as a constant matrix.

本アルゴリズムにおいて、仮に、p=17、第2引数の候補集合S={2,3,5}の場合、例えばy=2∈Sについて、秘匿等号演算部14は、データ点群(2,1),(3,0),(5,0)を取得し、多項式補間により、(log p)-1=3次の多項式f(x)を求める。秘匿等号演算部14は、y=3,5∈Sについても同様に多項式補間を行い、それぞれの係数ベクトルを保存する。 In this algorithm, if p = 17 and the candidate set S = {2,3,5} of the second argument, for example, for y = 2 ∈ S, the concealment equality arithmetic unit 14 is a data point group (2, 1), (3,0), (5,0) are acquired, and (log p) -1 = third-order polynomial f y (x) is obtained by polynomial interpolation. The concealment equal sign arithmetic unit 14 performs polynomial interpolation in the same manner for y = 3,5 ∈ S, and stores each coefficient vector.

図4は、本実施形態に係る秘匿2変数関数演算アルゴリズムを構成するサブモジュールの1つである秘匿定数等号演算ConstEq(C pow,y)のアルゴリズムを例示するフローチャートである。 FIG. 4 is a flowchart illustrating an algorithm of the secret constant equal sign operation ConstEq ( Capow , y), which is one of the submodules constituting the secret two-variable function calculation algorithm according to the present embodiment.

秘匿定数等号演算ConstEq(C pow,y)は、秘匿等号演算部14により実行され、第1変数aの暗号文Cの冪乗列ベクトルC pow、及び定数の平文yを引数とし、条件式(a=y)の値(例えば、TRUE=1、FALSE=0)の暗号文であるC(a=y)を返す。 The concealed constant equality calculation ConstEq (C a power, y) is executed by the concealed equality arithmetic unit 14, and the argument is the ciphertext vector C a pow of the ciphertext C a of the first variable a and the plain sentence y of the constant. And returns C (a = y) which is a ciphertext of the value of the conditional expression (a = y) (for example, TRUE = 1, FALSE = 0).

ステップS21において、秘匿等号演算部14は、引数である定数yに対応する係数ベクトルafy ConstEqを、事前計算により保存されている定数行列から取得する。 In step S21, the concealment equal sign calculation unit 14 acquires the coefficient vector afyConstEq corresponding to the constant y as an argument from the constant matrix stored by the pre-calculation.

ステップS22において、秘匿等号演算部14は、条件式(a=y)の暗号文C(a=y)を、次のように、係数ベクトルと暗号文aの冪乗列ベクトルとの内積により計算し出力する。
(a=y)=f(C
=(afy ConstEq・C pow mod p
In step S22, the concealment equal sign calculation unit 14 uses the ciphertext C (a = y) of the conditional expression (a = y) by the inner product of the coefficient vector and the power sequence vector of the ciphertext a as follows. Calculate and output.
C (a = y) = f y (C a )
= (A fyConstEq ) TC a power modd p

図5は、本実施形態に係る秘匿2変数関数演算アルゴリズムを構成するサブモジュールである秘匿定数関数演算ConstFunc(C pow,y)を実行する前の事前計算アルゴリズムを例示するフローチャートである。 FIG. 5 is a flowchart illustrating a pre-calculation algorithm before executing the concealed constant function operation ConstFunc (C a power, y), which is a submodule constituting the concealed two-variable function operation algorithm according to the present embodiment.

ステップS31において、秘匿関数演算部13は、予め定められた2変数関数g(x,y):Z×Z→Zに対して、yを定数とした1変数関数g(x)=g(x,y)を定義し、全てのx,y∈Zについて、データ点g(x)を取得する。 In step S31, the concealment function calculation unit 13 has a one-variable function gy (x) with y as a constant for a predetermined two-variable function g (x, y ): Z p × Z p → Z p . = G (x, y ) is defined, and the data point gy (x) is acquired for all x, y ∈ Z p .

ステップS32において、秘匿関数演算部13は、インデックスiを0からp-1までインクリメントしながら、ループ処理を行う。
ステップS33において、秘匿関数演算部13は、多項式補間により、全てのx∈Zに対してf(x)=g(x)を満たす多項式f(x):Z→Zの係数ベクトルafi ConstFuncを求める。
この処理が繰り返されることにより、全てのy∈Zに対して、多項式f(x)の係数ベクトルafy ConstFuncが求まる。
In step S32, the secret function calculation unit 13 performs loop processing while incrementing the index i from 0 to p-1.
In step S33, the concealment function arithmetic unit 13 uses polynomial interpolation to satisfy the polynomial fi (x) = g i ( x ) for all x Z p . Find the coefficient vector a fi ConstFunc .
By repeating this process, the coefficient vector a fyConstFunc of the polynomial f y (x) can be obtained for all y ∈ Z p .

ステップS34において、秘匿関数演算部13は、全てのy∈Zに対する係数ベクトルafy ConstFuncを、定数行列として記憶部20(第1記憶部)に保存する。 In step S34, the concealment function calculation unit 13 stores the coefficient vector a fyConstFunc for all y Z p in the storage unit 20 (first storage unit) as a constant matrix.

本アルゴリズムにおいて、f(0)=g(0,y),f(1)=g(1,y),・・・,f(p-1)=g(p-1,y)が与えられると、f(x)が多項式補間により、「f(x)=a{1,y}・x+a{2,y}・x+・・・+a{p-1,y}・xp-1 mod p」と求められる。これにより、係数ベクトル(a{1,y},a{2,y},・・・,a{p-1,y})がy(0≦y<p)と対応付けて記憶される。
仮に、p=17、第2引数の候補集合S={2,3,5}の場合、例えばy=2∈Sについて、秘匿等号演算部14は、{0,1,・・・,16}割る2のデータ点群(0,0),(1,0),(2,1),・・・,(16,8)を取得し、多項式補間により、p-1=16次の多項式f(x)を求める。秘匿等号演算部14は、y=3,5∈Sについても同様に多項式補間を行い、それぞれの係数ベクトルを保存する。
In this algorithm, f y (0) = g (0, y), f y (1) = g (1, y), ..., f y (p-1) = g (p-1, y). When is given, f y (x) is polynomial interpolated to " fy (x) = a {1, y} · x + a {2, y} · x 2 + ... + a {p-1, y}. -X p-1 mod p "is obtained. As a result, the coefficient vector (a {1, y} , a {2, y} , ..., a {p-1, y} ) is stored in association with y (0 ≦ y <p).
Assuming that p = 17, the candidate set S of the second argument S = {2,3,5}, for example, for y = 2 ∈ S, the concealment equal number arithmetic unit 14 is {0,1, ..., 16 } Divide 2 data point groups (0,0), (1,0), (2,1), ..., (16,8) are acquired, and p-1 = 16th-order polynomial by polynomial interpolation. Find f y (x). The concealment equal sign arithmetic unit 14 performs polynomial interpolation in the same manner for y = 3,5 ∈ S, and stores each coefficient vector.

図6は、本実施形態に係る秘匿2変数関数演算アルゴリズムを構成するサブモジュールである秘匿定数関数演算ConstFunc(C pow,y)のアルゴリズムを例示するフローチャートである。 FIG. 6 is a flowchart illustrating the algorithm of the secret constant function calculation ConstFunc (C a power, y), which is a submodule constituting the secret two-variable function calculation algorithm according to the present embodiment.

秘匿定数関数演算ConstFunc(C pow,y)は、秘匿関数演算部13により実行され、第1変数aの暗号文Cの冪乗列ベクトルC pow、及び定数の平文yを引数とし、2変数関数の第2変数をyに固定した1変数関数g(a,y)の暗号文であるC(a,y)=g(C,y)を返す。 The concealed constant function operation ConstFunc (C a power, y) is executed by the concealed function calculation unit 13, and takes as arguments the quadrature column vector C a pow of the cryptographic sentence C a of the first variable a and the plain sentence y of the constant. Returns C (a, y) = g (C a , y), which is a code statement of the one-variable function g (a, y) in which the second variable of the two-variable function is fixed to y.

ステップS41において、秘匿関数演算部13は、引数である定数yに対応する係数ベクトルafy ConstFuncを、事前計算により保存されている定数行列から取得する。 In step S41, the concealment function calculation unit 13 acquires the coefficient vector a fyConstFunc corresponding to the constant y as an argument from the constant matrix stored by the pre-calculation.

ステップS42において、秘匿関数演算部13は、g(a,y)の暗号文Cg(a,y)を、次のように、係数ベクトルと暗号文aの冪乗列ベクトルとの内積により計算し出力する。
g(a,y)=f(C
=(afy ConstFunc・C pow mod p
In step S42, the secret function calculation unit 13 calculates the ciphertext C g (a, y) of g (a, y) by the inner product of the coefficient vector and the power sequence vector of the ciphertext a as follows. And output.
C g (a, y) = f y (C a )
= (A fyConstFunc ) T・ C a power mod p

図7は、本実施形態に係る秘匿2変数関数演算Func(C,C,S)のアルゴリズムを示す図である。 FIG. 7 is a diagram showing an algorithm of the secret two-variable function operation Func (C a , C b , S) according to the present embodiment.

秘匿2変数関数演算Func(C,C,S)は、第1変数aの暗号文C、第2変数bの暗号文C、及び第2変数bの取り得る値の集合Sを引数とし、g(a,b)の暗号文であるCg(a,b)=g(C,C)を返す。
秘匿2変数関数演算Func(C,C,S)は、前述の3つのサブモジュールPows、ConstFunc、ConstEqを用いて構成される。
The secret two-variable function operation Func (C a , C b , S) sets the cipher statement C a of the first variable a, the cipher statement C b of the second variable b , and the set S of possible values of the second variable b. As an argument, C g (a, b) = g (C a , C b ), which is a cipher statement of g (a, b), is returned.
The concealed two-variable function operation Func (C a , C b , S) is configured by using the above-mentioned three submodules Powers, ConstFunk, and ConstEq.

ステップS51において、制御部10は、内部変数Csumを0に初期化する。
ステップS52において、制御部10(秘匿冪乗演算部12)は、Pows(C,p)により、引数のCについて、1~p-1を冪指数とする冪乗値からなる冪乗列ベクトルC powを算出する。
ステップS53において、制御部10(秘匿冪乗演算部12)は、Pows(C,|S|)により、引数のCについて、1~|S|-1を冪指数とする冪乗値からなる冪乗列ベクトルC powを算出する。
In step S51, the control unit 10 initializes the internal variable C sum to 0.
In step S52, the control unit 10 (confidential exponentiation calculation unit 12) uses Powers (C a , p) to form a power sequence consisting of power values having 1 to p-1 as exponents for the argument Ca. Calculate the vector C a power.
In step S53, the control unit 10 (confidential exponentiation unit 12) uses Powers (C b , | S |) to control the argument C b from a power value having 1 to | S | -1 as an exponent. The exponentiation vector C b power is calculated.

ステップS54において、制御部10は、集合Sの要素iのそれぞれについて、後続のステップS55~S57を繰り返すループ処理を行う。
ステップS55において、制御部10(秘匿関数演算部13)は、iを定数として、Cg(a,i)=g(C,i)=ConstFunc(C pow,i)を計算する。
ステップS56において、制御部10(秘匿等号演算部14)は、iを定数として、C(b=i)=ConstEq(C pow,i)を計算する。
In step S54, the control unit 10 performs a loop process of repeating the subsequent steps S55 to S57 for each of the elements i of the set S.
In step S55, the control unit 10 (confidential function calculation unit 13) calculates C g (a, i) = g (C a , i) = ConstFunc (C a power, i) with i as a constant.
In step S56, the control unit 10 (confidential equal sign calculation unit 14) calculates C (b = i) = ConstEq (C b power, i) with i as a constant.

ステップS57において、制御部10(出力部15)は、Cg(a,i)とC(b=i)との準同型乗算(FHE.Mult)をCsumに足し合わせる。
ここで、Cg(a,i)×C(b=i)は、i=bのときCg(a,b)となり、i≠bのときCとなる。したがって、ループ処理が終了し、Cg(a,i)とC(b=i)との積が総和されると、Csum=Cg(a,b)となる。
ステップS58において、制御部10(出力部15)は、結果として得られたCg(a,b)=Csumを出力する。
In step S57, the control unit 10 (output unit 15) adds the homomorphic multiplication (FHE.Mult) of C g (a, i) and C (b = i) to C sum .
Here, C g (a, i) × C (b = i) becomes C g (a, b) when i = b, and C 0 when i ≠ b. Therefore, when the loop processing is completed and the product of C g (a, i) and C (b = i) is summed, C sum = C g (a, b) .
In step S58, the control unit 10 (output unit 15) outputs the resulting C g (a, b) = C sum .

図8は、本実施形態に係る秘匿2変数関数演算Funcを秘匿除算演算に適用した場合の実行速度を、部分集合Sによる制限の有無で比較した実験結果を示す図である。
ここでは、第2引数(割る数)dの大きさ|S|を、平文空間p=2に対して、lに制限している。
FIG. 8 is a diagram showing experimental results comparing the execution speeds when the secret two-variable function operation Func according to the present embodiment is applied to the secret division operation, with or without restriction by the subset S.
Here, the size | S | of the second argument (divided number) d is limited to l with respect to the plaintext space p = 2 l .

例えば、p=17の場合、制限付きの場合の実行時間は0.87秒となり、制限のない場合の3.15秒に比べて、大幅に短縮された、この他、p=37,67,131,257のいずれの場合についても同様に、実行時間は大幅に短縮された。 For example, when p = 17, the execution time with limitation is 0.87 seconds, which is significantly shorter than 3.15 seconds with no limitation. In addition, p = 37,67, Similarly, in all cases 131 and 257, the execution time was significantly reduced.

図9及び10は、本実施形態に係る秘匿2変数関数演算Func及びサブモジュールにおける準同型乗算の深さ(Depth)と、準同型乗算(FHE.Mult)、(準同型加算FHE.Add)及び準同型定数乗算(FHE.multConst)の呼び出し回数とを示す図である。
ここで、図9は、部分集合Sによる制限を設けない場合を、図10は、部分集合Sによる制限を設けた場合を示している。
9 and 10 show the depth of the homomorphic multiplication in the secret two-variable function operation Func and the submodule according to the present embodiment, and the homomorphic multiplication (FHE.Multi), (homomorphic addition FHE.Add) and. It is a figure which shows the number of calls of a homomorphic constant multiplication (FHE.multConst).
Here, FIG. 9 shows a case where the limitation by the subset S is not provided, and FIG. 10 shows a case where the limitation by the subset S is provided.

部分集合Sの要素数|S|=lとしたとき、lビット長の入力に対する乗算の深さと、準同型演算の呼び出し回数は、制限を設けない場合に比べて削減されている。
この結果、理論的計算量は、O(22l)からO(l2)に削減された。
When the number of elements of the subset S | S | = l, the depth of multiplication for the input of the l-bit length and the number of calls of the homomorphic operation are reduced as compared with the case where no limit is provided.
As a result, the theoretical complexity was reduced from O (22 l ) to O (l 2 l ).

本実施形態によれば、秘匿計算装置1は、任意の2変数関数(例えば、除算、2値比較等)について、第2変数を固定した場合の1変数関数を、多項式補間により表現する。秘匿計算装置1は、この多項式の係数と引数の冪乗とを用いた秘匿定数関数演算ConstFunc、及び秘匿定数等号演算ConstEqにより、任意の2変数関数の秘匿計算を汎用的に実現できる。 According to the present embodiment, the concealment calculation device 1 expresses a one-variable function in the case where the second variable is fixed for any two-variable function (for example, division, binary comparison, etc.) by polynomial interpolation. The concealment calculation device 1 can universally realize the concealment calculation of an arbitrary two-variable function by the concealment constant function operation ConstFunc using the coefficient of this polynomial and the power of the argument, and the concealment constant equal number operation ConstEq.

ここで、秘匿計算装置1は、完全準同型暗号により任意の2変数関数の秘匿計算を実現した。例えば非特許文献5の二者間プロトコルを用いた手法では、ユーザとサーバとの間で少なくともlog lラウンドの通信回数が必要だが、本実施形態の通信回数は1ラウンドのみとなる。
さらに、秘匿計算装置1は、平文の空間Zに対して、第2変数を任意の部分集合Sに制限した。これにより、秘匿計算装置1は、Z全体を対象とする汎用性を維持しつつ、秘匿定数等号演算ConstEq、秘匿定数関数演算ConstFunc、及び処理負荷の大きい準同型乗算の実行回数を削減して高速化を実現した。
また、秘匿計算装置1は、第2変数が取り得る値が部分集合Sの要素のみのため、秘匿定数等号演算ConstEqにおける第2多項式は|S|-1次式となり、計算量を削減できる。
Here, the concealment calculation device 1 realizes concealment calculation of an arbitrary two-variable function by fully homomorphic encryption. For example, in the method using the bilateral protocol of Non-Patent Document 5, at least the number of log rounds of communication between the user and the server is required, but the number of communications of the present embodiment is only one round.
Further, the secret calculation device 1 limits the second variable to an arbitrary subset S with respect to the plaintext space Zp . As a result, the concealment calculation device 1 reduces the number of executions of the concealment constant equal sign operation ConstEq, the concealment constant function operation ConstFunc, and the homomorphic multiplication with a large processing load while maintaining the versatility for the entire Zp . Realized high speed.
Further, in the concealment calculation device 1, since the value that the second variable can take is only the element of the subset S, the second polynomial in the concealment constant equal sign operation ConstEq becomes a | S | -1 linear expression, and the amount of calculation can be reduced. ..

秘匿計算装置1は、秘匿冪乗演算Powsによって、引数である暗号文の冪乗列ベクトルを一度計算すると、このベクトルを再利用することで、暗号文同士の乗算の回数が抑制される。
また、秘匿計算装置1は、秘匿定数等号演算ConstEq及び秘匿定数関数演算ConstFuncにおいて、事前計算によって係数ベクトルを保存しておくことで、再利用を可能にした。さらに、集合Sに含まれる定数についてのみ、秘匿定数等号演算ConstEq及び秘匿定数関数演算ConstFuncにおける係数ベクトルを保存しておくことにより、事前計算の処理負荷を低減できる。
Once the concealment calculation device 1 calculates the exponentiation sequence vector of the ciphertext as an argument by the concealment exponentiation operation Powers, the number of multiplications between the ciphertexts is suppressed by reusing this vector.
Further, the concealment calculation device 1 enables reuse by storing the coefficient vector by pre-calculation in the concealment constant equal sign operation ConstEq and the concealment constant function operation ConstFunc. Further, by storing the coefficient vectors in the concealed constant equal number operation ConstEq and the concealed constant function operation ConstFunc only for the constants included in the set S, the processing load of the pre-calculation can be reduced.

特に、秘匿計算装置1は、integer-wiseの秘匿除算演算を、従来に比べて高速に実現できる。
これにより、秘匿計算装置1は、除算を含む種々の秘匿計算、例えば、秘匿平均値計算又は秘匿機械学習等を高速に実現できる。
In particular, the secret calculation device 1 can realize the secret division calculation of integer-wise at a higher speed than the conventional one.
As a result, the concealment calculation device 1 can realize various concealment calculations including division, for example, concealment average value calculation, concealment machine learning, and the like at high speed.

以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述した実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 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 a list of the most suitable effects resulting from the present invention, and the effects according to the present invention are not limited to those described in the embodiments.

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

1 秘匿計算装置
10 制御部
11 入力部
12 秘匿冪乗演算部
13 秘匿関数演算部
14 秘匿等号演算部
15 出力部
20 記憶部(第1記憶部、第2記憶部)
1 Concealment calculation device 10 Control unit 11 Input unit 12 Concealed exponentiation calculation unit 13 Concealment function calculation unit 14 Concealment equal sign calculation unit 15 Output unit 20 Storage unit (1st storage unit, 2nd storage unit)

Claims (7)

平文の空間内で、第1変数及び第2変数を入力とする2変数関数における前記第2変数を前記空間内の定数に固定したときの、前記第1変数に応じた関数値を多項式補間により定義した第1多項式の係数を、前記定数それぞれについて記憶する第1記憶部と、
前記第2変数が前記定数と等しい場合に1となり、異なる場合に0となる関数を多項式補間により定義した第2多項式の係数を、前記定数それぞれについて記憶する第2記憶部と、
前記第1変数の値及び前記第2変数の値をそれぞれ準同型暗号方式により暗号化した、第1暗号文及び第2暗号文の入力を受け付ける入力部と、
前記準同型暗号方式による暗号文の空間内で、前記第1暗号文及び前記第2暗号文の冪乗を計算する秘匿冪乗演算部と、
前記第2変数を前記定数のいずれかに固定し、前記第1多項式の係数ベクトルと前記第1暗号文の前記第1多項式と同次数までの冪乗を並べたベクトルとの内積により、前記第1多項式の値を算出する秘匿関数演算部と、
前記第2多項式の係数ベクトルと前記第2暗号文の前記第2多項式と同次数までの冪乗を並べたベクトルとの内積により、前記第2多項式の値を、前記第2暗号文の暗号化前の平文と前記定数とが異なる場合に0となる判定値暗号文として算出する秘匿等号演算部と、
前記空間内で前記第2変数が取り得る一部の定数毎に、前記秘匿関数演算部による算出結果、及び前記秘匿等号演算部による算出結果の積を算出し総和することにより、前記第1暗号文及び前記第2暗号文を入力とした前記2変数関数の値を出力する出力部と、を備える秘匿計算装置。
In a plain space, when the second variable in a two-variable function that inputs the first variable and the second variable is fixed to a constant in the space, the function value corresponding to the first variable is calculated by polynomial interpolation. A first storage unit that stores the defined variables of the first polynomial for each of the constants, and
A second storage unit that stores the coefficients of the second polynomial, which defines a function that becomes 1 when the second variable is equal to the constant and 0 when different, by polynomial interpolation, for each of the constants.
An input unit that accepts input of the first ciphertext and the second ciphertext, in which the value of the first variable and the value of the second variable are encrypted by a homomorphic encryption method, respectively.
A concealed exponentiation calculation unit that calculates the exponentiation of the first ciphertext and the second ciphertext within the space of the ciphertext by the homomorphic encryption method.
The second variable is fixed to one of the constants, and the coefficient vector of the first polynomial is the inner product of the first polynomial of the first polynomial and the power of the first polynomial to the same degree as the power of the first polynomial. A secret function calculation unit that calculates the value of one polynomial,
The value of the second polynomial is encrypted by the second ciphertext by the inner product of the coefficient vector of the second polynomial and the vector obtained by arranging the second polynomial of the second ciphertext and the vector obtained by arranging the cubes up to the same order. A secret code calculation unit that calculates as a ciphertext of a judgment value that becomes 0 when the previous plain text and the constant are different,
The first is calculated by calculating and summing the product of the calculation result by the secret function calculation unit and the calculation result by the secret equality calculation unit for each part of the constants that the second variable can take in the space. A concealment calculation device including a ciphertext and an output unit that outputs the value of the two-variable function with the second ciphertext as an input.
前記第1記憶部は、前記一部の定数についてのみ、前記第1多項式の係数を記憶する請求項1に記載の秘匿計算装置。 The concealment calculation device according to claim 1, wherein the first storage unit stores the coefficients of the first polynomial only for a part of the constants. 前記第2記憶部は、前記一部の定数についてのみ、前記第2多項式の係数を記憶する請求項1又は請求項2に記載の秘匿計算装置。 The concealment calculation device according to claim 1 or 2, wherein the second storage unit stores the coefficients of the second polynomial only for a part of the constants. 前記第2記憶部は、前記第2変数が取り得る値の空間に応じた次数で前記第2多項式を定義し、
前記秘匿冪乗演算部は、前記第2暗号文の冪乗を、前記第1暗号文の冪乗よりも低い前記次数まで計算する請求項に記載の秘匿計算装置。
The second storage unit defines the second polynomial with a degree corresponding to the space of values that the second variable can take.
The concealment calculation device according to claim 3 , wherein the concealment power calculation unit calculates the power of the second ciphertext to the order lower than the power of the first ciphertext.
前記2変数関数は、前記第1変数を被除数、前記第2変数を除数とする除算である請求項1から請求項4のいずれかに記載の秘匿計算装置。 The secret calculation device according to any one of claims 1 to 4, wherein the two-variable function is a division having the first variable as a divisor and the second variable as a divisor. 平文の空間内で、第1変数及び第2変数を入力とする2変数関数における前記第2変数を前記空間内の定数に固定したときの、前記第1変数に応じた関数値を多項式補間により定義した第1多項式の係数を、前記定数それぞれについて記憶する第1記憶ステップと、
前記第2変数が前記定数と等しい場合に1となり、異なる場合に0となる関数を多項式補間により定義した第2多項式の係数を、前記定数それぞれについて記憶する第2記憶ステップと、
前記第1変数の値及び前記第2変数の値をそれぞれ準同型暗号方式により暗号化した、第1暗号文及び第2暗号文の入力を受け付ける入力ステップと、
前記準同型暗号方式による暗号文の空間内で、前記第1暗号文及び前記第2暗号文の冪乗を計算する秘匿冪乗演算ステップと、
前記第2変数を前記定数のいずれかに固定し、前記第1多項式の係数ベクトルと前記第1暗号文の前記第1多項式と同次数までの冪乗を並べたベクトルとの内積により、前記第1多項式の値を算出する秘匿関数演算ステップと、
前記第2多項式の係数ベクトルと前記第2暗号文の前記第2多項式と同次数までの冪乗を並べたベクトルとの内積により、前記第2多項式の値を、前記第2暗号文の暗号化前の平文と前記定数とが異なる場合に0となる判定値暗号文として算出する秘匿等号演算ステップと、
前記空間内で前記第2変数が取り得る一部の定数毎に、前記秘匿関数演算ステップにおける算出結果、及び前記秘匿等号演算ステップにおける算出結果の積を算出し総和することにより、前記第1暗号文及び前記第2暗号文を入力とした前記2変数関数の値を出力する出力ステップと、をコンピュータが実行する秘匿計算方法。
In a plain space, when the second variable in a two-variable function that inputs the first variable and the second variable is fixed to a constant in the space, the function value corresponding to the first variable is calculated by polynomial interpolation. A first storage step in which the defined first polynomial coefficients are stored for each of the constants,
A second storage step in which the coefficients of the second polynomial, which defines a function that becomes 1 when the second variable is equal to the constant and 0 when the second variable is different, is stored for each of the constants.
An input step for accepting input of the first ciphertext and the second ciphertext in which the value of the first variable and the value of the second variable are encrypted by a homomorphic encryption method, respectively.
A concealed exponentiation calculation step for calculating the exponentiation of the first ciphertext and the second ciphertext in the ciphertext space by the homomorphic encryption method,
The second variable is fixed to one of the constants, and the coefficient vector of the first polynomial is the inner product of the first polynomial of the first polynomial and the power of the first polynomial to the same degree as the power of the first polynomial. A secret function calculation step that calculates the value of one polynomial, and
The value of the second polynomial is encrypted by the second ciphertext by the inner product of the coefficient vector of the second polynomial and the vector obtained by arranging the second polynomial of the second ciphertext and the vector obtained by arranging the cubes up to the same order. A secret code calculation step calculated as a ciphertext of a judgment value that becomes 0 when the previous plain text and the constant are different, and
The first is calculated by calculating and summing the product of the calculation result in the concealment function calculation step and the calculation result in the concealment equality calculation step for each part of the constants that the second variable can take in the space. A concealed calculation method in which a computer executes an output step of outputting a value of the two-variable function with the code text and the second code text as input.
請求項1から請求項のいずれかに記載の秘匿計算装置としてコンピュータを機能させるための秘匿計算プログラム。 The secret calculation program for operating a computer as the secret calculation device according to any one of claims 1 to 5 .
JP2019061680A 2019-03-27 2019-03-27 Concealment calculation device, concealment calculation method and concealment calculation program Active JP7073295B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019061680A JP7073295B2 (en) 2019-03-27 2019-03-27 Concealment calculation device, concealment calculation method and concealment calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019061680A JP7073295B2 (en) 2019-03-27 2019-03-27 Concealment calculation device, concealment calculation method and concealment calculation program

Publications (2)

Publication Number Publication Date
JP2020160353A JP2020160353A (en) 2020-10-01
JP7073295B2 true JP7073295B2 (en) 2022-05-23

Family

ID=72643204

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019061680A Active JP7073295B2 (en) 2019-03-27 2019-03-27 Concealment calculation device, concealment calculation method and concealment calculation program

Country Status (1)

Country Link
JP (1) JP7073295B2 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009272995A (en) 2008-05-09 2009-11-19 Hitachi Ltd Privacy-preserving scalar product calculation system, privacy-preserving scalar product calculation method, and cryptographic key sharing system
JP2013122707A (en) 2011-12-12 2013-06-20 Fujitsu Ltd Information processing method, program and device
US20140177828A1 (en) 2012-12-21 2014-06-26 Microsoft Corporation Managed secure computations on encrypted data
US20170134157A1 (en) 2015-11-05 2017-05-11 Microsoft Technology Licensing, Llc Homomorphic Encryption with Optimized Encoding
JP2017167531A (en) 2016-03-17 2017-09-21 パロ アルト リサーチ センター インコーポレイテッド Fault-tolerant aggregation of encrypted data in star network
JP2018114855A (en) 2017-01-18 2018-07-26 株式会社ジャロック Foldable transportation dolly
WO2018135563A1 (en) 2017-01-20 2018-07-26 日本電信電話株式会社 Secure computing system, secure computing device, secure computing method, and program
JP6916770B2 (en) 2018-09-27 2021-08-11 Kddi株式会社 Concealment calculation device, concealment calculation method and concealment calculation program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009272995A (en) 2008-05-09 2009-11-19 Hitachi Ltd Privacy-preserving scalar product calculation system, privacy-preserving scalar product calculation method, and cryptographic key sharing system
JP2013122707A (en) 2011-12-12 2013-06-20 Fujitsu Ltd Information processing method, program and device
US20140177828A1 (en) 2012-12-21 2014-06-26 Microsoft Corporation Managed secure computations on encrypted data
US20170134157A1 (en) 2015-11-05 2017-05-11 Microsoft Technology Licensing, Llc Homomorphic Encryption with Optimized Encoding
JP2017167531A (en) 2016-03-17 2017-09-21 パロ アルト リサーチ センター インコーポレイテッド Fault-tolerant aggregation of encrypted data in star network
JP2018114855A (en) 2017-01-18 2018-07-26 株式会社ジャロック Foldable transportation dolly
WO2018135563A1 (en) 2017-01-20 2018-07-26 日本電信電話株式会社 Secure computing system, secure computing device, secure computing method, and program
JP6916770B2 (en) 2018-09-27 2021-08-11 Kddi株式会社 Concealment calculation device, concealment calculation method and concealment calculation program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
安田 雅哉,他,準同型暗号を用いた複数企業間の顧客情報分析,FIT2013 第12回情報科学技術フォーラム 講演論文集 第4分冊,情報処理学会,2013年08月20日,15~22頁
岡田 大樹 ほか,2019年 暗号と情報セキュリティシンポジウム(SCIS2019)予稿集 [USB] 2019年 暗号と情報セキュリティシンポジウム予稿集 Proceedings of 2019 Symposium on Cryptography and Information Security,日本,2019年 暗号と情報セキュリティシンポジウム実行委員会,2019年01月15日,2A2-2,p。1-8
林 卓也,他,効率的な準同型内積演算の一般的構成,2017年 暗号と情報セキュリティシンポジウム(SCIS2017),2017年01月24日,3F2-1,pp.1-8

Also Published As

Publication number Publication date
JP2020160353A (en) 2020-10-01

Similar Documents

Publication Publication Date Title
JP6413743B2 (en) Cryptographic processing apparatus, cryptographic processing method, and cryptographic processing program
Chatterjee et al. Accelerating sorting of fully homomorphic encrypted data
JP6916770B2 (en) Concealment calculation device, concealment calculation method and concealment calculation program
Ghazanfaripour et al. Designing a digital image encryption scheme using chaotic maps with prime modular
JP6044738B2 (en) Information processing apparatus, program, and storage medium
JP7073295B2 (en) Concealment calculation device, concealment calculation method and concealment calculation program
WO2023074133A1 (en) Cryptographic processing device, cryptographic processing method, and cryptographic processing program
Shakhmetova et al. Application of Pseudo-Memory Finite Automata for Information Encryption.
Gouert et al. Optimizing homomorphic encryption parameters for arbitrary applications
Gorbenko et al. Methods of building general parameters and keys for NTRU Prime Ukraine of 5 th–7 th levels of stability. Product form
JP2018092010A (en) Encryption device and encryption method, encryption program, key generation device, key generation method, and key generation program
Hoang A novel structure of fast and efficient multiple image encryption
Qiao Nonlinear dynamics, applications to chaos-based encryption
US20240039693A1 (en) Encryption processing device, encryption processing method, and encryption processing program
JP7187076B1 (en) Cryptographic processing device, cryptographic processing method, and cryptographic processing program
Asante et al. A symmetric, probabilistic, non-circuit based fully homomorphic encryption scheme
JP7261502B2 (en) Cryptographic processing device, cryptographic processing method, and cryptographic processing program
AU2021106274A4 (en) A protocol for assuring data integrity in cloud setting by using a fully homomorphic batch encryption scheme with integer and shorter public key (hbeis)
JP2019040047A (en) Computation system, computation method and computation program
WO2022270080A1 (en) Encryption processing device, encryption processing method, and encryption processing program
US20240039698A1 (en) Encryption processing device and encryption processing method
JP7228287B1 (en) Cryptographic processing device, cryptographic processing method, and cryptographic processing program
Li et al. Full Domain Functional Bootstrapping with Least Significant Bit Encoding
KR20230049575A (en) Device and methof for acceleration of homomorphic arithmetic circuits with multi-input binary logic gates
Eremeev et al. Protective data transformations in ACSs on the basis of a new primitive

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211022

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211202

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220511

R150 Certificate of patent or registration of utility model

Ref document number: 7073295

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150