JP7179788B2 - Secure computing device, secure computing method and secure computing program - Google Patents
Secure computing device, secure computing method and secure computing program Download PDFInfo
- Publication number
- JP7179788B2 JP7179788B2 JP2020007701A JP2020007701A JP7179788B2 JP 7179788 B2 JP7179788 B2 JP 7179788B2 JP 2020007701 A JP2020007701 A JP 2020007701A JP 2020007701 A JP2020007701 A JP 2020007701A JP 7179788 B2 JP7179788 B2 JP 7179788B2
- Authority
- JP
- Japan
- Prior art keywords
- ciphertext
- result
- input
- calculation
- polynomial
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Complex Calculations (AREA)
Description
本発明は、完全準同型暗号上での秘匿演算装置、秘匿演算方法及び秘匿演算プログラムに関する。 The present invention relates to a secure computation device, a secure computation method, and a secure computation program on fully homomorphic encryption.
従来、暗号文上での秘匿演算の手法が様々提案されている。非特許文献1では、完全準同型方式であるTFHEが提案されたが、この方式では、平文はビット値に限られていた。非特許文献2では、整数の平文を扱うことができ(以下、Integer-wiseという)、かつ、完全準同型暗号に必要なブートストラッピングと呼ばれるノイズ除去処理と同時に符号関数を実行する方式が提案されている。
Conventionally, there have been proposed various methods of concealment operations on ciphertexts.
非特許文献2では、TFHEにおいて整数の暗号文を扱うことを可能にしたが、整数の暗号文同士の準同型加算、及び整数の暗号文に対するブートストラッピングと同時の符号関数演算のみが実行可能であり、秘匿演算が可能な演算の種類が不足していた。
In
本発明は、完全準同型暗号方式により、ブートストラッピングと同時に整数と2進数との乗算を実行できる秘匿演算装置、秘匿演算方法及び秘匿演算プログラムを提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a secure computation device, a secure computation method, and a secure computation program capable of executing multiplication of an integer and a binary number at the same time as bootstrapping by fully homomorphic encryption.
本発明に係る秘匿演算装置は、LWE暗号文の秘密鍵を平文とした暗号文であるブートストラッピング・キーを用いた準同型演算により、多項式のLWE暗号文を更新してノイズを初期化する際に、当該多項式の係数に設定されたトーラス上の値を用いて1変数関数の演算結果を出力するブートストラップ処理部と、Bを奇数としたとき、0以上B未満の入力整数に、入力2進数の1又は0を表す値である0又はBを加算した後、前記ブートストラップ処理部に対して、前記1変数関数として恒等写像の演算を設定して、第1演算結果を取得する第1演算部と、前記入力整数に前記第1演算結果を加算した後、前記ブートストラップ処理部に対して、前記1変数関数として、偶数を2分の1にし、奇数xを-(x+B)/2にする演算を設定して、第2演算結果を取得する第2演算部と、前記第2演算結果を、前記入力整数と前記入力2進数との乗算結果として出力する出力部と、を備える。 The secure arithmetic device according to the present invention updates the polynomial LWE ciphertext by homomorphic operation using the bootstrapping key, which is the ciphertext with the secret key of the LWE ciphertext as the plaintext, and initializes the noise. At this time, a bootstrap processing unit that outputs the calculation result of the one-variable function using the values on the torus set for the coefficients of the polynomial, and an input integer of 0 or more and less than B, where B is an odd number, After adding 0 or B, which is a value representing binary 1 or 0, the bootstrap processing unit is set to perform an identity mapping operation as the one-variable function to obtain a first operation result. a first arithmetic unit, after adding the first arithmetic result to the input integer, for the bootstrap processing unit, as the one-variable function, halving an even number and dividing an odd number x by −(x+B); /2 to obtain a second operation result; and an output unit for outputting the second operation result as a multiplication result of the input integer and the input binary number. Prepare.
本発明に係る秘匿演算方法は、LWE暗号文の秘密鍵を平文とした暗号文であるブートストラッピング・キーを用いた準同型演算により、多項式のLWE暗号文を更新してノイズを初期化する際に、当該多項式の係数に設定されたトーラス上の値を用いて1変数関数の演算結果を出力するブートストラップ処理部を備えたコンピュータが、Bを奇数としたとき、0以上B未満の入力整数に、入力2進数の1又は0を表す値である0又はBを加算した後、前記ブートストラップ処理部に対して、前記1変数関数として恒等写像の演算を設定して、第1演算結果を取得する第1演算ステップと、前記入力整数に前記第1演算結果を加算した後、前記ブートストラップ処理部に対して、前記1変数関数として、偶数を2分の1にし、奇数xを-(x+B)/2にする演算を設定して、第2演算結果を取得する第2演算ステップと、前記第2演算結果を、前記入力整数と前記入力2進数との乗算結果として出力する出力ステップと、を実行する。 The confidential operation method according to the present invention updates the polynomial LWE ciphertext by homomorphic operation using the bootstrapping key, which is the ciphertext with the secret key of the LWE ciphertext as the plaintext, and initializes the noise. At that time, a computer equipped with a bootstrap processing unit that outputs the calculation result of the one-variable function using the values on the torus set for the coefficients of the polynomial, when B is an odd number, an input of 0 or more and less than B After adding 0 or B, which is a value representing 1 or 0 of the input binary number, to the integer, the bootstrap processing unit is set to perform an identity mapping operation as the one-variable function, thereby performing a first operation After a first operation step of obtaining a result and adding the first operation result to the input integer, for the bootstrap processing unit, as the one-variable function, even numbers are halved and odd numbers x are a second operation step of setting an operation to -(x+B)/2 to obtain a second operation result; and an output of outputting the second operation result as a multiplication result of the input integer and the input binary number. Execute the step and
本発明に係る秘匿演算プログラムは、前記秘匿演算装置としてコンピュータを機能させるためのものである。 A secure computation program according to the present invention is for causing a computer to function as the secure computation device.
本発明によれば、完全準同型暗号方式により、ブートストラッピングと同時に整数と2進数との乗算が実行される。 According to the present invention, a fully homomorphic encryption scheme performs integer-binary multiplication simultaneously with bootstrapping.
以下、本発明の実施形態の一例について説明する。
本実施形態では、まず、完全準同型暗号で必要なブートストラッピングと同時に実現されるInteger-wiseの任意の1変数関数(写像)の演算方式を説明し、次に、この1変数関数演算を用いて実現される整数と2進数との秘匿乗算の方式を説明する。
An example of an embodiment of the present invention will be described below.
In the present embodiment, first, an operation method of an arbitrary one-variable function (mapping) of integer-wise, which is realized simultaneously with the bootstrapping necessary for fully homomorphic encryption, is explained, and then this one-variable function operation is described. A method of secure multiplication of an integer and a binary number realized by using the method will be described.
完全準同型暗号は、Somewhat型準同型暗号にブートストラッピングを組み合わせて構成される。ここで、Somewhat型準同型暗号とは、演算を重ねることによって暗号文上のノイズが大きくなり、ある程度の大きさになると復号が不可能になる方式である。完全準同型暗号は、Somewhat型準同型暗号にブートストラッピングと呼ばれるノイズ除去処理を行うことで無制限に演算が実行できるようにしたものである。 Fully homomorphic encryption is configured by combining Somewhat-type homomorphic encryption with bootstrapping. Here, Somewhat-type homomorphic encryption is a scheme in which the noise in the ciphertext increases with repeated operations, and when the noise reaches a certain level, decryption becomes impossible. Fully homomorphic encryption is obtained by subjecting Somewhat-type homomorphic encryption to a noise removal process called bootstrapping so that unlimited operations can be executed.
[1変数関数演算]
図1は、本実施形態における秘匿演算装置1のうち、1変数関数演算を実現するための機能構成を示すブロック図である。
秘匿演算装置1は、サーバ装置又はパーソナルコンピュータ等の情報処理装置(コンピュータ)であり、制御部10及び記憶部20の他、各種データの入出力デバイス及び通信デバイス等を備える。
[1-variable function operation]
FIG. 1 is a block diagram showing a functional configuration for realizing a 1-variable function operation in a
The
制御部10は、秘匿演算装置1の全体を制御する部分であり、記憶部20に記憶された各種プログラムを適宜読み出して実行することにより、本実施形態における各機能を実現する。制御部10は、CPUであってよい。
The
記憶部20は、ハードウェア群を秘匿演算装置1として機能させるための各種プログラム(秘匿演算プログラム)、及び各種データ等の記憶領域であり、ROM、RAM、フラッシュメモリ又はハードディスクドライブ(HDD)等であってよい。
The
制御部10は、入力部111と、サンプル変換部112と、多項式定義部113と、多項式更新部114と、定数項抽出部115と、鍵変換部116とを備える。
The
入力部111は、ブートストラッピングを実施する後述のアルゴリズムに対して、任意の1変数関数(写像)を定義するための値、及びこの関数への入力値を、パラメータとして受け付ける。
The
サンプル変換部112は、入力値のトーラス上のLWEサンプルを、整数空間上のサンプルへ変換する。
The
多項式定義部113は、サンプル変換部112により整数空間に割り当てられた入力値に対する関数値のトーラス上の値を、この整数空間の値をマイナスの次数とする項の係数とした多項式(後述のベクトルtestv)を定義する。
The
多項式更新部114は、LWE暗号文の第1の秘密鍵を平文とした暗号文であるブートストラッピング・キーを用いた準同型演算により、多項式のLWE暗号文を更新してノイズを初期化する。
The
定数項抽出部115は、多項式更新部114により更新された多項式の定数項のLWE暗号文を抽出することにより、関数値の第2の秘密鍵によるLWE暗号文を取得する。
The constant
鍵変換部116は、定数項抽出部115により取得した第2の秘密鍵によるLWE暗号文を、第1の秘密鍵によるLWE暗号文に変換する。
The
次に、秘匿演算装置1により実行される秘匿演算方法について、アルゴリズムの詳細を説明する。
Next, the details of the algorithm of the secure computation method executed by the
[定義]
本実施形態の秘匿演算方法における各種の定義は、非特許文献1及び2に従うが、次のように説明を補足する。
長さnのベクトルxのi番目の要素をxiと表記する(x=(x1,…,xn))。
各種の空間等を次のように表記する。
・整数空間:Z,実数空間:R
・トーラスT=R/Z
・多項式:
R[X]: 係数∈Rである、任意次数の多項式の集合
TN[X]:=R[X]/(XN+1): 係数∈TであるN(例えば、1024)次の多項式の集合
また、x←Uχは、集合χから一様にランダムにxをサンプルすることを意味する。
[definition]
Various definitions in the secure computation method of this embodiment conform to
The i-th element of a vector x of length n is denoted by x i (x=(x 1 , . . . , x n )).
Various spaces are described as follows.
・Integer space: Z, real number space: R
・Torus T=R/Z
・Polynomial:
R[X]: set of polynomials of any degree with coefficients εR T N [X]:=R[X]/(X N +1): polynomials of degree N (eg, 1024) with coefficients εT Also, x← U χ means sample x uniformly at random from the set χ.
TLWE暗号及びTGSW暗号は、非特許文献1において定義され、それぞれLWE暗号及びGSW暗号を拡張したものである。
TLWE暗号について、秘密ベクトルs、平文m、ノイズeのLWEサンプル(a,b)∈LWEs(m)は、
For a TLWE cipher, LWE samples (a,b) ∈ LWE s (m) of secret vector s, plaintext m, noise e are
ブートストラッピング・キーBKs→s”,α=(BK1,…,BKn)について、各BKiは、秘密鍵s”による、平文がTLWE暗号文の秘密鍵siのTGSW暗号文である。ここで、TGSW暗号文は、TLWE暗号文と準同型演算が可能であり、
この「秘密鍵の暗号文」BKiを用いることで、暗号文上の準同型演算により復号に当たる演算を行える。これにより、ブートストラッピングでは、入力の平文と同じ平文を持ち、かつ、ノイズの大きさが初期化された暗号文が生成される。
For bootstrapping keys BK s→s", α = ( BK 1 , . be. Here, the TGSW ciphertext can be homomorphically operated with the TLWE ciphertext,
By using this "secret key ciphertext" BK i , it is possible to carry out an operation corresponding to decryption by a homomorphic operation on the ciphertext. As a result, in bootstrapping, a ciphertext having the same plaintext as the input plaintext and with the magnitude of noise initialized is generated.
[平文空間の設定]
前述の非特許文献1の手法では、暗号文の平文空間がビット値に限られていた。本実施形態では、この手法を、非特許文献2のように整数値も扱えるように拡張する。
[Plaintext space settings]
In the method of
Bを自然数とし、min∈{0,…,B-1}を平文とする。このとき、LWE暗号文の構成は次のようになる。
平文minは、暗号文においては、min/2B∈Tの値に変換されている。ここで、ノイズeが、
また、秘密鍵sによる、平文mのLWE暗号文Enc(s,m)=(a,b)を、LWEs(m)とも表記する。
The plaintext min is transformed into the value min/ 2BεT in the ciphertext. Here, the noise e is
Also, the LWE ciphertext Enc(s,m)=(a,b) of the plaintext m with the secret key s is also written as LWE s (m).
[1変数関数アルゴリズム]
図2は、本実施形態における1変数関数の秘匿演算方法を実行するためのアルゴリズムを示す図である。
このアルゴリズムにより、ブートストラッピングと同時に任意の1変数関数f:{0,…,B-1}→{0,…,B-1}が実行される。
[One-variable function algorithm]
FIG. 2 is a diagram showing an algorithm for executing the method of concealment operation of a function of one variable in this embodiment.
This algorithm executes an arbitrary one-variable function f: {0, . . . , B-1}→{0, .
まず、入力部111は、min∈{0,…,B-1}を平文とする、トーラスT=R/Z上のLWEサンプル(a,b)∈LWEs(min)の他、前述のブートストラッピング・キーBKs→s”,α、キースイッチ・キーKSs’→s,γ、及び後述のベクトルtestv∈TN[X]の係数{μ0,…,μN-1}を入力として受け付ける。
First, the
ここで、minの平文空間上で取り得る値の範囲φ(min)に対して、
また、
以下では、eACC=0とする。よって、minの平文空間上で取り得る値の範囲φ(min)は、
In the following, e ACC =0. Therefore, the range of values φ( min ) that can be taken on the plaintext space of min is
min=0のとき、φ(0)=2Neであり、
なお、TN[X]:=R[X]/(XN+1)であり、XN+1≡0、XN≡-1であることから、X-i≡-XN-i、Xi≡-X-(N-i)である。
When m in =0, φ(0)=2Ne, and
Note that T N [X]:=R [X]/(X N +1), and since X N +1 ≡ 0 and X N ≡ -1, X i ≡ -X N-i , X i ≡-X- (Ni) .
min∈{1,…,B-1}のとき、φ(min)=2N(e+min/2B)であり、式(1)から、
なお、min∈{1,…,B-1}に代えて、min∈{-(B-1),…,-1}を入力とする場合には、
図3は、本実施形態における平文空間のスライスを例示する図である。
平文は、最初はトーラスT上の値(0~1の実数)だが、ブートストラッピングのアルゴリズム(図2)中で2N倍され、Z2N上の値となる。図3では、Z2N上での平文空間のスライス(区切り)を示している。
FIG. 3 is a diagram illustrating a slice of plaintext space in this embodiment.
The plaintext is initially a value on the torus T (a real number between 0 and 1), but is multiplied by 2N in the bootstrapping algorithm (Fig. 2) to become a value on Z 2N . FIG. 3 shows a slice of plaintext space on Z 2N .
スライスは、LWE暗号文の持つノイズの取り得る幅であり、この幅が重ならないように定義されることで平文を配置することができる。
ここでは、平文の値の範囲をB=8とした場合を示しており、0~2Nが2B個のスライスに分割されている。
すなわち、各スライスの幅はN/Bであり、例えば、平文「3」は、3N/Bを中心に、±N/2Bの範囲に割り当てられる。
A slice is a possible width of noise in an LWE ciphertext, and the plaintext can be arranged by defining the widths so that they do not overlap.
Here, a case is shown where the range of plaintext values is B=8, and 0 to 2N are divided into 2B slices.
That is, the width of each slice is N/B, and plaintext "3", for example, is assigned to a range of ±N/2B around 3N/B.
図4は、本実施形態における1変数関数の値の設定方法を示す図である。
円周上の位置は、前述のベクトルtestv∈TN[X]におけるマイナスの次数に対応し、各スライスに、写像f(min)が割り当てられる。そして、testvの各次数の係数μi(0≦i≦N-1)∈Tとして、前述のようにf(min)/2Bが予め設定される。
なお、前述のtestvの式変形に見られるように、X-i≡-XN-i、Xi≡-X-(N-i)であることから、円周上の対称位置には反対符号の値が設定される。
FIG. 4 is a diagram showing a method of setting the value of the one-variable function in this embodiment.
The positions on the circle correspond to negative orders in the vector testvεT N [X] above, and each slice is assigned a mapping f(m in ). Then, as the coefficient μ i (0≦i≦N-1)εT of each order of testv, f(m in )/2B is set in advance as described above.
As can be seen in the transformation of the above testv formula, since X −i ≡-X N−i and X i ≡−X −(N−i) , symmetrical positions on the circumference have opposite signs value is set.
図2に戻り、ステップ1において、サンプル変換部112は、トーラスT=R/Z上のLWEサンプル(a,b)∈Tn×Tを2N倍してroundすることにより、整数上のサンプル(a ̄,b ̄)∈Z2N
n×Z2Nへ変換する。
Returning to FIG. 2, in
ステップ2において、多項式定義部113は、多項式testv:=μ0+μ1X-1+…+μN-1X-(N-1)∈TN[X]を定義する。
In
ステップ3において、多項式更新部114は、中間生成物として、多項式Xb ̄・(0,testv)∈TN[X]×TN[X]を暗号化したTLWE暗号文であるACCを算出する。
In
ステップ4~6のループ処理において、多項式更新部114は、準同型演算により多項式のTLWE暗号文ACCを更新する。
ここで、各BKiは、秘密鍵s”による、平文がTLWE暗号文の秘密鍵siのTGSW暗号文である。前述のように、TGSW暗号文は、TLWE暗号文と準同型演算が可能なので、多項式更新部114は、TGSW暗号文とTLWE暗号文であるACCとの準同型演算により、
よって、ループ処理を終えた時点で、ACCは、
where each BK i is a TGSW ciphertext with a secret key s i whose plaintext is a TLWE ciphertext with a secret key s″. Therefore, the
Therefore, when the loop processing ends, ACC
ステップ7において、定数項抽出部115は、多項式のTLWE暗号文ACCから定数項、すなわちtestvの係数として設定されたf(min)/2BのLWE暗号文を抽出する。
In
ステップ8において、鍵変換部116は、キースイッチ・キーKSs’→s,γを用いたKeySwitchの操作により、秘密鍵s’によるLWE暗号文であるuを、秘密鍵sによるLWE暗号文に変換する。
In
図5は、本実施形態における秘匿演算方法に用いる鍵変換処理のアルゴリズムを示す図である。
なお、この鍵変換処理(KeySwitch)は、非特許文献1に示されているものと同一である。
FIG. 5 is a diagram showing an algorithm for key conversion processing used in the encryption calculation method according to this embodiment.
Note that this key conversion process (KeySwitch) is the same as that shown in
このようにして、秘匿演算装置1は、ブートストラッピングと同時に任意の1変数関数fを実行し、入力されたminの暗号文Cm_inに対して、f(min)の暗号文Cf(m_in)を出力する。
In this way, the
[整数と2進数との秘匿乗算]
図6は、本実施形態における秘匿演算装置1の機能構成を示すブロック図である。
制御部10は、前述の入力部111と、サンプル変換部112と、多項式定義部113と、多項式更新部114と、定数項抽出部115と、鍵変換部116とを備えたブートストラップ処理部11に加えて、第1演算部12と、第2演算部13と、出力部14とを備える。
[Anonymous Multiplication of Integers and Binary Numbers]
FIG. 6 is a block diagram showing the functional configuration of the
The
ブートストラップ処理部11は、前述した通り、LWE暗号文の秘密鍵を平文とした暗号文であるブートストラッピング・キーを用いた準同型演算により、多項式のLWE暗号文を更新してノイズを初期化する際に、この多項式の係数に設定されたトーラス上の値を用いて1変数関数の演算結果を出力する。
As described above, the
第1演算部12は、0以上B未満の入力整数に、入力2進数の1又は0を表す0又はB(若しくは-B)を加算した後、ブートストラップ処理部11に対して、1変数関数として、整数をそのまま返す演算を設定して、第1演算結果を取得する。
ここで、平文空間{-(B-1),…,0,…,B-1}を決める整数Bは、奇数とする。
The first
Here, the integer B that determines the plaintext space {−(B−1), . . . , 0, .
第2演算部13は、入力整数に第1演算結果を加算した後、ブートストラップ処理部11に対して、1変数関数として、偶数を2分の1にし、奇数xを-(x+B)/2にする演算を設定して、第2演算結果を取得する。
After adding the first calculation result to the input integer, the
出力部14は、第3演算結果を、入力整数と入力2進数との乗算結果として出力する。
The
図7は、本実施形態における整数と2進数との乗算のアルゴリズムを示す図である。
ここでは、整数mint∈{0,…,B-1}の暗号文Cm_intと、2進数mbin∈{-B,0,B}の暗号文Cm_binとを入力とし、mbin=0のときCm_intが、mbin=-B又はBのときC0が、乗算MultbyBin(Cm_int,Cm_bin)の結果(暗号文Cm_out)として出力される。
なお、mbin=0は、2進数の1(true)を表し、mbin=-B又はBは、2進数の0(false)を表す。
FIG. 7 is a diagram showing an algorithm for multiplication of integers and binary numbers in this embodiment.
Here, a ciphertext C m_int of an
Note that m bin =0 represents binary 1 (true), and m bin =−B or B represents binary 0 (false).
ステップ1において、第1演算部12は、1変数関数fid_int(恒等写像)の実行を伴うブートストラッピングによって、暗号文Ctmp=Bootstrap(Cm_int+Cm_bin,fid_int)を算出する。
In
ここで、fid_int:{0,…,B-1}→{0,…,B-1}、すなわちfid_int(x):=xの演算は、testvの係数μ0,…,μN-1∈Tを、次のように定義することで実現される。
ステップ2において、第2演算部13は、1変数関数fmultbinの実行を伴うブートストラッピングによって、暗号文Cm_out=Bootstrap(Cm_int+Cm_tmp,fmultbin)を算出する。
In
ここで、fmultbinは、
図8は、本実施形態における乗算を構成する各ステップに伴う平文空間上での値の変化を示す図である。
例えば、入力された整数mint=1は、N/Bを含むスライスに割り当てられており、mbin∈{-B,0,B}を加算すると、結果は、mbin=0(true)の場合は同じスライスに、mbin=-B又はB(false)の場合は(N/B)+Nを含むスライスに位置する。この演算結果に対してfid_intの演算を行うブートストラッピングによって、演算結果tmpは、mbin=0の場合はf(1)の結果の位置、すなわちN/Bを含むスライスに、mbin=-B又はBの場合はf(1)の結果のマイナスの位置、すなわち-N/Bを含むスライスに位置する。
FIG. 8 is a diagram showing changes in values on the plaintext space accompanying each step of multiplication in this embodiment.
For example, the input integer m int =1 is assigned to the slice containing N/B, and adding m bin ∈ {−B, 0, B} results in m bin =0 (true). If m bin =−B or B(false), it is located in the slice containing (N/B)+N. By bootstrapping the f id_int operation on this operation result, the operation result tmp is stored at the position of the result of f(1) if m bin =0, that is, in the slice containing N/B, m bin = If -B or B, it is located in the slice containing the minus position of the result of f(1), ie -N/B.
このように、前述のアルゴリズム(図7)のステップ1では、Cm_binが-B又はBの暗号文であった場合、図8のようにCm_intの位相は原点対称の位置に移動し、その後、fid_intの演算を伴うブートストラッピングにより、暗号文の位相はx軸対象の位置に移動する。つまり、Ctmpは、正負が反転し、Ctmp=C-m_intとなる。
また、Cm_binが0の暗号文であった場合、0を足すだけなので、Ctmpは変わらず、Ctmp=Cm_intとなる。
Thus, in
Also, if C m_bin is a ciphertext of 0, since 0 is simply added, C tmp remains unchanged and C tmp =C m_int .
次に、mintにtmpを加算すると、mbin=0の場合は同じ値を足すので2倍され、結果は元の2N/Bを含むスライスに位置する。一方、mbin=-B又はBの場合はプラスとマイナスの同じ値を足すので、結果は0を含むスライスに位置する。この演算結果に対してfmultbinの演算を行うブートストラッピングによって値は半分になり、演算結果moutは、mbin=0の場合はN/Bを含むスライスに、mbin=-B又はBの場合は0を含むスライスに位置する。 Then add tmp to min int , if m bin =0 then add the same value, so doubled and the result is located in the slice containing the original 2N/B. On the other hand, if m bin =−B or B, then add the same positive and negative values, so the result is located in the slice containing 0. The value is halved by bootstrapping the f multbin operation on this operation result, and the operation result m out is the slice containing N/B if m bin =0, m bin =−B or B is located in the slice containing 0.
このように、前述のアルゴリズム(図7)のステップ2では、Cm_binが-B又はBの暗号文であった場合、Cm_int+Ctmp=C0となり、Cm_binが0の暗号文であった場合、Cm_int+Ctmp=Cm_int+Cm_intとなる。
そして、fmultbinの演算を伴うブートストラッピングによって、Cm_int+Cm_intはCm_intへと半分にされ、C0はそのままC0となる。
Thus, in
Then, bootstrapping with the operation of f multbin halves C m_int +C m_int to C m_int and C 0 remains C 0 .
この結果、mbin=0(true)の場合、元のmintが暗号文で出力され、mbin=-B又はB(false)の場合、0が暗号文で出力される。 As a result, when m bin =0 (true), the original m int is output in ciphertext, and when m bin =−B or B (false), 0 is output in ciphertext.
ここで、値を半分にするfmultbinの演算を、B=5の場合を例に説明する。
mintがB/2未満の値、例えばmint=1に対しては、mint+mint=2であるので、「2」のスライスの演算結果を「1」とする。同様に、mint=2に対しては、「4」のスライスの演算結果を「2」とする。
Here, the operation of f multbin that halves the value will be described using the case of B=5 as an example.
For a value of min int less than B/2, for example min int =1, since min int + min int =2, the operation result of the slice of “2” is set to “1”. Similarly, for m int =2, the operation result of the slice of "4" is set to "2".
mintがB/2より大きい値、例えばmint=3に対しては、mint+mint=6であるので、「-1」のスライスの演算結果を「3」とする。これはつまり、「-1」のスライスの原点対称の位置にある「1」のスライスの演算結果を「-3」と設定することと同じである。同様に、mint=4に対しては、「-3」のスライスの演算結果を「4」に、つまり、「3」のスライスの演算結果を「-4」とする。 For a value of min int larger than B/2, for example, min int =3, since min int +min int =6, the operation result of the “−1” slice is set to “3”. In other words, this is the same as setting the operation result of the "1" slice located at the point symmetrical to the "-1" slice to "-3". Similarly, for m int =4, the operation result of the “−3” slice is set to “4”, that is, the operation result of the “3” slice is set to “−4”.
すなわち、1,2,3,4のスライスの演算結果を順に{-3,1,-4,2}とすればよい。これを数式表現すると、前述の式(1)となる。
ここで、Bが奇数であることから、mint+tmpの値は、mintがB/2未満のときB未満の偶数に、mintがB/2より大きいときマイナスの奇数となる。したがって、0~B-1のスライスに対して演算結果を設定することで値を半分にするfmultbinの演算が実現される。
That is, the operation results of
Here, since B is an odd number, the value of min int +tmp is an even number less than B when min int is less than B/2, and a negative odd number when min int is greater than B/2. Therefore, by setting the operation result for
本実施形態によれば、秘匿演算装置1は、ブートストラッピングと同時に1変数関数を実行する処理を用いて、入力整数に入力2進数を加算した後に関数fid_intを実行する第1演算、入力整数に第1演算の結果を加算した後に関数fmultbinを実行する第2演算を順に実行する。
これにより、秘匿演算装置1は、完全準同型暗号方式により、入力整数と入力2進数との乗算をブートストラッピングと同時に実行できる。
According to the present embodiment, the secure
As a result, the secure
また、本発明者は、特願2019-211426号明細書において、1変数関数を実現するブートストラッピング処理を3回実行することで、入力整数と入力2進数との乗算を実現する手法を提案した。
これに対して、本実施形態では、ブートストラッピング処理の回数が2回に削減され、処理効率が向上した。
In addition, in Japanese Patent Application No. 2019-211426, the present inventor proposes a method of realizing multiplication of an input integer and an input binary number by executing bootstrapping processing that realizes a single-variable function three times. did.
On the other hand, in this embodiment, the number of times of bootstrapping processing is reduced to two, and the processing efficiency is improved.
以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述した実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 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による秘匿演算方法は、ソフトウェアにより実現される。ソフトウェアによって実現される場合には、このソフトウェアを構成するプログラムが、情報処理装置(コンピュータ)にインストールされる。また、これらのプログラムは、CD-ROMのようなリムーバブルメディアに記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。さらに、これらのプログラムは、ダウンロードされることなくネットワークを介したWebサービスとしてユーザのコンピュータに提供されてもよい。
The secure computation method by the
1 秘匿演算装置
10 制御部
11 ブートストラップ処理部
12 第1演算部
13 第2演算部
14 出力部
20 記憶部
111 入力部
112 サンプル変換部
113 多項式定義部
114 多項式更新部
115 定数項抽出部
116 鍵変換部
1 secret
Claims (3)
Bを奇数としたとき、0以上B未満の入力整数に、入力2進数の1又は0を表す値である0又はBを加算した後、前記ブートストラップ処理部に対して、前記1変数関数として恒等写像の演算を設定して、第1演算結果を取得する第1演算部と、
前記入力整数に前記第1演算結果を加算した後、前記ブートストラップ処理部に対して、前記1変数関数として、偶数を2分の1にし、奇数xを-(x+B)/2にする演算を設定して、第2演算結果を取得する第2演算部と、
前記第2演算結果を、前記入力整数と前記入力2進数との乗算結果として出力する出力部と、を備える秘匿演算装置。 When updating the LWE ciphertext of the polynomial and initializing the noise by homomorphic operation using the bootstrapping key, which is the ciphertext with the secret key of the LWE ciphertext as the plaintext, set to the coefficient of the polynomial A bootstrap processing unit that outputs the operation result of the one-variable function using the value on the torus obtained;
When B is an odd number, after adding 0 or B, which is a value representing an input binary number of 1 or 0, to an input integer greater than or equal to 0 and less than B, the one-variable function is given to the bootstrap processing unit a first calculation unit that sets an identity map calculation and obtains a first calculation result;
After adding the first operation result to the input integer, the bootstrap processing unit performs an operation to halve an even number and to -(x+B)/2 an odd number x as the one-variable function. a second calculation unit that sets and obtains a second calculation result;
and an output unit that outputs the second operation result as a multiplication result of the input integer and the input binary number.
Bを奇数としたとき、0以上B未満の入力整数に、入力2進数の1又は0を表す値である0又はBを加算した後、前記ブートストラップ処理部に対して、前記1変数関数として恒等写像の演算を設定して、第1演算結果を取得する第1演算ステップと、
前記入力整数に前記第1演算結果を加算した後、前記ブートストラップ処理部に対して、前記1変数関数として、偶数を2分の1にし、奇数xを-(x+B)/2にする演算を設定して、第2演算結果を取得する第2演算ステップと、
前記第2演算結果を、前記入力整数と前記入力2進数との乗算結果として出力する出力ステップと、を実行する秘匿演算方法。 When updating the LWE ciphertext of the polynomial and initializing the noise by homomorphic operation using the bootstrapping key, which is the ciphertext with the secret key of the LWE ciphertext as the plaintext, set to the coefficient of the polynomial A computer equipped with a bootstrap processing unit that outputs the operation result of a one-variable function using the values on the torus obtained,
When B is an odd number, after adding 0 or B, which is a value representing an input binary number of 1 or 0, to an input integer greater than or equal to 0 and less than B, the one-variable function is given to the bootstrap processing unit a first calculation step of setting an identity map calculation and obtaining a first calculation result;
After adding the first operation result to the input integer, the bootstrap processing unit performs an operation to halve an even number and to -(x+B)/2 an odd number x as the one-variable function. a second calculation step of setting and obtaining a second calculation result;
an output step of outputting the result of the second operation as a multiplication result of the input integer and the input binary number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020007701A JP7179788B2 (en) | 2020-01-21 | 2020-01-21 | Secure computing device, secure computing method and secure computing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020007701A JP7179788B2 (en) | 2020-01-21 | 2020-01-21 | Secure computing device, secure computing method and secure computing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021113956A JP2021113956A (en) | 2021-08-05 |
JP7179788B2 true JP7179788B2 (en) | 2022-11-29 |
Family
ID=77076993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020007701A Active JP7179788B2 (en) | 2020-01-21 | 2020-01-21 | Secure computing device, secure computing method and secure computing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7179788B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150312028A1 (en) | 2012-08-28 | 2015-10-29 | Snu R&Db Foundation | Homomorphic encryption and decryption methods using ring isomorphism, and apparatuses using the same |
US20190327077A1 (en) | 2018-04-18 | 2019-10-24 | Fujitsu Limited | Outsourcing processing operations with homomorphic encryption |
JP2019211426A (en) | 2018-06-08 | 2019-12-12 | Jnc株式会社 | Column, column filling device, column filling system, and column processing method |
JP2021083039A (en) | 2019-11-22 | 2021-05-27 | Kddi株式会社 | Secret arithmetic unit, secret arithmetic method, and secret arithmetic program |
-
2020
- 2020-01-21 JP JP2020007701A patent/JP7179788B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150312028A1 (en) | 2012-08-28 | 2015-10-29 | Snu R&Db Foundation | Homomorphic encryption and decryption methods using ring isomorphism, and apparatuses using the same |
US20190327077A1 (en) | 2018-04-18 | 2019-10-24 | Fujitsu Limited | Outsourcing processing operations with homomorphic encryption |
JP2019191575A (en) | 2018-04-18 | 2019-10-31 | 富士通株式会社 | Commission of processing operation using homomorphism code |
JP2019211426A (en) | 2018-06-08 | 2019-12-12 | Jnc株式会社 | Column, column filling device, column filling system, and column processing method |
JP2021083039A (en) | 2019-11-22 | 2021-05-27 | Kddi株式会社 | Secret arithmetic unit, secret arithmetic method, and secret arithmetic program |
Non-Patent Citations (1)
Title |
---|
佐久間 淳ほか,安全なデータ活用を実現する秘密計算技術,情報処理,日本,一般社団法人情報処理学会,2018年09月15日,第59巻,第10号,pp.898-903 |
Also Published As
Publication number | Publication date |
---|---|
JP2021113956A (en) | 2021-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Jiang et al. | Secure outsourced matrix computation and application to neural networks | |
Martins et al. | A survey on fully homomorphic encryption: An engineering perspective | |
Bost et al. | Machine learning classification over encrypted data | |
Doröz et al. | Homomorphic AES evaluation using the modified LTV scheme | |
Farsana et al. | An audio encryption scheme based on Fast Walsh Hadamard Transform and mixed chaotic keystreams | |
Beullens et al. | Field lifting for smaller UOV public keys | |
Han et al. | Efficient logistic regression on large encrypted data | |
JP7146724B2 (en) | Secure computing device, secure computing method and secure computing program | |
Kaosar et al. | Fully homomorphic encryption based two-party association rule mining | |
Aguilar Melchor et al. | A comparison of the homomorphic encryption libraries HElib, SEAL and FV-NFLlib | |
Furue et al. | A new variant of unbalanced oil and vinegar using quotient ring: QR-UOV | |
Kim et al. | Comprehensive introduction to fully homomorphic encryption for dynamic feedback controller via LWE-based cryptosystem | |
Alexandru et al. | Secure multi-party computation for cloud-based control | |
Ramos-Calderer et al. | Quantum search for scaled hash function preimages | |
Huang et al. | Support vector machine classification over encrypted data | |
Zhang et al. | Protecting data privacy in publicly verifiable delegation of matrix and polynomial functions | |
Herbert et al. | Design and implementation of low-depth pairing-based homomorphic encryption scheme | |
Xiang et al. | Fast blind rotation for bootstrapping FHEs | |
JP7146725B2 (en) | Secure computing device, secure computing method and secure computing program | |
Laine | Homomorphic encryption | |
JP7179788B2 (en) | Secure computing device, secure computing method and secure computing program | |
JP7228286B1 (en) | Cryptographic processing device, cryptographic processing method, and cryptographic processing program | |
Biasse | Approximate Short Vectors in Ideal Lattices of Q (ζ _ p^ e) Q (ζ pe) with Precomputation of Cl (O _K) Cl (OK) | |
Furue et al. | A structural attack on block-anti-circulant UOV at SAC 2019 | |
JP7096214B2 (en) | Concealment calculation device, concealment calculation method and concealment calculation program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220107 |
|
TRDD | Decision of grant or rejection written | ||
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221018 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20221025 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221116 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7179788 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |