JP2013157652A - Secret calculation system, encryption device, secrete calculation device, and method and program thereof - Google Patents
Secret calculation system, encryption device, secrete calculation device, and method and program thereof Download PDFInfo
- Publication number
- JP2013157652A JP2013157652A JP2012014214A JP2012014214A JP2013157652A JP 2013157652 A JP2013157652 A JP 2013157652A JP 2012014214 A JP2012014214 A JP 2012014214A JP 2012014214 A JP2012014214 A JP 2012014214A JP 2013157652 A JP2013157652 A JP 2013157652A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- column
- encryption
- vectors
- matrix
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は暗号応用技術に関するものであり、特に三個以上の秘密計算装置に入力データの断片(暗号文)を送り、各秘密計算装置において復号せずに、入力データを明かすことなく断片のまま計算を行う秘密計算技術に関する。 The present invention relates to a cryptographic application technique, and in particular, fragments of input data (ciphertext) are sent to three or more secret computing devices, and without being decrypted by each secret computing device, the fragments remain without revealing the input data. The present invention relates to a secret calculation technique for performing calculation.
暗号化された数値を復元せずに演算結果を得る方法として、秘密計算と呼ばれる方法がある。非特許文献1が秘密計算の従来技術として知られている。非特許文献1では、三個の秘密計算装置に数値の断片を分散させるという暗号化を行い、数値を復元せずに、加減算、定数和、乗算、定数倍、論理演算(否定、論理積、論理和、排他的論理和)及びデータ形式変換(整数、二進数)の結果を三個の秘密計算装置に分散された状態、すなわち暗号化されたまま保持させることができる。
There is a method called a secret calculation as a method for obtaining a calculation result without restoring an encrypted numerical value. Non-Patent
しかしながら、従来技術は、暗号化された数値を復元せずに写像を計算し、その結果を得る方法(以下、「秘密写像」という)について何ら開示していない。仮に秘密写像を実現しようとすると、以下の方法が考えられる。 However, the prior art does not disclose any method for calculating the mapping without restoring the encrypted numerical value and obtaining the result (hereinafter referred to as “secret mapping”). If a secret map is to be realized, the following method can be considered.
定義域及び値域に含まれる全ての元を暗号化しておき、定義域に含まれる各元の断片(暗号文)と入力データの断片とを比較し、一致する元の断片における写像の像を求める必要がある。そのため一つの入力データに対して定義域の大きさmに比例した計算時間O(m)がかかる。暗号化されたn個の入力データに対して秘密写像を計算する場合、O(mn)の計算時間が必要となる。 All elements included in the domain and range are encrypted, and each original fragment (ciphertext) included in the domain is compared with a fragment of the input data to obtain a mapping image in the original fragment that matches. There is a need. Therefore, a calculation time O (m) proportional to the size m of the domain is required for one input data. When calculating a secret map for n pieces of encrypted input data, a calculation time of O (mn) is required.
本発明は、暗号化されたn個の入力データに対して計算時間がO((m+n)logn)で秘密写像を計算できる秘密計算装置、そのための暗号化装置、暗号化装置と秘密計算装置とからなる秘密システム及びその方法、プログラムを提供することを目的とする。 The present invention relates to a secret calculation device capable of calculating a secret mapping for n pieces of encrypted input data with a calculation time of O ((m + n) logn), an encryption device therefor, an encryption device, and a secret calculation device. It aims at providing the secret system which consists of, its method, and a program.
上記の課題を解決するために、本発明の第一の態様によれば、Nは3以上の整数とし、秘密計算システム、暗号化装置とN個の秘密計算装置とを含む。暗号化装置は、m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成部と、nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成部と、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成部と、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成部と、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成部と、N個の暗号行列の1列目からなる列ベクトル、N個の暗号入力ベクトル、N個の暗号目印ベクトル、N個の像ベクトル及びN個の更新済ベクトルをそれぞれN個の秘密計算装置に配布する送信部と、を含む。各秘密計算装置は、秘密計算により暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルと、暗号目印ベクトル、像ベクトル及び更新済ベクトルを水平に連結した行列を、ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソート部と、入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとし、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算部と、暗号目印ベクトルと反復計算後の像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換部と、その秘密計算装置が保管する暗号目印ベクトルと他の秘密計算装置が保管する暗号目印ベクトルとから目印ベクトルを復号する目印ベクトル復号部と、目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替え部と、を含む。
In order to solve the above problem, according to the first aspect of the present invention, N is an integer of 3 or more, and includes a secret calculation system, an encryption device, and N secret calculation devices. The encryption apparatus sets a mapping that designates an element in the second column of the same row to an element in the first column of each row of an m-row and two-column matrix as a mapping that the matrix expresses, and the matrix T that expresses the mapping A cryptographic matrix generation unit that encrypts each element and generates N cryptographic matrices, and n is the number of input data, and each element of the input vector, which is a column vector having n elements, is encrypted, An encryption input vector generation unit that generates an encryption input vector, and encrypts each element of a mark vector that is a column vector made up of m number 0,
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation unit that performs secret calculation, a random replacement unit that randomly replaces a combination of the encryption landmark vector and the image vector after the iteration calculation by secret calculation for each row, an encryption landmark vector stored in the secret calculation device, and other A mark vector decoding unit that decodes the mark vector from the encryption mark vector stored in the secret computing device, and the elements of the image vector in the same row as the elements having values from 1 to n among the elements of the mark vector A rearrangement unit that obtains the column vectors arranged in order as encryption output vectors.
上記の課題を解決するために、本発明の第二の態様によれば、Nは3以上の整数とし、暗号化装置は、ある数値から秘密計算可能な暗号文であるN個の断片を生成する。暗号化装置は、m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成部と、nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成部と、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成部と、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成部と、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成部と、N個の暗号行列の1列目からなる列ベクトル、N個の暗号入力ベクトル、N個の暗号目印ベクトル、N個の像ベクトル及びN個の更新済ベクトルをそれぞれN個の秘密計算装置に配布する送信部と、を含む。
In order to solve the above problems, according to the second aspect of the present invention, N is an integer of 3 or more, and the encryption device generates N pieces of ciphertext that can be secretly calculated from a certain numerical value. To do. The encryption apparatus sets a mapping that designates an element in the second column of the same row to an element in the first column of each row of an m-row and two-column matrix as a mapping that the matrix expresses, and the matrix T that expresses the mapping A cryptographic matrix generation unit that encrypts each element and generates N cryptographic matrices, and n is the number of input data, and each element of the input vector, which is a column vector having n elements, is encrypted, An encryption input vector generation unit that generates an encryption input vector, and encrypts each element of a mark vector that is a column vector made up of m number 0,
上記の課題を解決するために、本発明の第三の態様によれば、m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化したものを暗号行列とし、nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化したものを暗号入力ベクトルとし、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化したものを暗号目印ベクトルとし、n個の数値0からなる列ベクトル0nを暗号化し、暗号行列の2列目と暗号列ベクトル[[0n]]とを垂直に連結したものを像ベクトル[[a0]]とし、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、暗号ベクトル[[1m]]と暗号列ベクトル[[0n]]とを垂直に連結したものを更新済ベクトル[[c0]]とし、秘密計算装置は、秘密計算により暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルと、暗号目印ベクトル、像ベクトル及び更新済ベクトルを水平に連結した行列を、ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソート部と、入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとし、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算部と、暗号目印ベクトルと反復計算後の像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換部と、その秘密計算装置が保管する暗号目印ベクトルと他の秘密計算装置が保管する暗号目印ベクトルとから目印ベクトルを復号する目印ベクトル復号部と、目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替え部と、を含む。
In order to solve the above problem, according to a third aspect of the present invention, there is provided a mapping for designating an element in the second column of the same row with respect to an element in the first column of each row of an m × 2 matrix. , A mapping expressed by a matrix, an encrypted matrix obtained by encrypting each element of the matrix T expressing the mapping, an encryption matrix, n being the number of input data, and each element of an input vector being a column vector having n elements Are encrypted input vectors, encrypted elements of a mark vector, which is a column vector composed of m number 0, and
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation unit that performs secret calculation, a random replacement unit that randomly replaces a combination of the encryption landmark vector and the image vector after the iteration calculation by secret calculation for each row, an encryption landmark vector stored in the secret calculation device, and other A mark vector decoding unit that decodes the mark vector from the encryption mark vector stored in the secret computing device, and the elements of the image vector in the same row as the elements having values from 1 to n among the elements of the mark vector A rearrangement unit that obtains the column vectors arranged in order as encryption output vectors.
上記の課題を解決するために、本発明の第四の態様によれば、Nは3以上の整数とし、秘密計算方法は、暗号化装置とN個の秘密計算装置とを用いる。秘密計算方法は、m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、暗号化装置が、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成ステップと、nを入力データの個数とし、暗号化装置が、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成ステップと、暗号化装置が、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成ステップと、暗号化装置が、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成ステップと、暗号化装置が、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成ステップと、暗号化装置が、N個の暗号行列の1列目からなる列ベクトル、N個の暗号入力ベクトル、N個の暗号目印ベクトル、N個の像ベクトル及びN個の更新済ベクトルをそれぞれN個の秘密計算装置に配布する送信ステップと、秘密計算により暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルを生成するソート用キーベクトル生成ステップと、各秘密計算装置が、ソート用キーベクトルと、暗号目印ベクトル、像ベクトル及び更新済ベクトルを水平に連結した行列を、ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソートステップと、入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとして算出するステップと、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、各秘密計算装置が、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算ステップと、各秘密計算装置が、暗号目印ベクトルと反復計算後の像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換ステップと、各秘密計算装置が、その秘密計算装置が保管する暗号目印ベクトルと他の秘密計算装置が保管する暗号目印ベクトルとから目印ベクトルを復号する目印ベクトル復号ステップと、各秘密計算装置が、目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替えステップと、を含む。
In order to solve the above problem, according to the fourth aspect of the present invention, N is an integer of 3 or more, and the secret calculation method uses an encryption device and N secret calculation devices. In the secret calculation method, the mapping that designates the element in the second column of the same row with respect to the element in the first column of each row of the m-by-2 matrix is a mapping that the matrix represents, and the encryption device An encryption matrix generation step for encrypting each element of the matrix T to be expressed to generate N encryption matrices, n being the number of input data, and an input vector in which the encryption device is a column vector having n elements The encryption input vector generation step for encrypting each element of N and generating N encryption input vectors, and the encryption device is a column vector composed of m number 0,
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
Each of the secret calculation devices, the random calculation step in which each secret calculation device randomly replaces the combination of the encryption landmark vector and the image vector after the iteration calculation by secret calculation for each row, and each secret calculation device A landmark vector decrypting step for decrypting the landmark vector from the cryptographic landmark vector stored in the secret computing device and the cryptographic landmark vector stored in another secret computing device, and each secret computing device has 1 to n of the landmark vector elements And a rearranging step for obtaining a column vector in which the elements of the image vector in the same row as the elements having values up to 1 are arranged in order from 1 to n as an encryption output vector.
上記の課題を解決するために、本発明の第五の態様によれば、Nは3以上の整数とし、暗号化方法は、ある数値から秘密計算可能な暗号文であるN個の断片を生成する。暗号化方法は、m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成ステップと、nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成ステップと、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成ステップと、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成ステップと、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成ステップと、N個の暗号行列の1列目からなる列ベクトル、N個の暗号入力ベクトル、N個の暗号目印ベクトル、N個の像ベクトル及びN個の更新済ベクトルをそれぞれN個の秘密計算方法に配布する送信ステップと、を含む。
In order to solve the above problems, according to the fifth aspect of the present invention, N is an integer of 3 or more, and the encryption method generates N pieces of ciphertext that can be secretly calculated from a certain numerical value. To do. In the encryption method, a mapping that designates an element in the second column of the same row with respect to an element in the first column of each row of an m-row and two-column matrix is a mapping that the matrix represents, and the matrix T that represents the mapping A cryptographic matrix generation step for encrypting each element to generate N cryptographic matrices, and encrypting each element of the input vector, which is a column vector having n elements, where n is the number of input data, A cryptographic input vector generating step for generating a cryptographic input vector, and encrypting each element of a landmark vector which is a column vector consisting of m number 0,
上記の課題を解決するために、本発明の第六の態様によれば、m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化したものを暗号行列とし、nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化したものを暗号入力ベクトルとし、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化したものを暗号目印ベクトルとし、n個の数値0からなる列ベクトル0nを暗号化し、暗号行列の2列目と暗号列ベクトル[[0n]]とを垂直に連結したものを像ベクトル[[a0]]とし、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、暗号ベクトル[[1m]]と暗号列ベクトル[[0n]]とを垂直に連結したものを更新済ベクトル[[c0]]とし、秘密計算方法は、秘密計算により暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルと、暗号目印ベクトル、像ベクトル及び更新済ベクトルを水平に連結した行列を、ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソートステップと、入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとし、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算ステップと、暗号目印ベクトルと反復計算後の像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換ステップと、目印ベクトルを復号する目印ベクトル復号ステップと、目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替えステップと、を含む。
In order to solve the above problem, according to a sixth aspect of the present invention, there is provided a mapping for designating an element in the second column of the same row with respect to the element in the first column of each row of the matrix of m rows and 2 columns. , A mapping expressed by a matrix, an encrypted matrix obtained by encrypting each element of the matrix T expressing the mapping, an encryption matrix, n being the number of input data, and each element of an input vector being a column vector having n elements Are encrypted input vectors, encrypted elements of a mark vector, which is a column vector composed of m number 0, and
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation step for secretly calculating, a random replacement step for randomly replacing the combination of the encryption mark vector and the image vector after the iterative calculation by secret calculation for each row, a mark vector decoding step for decoding the mark vector, and a mark vector A rearrangement step for obtaining, as an encryption output vector, a column vector in which elements of image vectors in the same row as elements having values from 1 to n are sequentially arranged from 1 to n.
本発明に係る秘密計算方法によれば、定義域の大きさがmであるとき、暗号化されたn個の入力データに対して計算時間がO((m+n)logn)で秘密写像を計算できるという効果を奏する。 According to the secret calculation method of the present invention, when the size of the domain is m, the secret mapping can be calculated with the calculation time O ((m + n) logn) for the n pieces of encrypted input data. There is an effect.
以下、本発明の実施形態について説明する。なお、以下の説明に用いる図面では、同じ機能を持つ構成部や同じ処理を行うステップには同一の符号を記し、重複説明を省略する。また、ベクトルや行列の各要素単位で行われる処理は、特に断りがない限り、そのベクトルやその行列の全ての要素に対して適用されるものとする。 Hereinafter, embodiments of the present invention will be described. In the drawings used for the following description, constituent parts having the same function and steps for performing the same process are denoted by the same reference numerals, and redundant description is omitted. Further, the processing performed for each element of a vector or matrix is assumed to be applied to all elements of the vector or matrix unless otherwise specified.
<第一実施形態に係る秘密計算システム10>
図1は秘密計算システム10の構成例を示す。秘密計算システム10は暗号化装置11と通信回線13と秘密計算装置12−1,12−2,…,12−Nとを含む。ただし、Nは3以上の整数とする。通信回線13は例えば電気事業者が提供する広域通信回線、VPN(Virtual Private Network)またはLAN(Local Area Network)等からなり、秘密計算システム10と各秘密計算装置12−1,12−2,…,12−Nとの通信及び各秘密計算装置12−1,12−2,…,12−N間の通信を可能としている。以下、各装置の詳細を説明する。
<Secret calculation system 10 according to the first embodiment>
FIG. 1 shows a configuration example of the secret calculation system 10. The secret calculation system 10 includes an
<暗号化装置11>
図2は暗号化装置11の機能ブロック図を、図3は暗号化装置11の初期設定時の処理フローを、図4は暗号化装置11の入力データ受信時の処理フローを示す。
<
2 shows a functional block diagram of the
暗号化装置11は、暗号行列生成部111、暗号入力ベクトル生成部112、暗号目印ベクトル生成部113、像ベクトル生成部114、更新済ベクトル生成部115、送信部116及び記憶部117を含む。
The
暗号化装置11は、写像を表現するm行2列の行列T及びn個の入力データを入力とし、記憶部117に格納する。この入力を用いて、N個の暗号行列の1列目からなるN個の列ベクトル、N個の暗号入力ベクトル、N個の暗号目印ベクトル、N個の像ベクトル及びN個の更新済ベクトルを生成し、それぞれN個の秘密計算装置に出力する。なお、行列T及び各ベクトルの詳細は後述する。
The
暗号化装置11内の各部(暗号行列生成部111、暗号入力ベクトル生成部112、暗号目印ベクトル生成部113、像ベクトル生成部114及び更新済ベクトル生成部115)では暗号化が行われる。その暗号化の方法としては例えば参考文献1記載の方法がある。
(参考文献1)SecureSCM. Security analysis. Deliverable D9.2, SecureSCM Project, 2009
Each unit (encryption
(Reference 1) SecureSCM. Security analysis. Deliverable D9.2, SecureSCM Project, 2009
例えば数値Aから暗号文であるN個の断片[[A]]が生成される。この場合において、N個の断片[[A]]のうちのN’個の断片[[A]]がなければ数値Aを復元することはできない。ただし、N’は、2以上N以下の整数である。N及びN’の値は、暗号化の方式により異なる。なおN個の断片[[A]]はそれぞれ異なる値であるが、便宜上全ての断片を[[A]]と表記する。 For example, N pieces [[A]] which are ciphertexts are generated from the numerical value A. In this case, the numerical value A cannot be restored unless there are N ′ pieces [[A]] of N pieces [[A]]. However, N ′ is an integer of 2 or more and N or less. The values of N and N ′ vary depending on the encryption method. N fragments [[A]] have different values, but for convenience, all fragments are represented as [[A]].
[暗号行列生成部111]
ベクトルV及び行列Mの各要素を暗号化した際に得られるN個の暗号ベクトル及び暗号行列をそれぞれ[[V]]、[[M]]と記載する。暗号行列生成部111は、写像を表現する行列Tを与えられ、行列Tの各要素を暗号化し、N個の暗号行列[[T]]を生成し(s11)、記憶部117に格納する。なお、m行2列の行列Tの1列目に含まれる要素を元とする集合(定義域)から行列Tの2列目に含まれる要素を元とする集合(値域)への写像であって、行列Tの各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列Tが表現する写像と呼ぶ。行列Tの1列目からなる列ベクトルをxとし、2列目からなる列ベクトルをyとする。よって、
[Cryptographic matrix generator 111]
N encryption vectors and encryption matrices obtained when the elements of the vector V and the matrix M are encrypted will be described as [[V]] and [[M]], respectively. The encryption
である。ただし「T」は転置を表す。 It is. However, “ T ” represents transposition.
[暗号目印ベクトル生成部113]
暗号目印ベクトル生成部113は、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルhの各要素を暗号化し、N個の暗号目印ベクトル[[h]]を生成し(s13)、記憶部117に格納する。
[Cryptographic Mark Vector Generation Unit 113]
The encryption landmark
[像ベクトル生成部114]
像ベクトル生成部114は、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成し(s15)、記憶部117に格納する。
[Image Vector Generation Unit 114]
Image
[更新済ベクトル生成部115]
更新済ベクトル生成部115は、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成し(s17)、記憶部117に格納する。
[Updated vector generation unit 115]
Updated
送信部116は、N個の暗号行列の1列目からなるN個の列ベクトル[[x]]、N個の暗号目印ベクトル[[h]]、N個の像ベクトル[[a0]]及びN個の更新済ベクトル[[c0]]が生成されると、これらのベクトルを記憶部117から取り出し、それぞれN個の秘密計算装置に送信し、配布する(s19)。
The
[暗号入力ベクトル生成部112]
暗号入力ベクトル生成部112は、n個の入力データを入力されると(s21)、n個の要素を持つ列ベクトルである入力ベクトルkの各要素を暗号化し、N個の暗号入力ベクトル[[k]]を生成し(s23)、記憶部117に格納する。
[Cryptographic input vector generation unit 112]
When n pieces of input data are input (s21), the cryptographic input
送信部116は、N個の暗号入力ベクトルが生成されると、記憶部117から取り出し、それぞれN個の秘密計算装置に送信し、配布する(s25)。
When the N encryption input vectors are generated, the
なお、本実施形態では予め入力データの個数をnと定めておき、その大きさに対する各種ベクトルを生成している。入力データの個数がn以下の場合にはブランクを表す記号を不足分だけ入力して各種ベクトルを生成し、入力データの個数がn以上の場合には入力データをn個づつのブロックに分割して、ブロック毎に各種ベクトルを生成する。 In the present embodiment, the number of input data is determined in advance as n, and various vectors for the size are generated. If the number of input data is n or less, a symbol representing a blank is input in an insufficient amount to generate various vectors. If the number of input data is n or more, the input data is divided into n blocks. Then, various vectors are generated for each block.
nを予め定めず、入力データを入力された時点において、nを決定してもよい。その場合には、各種ベクトルを入力データ入力後に生成する構成となる。この構成の場合には、ブランクを表す記号を入力したり、入力データを分割する処理を省くことができ、一回の送信で全てのベクトルを送信できるというメリットがある。本実施形態の場合には入力データが入力された後は暗号入力ベクトルのみを生成し、送信するため、応答時間が早いが、nを予め定めない場合には入力データが入力された後で各種ベクトルを生成するため応答時間が長くなるというデメリットがある。 n may be determined at the time when input data is input without setting n in advance. In this case, the various vectors are generated after input data is input. In the case of this configuration, there is an advantage that a symbol representing a blank or a process of dividing input data can be omitted, and all vectors can be transmitted by one transmission. In the case of the present embodiment, after the input data is input, only the encryption input vector is generated and transmitted, so the response time is fast. However, if n is not predetermined, the input data is input after the input data is input. Since the vector is generated, there is a demerit that the response time becomes long.
<秘密計算装置12−1>
図5は秘密計算装置12−1の機能ブロック図を、図6はその初期設定時の処理フローを、図7はその暗号入力ベクトル受信時の処理フローを示す。なお、他の秘密計算装置12−2,12−3,…,12−Nにおいても同様の機能構成を有し、同様の処理を行う。
<Secret Computing Device 12-1>
FIG. 5 is a functional block diagram of the secret computing device 12-1, FIG. 6 shows a processing flow at the time of initial setting, and FIG. 7 shows a processing flow at the time of receiving the encryption input vector. The other secret computing devices 12-2, 12-3,..., 12-N have the same functional configuration and perform the same processing.
秘密計算装置12−1は、ソート用キーベクトル生成部121、ソート部122、反復計算部123、ランダム置換部124、目印ベクトル復号部125、並び替え部126、送受信部127及び記憶部128を含む。
The secret calculation device 12-1 includes a sorting key
秘密計算装置12−1は、まず送受信部127を介して暗号行列[[T]]の1列目からなる列ベクトル[[x]]、暗号目印ベクトル[[h]]、像ベクトル[[a0]]及び更新済ベクトル[[c0]]を受信し、記憶部128に格納する(図6のs31)。次に送受信部127を介して暗号入力ベクトル[[k]]を受信し、記憶部128に格納する(図7のs33)。秘密計算装置12−1は、これらのベクトルを用いて、入力ベクトルkを復元せずに、入力ベクトルkの各要素に行列Tが表現する写像を適用した大きさnの出力ベクトルvの暗号文[[v]]を計算し、計算結果を暗号化したまま記憶部128に保持する。以下、各部の処理内容を説明する。
The secret computing device 12-1 first sends a column vector [[x]] consisting of the first column of the encryption matrix [[T]], the encryption landmark vector [[h]], and the image vector [[a] via the transmission / reception unit 127. 0 ]] and the updated vector [[c 0 ]] are received and stored in the storage unit 128 (s31 in FIG. 6). Next, the encryption input vector [[k]] is received via the transmission /
[ソート用キーベクトル生成部121]
ソート用キーベクトル生成部121は、暗号行列[[T]]の1列目からなる列ベクトル[[x]]を受信すると、これを記憶部128から取り出し、秘密計算により暗号行列[[T]]の1列目からなる列ベクトル[[x]]の各要素に2を乗じた列ベクトル2・[[x]]を生成し、記憶部128に格納する(図6のs32)。
[Sort key vector generation unit 121]
When receiving the column vector [[x]] consisting of the first column of the encryption matrix [[T]], the sorting key
さらに、ソート用キーベクトル生成部121は、暗号入力ベクトル[[k]]を受信すると、これを記憶部128から取り出し、秘密計算により暗号入力ベクトル[[k]]の各要素に2を乗じたものに1を足した列ベクトル(2・[[k]]+1n)を生成し、記憶部128に格納する。
Further, upon receiving the cryptographic input vector [[k]], the sorting key
なお、1nはn個の数値1を要素として持つ列ベクトルを表す。秘密計算により加算、乗算を行う方法として既存技術を利用することができる(例えば参考文献1参照)。
1 n represents a column vector having n
さらに、ソート用キーベクトル生成部121は、列ベクトル2・[[x]]と(2・[[k]]+1n)とを垂直に連結したソート用キーベクトル[[e]]を生成し(s35)、記憶部128に格納する。
Further, the sorting key
[ソート部122]
ソート部122は、暗号目印ベクトル[[h]]、像ベクトル[[a0]]、更新済ベクトル[[c0]]及びソート用キーベクトル[[e]]を記憶部128から取り出し、これらのベクトルを水平に連結した行列
[Sort section 122]
The
を(式(6)、(7)、(8)、(13)参照)、ソート用キーベクトル[[e]]の各要素の大小関係に応じて行毎に秘密計算によりソートし(s37)、ソート後の暗号目印ベクトル[[h]]、像ベクトル[[a0]]及び更新済ベクトル[[c0]]を記憶部128に格納する。なお、秘密計算によりソートを行う方法として既存技術を利用することができる(例えば参考文献2参照)。
(参考文献2参照)濱田浩気、五十嵐大、千田浩司、高橋克巳、「秘匿関数計算上の線形時間ソート」、SCIS、2011年、pp.1-7
(See formulas (6), (7), (8), and (13)), and sort by secret calculation for each row according to the magnitude relation of each element of the sorting key vector [[e]] (s37) The sorted encryption mark vector [[h]], the image vector [[a 0 ]], and the updated vector [[c 0 ]] are stored in the
(See Reference 2) Hiroki Hirota, Dai Igarashi, Koji Senda, Katsumi Takahashi, “Linear time sort on secret function calculation”, SCIS, 2011, pp.1-7
本実施形態で用いるソートは、秘匿関数計算でソートを行う暗号文の組[[X]]の平文Xの行を指定した列の値に従って整列した平文Yの各要素を暗号化した暗号文[[Y]]を計算し、[[X]]と[[Y]]の各要素の対応が誰にもわからないように計算することができるものであればよい。 The sort used in the present embodiment is a ciphertext obtained by encrypting each element of plaintext Y that is arranged in accordance with the value of a specified column of a plaintext X row of a ciphertext pair [[X]] that is sorted by a secret function calculation [ [Y]] may be calculated so long as no one understands the correspondence between each element of [[X]] and [[Y]].
[反復計算部123]
反復計算部123は、暗号化入力ベクトルの要素の個数に1を足した値の対数値以上の最小の整数を算出し(s38)、この値を反復回数tとする。
[Iteration calculation unit 123]
The
ただし、ceil(・)は、天井関数を表し、・以上の最小の整数を表す。 However, ceil (•) represents a ceiling function, and represents a minimum integer greater than or equal to.
反復計算部123は、記憶部128からソート後の像ベクトル[[a0]]及び更新済ベクトル[[c0]]を取り出し、i=1からi=tまで
d←2i-1 (16)
[[ci]][0…d]←[[ci-1]][0…d] (17)
[[ai]][0…d]←[[ai-1]][0…d] (18)
[[ci]][d…(m+n)]←[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)] (19)
[[ai]][d…(m+n)]
←[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
(20)
を秘密計算により求め(s39〜s45)、[[at]]を記憶部128に格納する。ただし、u[p…q]は列ベクトルuのp+1行目からq行目までを、A||BはAとBとの論理和を、iは1以上t以下の整数を表し、要素毎に代入、論理和、乗算、加算を行うものとする。なお、秘密計算により論理和を求める方法として既存技術を利用することができる(例えば参考文献1参照)。
The
d ← 2 i-1 (16)
[[c i ]] [0… d] ← [[c i-1 ]] [0… d] (17)
[[a i ]] [0… d] ← [[a i-1 ]] [0… d] (18)
[[c i ]] [d… (m + n)] ← [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )] (19)
[[a i ]] [d… (m + n)]
← [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
(20)
The determined by a secret calculation (s39~s45), stored in the
[ランダム置換部124]
ランダム置換部124は、暗号目印ベクトル[[h]]と反復計算後の像ベクトル[[at]]とを記憶部128から取り出し、この組合せを行毎に秘密計算によりランダム置換し(s47)、置換後の暗号目印ベクトル[[h]]と像ベクトル[[at]]とを記憶部128に格納する。なお、秘密計算によりランダム置換を行う方法として既存技術を利用することができる(参考文献3参照)。
(参考文献3参照)濱田浩気、五十嵐大、千田浩司、高橋克巳、「3パーティ秘匿関数計算上のランダム置換プロトコル」、情報処理学会シンポジウム論文集、2010年、巻:2010、号:9、頁:561-566
[Random replacement part 124]
(See Reference 3) Hiroki Hirota, Dai Igarashi, Koji Senda, Katsumi Takahashi, “Random replacement protocol for computing three-party secret functions”, Proceedings of the IPSJ Symposium, 2010, Volume: 2010, Issue: 9, page : 561-566
本実施形態におけるランダム置換は、秘匿関数計算でランダム置換を行う暗号文の組[[X]]の平文Xの行をランダムに置換した平文Yの各要素を暗号化した暗号文[[Y]]を計算し、[[X]]と[[Y]]の各要素の対応が誰にも分からないように計算するものであればよい。 The random replacement in the present embodiment is a ciphertext [[Y] obtained by encrypting each element of the plaintext Y obtained by randomly replacing the plaintext X row of the ciphertext pair [[X]] that is randomly replaced by the secret function calculation. [[X]] and [[Y]] may be calculated so that no one knows the correspondence between each element.
[目印ベクトル復号部125]
目印ベクトル復号部125は、送受信部127を介して、少なくとも他の(N’−1)個の秘密計算装置に対して、その秘密計算装置が保管する暗号目印ベクトル[[h]]を送信するように要求する。目印ベクトル復号部125は、他の秘密計算装置から(N’−1)個の暗号目印ベクトル[[h]]を受信すると、当該秘密計算装置が保管する暗号目印ベクトル[[h]]と併せて、N’個の暗号目印ベクトル[[h]]から、元の目印ベクトルhを復号し(s49)、復号後の目印ベクトルhと置換後の像ベクトル[[at]]とを、行の関係を変えずに記憶部128に格納する。なお、この場合における復号方法は暗号化装置11において行われた暗号化に対応するものであればよい(例えば参考文献1参照)。
[Market Vector Decoding Unit 125]
The mark
[並び替え部126]
並び替え部126は、復元した目印ベクトルhの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトル[[at]]の要素を1からnまで順に並べた列ベクトルを暗号出力ベクトル[[v]]として求め(s51)、記憶部128に格納する。このようにして求めた暗号出力ベクトル[[v]]は、入力ベクトルkに行列Tの表現する写像を適用した結果を示す出力ベクトルvを暗号化したものとなる。よって、暗号入力ベクトル[[k]]を復元せずに行列Tの表現する写像を計算し、その結果を得ることができる。
[Sort section 126]
Rearranging
<効果>
ある領域内に配置された値をどこから読み出したかを秘匿したまま読み出すという計算(以下「秘匿読み込み」という)を、従来技術において実現しようとすると、一つの入力データに対して秘匿読み込みを一度行う必要がある。そのため、領域内に配置された全ての値を読み込んだ「ふり」をするために領域の大きさmに比例した時間がかかってしまう。本実施形態は、秘匿読み込みを大量の入力データに対して一度行うことにより効率化したものである。本実施形態では、反復毎に計算済みの要素数が指数的に増加するように写像適用後の値を計算するような反復計算を作り、これを使うことによって計算時間をO((m+n)logn)にした。
<Effect>
If the calculation to read out the value placed in a certain area while keeping it secret (hereinafter referred to as “secret reading”) is to be realized in the conventional technology, it is necessary to perform confidential reading once for one input data There is. For this reason, it takes time proportional to the size m of the region to “pretend” reading all the values arranged in the region. In the present embodiment, the efficiency is improved by performing confidential reading once for a large amount of input data. In this embodiment, an iterative calculation is performed such that the value after mapping is applied so that the number of elements already calculated increases exponentially at each iteration, and the calculation time is set to O ((m + n) logn by using this calculation. )
<実施例>
本実施例では、暗号化装置11は、以下の行列Tと入力ベクトルkとを入力された場合について説明する。なお、説明を容易にするために各数値を平文で記載しているが、実際には暗号文で秘密計算を行う。
<Example>
In the present embodiment, the
暗号化装置11は、以下の目印ベクトルh、像ベクトルa0、更新済ベクトルc0を生成する。また、秘密計算装置12−1は、以下のソート用キーベクトルeを生成する。
The
ソート部122は、これらのベクトルを水平に連結した行列をソート用キーベクトル[[e]]の各要素の大小関係に応じてソートする。ソート後の各ベクトルを以下に示す。
The
反復計算部123は、ソート後の像ベクトルa0及び更新済ベクトルc0を用いて、i=1からi=tまで式(16)〜(20)を繰り返す。各iにおける像ベクトルai及び更新済ベクトルciは以下のようになる。
ランダム置換部124は、ソート後の目印ベクトルhと反復計算後の像ベクトルa4
The
の組合せをランダム置換する。なお、目印ベクトルhの要素0の位置から写像の計算結果の分布が分かるのを防ぐためにランダム置換を行う。目印ベクトルhの要素0の行は、像ベクトルa0(暗号行列の2列目と暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したもの)の暗号行列の2列目の要素の行と対応している。例えば、hの4番目の0と5番目の0との間に、hは5個の要素(9、5、2、3及び7)を持っている。これはyの4番目の要素と5番目の要素との間に、5個の値が存在することを表している。ランダム置換前に目印ベクトルhを復元すると、この分布が分かるが、ランダム置換後に目印ベクトルhを復元することで、これを防ぐことができる。 Randomly replace the combination of Note that random replacement is performed in order to prevent the distribution of the calculation result of the mapping from the position of the element 0 of the mark vector h. The row of the element 0 of the mark vector h is the element of the second column of the encryption matrix of the image vector a 0 (the second column of the encryption matrix and the encryption column vector [[0 n ]] connected vertically). Corresponds to the line. For example, between the 4th 0 and the 5th 0 of h, h has 5 elements (9, 5, 2, 3 and 7). This indicates that there are five values between the fourth element and the fifth element of y. When the mark vector h is restored before the random replacement, this distribution can be found. However, this can be prevented by restoring the mark vector h after the random replacement.
並び替え部126は、復元した目印ベクトルhの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトル[[at]]の要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルvとして求める。
Rearranging
この出力ベクトルvは、入力ベクトルkに行列Tが表現する写像を適用したベクトルとなっていることが分かる。 It can be seen that the output vector v is a vector obtained by applying the mapping represented by the matrix T to the input vector k.
なお、実施例1において、入力ベクトルkの各要素が必ずしも行列Tの1列目からなる列ベクトルxに含まれなくてもよい。この場合、xの各要素を小さいものからx1,x2,…,xmとし、行列Tの表現する写像をfとすると、[−∞,x1),[x1,x2),…,[xm−1,xm),[xm,∞]の各区間に含まれる値はそれぞれ0,f(x1),…,f(xm−1)、f(xm)として出力される。上述の例での入力ベクトルをk=(37,30,32,49,28,3,34,41,25)Tとしても同じ出力ベクトルv=(40,30,30,50,30,0,30,40,30)Tが得られ、この例では54以下の自然数に対する四捨五入が実現できている。 In the first embodiment, each element of the input vector k need not necessarily be included in the column vector x consisting of the first column of the matrix T. In this case, if each element of x is set to x 1 , x 2 ,..., X m from the smallest, and the mapping represented by the matrix T is f, [−∞, x 1 ), [x 1 , x 2 ), ..., [x m-1 , x m ), [x m , ∞] include 0, f (x 1 ), ..., f (x m-1 ), f (x m ), respectively. Is output as Even if the input vector in the above example is k = (37, 30, 32, 49, 28, 3, 34, 41, 25) T , the same output vector v = (40, 30, 30, 50, 30, 0, 30, 40, 30) T is obtained, and in this example, rounding is performed for natural numbers of 54 or less.
<変形例>
本実施形態では、秘密計算装置側でソート用キーベクトル生成部121の処理を行っているが、暗号化装置11側で行ってもよい。その場合、暗号化装置11は生成したN個のソート用キーベクトル[[e]]をN個の秘密計算装置12−1,12−2,…,12−Nに送信し配布する。
<Modification>
In the present embodiment, the sort key
本実施形態では、秘密計算装置側で反復回数tを求めているが、暗号化装置11においてtを求め、tをN個の秘密計算装置12−1,12−2,…,12−Nに送信し配布する構成としてもよい。
In this embodiment, the number of iterations t is obtained on the secret computing device side, but t is obtained in the
本実施形態では、秘密計算装置とは別の装置として暗号化装置を構成しているが、何れかの秘密計算装置上に暗号化装置を実装してもよい。 In the present embodiment, the encryption device is configured as a device different from the secret calculation device, but the encryption device may be mounted on any one of the secret calculation devices.
本発明は上記の実施形態及び変形例に限定されるものではない。例えば、上述の各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。その他、本発明の趣旨を逸脱しない範囲で適宜変更が可能である。 The present invention is not limited to the above-described embodiments and modifications. For example, the various processes described above are not only executed in time series according to the description, but may also be executed in parallel or individually as required by the processing capability of the apparatus that executes the processes. In addition, it can change suitably in the range which does not deviate from the meaning of this invention.
<プログラム及び記録媒体>
上述した暗号化装置及び秘密計算装置は、コンピュータにより機能させることもできる。この場合はコンピュータに、目的とする装置(各種実施形態で図に示した機能構成をもつ装置)として機能させるためのプログラム、またはその処理手順(各実施形態で示したもの)の各過程をコンピュータに実行させるためのプログラムを、CD−ROM、磁気ディスク、半導体記憶装置などの記録媒体から、あるいは通信回線を介してそのコンピュータ内にダウンロードし、そのプログラムを実行させればよい。
<Program and recording medium>
The above-described encryption device and secret calculation device can also be operated by a computer. In this case, each process of a program for causing a computer to function as a target device (a device having the functional configuration shown in the drawings in various embodiments) or a process procedure (shown in each embodiment) is processed by the computer. A program to be executed by the computer may be downloaded from a recording medium such as a CD-ROM, a magnetic disk, or a semiconductor storage device or via a communication line into the computer, and the program may be executed.
Claims (7)
前記暗号化装置は、
m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成部と、
nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成部と、
m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成部と、
n個の数値0からなる列ベクトル0nを暗号化し、N個の前記暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成部と、
m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成部と、
N個の前記暗号行列の1列目からなる列ベクトル、N個の前記暗号入力ベクトル、N個の前記暗号目印ベクトル、N個の前記像ベクトル及びN個の前記更新済ベクトルをそれぞれN個の秘密計算装置に配布する送信部と、を含み、
各前記秘密計算装置は、
秘密計算により前記暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により前記暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルと、前記暗号目印ベクトル、前記像ベクトル及び前記更新済ベクトルを水平に連結した行列を、前記ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソート部と、
入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとし、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算部と、
前記暗号目印ベクトルと反復計算後の前記像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換部と、
当該秘密計算装置が保管する前記暗号目印ベクトルと他の秘密計算装置が保管する前記暗号目印ベクトルとから前記目印ベクトルを復号する目印ベクトル復号部と、
目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替え部と、を含む、
秘密計算システム。 N is an integer equal to or greater than 3, and is a secret calculation system including an encryption device and N secret calculation devices,
The encryption device is:
The mapping that designates the element in the second column of the same row for the element in the first column of each row of the m-row and two-column matrix is the mapping that the matrix expresses, and each element of the matrix T that expresses the mapping is encrypted A cryptographic matrix generation unit for generating N cryptographic matrices;
a cryptographic input vector generation unit that encrypts each element of an input vector, which is a column vector having n elements, where n is the number of input data, and generates N cryptographic input vectors;
an encryption landmark vector generation unit that encrypts each element of a landmark vector, which is a column vector composed of m number 0 and numbers 1, 2,..., n, and generates N encryption landmark vectors;
encrypts the column vector 0 n of n numbers 0, N pieces of the N images vectors second column and N encryption column vector [[0 n]] and were coupled perpendicularly each encryption matrix an image vector generation unit for generating [[a 0 ]];
The column vector 1 m consisting of m numbers 1 is encrypted, the column vector 0 n consisting of n numbers 0 is encrypted, and N encryption vectors [[1 m ]] and N encryption column vectors [[ 0 n ]] and N updated vectors [[c 0 ]] that are vertically connected to each other,
A column vector consisting of the first column of the N number of cryptographic matrices, N number of cryptographic input vectors, N number of cryptographic landmark vectors, N number of image vectors, and N number of updated vectors, A transmission unit distributed to a secret computing device,
Each of the secret computing devices
A column vector obtained by multiplying each element of the column vector consisting of the first column of the cryptographic matrix by 2 by secret calculation, and a column vector obtained by adding 1 to each element of the encryption input vector multiplied by 2 by secret calculation; A secret key vector that is vertically concatenated, and a matrix that horizontally concatenates the encryption landmark vector, the image vector, and the updated vector are secreted for each row according to the magnitude relationship of each element of the sort key vector. A sorting section for sorting by calculation;
The minimum integer greater than or equal to the logarithm of the number of input data plus 1 is the number of iterations t, u [p... Q] is the p + 1th to qth rows of the column vector u, and A || B is Represents the logical sum of A and B, i is an integer of 1 to t, and i = 1 to i = t
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation unit that secretly calculates
A random replacement unit that randomly replaces the combination of the encryption landmark vector and the image vector after the repeated calculation by secret calculation for each row;
A mark vector decrypting unit that decrypts the mark vector from the cipher mark vector stored by the secret computer and the cipher mark vector stored by another secret computer;
A reordering unit that obtains, as an encryption output vector, a column vector in which image vector elements in the same row as elements having values from 1 to n are arranged in order from 1 to n among the elements of the mark vector,
Secret calculation system.
m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成部と、
nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成部と、
m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成部と、
n個の数値0からなる列ベクトル0nを暗号化し、N個の前記暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成部と、
m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成部と、
N個の前記暗号行列の1列目からなる列ベクトル、N個の前記暗号入力ベクトル、N個の前記暗号目印ベクトル、N個の前記像ベクトル及びN個の前記更新済ベクトルをそれぞれN個の秘密計算装置に配布する送信部と、を含む、
暗号化装置。 N is an integer equal to or greater than 3, and is an encryption device that generates N pieces of ciphertext that can be secretly calculated from a certain numerical value,
The mapping that designates the element in the second column of the same row for the element in the first column of each row of the m-row and two-column matrix is the mapping that the matrix expresses, and each element of the matrix T that expresses the mapping is encrypted A cryptographic matrix generation unit for generating N cryptographic matrices;
a cryptographic input vector generation unit that encrypts each element of an input vector, which is a column vector having n elements, where n is the number of input data, and generates N cryptographic input vectors;
an encryption landmark vector generation unit that encrypts each element of a landmark vector, which is a column vector composed of m number 0 and numbers 1, 2,..., n, and generates N encryption landmark vectors;
encrypts the column vector 0 n of n numbers 0, N pieces of the N images vectors second column and N encryption column vector [[0 n]] and were coupled perpendicularly each encryption matrix an image vector generation unit for generating [[a 0 ]];
The column vector 1 m consisting of m numbers 1 is encrypted, the column vector 0 n consisting of n numbers 0 is encrypted, and N encryption vectors [[1 m ]] and N encryption column vectors [[ 0 n ]] and N updated vectors [[c 0 ]] that are vertically connected to each other,
A column vector consisting of the first column of the N number of cryptographic matrices, N number of cryptographic input vectors, N number of cryptographic landmark vectors, N number of image vectors, and N number of updated vectors, Including a transmission unit distributed to the secret computing device,
Encryption device.
秘密計算により前記暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により前記暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルと、前記暗号目印ベクトル、前記像ベクトル及び前記更新済ベクトルを水平に連結した行列を、前記ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソート部と、
入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとし、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算部と、
前記暗号目印ベクトルと反復計算後の前記像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換部と、
当該秘密計算装置が保管する前記暗号目印ベクトルと他の秘密計算装置が保管する前記暗号目印ベクトルとから前記目印ベクトルを復号する目印ベクトル復号部と、
目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替え部と、を含む、
秘密計算装置。 The mapping that designates the element in the second column of the same row for the element in the first column of each row of the m-by-2 matrix is the mapping that the matrix represents, and each element of the matrix T that represents the mapping is encrypted The encryption matrix is an encryption matrix, n is the number of input data, each element of the input vector, which is a column vector having n elements, is encrypted, and the encryption input vector is m numbers 0 and 1 , 2,..., N, which are encrypted vector elements of the mark vector, are used as encryption mark vectors, and a column vector 0 n consisting of n number 0 is encrypted, and two columns of the encryption matrix An image vector [[a 0 ]] is obtained by vertically concatenating the eyes and the cipher sequence vector [[0 n ]], and a column vector 1 m consisting of m numbers 1 is encrypted, and n numbers 0 encrypts the column vector 0 n comprising encryption vector [[1 m]] the encryption column vector And Le [[0 n]] and the updated vector the concatenation vertically [[c 0]],
A column vector obtained by multiplying each element of the column vector consisting of the first column of the cryptographic matrix by 2 by secret calculation, and a column vector obtained by adding 1 to each element of the encryption input vector multiplied by 2 by secret calculation; A secret key vector that is vertically concatenated, and a matrix that horizontally concatenates the encryption landmark vector, the image vector, and the updated vector are secreted for each row according to the magnitude relationship of each element of the sort key vector. A sorting section for sorting by calculation;
The minimum integer greater than or equal to the logarithm of the number of input data plus 1 is the number of iterations t, u [p... Q] is the p + 1th to qth rows of the column vector u, and A || B is Represents the logical sum of A and B, i is an integer of 1 to t, and i = 1 to i = t
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation unit that secretly calculates
A random replacement unit that randomly replaces the combination of the encryption landmark vector and the image vector after the repeated calculation by secret calculation for each row;
A mark vector decrypting unit that decrypts the mark vector from the cipher mark vector stored by the secret computer and the cipher mark vector stored by another secret computer;
A reordering unit that obtains, as an encryption output vector, a column vector in which image vector elements in the same row as elements having values from 1 to n are arranged in order from 1 to n among the elements of the mark vector,
Secret computing device.
m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、前記暗号化装置が、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成ステップと、
nを入力データの個数とし、前記暗号化装置が、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成ステップと、
前記暗号化装置が、m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成ステップと、
前記暗号化装置が、n個の数値0からなる列ベクトル0nを暗号化し、N個の前記暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成ステップと、
前記暗号化装置が、m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成ステップと、
前記暗号化装置が、N個の前記暗号行列の1列目からなる列ベクトル、N個の前記暗号入力ベクトル、N個の前記暗号目印ベクトル、N個の前記像ベクトル及びN個の前記更新済ベクトルをそれぞれN個の秘密計算装置に配布する送信ステップと、
秘密計算により前記暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により前記暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルを生成するソート用キーベクトル生成ステップと、
各前記秘密計算装置が、前記ソート用キーベクトルと、前記暗号目印ベクトル、前記像ベクトル及び前記更新済ベクトルを水平に連結した行列を、前記ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソートステップと、
入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとして算出するステップと、
u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、各前記秘密計算装置が、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算ステップと、
各前記秘密計算装置が、前記暗号目印ベクトルと反復計算後の前記像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換ステップと、
各前記秘密計算装置が、当該秘密計算装置が保管する前記暗号目印ベクトルと他の秘密計算装置が保管する前記暗号目印ベクトルとから前記目印ベクトルを復号する目印ベクトル復号ステップと、
各前記秘密計算装置が、目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替えステップと、を含む、
秘密計算方法。 N is an integer equal to or greater than 3, and is a secret calculation method using an encryption device and N secret calculation devices,
A mapping that designates an element in the second column of the same row with respect to an element in the first column of each row of an m-row and two-column matrix is defined as a mapping that the matrix represents, and the encryption device uses a matrix T that represents the mapping. A cryptographic matrix generation step of encrypting each element of N and generating N cryptographic matrices;
n is the number of input data, and the encryption device encrypts each element of the input vector, which is a column vector having n elements, and generates N encrypted input vectors, and
The encryption device encrypts each element of a mark vector, which is a column vector composed of m number 0, and numbers 1, 2,..., N, and generates N number of mark points. Steps,
The encryption device encrypts the n-number column vectors 0 of numbers 0 to n, 2-row and N encryption column vector of N the encryption matrix [[0 n]] and a connecting perpendicular, respectively An image vector generation step for generating N image vectors [[a 0 ]] performed;
The encryption apparatus encrypts a column vector 1 m consisting of m number 1s , encrypts a column vector 0 n consisting of n numbers 0, and N encryption vectors [[1 m ]] and N An updated vector generation step for generating N updated vectors [[c 0 ]] obtained by vertically connecting the cipher string vectors [[0 n ]] of
The encryption apparatus includes a column vector consisting of the first column of the N number of the encryption matrices, N number of the encryption input vectors, N number of the encryption landmark vectors, N number of the image vectors, and N number of the updated matrices. A transmission step of distributing the vector to each of N secret computing devices;
A column vector obtained by multiplying each element of the column vector consisting of the first column of the cryptographic matrix by 2 by secret calculation, and a column vector obtained by adding 1 to each element of the encryption input vector multiplied by 2 by secret calculation; A sorting key vector generation step for generating a sorting key vector obtained by vertically concatenating
Each of the secret computing devices performs a matrix obtained by horizontally connecting the sorting key vector, the encryption landmark vector, the image vector, and the updated vector according to the magnitude relationship of each element of the sorting key vector. A sorting step for sorting by secret calculation every time,
Calculating a minimum integer equal to or greater than the logarithm of the value obtained by adding 1 to the number of input data as the number of iterations t;
u [p... q] is the column vector u from the p + 1th row to the qth row, A || B represents the logical sum of A and B, i is an integer of 1 to t, and each of the secrets The computing device is from i = 1 to i = t
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation step for secretly calculating
A random replacement step in which each of the secret calculation devices randomly replaces the combination of the encryption landmark vector and the image vector after the iterative calculation by secret calculation for each row;
A landmark vector decrypting step in which each of the secret computing devices decrypts the landmark vector from the cipher landmark vector stored by the secret computing device and the cipher landmark vector stored by another secret computing device;
Reordering step in which each of the secret computing devices obtains as a cipher output vector a column vector in which image vector elements in the same row as elements having values from 1 to n are arranged in order from 1 to n among the elements of the mark vector Including,
Secret calculation method.
m行2列の行列の各行の1列目の要素に対して同じ行の2列目の要素を指定する写像を、行列が表現する写像とし、写像を表現する行列Tの各要素を暗号化し、N個の暗号行列を生成する暗号行列生成ステップと、
nを入力データの個数とし、n個の要素を持つ列ベクトルである入力ベクトルの各要素を暗号化し、N個の暗号入力ベクトルを生成する暗号入力ベクトル生成ステップと、
m個の数値0と、数値1,2,…,nとからなる列ベクトルである目印ベクトルの各要素を暗号化し、N個の暗号目印ベクトルを生成する暗号目印ベクトル生成ステップと、
n個の数値0からなる列ベクトル0nを暗号化し、N個の前記暗号行列の2列目とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の像ベクトル[[a0]]を生成する像ベクトル生成ステップと、
m個の数値1からなる列ベクトル1mを暗号化し、n個の数値0からなる列ベクトル0nを暗号化し、N個の暗号ベクトル[[1m]]とN個の暗号列ベクトル[[0n]]とをそれぞれ垂直に連結したN個の更新済ベクトル[[c0]]を生成する更新済ベクトル生成ステップと、
N個の前記暗号行列の1列目からなる列ベクトル、N個の前記暗号入力ベクトル、N個の前記暗号目印ベクトル、N個の前記像ベクトル及びN個の前記更新済ベクトルをそれぞれN個の秘密計算方法に配布する送信ステップと、を含む、
暗号化方法。 N is an encryption method for generating N pieces of ciphertext that can be secretly calculated from a certain numerical value, where N is an integer of 3 or more,
The mapping that designates the element in the second column of the same row for the element in the first column of each row of the m-row and two-column matrix is the mapping that the matrix expresses, and each element of the matrix T that expresses the mapping is encrypted A cryptographic matrix generation step for generating N cryptographic matrices;
a cryptographic input vector generation step of encrypting each element of an input vector, which is a column vector having n elements, where n is the number of input data, and generating N cryptographic input vectors;
a cryptographic landmark vector generation step of encrypting each element of a landmark vector that is a column vector composed of m number 0, number 1, 2, ..., n, and generating N number of cryptographic landmark vectors;
encrypts the column vector 0 n of n numbers 0, N pieces of the N images vectors second column and N encryption column vector [[0 n]] and were coupled perpendicularly each encryption matrix an image vector generation step for generating [[a 0 ]];
The column vector 1 m consisting of m numbers 1 is encrypted, the column vector 0 n consisting of n numbers 0 is encrypted, and N encryption vectors [[1 m ]] and N encryption column vectors [[ 0 n ]] vertically connected to each other to generate N updated vectors [[c 0 ]],
A column vector consisting of the first column of the N number of cryptographic matrices, N number of cryptographic input vectors, N number of cryptographic landmark vectors, N number of image vectors, and N number of updated vectors, Sending to the secret calculation method,
Encryption method.
秘密計算により前記暗号行列の1列目からなる列ベクトルの各要素に2を乗じた列ベクトルと、秘密計算により前記暗号入力ベクトルの各要素に2を乗じたものに1を足した列ベクトルとを垂直に連結したソート用キーベクトルと、前記暗号目印ベクトル、前記像ベクトル及び前記更新済ベクトルを水平に連結した行列を、前記ソート用キーベクトルの各要素の大小関係に応じて行毎に秘密計算によりソートするソートステップと、
入力データの個数に1を足した値の対数値以上の最小の整数を反復回数tとし、u[p…q]を列ベクトルuのp+1行目からq行目までとし、A||BはAとBとの論理和を表し、iは1以上t以下の整数であり、i=1からi=tまで
d=2i-1
[[ci]][0…d]=[[ci-1]][0…d]
[[ai]][0…d]=[[ai-1]][0…d]
[[ci]][d…(m+n)]=[[ci-1]][d…(m+n)]||[[ci-1]][0…(m+n-d)]
[[ai]][d…(m+n)]
=[[ai-1]][d…(m+n)]+[[ai-1]][0…(m+n-d)]×([[ci]][d…(m+n)]-[[ci-1]][d…(m+n)])
を秘密計算する反復計算ステップと、
前記暗号目印ベクトルと反復計算後の前記像ベクトルとの組合せを行毎に秘密計算によりランダム置換するランダム置換ステップと、
前記目印ベクトルを復号する目印ベクトル復号ステップと、
目印ベクトルの要素の内、1からnまでの値を持つ要素と同じ行の像ベクトルの要素を1からnまで順に並べた列ベクトルを暗号出力ベクトルとして求める並び替えステップと、を含む、
秘密計算方法。 The mapping that designates the element in the second column of the same row for the element in the first column of each row of the m-by-2 matrix is the mapping that the matrix represents, and each element of the matrix T that represents the mapping is encrypted The encryption matrix is an encryption matrix, n is the number of input data, each element of the input vector, which is a column vector having n elements, is encrypted, and the encryption input vector is m numbers 0 and 1 , 2,..., N, which are encrypted vector elements of the mark vector, are used as encryption mark vectors, and a column vector 0 n consisting of n number 0 is encrypted, and two columns of the encryption matrix An image vector [[a 0 ]] is obtained by vertically concatenating the eyes and the cipher sequence vector [[0 n ]], and a column vector 1 m consisting of m numbers 1 is encrypted, and n numbers 0 encrypts the column vector 0 n comprising encryption vector [[1 m]] the encryption column vector And Le [[0 n]] and the updated vector the concatenation vertically [[c 0]],
A column vector obtained by multiplying each element of the column vector consisting of the first column of the cryptographic matrix by 2 by secret calculation, and a column vector obtained by adding 1 to each element of the encryption input vector multiplied by 2 by secret calculation; A secret key vector that is vertically concatenated, and a matrix that horizontally concatenates the encryption landmark vector, the image vector, and the updated vector are secreted for each row according to the magnitude relationship of each element of the sort key vector. A sorting step to sort by calculation;
The minimum integer greater than or equal to the logarithm of the number of input data plus 1 is the number of iterations t, u [p... Q] is the p + 1th to qth rows of the column vector u, and A || B is Represents the logical sum of A and B, i is an integer of 1 to t, and i = 1 to i = t
d = 2 i-1
[[c i ]] [0… d] = [[c i-1 ]] [0… d]
[[a i ]] [0… d] = [[a i-1 ]] [0… d]
[[c i ]] [d… (m + n)] = [[c i-1 ]] [d… (m + n)] || [[c i-1 ]] [0… (m + nd )]
[[a i ]] [d… (m + n)]
= [[a i-1 ]] [d… (m + n)] + [[a i-1 ]] [0… (m + nd)] × ([[c i ]] [d… (m + n)]-[[c i-1 ]] [d ... (m + n)])
An iterative calculation step for secretly calculating
A random replacement step of randomly replacing a combination of the encryption landmark vector and the image vector after the iterative calculation by a secret calculation for each row;
A landmark vector decoding step of decoding the landmark vector;
A reordering step for obtaining, as an encryption output vector, a column vector in which image vector elements in the same row as elements having a value from 1 to n among the elements of the mark vector are arranged in order from 1 to n;
Secret calculation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012014214A JP5689826B2 (en) | 2012-01-26 | 2012-01-26 | Secret calculation system, encryption apparatus, secret calculation apparatus and method, program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012014214A JP5689826B2 (en) | 2012-01-26 | 2012-01-26 | Secret calculation system, encryption apparatus, secret calculation apparatus and method, program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013157652A true JP2013157652A (en) | 2013-08-15 |
JP5689826B2 JP5689826B2 (en) | 2015-03-25 |
Family
ID=49052500
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012014214A Active JP5689826B2 (en) | 2012-01-26 | 2012-01-26 | Secret calculation system, encryption apparatus, secret calculation apparatus and method, program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5689826B2 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020036126A1 (en) * | 2018-08-13 | 2020-02-20 | 日本電信電話株式会社 | Secret combination system, method therefor, secret calculation device, and program |
WO2020036125A1 (en) * | 2018-08-13 | 2020-02-20 | 日本電信電話株式会社 | Secret strong mapping calculation system, method therefor, secret calculation device, and program |
CN112805768A (en) * | 2018-10-04 | 2021-05-14 | 日本电信电话株式会社 | Secret sigmoid function calculation system, secret logistic regression calculation system, secret sigmoid function calculation device, secret logistic regression calculation device, secret sigmoid function calculation method, secret logistic regression calculation method, and program |
CN113055184A (en) * | 2021-03-22 | 2021-06-29 | 中国工商银行股份有限公司 | Data encryption and decryption method and device |
CN115455451A (en) * | 2022-09-23 | 2022-12-09 | 蔡玉娟 | Encrypted data grading decryption method and AI system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6772339B1 (en) * | 2000-03-13 | 2004-08-03 | Lucent Technologies Inc. | Mix and match: a new approach to secure multiparty computation |
-
2012
- 2012-01-26 JP JP2012014214A patent/JP5689826B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6772339B1 (en) * | 2000-03-13 | 2004-08-03 | Lucent Technologies Inc. | Mix and match: a new approach to secure multiparty computation |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2020036126A1 (en) * | 2018-08-13 | 2021-08-10 | 日本電信電話株式会社 | Secret coupling system, this method, secret calculator and program |
US20210314145A1 (en) * | 2018-08-13 | 2021-10-07 | Nippon Telegraph And Telephone Corporation | Secure joining system, method, secure computing apparatus and program |
CN112602135A (en) * | 2018-08-13 | 2021-04-02 | 日本电信电话株式会社 | Secret linking system, secret linking method, secret computing device, and program |
CN112602135B (en) * | 2018-08-13 | 2024-05-24 | 日本电信电话株式会社 | Secret linking system, secret linking method, secret calculation device, and recording medium |
US20210182062A1 (en) * | 2018-08-13 | 2021-06-17 | Nippon Telegraph And Telephone Corporation | Secure strong mapping computing systems, methods, secure computing apparatus and program |
US11888973B2 (en) | 2018-08-13 | 2024-01-30 | Nippon Telegraph And Telephone Corporation | Secure joining system, method, secure computing apparatus and program |
WO2020036125A1 (en) * | 2018-08-13 | 2020-02-20 | 日本電信電話株式会社 | Secret strong mapping calculation system, method therefor, secret calculation device, and program |
JPWO2020036125A1 (en) * | 2018-08-13 | 2021-08-12 | 日本電信電話株式会社 | Secret strong mapping calculation system, these methods, secret calculation device and program |
WO2020036126A1 (en) * | 2018-08-13 | 2020-02-20 | 日本電信電話株式会社 | Secret combination system, method therefor, secret calculation device, and program |
AU2019322590B2 (en) * | 2018-08-13 | 2021-12-16 | Nippon Telegraph And Telephone Corporation | Secure joining system, method, secure computing apparatus and program |
AU2019321329B2 (en) * | 2018-08-13 | 2021-12-16 | Nippon Telegraph And Telephone Corporation | Secure strong mapping computing systems, methods, secure computing apparatus and program |
EP3839922A4 (en) * | 2018-08-13 | 2022-03-23 | Nippon Telegraph And Telephone Corporation | Secret combination system, method therefor, secret calculation device, and program |
JP7067625B2 (en) | 2018-08-13 | 2022-05-16 | 日本電信電話株式会社 | Secret coupling system, this method, secret calculator and program |
JP7067624B2 (en) | 2018-08-13 | 2022-05-16 | 日本電信電話株式会社 | Secret strong mapping calculation system, these methods, secret calculation device and program |
US11886876B2 (en) | 2018-08-13 | 2024-01-30 | Nippon Telegraph And Telephone Corporation | Secure strong mapping computing systems, methods, secure computing apparatus and program |
CN112805768B (en) * | 2018-10-04 | 2023-08-04 | 日本电信电话株式会社 | Secret S-type function calculation system and method therefor, secret logistic regression calculation system and method therefor, secret S-type function calculation device, secret logistic regression calculation device, and program |
CN112805768A (en) * | 2018-10-04 | 2021-05-14 | 日本电信电话株式会社 | Secret sigmoid function calculation system, secret logistic regression calculation system, secret sigmoid function calculation device, secret logistic regression calculation device, secret sigmoid function calculation method, secret logistic regression calculation method, and program |
CN113055184A (en) * | 2021-03-22 | 2021-06-29 | 中国工商银行股份有限公司 | Data encryption and decryption method and device |
CN115455451B (en) * | 2022-09-23 | 2023-10-24 | 北京国联视讯信息技术股份有限公司 | Encrypted data hierarchical decryption method and AI system |
CN115455451A (en) * | 2022-09-23 | 2022-12-09 | 蔡玉娟 | Encrypted data grading decryption method and AI system |
Also Published As
Publication number | Publication date |
---|---|
JP5689826B2 (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Wang et al. | A block cipher with dynamic S-boxes based on tent map | |
CN102546181B (en) | Cloud storage encrypting and deciphering method based on secret key pool | |
Khan et al. | A novel technique for the construction of strong S-boxes based on chaotic Lorenz systems | |
CN106850221B (en) | Information encryption and decryption method and device | |
JP6035459B2 (en) | ENCRYPTION DEVICE, DECRYPTION DEVICE, AND PROGRAM | |
WO2014007347A1 (en) | Shared secret key generation device, encryption device, decryption device, shared secret key generation method, encryption method, decryption method, and program | |
TWI571091B (en) | Technologies for modifying a first cryptographic cipher with operations of a second cryptographic cipher | |
Belazi et al. | Algebraic analysis of a RGB image encryption algorithm based on DNA encoding and chaotic map | |
JP2014126866A (en) | Device and method for encryption processing | |
Abusukhon et al. | New direction of cryptography: A review on text-to-image encryption algorithms based on RGB color value | |
CN107135062A (en) | A kind of encryption method of improved big file | |
JP5689826B2 (en) | Secret calculation system, encryption apparatus, secret calculation apparatus and method, program | |
CN112183767A (en) | Multi-key lower model aggregation federal learning method and related equipment | |
WO2016088453A1 (en) | Encryption apparatus, decryption apparatus, cryptography processing system, encryption method, decryption method, encryption program, and decryption program | |
CN109450615A (en) | A kind of efficient OPC UA client and server data transfer encryption method | |
JP6552184B2 (en) | INFORMATION PROCESSING APPARATUS AND METHOD THEREOF | |
Acharya | Image encryption using a new chaos based encryption algorithm | |
WO2020213114A1 (en) | Mac tag list generation device, mac tag list verification device, method, and program | |
Priya et al. | FPGA implementation of efficient AES encryption | |
CN109495478B (en) | Block chain-based distributed secure communication method and system | |
WO2020070973A1 (en) | Decryption device, cryptosystem, decryption method, and decryption program | |
Chaouch et al. | Software application for simulation-based AES, RSA and elliptic-curve algorithms | |
CN107493164B (en) | DES encryption method and system based on chaotic system | |
Bajaj et al. | AES algorithm for encryption | |
Xian et al. | Image encryption algorithm based on chaos and S-boxes scrambling |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140206 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141010 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141021 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141218 |
|
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: 20150120 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150129 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5689826 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |