JP7096214B2 - Concealment calculation device, concealment calculation method and concealment calculation program - Google Patents
Concealment calculation device, concealment calculation method and concealment calculation program Download PDFInfo
- Publication number
- JP7096214B2 JP7096214B2 JP2019142551A JP2019142551A JP7096214B2 JP 7096214 B2 JP7096214 B2 JP 7096214B2 JP 2019142551 A JP2019142551 A JP 2019142551A JP 2019142551 A JP2019142551 A JP 2019142551A JP 7096214 B2 JP7096214 B2 JP 7096214B2
- Authority
- JP
- Japan
- Prior art keywords
- ciphertext
- value
- lwe
- constant
- unit
- 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
- Complex Calculations (AREA)
Description
本発明は、暗号文上で演算を行う秘匿計算装置、秘匿計算方法及び秘匿計算プログラムに関する。 The present invention relates to a secret calculation device, a secret calculation method, and a secret calculation program that perform calculations on a ciphertext.
従来、暗号化したまま平文の計算を行う秘密計算の手法が提案されている。
例えば、非特許文献1では、入力の整数をビット値に変換せず、つまり平文が整数値のままである場合(以下、Integer-wiseと表現する)に、完全準同型暗号により暗号化された暗号文上で2値比較演算を行う手法が提案されている。
Conventionally, a secret calculation method has been proposed in which plaintext is calculated while being encrypted.
For example, in Non-Patent
このような2値比較演算等を行うためには、値の符号を判定するアルゴリズムが必要であり、非特許文献1の手法では、ヘビサイドの階段関数の出力[H(x)=1(x≧0),0(x<0)]を得るために多項式補間が用いられている。
また、非特許文献2では、暗号文上でニューラルネットワークの活性化関数として、Integer-wise型のブートストラッピング(bootstrapping)と同時に符号関数[sign(x)=1(x>0),-1(x≦0)]を演算する手法が提案されている。
In order to perform such a binary comparison operation or the like, an algorithm for determining the sign of the value is required, and in the method of
Further, in
非特許文献1におけるヘビサイドの階段関数の演算は、多項式補間に基づく手法であり、多くの乗算を必要とするため、計算コストが高い。具体的には、例えば、平文のビット長をlビットとし、p=2lとしたとき、多項式f(x)=c0+c1x+・・・+cp-1xp-1の演算を暗号文上で行うため、乗算の深さは、O(log p)=O(l)となり、総乗算回数は、O(p)=O(2l)とビット長lに応じて指数関数的に増加する。
したがって、2値比較演算の秘匿計算を実行する場合、乗算に伴うノイズの増加に耐えるために、多くの回数のブートストラッピングを必要とし、その実行にも多くの時間を要していた。
The calculation of the Heaviside step function in Non-Patent
Therefore, when executing the secret calculation of the binary comparison operation, it is necessary to perform a large number of boot strappings in order to withstand the increase in noise due to the multiplication, and it also takes a lot of time to execute the boot strapping.
また、非特許文献2の手法では、ブートストラッピングと同時に符号関数を演算できるため、コストの低減が期待できるものの、出力は、符号に応じた1又は-1である。
しかしながら、例えば2値比較演算の結果により並び替えを行うアルゴリズム等においては、大小を1又は0で表現する必要がある。このため、出力の暗号文Cy(-1又は1)を、[Cy´←(Cy+1)/2]のように変換する必要があった。ところが、この変換には、暗号文上での定数の乗算が含まれるため、計算コスト及びノイズが増加していた。
Further, in the method of
However, for example, in an algorithm or the like that sorts according to the result of a binary comparison operation, it is necessary to express the magnitude as 1 or 0. Therefore, it is necessary to convert the output ciphertext Cy (-1 or 1) as [ Cy ′ ← ( Cy +1) / 2]. However, since this conversion includes the multiplication of constants on the ciphertext, the calculation cost and noise are increased.
本発明は、暗号文上でヘビサイドの階段関数を低コストで演算できる秘匿計算装置、秘匿計算方法及び秘匿計算プログラムを提供することを目的とする。 An object of the present invention is to provide a secret calculation device, a secret calculation method, and a secret calculation program capable of calculating a Heaviside step function on a ciphertext at low cost.
本発明に係る秘匿計算装置は、出力値の平文を示す第1の定数、及び当該第1の定数をトーラス上の値に変換した後さらに半分にした第2の定数を設定する初期設定部と、入力値のトーラス上のLWEサンプルを、整数上のサンプルへ変換するサンプル変換部と、前記第2の定数を係数とする多項式を定義する多項式定義部と、LWE暗号文の第1の秘密鍵を平文とした暗号文であるブートストラッピングキーを用いた準同型演算により、前記多項式のLWE暗号文を更新してノイズを初期化する多項式更新部と、前記多項式の定数項のLWE暗号文を抽出した後、前記第2の定数だけシフトすることにより、前記第1の定数又は0の第2の秘密鍵によるLWE暗号文を取得する定数項抽出部と、前記第2の秘密鍵によるLWE暗号文を、前記第1の秘密鍵によるLWE暗号文に変換する鍵変換部と、を備える。 The concealment calculation device according to the present invention includes a first constant indicating the plain text of the output value, and an initial setting unit for setting a second constant obtained by converting the first constant into a value on the torus and then halving it. , A sample conversion unit that converts an LWE sample on a torus of input values into a sample on an integer, a polynomial definition unit that defines a polynomial with the second constant as a coefficient, and a first secret key of the LWE cipher statement. The polynomial updater that updates the LWE cipher of the polynomial to initialize the noise and the LWE cipher of the constant term of the polynomial by the quasi-homogeneous operation using the bootstrapping key, which is a cipher with plain text. After extraction, the constant term extraction unit for acquiring the LWE cipher using the first constant or the second secret key of 0 by shifting by the second constant, and the LWE cipher using the second secret key. A key conversion unit for converting a sentence into an LWE encrypted sentence using the first private key is provided.
前記秘匿計算装置は、第1の値及び第2の値それぞれの暗号文の入力を受け付ける入力部と、前記第1の値の暗号文から前記第2の値の暗号文を減算することにより、差分値の暗号文を算出する減算部と、前記差分値の暗号文を前記入力値とすることにより、前記出力値である1の暗号文、又は0の暗号文を、2値比較演算の結果として出力する比較結果出力部と、を備えてもよい。 The concealment calculation device has an input unit that accepts the input of the ciphers of the first value and the second value, and the cipher of the second value by subtracting the cipher of the second value from the cipher of the first value. By using the subtraction unit that calculates the cipher of the difference value and the cipher of the difference as the input value, the cipher of 1 or the cipher of 0, which is the output value, is the result of the binary comparison operation. It may be provided with a comparison result output unit which outputs as.
前記秘匿計算装置は、前記2値比較演算の結果に前記差分値の暗号文を乗算し、前記第2の値の暗号文を加算することにより、前記第1の値及び前記第2の値のうち大きい方の値の暗号文を算出する第1の並び替え部と、前記第1の値の暗号文に前記第2の値の暗号文を加算し、前記大きい方の値の暗号文を減算することにより、前記第1の値及び前記第2の値のうち小さい方の値の暗号文を算出する第2の並び替え部と、を備えてもよい。 The secret calculation device multiplies the result of the binary comparison operation by the ciphertext of the difference value, and adds the ciphertext of the second value to obtain the first value and the second value. The first sorting unit that calculates the ciphertext of the larger value, the ciphertext of the second value is added to the ciphertext of the first value, and the ciphertext of the larger value is subtracted. By doing so, a second rearrangement unit for calculating the ciphertext of the smaller value of the first value and the second value may be provided.
本発明に係る秘匿計算方法は、出力値の平文を示す第1の定数、及び当該第1の定数をトーラス上の値に変換した後さらに半分にした第2の定数を設定する初期設定ステップと、入力値のトーラス上のLWEサンプルを、整数上のサンプルへ変換するサンプル変換ステップと、前記第2の定数を係数とする多項式を定義する多項式定義ステップと、LWE暗号文の第1の秘密鍵を平文とした暗号文であるブートストラッピングキーを用いた準同型演算により、前記多項式のLWE暗号文を更新してノイズを初期化する多項式更新ステップと、前記多項式の定数項のLWE暗号文を抽出した後、前記第2の定数だけシフトすることにより、前記第1の定数又は0の第2の秘密鍵によるLWE暗号文を取得する定数項抽出ステップと、前記第2の秘密鍵によるLWE暗号文を、前記第1の秘密鍵によるLWE暗号文に変換する鍵変換ステップと、をコンピュータが実行する。 The concealment calculation method according to the present invention includes an initial setting step of setting a first constant indicating the plain text of the output value and a second constant obtained by converting the first constant into a value on the torus and then halving it. , A sample conversion step that converts an LWE sample on a torus of input values into a sample on an integer, a polynomial definition step that defines a polynomial with the second constant as a coefficient, and a first secret key of the LWE cipher. The polynomial update step of updating the LWE cipher of the polynomial to initialize the noise and the LWE cipher of the constant term of the polynomial by the quasi-isomorphic operation using the bootstrapping key, which is a cipher with plain text. After extraction, the constant term extraction step of acquiring the LWE cipher using the first constant or the second secret key of 0 by shifting by the second constant, and the LWE cipher using the second secret key. The computer executes a key conversion step of converting the statement into an LWE cipher statement using the first private key.
本発明に係る秘匿計算プログラムは、前記秘匿計算装置としてコンピュータを機能させるためのものである。 The secret calculation program according to the present invention is for operating a computer as the secret calculation device.
本発明によれば、暗号文上でヘビサイドの階段関数を低コストで演算できる。 According to the present invention, the Heaviside step function can be calculated on the ciphertext at low cost.
以下、本発明の実施形態の一例について説明する。
本実施形態における秘匿計算装置は、完全準同型暗号で必要なブートストラッピングと同時にヘビサイドの階段関数の演算を実現する。
完全準同型暗号は、Somewhat型準同型暗号にブートストラッピングを組み合わせて構成される。ここで、Somewhat型準同型暗号とは、演算を重ねることによって暗号文上のノイズが大きくなり、ある程度の大きさになると復号が不可能になる方式である。完全準同型暗号は、Somewhat型準同型暗号にブートストラッピングと呼ばれるノイズ除去処理を行うことで無制限に演算が実行できるようにしたものである。
Hereinafter, an example of the embodiment of the present invention will be described.
The concealment computing device in the present embodiment realizes the operation of the Heaviside step function at the same time as the bootstrapping required by the fully homomorphic encryption.
Full homomorphic encryption is configured by combining Somehat type homomorphic encryption with bootstrapping. Here, the Somehat type homomorphic encryption is a method in which noise on the ciphertext becomes large due to repeated operations, and decryption becomes impossible when the size becomes a certain level. The fully homomorphic encryption is a Somehat type homomorphic encryption that can be subjected to an unlimited number of operations by performing a noise removal process called bootstrapping.
図1は、本実施形態における秘匿計算装置1の機能構成を示すブロック図である。
秘匿計算装置1は、サーバ装置又はパーソナルコンピュータ等の情報処理装置(コンピュータ)であり、制御部10及び記憶部20の他、各種データの入出力デバイス及び通信デバイス等を備える。
FIG. 1 is a block diagram showing a functional configuration of the
The
制御部10は、秘匿計算装置1の全体を制御する部分であり、記憶部20に記憶された各種プログラムを適宜読み出して実行することにより、本実施形態における各機能を実現する。制御部10は、CPUであってよい。
The
記憶部20は、ハードウェア群を秘匿計算装置1として機能させるための各種プログラム(秘匿計算プログラム)、及び各種データ等の記憶領域であり、ROM、RAM、フラッシュメモリ又はハードディスクドライブ(HDD)等であってよい。
The
制御部10は、初期設定部101と、サンプル変換部102と、多項式定義部103と、多項式更新部104と、定数項抽出部105と、鍵変換部106と、入力部107と、減算部108と、比較結果出力部109と、第1の並べ替え部110と、第2の並べ替え部111とを備える。
The
初期設定部101は、出力値の平文を示す第1の定数(ヘビサイドの階段関数の出力である1)、及び当該定数をトーラス上の値(後述のμ)に変換し半分にした第2の定数(後述のμ’=μ/2)を設定する。
The
サンプル変換部102は、入力値のトーラス上のLWEサンプルを、整数上のサンプルへ変換する。
The
多項式定義部103は、初期設定された第2の定数μ’を係数とする多項式(後述のtestv)を定義する。
The
多項式更新部104は、LWE暗号文の第1の秘密鍵を平文とした暗号文であるブートストラッピングキーを用いた準同型演算により、多項式のLWE暗号文を更新してノイズを初期化する。
The
定数項抽出部105は、多項式更新部104により更新された多項式の定数項のLWE暗号文を抽出した後、第2の定数μ’だけシフトすることにより、第1の定数(=1)又は0の第2の秘密鍵によるLWE暗号文を取得する。
The constant
鍵変換部106は、定数項抽出部105により取得した第2の秘密鍵によるLWE暗号文を、第1の秘密鍵によるLWE暗号文に変換する。
The
入力部107は、大小比較を行う第1の値及び第2の値それぞれの暗号文の入力を受け付ける。
The
減算部108は、入力部107が受け付けた第1の値の暗号文から第2の値の暗号文を減算することにより、差分値の暗号文を算出する。
The
比較結果出力部109は、差分値の暗号文をサンプル変換部102の入力値とすることにより、ヘビサイドの階段関数の出力値である1の暗号文、又は0の暗号文を、2値比較演算の結果として出力する。
The comparison
第1の並べ替え部110は、2値比較演算の結果に差分値の暗号文を乗算し、第2の値の暗号文を加算することにより、第1の値及び第2の値のうち大きい方の値の暗号文を算出する。
The
第2の並べ替え部111は、第1の値の暗号文に第2の値の暗号文を加算し、第1の並べ替え部110により算出された大きい方の値の暗号文を減算することにより、第1の値及び第2の値のうち小さい方の値の暗号文を算出する。
The
次に、秘匿計算装置1により実行される秘匿計算方法について、アルゴリズムの詳細を説明する。
Next, the details of the algorithm will be described with respect to the secret calculation method executed by the
[定義]
本実施形態の秘匿計算方法における各種の定義は、次の文献Aに従う。
文献A: Ilaria Chillotti, Nicolas Gama, Mariya Georgieva, and Malika Izabachene. Faster fully homomorphic encryption: Bootstrapping in less than 0.1 seconds. In Jung Hee Cheon and Tsuyoshi Takagi, editors, Advances in Cryptology - ASIACRYPT 2016, pages 3-33, 2016.
[Definition]
Various definitions in the confidential calculation method of the present embodiment follow the following document A.
References A: Ilaria Chilotti, Nicolas Gama, Mariya Georgieva, and Malika Izabachene. Faster full homomorphic encryption: Bootstrapping in less than 0.1 seconds. In Jung Hee Chain and Tsuyoshi Takagi, editors, Advances in Cryptography-ASIACRYPT 2016, pages 3-33, 2016.
ここで、次のように説明を補足する。
長さnのベクトルxのi番目の要素をxiと表記する(x=(x1,…,xn))。
各種の空間等を次のように表記する。
・整数空間:Z,実数空間:R
・トーラスT=R/Z
・多項式:
R[X]:係数∈Rである、任意次数の多項式の集合
TN[X]:=R[X]/(XN+1):係数∈Tである、N次の多項式の集合
また、x←Uχは、集合χから一様にランダムにxをサンプルすることを意味する。
Here, the explanation is supplemented as follows.
The i-th element of the vector x of length n is expressed as x i (x = (x 1 , ..., X n )).
Various spaces are described as follows.
-Integer space: Z, real space: R
・ Torus T = R / Z
・ Polynomial:
R [X]: Set of polynomials of arbitrary degree with coefficient ∈ R TN [X]: = R [X] / (X N +1): Set of polynomials of degree N with coefficient ∈ T Also, x ← U χ means to sample x uniformly and randomly from the set χ.
TLWE暗号及びTGSW暗号は、文献Aにおいて定義され、それぞれLWE暗号及びGSW暗号を拡張したものである。
TLWE暗号について、秘密ベクトルs、平文m、ノイズeのLWEサンプル(a,b)∈LWEs(m)は、
For the TLWE cipher, the LWE sample (a, b) ∈ LWE s (m) of the secret vector s, plaintext m, and noise e is
ブートストラッピングキーBKs→s”,α=(BK1,…,BKn)について、各BKiは、秘密鍵s”による、平文がTLWE暗号文の秘密鍵siのTGSW暗号文である。ここで、TGSW暗号文は、TLWE暗号文と準同型演算が可能であり、
この「秘密鍵の暗号文」BKiを用いることで、暗号文上の準同型演算により復号に当たる演算を行える。これにより、ブートストラッピングでは、入力の平文と同じ平文を持ち、かつ、ノイズの大きさが初期化された暗号文が生成される。
For the bootstrapping key BK s → s ”, α = (BK 1 ,…, BK n ), each BK i is a TGSW ciphertext of the secret key s i of the TLWE ciphertext by the secret key s”. .. Here, the TGSW ciphertext can perform homomorphic operations with the TLWE ciphertext.
By using this "ciphertext of private key" BK i , it is possible to perform 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 noise level initialized is generated.
[平文空間の設定]
前述の文献Aの手法では、暗号文の平文空間がビット値に限られていた。本実施形態では、この手法を整数値も扱えるように拡張する。
[Plaintext space settings]
In the method of Document A described above, the plaintext space of the ciphertext is limited to the bit value. In this embodiment, this method is extended so that it can handle integer values as well.
Bを整数とし、m∈{-B,…,0,…,B}を平文とする。このとき、LWE暗号文の構成は次のようになる(非特許文献2参照)。
m∈[-B,B]の平文は、暗号文においては、m/(2B+1)∈Tの値に変換されている。ここで、ノイズeは、
また、秘密鍵sによる、平文mのLWE暗号文Enc(s,m)=(a,b)を、LWEs(m)とも表記する。
The plaintext of m ∈ [-B, B] is converted to the value of m / (2B + 1) ∈ T in the ciphertext. Here, the noise e is
Further, the LWE ciphertext Enc (s, m) = (a, b) of the plaintext m by the private key s is also expressed as LWE s (m).
[アルゴリズム]
図2は、本実施形態の秘匿計算方法を実行するためのアルゴリズムを示す図である。
このアルゴリズムにより、ブートストラッピングと同時にヘビサイドの階段関数が実行される。
[algorithm]
FIG. 2 is a diagram showing an algorithm for executing the secret calculation method of the present embodiment.
This algorithm executes the Heaviside step function at the same time as bootstrapping.
ステップ1において、初期設定部101は、出力の暗号文の平文(整数値)を示す定数msetを設定する。具体的には、mset=1とすることで、ヘビサイドの階段関数が実現される。
ここで、定数μ∈Tは、前述のように、msetをトーラスT上のLWE暗号文に入力するためにT上の値に変換したものである。また、初期設定部101は、暗号文の出力を決める定数μ’=μ/2を設定する。
In
Here, the constant μ ∈ T is obtained by converting m set into a value on T in order to input it into the LWE ciphertext on the torus T, as described above. Further, the
ステップ2において、サンプル変換部102は、トーラスT=R/Z上のLWEサンプル(a,b)∈Tn×Tを2N倍してroundすることにより、整数上のサンプル(a ̄,b ̄)∈Z2N
n×Z2Nへ変換する。
In
ステップ3において、多項式定義部103は、多項式testv∈TN[X]を定義する。
In
ステップ4において、多項式更新部104は、中間生成物として、多項式Xb ̄・testv∈TN[X]を暗号化したTLWE暗号文であるACCを算出する。
In step 4, the
ステップ5~7のループ処理において、多項式更新部104は、準同型演算により多項式のTLWE暗号文ACCを更新する。
ここで、各BKiは、秘密鍵s”による、平文がTLWE暗号文の秘密鍵siのTGSW暗号文である。前述のように、TGSW暗号文は、TLWE暗号文と準同型演算が可能なので、多項式更新部104は、TGSW暗号文とTLWE暗号文であるACCとの準同型演算により、
よって、ループ処理を終えた時点で、ACCは、
Here, each BK i is a TGSW ciphertext in which the plaintext is the secret key s i of the TLWE ciphertext by the secret key s. Therefore, the
Therefore, when the loop processing is completed, the ACC
ここで、
以下では、eACC=0とする。よって、
In the following, e ACC = 0. Therefore,
すると、1≦m≦Bのとき、式(1)の上界より、
また、-B≦m≦0のとき、同様に、
なお、TN[X]:=R[X]/(XN+1)であり、XN+1≡0、XN≡-1であることから、X-i≡-XN-iである。
Similarly, when −B ≦ m ≦ 0, the same applies.
Since TN [X]: = R [X] / (X N +1) and X N +1 ≡ 0 and X N ≡ -1, it is X −i ≡ −X N−i .
ステップ8において、定数項抽出部105は、多項式のTLWE暗号文ACCから定数項のLWE暗号文を抽出する。
(a’,b’):=SampleExtract(ACC)とおくと、a’∈TNは多項式a”∈TN[X]の係数列ベクトルを、b’∈Tは多項式b”∈TN[X]の定数項のみを抜き出したものである。ここで、(a”,b”)∈TN[X]×TN[X]は、ステップ5~7のループ処理後のACCのことであり、
(A', b'): = SimpleExtract (ACC), a'∈ T N is the coefficient sequence vector of the polynomial a "∈ TN [X], and b'∈ T is the polynomial b" ∈ TN [ Only the constant term of [X] is extracted. Here, (a ”, b”) ∈ TN [X] × TN [X] is the ACC after the loop processing in
ステップ9において、鍵変換部106は、keyswitching key KSs’→s,γを用いたKeySwitchの操作により、秘密鍵s’によるLWE暗号文であるuを、秘密鍵sによるLWE暗号文に変換する。
図3は、本実施形態の秘匿計算方法に用いる鍵変換処理のアルゴリズムを示す図である。
なお、この鍵変換処理(KeySwitch)は、文献Aに示されているものと同一である。
In step 9, the
FIG. 3 is a diagram showing an algorithm of the key conversion process used in the confidential calculation method of the present embodiment.
The key conversion process (KeySwitch) is the same as that shown in Document A.
このようにして、秘匿計算装置1は、ブートストラッピングと同時にヘビサイドの階段関数を実行し、入力された定数minの暗号文に対して、1≦min≦Bであればmset(=1)の暗号文を、-B≦min≦0であれば0の暗号文を出力する。
In this way, the
[2値比較演算]
秘匿計算装置1は、前述のブートストラッピングと同時に実行されるヘビサイドの階段関数を用いて、さらに、2値比較演算を実行できる。
[Bivalue comparison operation]
The
図4は、本実施形態における2値比較演算のアルゴリズムを示す図である。
このアルゴリズムでは、整数a,b∈{1,…,B}を平文とする暗号文Ca及びCbを入力とし、0又は1の暗号文C(a>b)が2値比較の結果として出力される。
FIG. 4 is a diagram showing an algorithm for binary comparison operation in the present embodiment.
In this algorithm, the ciphertexts C a and C b whose plaintexts are the integers a, b ∈ {1, ..., B} are input, and the ciphertext C (a> b) of 0 or 1 is the result of binary comparison. It is output.
ステップ11において、減算部108は、入力部107が受け付けた第1の値aの暗号文Caから、第2の値bの暗号文Cbを減算した差分値の暗号文Ca-b:=Ca-Cbを算出する。
In step 11, the
ステップ12において、比較結果出力部109は、差分値の暗号文Ca-bを入力として前述のブートストラッピングと同時のヘビサイドの階段関数Hのアルゴリズム(図2)を実行することにより、a>bのとき1(mset)の暗号文を、a≦bのとき0の暗号文を、2値比較演算の結果C(a>b):=CMP(Ca,Cb)として算出する。
In step 12, the comparison
ステップ13において、比較結果出力部109は、2値比較演算の結果C(a>b)を出力する。
In step 13, the comparison
[並べ替え演算]
秘匿計算装置1は、前述の2値比較演算を用いて、さらに、2値の並べ替え演算を実行できる。
このとき、2値比較演算の結果が0又は1である必要がある。
[Sort operation]
The
At this time, the result of the binary comparison operation needs to be 0 or 1.
図5は、本実施形態における並べ替え演算のアルゴリズムを示す図である。
このアルゴリズムでは、2値比較演算の結果C(a>b)、2値の暗号文Ca及びCb、差分値の暗号文Ca-bを入力とし、小さい方の値Csmall及び大きい方の値Clargeが出力される。
FIG. 5 is a diagram showing an algorithm for sorting operations in the present embodiment.
In this algorithm, the result of the binary comparison operation C (a> b) , the binary ciphertexts C a and C b , and the difference value ciphertext C ab are input, and the smaller value C small and the larger one are input. The value of C range is output.
ステップ21において、第1の並べ替え部110は、2値比較演算の結果C(a>b)に、2値の差分値の暗号文Ca-bを乗算し、第2の値bの暗号文Cbを加算することにより、2値a及びbのうち大きい方の値の暗号文Clargeを算出する。
In step 21, the
ステップ22において、第2の並べ替え部111は、第1の値aの暗号文Caに第2の値bの暗号文Cbを加算し、大きい方の値の暗号文Clargeを減算することにより、2値a及びbのうち小さい方の値の暗号文Csmallを算出する。
In step 22, the
ステップ23において、制御部10は、2値の並べ替えの結果として、CsmallとClargeとを出力する。
In step 23, the
本実施形態によれば、秘匿計算装置1は、ブートストラッピングの演算の中で、入力値の符号に応じて0又は1の暗号文を出力するヘビサイドの階段関数を実現した。
これにより、秘匿計算装置1は、暗号文上でヘビサイドの階段関数を低コストで演算できる。また、出力される暗号文は、既にノイズが初期化されており、ヘビサイドの階段関数を用いた任意の処理が不都合なく実行可能である。
According to the present embodiment, the
As a result, the
また、秘匿計算装置1は、ブートストラッピングと同時のヘビサイドの階段関数を用いて、出力が0又は1の2値比較演算を暗号文上で、低コストで実行できる。
Further, the
さらに、秘匿計算装置1は、出力が0又は1の2値比較演算を用いることにより、2値の並べ替え演算を暗号文上で、低コストで実行できる。
秘匿計算装置1は、この2値の並べ替え演算を繰り返すことにより、暗号文上で秘匿ソート演算、秘匿max関数演算等を低コストで実現できる。
Further, the
By repeating this binary sorting operation, the
以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述した実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 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
1 秘匿計算装置
10 制御部
20 記憶部
101 初期設定部
102 サンプル変換部
103 多項式定義部
104 多項式更新部
105 定数項抽出部
106 鍵変換部
107 入力部
108 減算部
109 比較結果出力部
110 第1の並べ替え部
111 第2の並べ替え部
1
Claims (5)
第1の値及び第2の値それぞれの暗号文の入力を受け付ける入力部と、
前記第1の値の暗号文から前記第2の値の暗号文を減算することにより、差分値の暗号文を算出する減算部と、
前記差分値の暗号文のトーラス上のLWEサンプルを、整数上のサンプルへ変換するサンプル変換部と、
前記第2の定数を係数とする多項式を定義する多項式定義部と、
LWE暗号文の第1の秘密鍵を平文とした暗号文であるブートストラッピングキーを用いた準同型演算により、前記多項式のLWE暗号文を更新してノイズを初期化する多項式更新部と、
前記多項式更新部により更新された多項式の定数項のLWE暗号文を抽出した後、前記第2の定数だけシフトすることにより、前記第1の定数又は0の第2の秘密鍵によるLWE暗号文を取得する定数項抽出部と、
前記第2の秘密鍵によるLWE暗号文を、前記第1の秘密鍵によるLWE暗号文に変換する鍵変換部と、
前記第1の秘密鍵によるLWE暗号文を、前記2値比較演算の結果として出力する比較結果出力部と、を備える秘匿計算装置。 With the initial setting unit that sets the first constant as the plaintext corresponding to the ciphertext that is the result of the binary comparison operation , and the second constant that is further halved after converting the first constant to the value on the torus. ,
An input unit that accepts the input of the ciphertexts of the first value and the second value, and
A subtraction unit that calculates a ciphertext of a difference value by subtracting the ciphertext of the second value from the ciphertext of the first value, and a subtraction unit.
A sample conversion unit that converts an LWE sample on the torus of the ciphertext of the difference value into a sample on an integer,
A polynomial definition unit that defines a polynomial with the second constant as a coefficient, and
A polynomial updater that updates the LWE ciphertext of the polynomial and initializes noise by a quasi-isomorphic operation using a bootstrapping key, which is a ciphertext with the first secret key of the LWE ciphertext as plaintext.
After extracting the LWE cipher of the constant term of the polynomial updated by the polynomial update unit, the LWE cipher by the first constant or the second secret key of 0 is obtained by shifting by the second constant. The constant term extractor to be acquired and
A key conversion unit that converts the LWE ciphertext using the second private key into the LWE ciphertext using the first private key,
A secret calculation device including a comparison result output unit that outputs an LWE ciphertext using the first secret key as a result of the binary comparison operation .
前記第1の値の暗号文に前記第2の値の暗号文を加算し、前記大きい方の値の暗号文を減算することにより、前記第1の値及び前記第2の値のうち小さい方の値の暗号文を算出する第2の並び替え部と、を備える請求項2に記載の秘匿計算装置。 By multiplying the result of the binary comparison operation by the ciphertext of the difference value and adding the ciphertext of the second value, the larger value of the first value and the second value is obtained. The first sorting part that calculates the ciphertext,
By adding the ciphertext of the second value to the ciphertext of the first value and subtracting the ciphertext of the larger value, the smaller of the first value and the second value is obtained. The secret calculation device according to claim 2, further comprising a second sorting unit for calculating a ciphertext of the value of.
初期設定部により、2値比較演算の結果である暗号文に対応する平文として第1の定数、及び当該第1の定数をトーラス上の値に変換した後さらに半分にした第2の定数を設定し、
入力部により、第1の値及び第2の値それぞれの暗号文の入力を受け付け、
減算部により、前記第1の値の暗号文から前記第2の値の暗号文を減算することにより、差分値の暗号文を算出し、
サンプル変換部により、前記差分値の暗号文のトーラス上のLWEサンプルを、整数上のサンプルへ変換し、
多項式定義部により、前記第2の定数を係数とする多項式を定義し、
多項式更新部により、LWE暗号文の第1の秘密鍵を平文とした暗号文であるブートストラッピングキーを用いた準同型演算により、前記多項式のLWE暗号文を更新してノイズを初期化し、
定数項抽出部により、前記多項式更新部により更新された多項式の定数項のLWE暗号文を抽出した後、前記第2の定数だけシフトすることにより、前記第1の定数又は0の第2の秘密鍵によるLWE暗号文を取得し、
鍵変換部により、前記第2の秘密鍵によるLWE暗号文を、前記第1の秘密鍵によるLWE暗号文に変換し、
比較結果出力部により、前記第1の秘密鍵によるLWE暗号文を、前記2値比較演算の結果として出力する秘匿計算方法。 The computer
The initial setting unit sets the first constant as the plaintext corresponding to the ciphertext that is the result of the binary comparison operation , and the second constant that is further halved after converting the first constant to the value on the torus. And
The input unit accepts the input of the ciphertexts of the first value and the second value, respectively.
The subtraction unit calculates the ciphertext of the difference value by subtracting the ciphertext of the second value from the ciphertext of the first value.
The sample conversion unit converts the LWE sample on the torus of the ciphertext of the difference value into the sample on the integer.
The polynomial definition unit defines a polynomial with the second constant as a coefficient.
The polynomial updater updates the LWE ciphertext of the polynomial and initializes the noise by quasi-homogeneous operation using the bootstrapping key, which is a ciphertext with the first secret key of the LWE ciphertext as plaintext.
The constant term extraction unit extracts the LWE code statement of the constant term of the polynomial updated by the polynomial update unit, and then shifts by the second constant to obtain the first constant or the second secret of 0. Obtain the LWE coded text with the key,
The key conversion unit converts the LWE ciphertext using the second private key into the LWE ciphertext using the first private key.
A secret calculation method in which the comparison result output unit outputs the LWE ciphertext using the first secret key as the result of the binary comparison operation .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019142551A JP7096214B2 (en) | 2019-08-01 | 2019-08-01 | Concealment calculation device, concealment calculation method and concealment calculation program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019142551A JP7096214B2 (en) | 2019-08-01 | 2019-08-01 | Concealment calculation device, concealment calculation method and concealment calculation program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021026082A JP2021026082A (en) | 2021-02-22 |
JP7096214B2 true JP7096214B2 (en) | 2022-07-05 |
Family
ID=74663824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019142551A Active JP7096214B2 (en) | 2019-08-01 | 2019-08-01 | Concealment calculation device, concealment calculation method and concealment calculation program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7096214B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022185391A1 (en) * | 2021-03-01 | 2022-09-09 | 日本電信電話株式会社 | Random number generation system, random number generation device, random number generation method, and program |
-
2019
- 2019-08-01 JP JP2019142551A patent/JP7096214B2/en active Active
Non-Patent Citations (4)
Title |
---|
Hiroki Okada et al.,Linear Depth Integer-wise Homomorphic Division,12th IFIP International Conference on Information Security Theory and Practice (WISTP),[オンライン],2018年12月,p. 91-106,<URL: https://hal.archives-ouverles.fr/hal-02294597/document>,(検索日 令和4年3月10日)、インターネット |
Ilaria Chillotti et al.,Faster Packed Homomorphic Operations and Efficient Circuit Bootstrapping for TFHE,LNCS, International Conference on the Theory and Application of Cryptology and Information Security,2017年11月30日,Volume 10624,p. 377-408 |
岡田 大樹 ほか,2019年 暗号と情報セキュリティシンポジウム(SCIS2019)予稿集 [USB] 2019年 暗,日本,2019年 暗号と情報セキュリティシンポジウム実行,2019年01月15日,2A2-2,p。1-8 |
岡田 大樹 ほか,TFHEにおけるInteger-wise型一般化Bootstrapping,2020年 暗号と情報性キュウリティシンポジウム予稿集,日本,2020年01月21日,1B1-2,p.1-8 |
Also Published As
Publication number | Publication date |
---|---|
JP2021026082A (en) | 2021-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7146724B2 (en) | Secure computing device, secure computing method and secure computing program | |
Noshadian et al. | Optimizing chaos based image encryption | |
Marcano et al. | On fully homomorphic encryption for privacy-preserving deep learning | |
WO2018135563A1 (en) | Secure computing system, secure computing device, secure computing method, and program | |
Liu et al. | Stego key searching for LSB steganography on JPEG decompressed image. | |
Boussif et al. | Securing DICOM images by a new encryption algorithm using Arnold transform and Vigenère cipher | |
Musanna et al. | A novel image encryption algorithm using chaotic compressive sensing and nonlinear exponential function | |
JP6916770B2 (en) | Concealment calculation device, concealment calculation method and concealment calculation program | |
CN113746620A (en) | Homomorphic encryption method, apparatus, medium, and computer program product | |
JP7096214B2 (en) | Concealment calculation device, concealment calculation method and concealment calculation program | |
Giboulot et al. | Multivariate side-informed Gaussian embedding minimizing statistical detectability | |
Aung et al. | Fully homomorphic encryption over the integers for non-binary plaintexts without the sparse subset sum problem | |
Lee et al. | Overflow-Detectable Floating-Point Fully Homomorphic Encryption | |
CN110874481A (en) | GBDT model-based prediction method and device | |
JP2021083039A (en) | Secret arithmetic unit, secret arithmetic method, and secret arithmetic program | |
Çavuşoğlu | S-Box-based video stenography application of variable-order fractional hopfield neural network (VFHNN) | |
Wingarz et al. | Privacy-Preserving Convolutional Neural Networks Using Homomorphic Encryption | |
US20240039693A1 (en) | Encryption processing device, encryption processing method, and encryption processing program | |
JP7069460B2 (en) | Cryptographic equipment, cryptographic processing method, and cryptographic processing program | |
JP6885460B2 (en) | Reverse image sampling device, reverse image sampling method and reverse image sampling program | |
Barni et al. | Privacy preserving evaluation of signal quality with application to ECG analysis | |
Guimaraes et al. | Homomorphic evaluation of large look-up tables for inference on human genome data in the cloud | |
JP2021113956A (en) | Secure computing device, secure computing method, and secure computing program | |
Sadr et al. | Security in the speech cryptosystem based on blind sources separation | |
JP2021081591A (en) | Safety evaluation device, safety evaluation method, and safety evaluation program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210625 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220322 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220516 |
|
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: 20220531 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220623 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7096214 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |