WO2016056503A1 - 部分文字列位置検出装置、部分文字列位置検出方法及びプログラム - Google Patents

部分文字列位置検出装置、部分文字列位置検出方法及びプログラム Download PDF

Info

Publication number
WO2016056503A1
WO2016056503A1 PCT/JP2015/078185 JP2015078185W WO2016056503A1 WO 2016056503 A1 WO2016056503 A1 WO 2016056503A1 JP 2015078185 W JP2015078185 W JP 2015078185W WO 2016056503 A1 WO2016056503 A1 WO 2016056503A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
character string
text
partial character
secret
Prior art date
Application number
PCT/JP2015/078185
Other languages
English (en)
French (fr)
Inventor
浩気 濱田
大 五十嵐
直人 桐淵
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to CN201580053993.1A priority Critical patent/CN106796764B/zh
Priority to US15/515,650 priority patent/US10291396B2/en
Priority to JP2016553093A priority patent/JP6367959B2/ja
Priority to EP15848972.4A priority patent/EP3206200B1/en
Publication of WO2016056503A1 publication Critical patent/WO2016056503A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem

Definitions

  • the present invention relates to a cryptographic application technique, and more particularly to a technique for detecting an appearance position in a text of a partial character string included in a pattern without revealing input data.
  • Non-Patent Document 1 As a method for obtaining a specific calculation result without restoring the encrypted numerical value, there is a method called secret calculation (see, for example, Non-Patent Document 1).
  • encryption is performed such that numerical fragments are distributed to three secret calculation devices, and the three secret calculation devices perform cooperative calculation, thereby performing addition / subtraction, constant sum without restoring the numerical values.
  • Multiplication, constant multiplication, logical operation (negation, logical product, logical sum, exclusive logical sum), data format conversion (integer, binary number) results distributed to three secret computing devices, ie encrypted Can be held as is.
  • An object of the present invention is to efficiently detect a position where a partial character string in a pattern appears in text when pattern matching is performed.
  • the partial character string position detection device of the present invention includes a secret sentence [t] of a text t having a length n, a secret sentence [p] having a pattern p having a length m, and a length m
  • the secret text [c] of vector c and the secret text [E] of matrix E of m rows and n columns are input, and the secret text [H] of matrix H of m rows and n columns is output.
  • p [i] is the i th element of the pattern p
  • t [i] is the i th element of the text t
  • c [i] is the i th element of the vector c
  • E [i] [ j] is the element in the i-th row and j-th column of the matrix E
  • H [i] [j] is the element in the i-th row and j-th column of the matrix H.
  • a secret sentence [F] of a matrix F of row (n + 1) columns is generated.
  • a secret sentence [F ′] of a matrix F ′ of columns is generated.
  • the partial character string position detection technique of the present invention when the matching result for each character of the text and the pattern is given, the appearance position in the text of the partial character string in the pattern is rounded by O (log m) round. , O (mn) traffic can be detected. Therefore, when pattern matching is performed, the position where the partial character string in the pattern appears in the text can be detected efficiently.
  • FIG. 1 is a diagram illustrating a functional configuration of the partial character string position detection device.
  • FIG. 2 is a diagram illustrating a processing flow of the partial character string position detection method.
  • a value obtained by concealing a value a by encryption, secret sharing, or the like is referred to as a concealed text of a, and is represented as [a].
  • a concealed text of a When the concealment is secret sharing, a set of secret sharing fragments of each secret computing device is referred to by [a].
  • the i-th row of the matrix X is X [i].
  • the i-th element of the vector u is denoted as u [i].
  • the entire matrix in which each element of the matrix X is concealed is denoted as [X], and is called the secret sentence of X.
  • the entire vector in which each element of the vector u is concealed is denoted as [u], and is called u concealment text.
  • ⁇ T represents transposition of ⁇ .
  • the most effective method for performing such pattern matching is to regard the pattern as an array of partial character strings separated by an infinite length gap, calculate the appearance position of each partial character string in the text, and information on the appearance position This is a method for determining whether text matches a pattern using.
  • H [i] [j] 1
  • H [i] [j] is an element in the i-th row and j-th column of the matrix H.
  • p i: (c [i ], e j [i]) is defined as the first element S i [0] of S i to be calculated by the following equation and e 'j [i]. Thereby, a vector e ′ j satisfying the above condition can be generated.
  • Reference 2 is a technique for efficiently calculating by changing the order of binary operations. Thereby, S 1 ,..., S m ⁇ 1 can be calculated O (m) times by O (log m) stage binomial operation, and the vector e ′ j can be calculated more efficiently. .
  • step S20 a matrix F shown in the following equation is generated.
  • this program is distributed by selling, transferring, or lending a portable recording medium such as a DVD or CD-ROM in which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of the server computer and transferring the program from the server computer to another computer via a network.
  • the present apparatus is configured by executing a predetermined program on a computer.
  • a predetermined program on a computer.
  • at least a part of these processing contents may be realized by hardware.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 パターン中の部分文字列がテキスト中に出現する位置を効率よく検出する。部分文字列位置検出装置1は、テキストtの秘匿文〔t〕、パターンpの秘匿文〔p〕、ベクトルcの秘匿文〔c〕及び行列Eの秘匿文〔E〕を入力とし、行列Hの秘匿文〔H〕を出力する。第一行列生成部20は、F[i][j]=E[i][j+i mod n+1](ただし、E[i][n]=¬c[i]とみなす)となる行列Fの秘匿文〔F〕を生成する。第二行列生成部30は、c[i]=0である場合またはc[i]=1かつk=i,…,n-1で連続してc[k]=1であるすべてのkについてF[k][j]=1である場合にF'[i][j]=1が設定され、それ以外であればF'[i][j]=0が設定される行列F'の秘匿文〔F'〕を生成する。第三行列生成部40は、〔H[i][j]〕=〔F'[i][j-i mod n+1]〕∧〔c[i]〕∧¬〔c[i-1]〕を計算して秘匿文〔H〕を生成する。

Description

部分文字列位置検出装置、部分文字列位置検出方法及びプログラム
 この発明は、暗号応用技術に関し、特に、入力データを明かすことなくパターンに含まれる部分文字列のテキスト中の出現位置を検出する技術に関する。
 暗号化された数値を復元すること無く特定の演算結果を得る方法として、秘密計算と呼ばれる方法がある(例えば、非特許文献1参照)。非特許文献1の方法では、3つの秘密計算装置に数値の断片を分散させるという暗号化を行い、3つの秘密計算装置が協調計算を行うことにより、数値を復元すること無く、加減算、定数和、乗算、定数倍、論理演算(否定、論理積、論理和、排他的論理和)、データ形式変換(整数、二進数)の結果を3つの秘密計算装置に分散された状態、すなわち暗号化されたまま保持させることができる。
 文字列のパターンマッチングを行う場合、パターンに含まれる部分文字列のテキスト中の出現位置を求め、その出現位置の情報を基にテキストがパターンにマッチしているかどうかの判定をすることがよく行われる。
千田浩司、濱田浩気、五十嵐大、高橋克巳、"軽量検証可能3パーティ秘匿関数計算の再考"、CSS、2010年
 しかしながら、秘密計算で部分文字列の位置を求めようとすると、テキストとパターンの内容を秘匿したまま処理をする必要がある。そのため、素朴な方法でパターンマッチングを行う場合、入力テキスト長をn、パターン長をmとすると、O(1)ラウンド、Ω(m3n)の通信量を要していた。
 この発明の目的は、パターンマッチングを行う場合にパターン中の部分文字列がテキスト中に出現する位置を効率よく検出することである。
 上記の課題を解決するために、この発明の部分文字列位置検出装置は、長さnのテキストtの秘匿文〔t〕、長さmのパターンpの秘匿文〔p〕、長さmのベクトルcの秘匿文〔c〕及びm行n列の行列Eの秘匿文〔E〕を入力とし、m行n列の行列Hの秘匿文〔H〕を出力する。p[i]はパターンpのi番目の要素であり、t[i]はテキストtのi番目の要素であり、c[i]はベクトルcのi番目の要素であり、E[i][j]は行列Eのi行j列目の要素であり、H[i][j]は行列Hのi行j列目の要素である。ベクトルcは、p[i]が任意の長さの文字列を表す無限長ギャップでない場合にはc[i]=1が設定され、そうでない場合にはc[i]=0が設定されるものである。行列Eは、c[i]=0またはp[i]=t[j]ならばE[i][j]=1が設定され、そうでない場合にはE[i][j]=0が設定されるものである。行列Hは、p[i]がパターンpを無限長ギャップで分割した部分文字列の先頭の要素であり、かつ、部分文字列がテキストtのj番目の位置に出現するならばH[i][j]=1が設定され、それ以外であればH[i][j]=0が設定されるものである。第一行列生成部は、F[i][j]=E[i][j+i mod n+1](ただし、E[i][n]=¬c[i]とみなす)となるm行(n+1)列の行列Fの秘匿文〔F〕を生成する。第二行列生成部は、c[i]=0である場合またはc[i]=1かつkをiから1ずつ加算したとき連続してc[k]=1であるすべてのkについてF[k][j]=1である場合にF'[i][j]=1が設定され、それ以外であればF'[i][j]=0が設定されるm行(n+1)列の行列F'の秘匿文〔F'〕を生成する。第三行列生成部は、〔H[i][j]〕=〔F'[i][j-i mod n+1]〕∧〔c[i]〕∧¬〔c[i-1]〕を計算して上記秘匿文〔H〕を生成する。
 この発明の部分文字列位置検出技術によれば、テキストとパターンの文字ごとのマッチング結果が与えられているときに、パターン中の部分文字列のテキスト中での出現位置をO(log m)ラウンド、O(mn)の通信量で検出することができる。したがって、パターンマッチングを行う場合にパターン中の部分文字列がテキスト中に出現する位置を効率よく検出することができる。
図1は、部分文字列位置検出装置の機能構成を例示する図である。 図2は、部分文字列位置検出方法の処理フローを例示する図である。
 実施形態の説明に先立ち、この明細書における表記方法および用語の定義について説明する。
<表記方法>
 ある値aを暗号化や秘密分散などにより秘匿化した値をaの秘匿文と呼び、〔a〕と表記する。秘匿化が秘密分散である場合は、〔a〕により各秘密計算装置が持つ秘密分散の断片の集合を参照する。
 行列Xの第i行をX[i]と表記する。ベクトルuの第i要素をu[i]と表記する。行列Xの各要素を秘匿化した行列全体を〔X〕と表記し、Xの秘匿文と呼ぶ。ベクトルuの各要素を秘匿化したベクトル全体を〔u〕と表記し、uの秘匿文と呼ぶ。
 ・Tは・の転置を表す。
<加算、減算、乗算>
 加算、減算、乗算の各演算は二つの値a, bの秘匿文〔a〕,〔b〕を入力とし、それぞれa+b, a-b, abの計算結果c1, c2, c3の秘匿文〔c1〕,〔c2〕,〔c3〕を計算する。これらの演算の実行をそれぞれ次式のように記述する。
Figure JPOXMLDOC01-appb-M000007
 なお、誤解を招く恐れのない場合は、Add(〔a〕,〔b〕),Sub(〔a〕,〔b〕),Mul(〔a〕,〔b〕)をそれぞれ〔a〕+〔b〕,〔a〕-〔b〕,〔a〕×〔b〕と略記する。
<論理演算>
 論理和、論理積、否定の各演算は二つの値a, b∈{0,1}の秘匿文〔a〕,〔b〕を入力とし、それぞれaとbの論理和, aとbの論理積, aの否定の計算結果c1, c2, c3の秘匿文〔c1〕,〔c2〕,〔c3〕を計算する。これらの演算の実行をそれぞれ次式のように記述する。
Figure JPOXMLDOC01-appb-M000008
 これらの論理演算は、次式の計算により実現される。
Figure JPOXMLDOC01-appb-M000009
<等号判定>
 等号判定の演算は2つの値a, bの秘匿文〔a〕,〔b〕を入力とし、それぞれa=b, a≠bの真偽値c1, c2の秘匿文〔c1〕,〔c2〕を計算する。真偽値は真のときは1、偽のときは0とする。
 これらの演算の実行をそれぞれ次式のように記述する。
Figure JPOXMLDOC01-appb-M000010
 秘匿化、復元、加算、減算、乗算は、例えば、非特許文献1に記載の方法を用いればよい。また、等号判定は、例えば、「Ivan Damgard, Matthias Fitzi, Eike Kiltz, Jesper Buus Nielsen, and Tomas Toft, “Unconditionally secure constant-rounds multi-party computation for equality, comparison, bits and exponentiation”, TCC, pp. 285-304, 2006.(参考文献1)」に記載の方法を用いればよい。
<パターンマッチング>
 パターンマッチングとは、テキストtとパターンpの二つの文字列が与えられたときに、テキストtがパターンpに記述された条件を満たしているかどうかを判定する問題である。テキストtはアルファベットΣ={a,b,c,…,z}の要素を0個以上並べたベクトルである。パターンpは0個以上のアルファベットまたは特殊記号からなるベクトルである。特殊記号としては、データベース操作のための言語であるSQLのLIKEコマンドや基本ソフト(OS)操作のための言語であるシェルの多くで使われている特殊記号「?」や「*」が挙げられる。前者の特殊記号「?」は、任意のアルファベット1個を表す特殊記号であり、ワイルドカードと呼ばれる。後者の特殊記号「*」は、0個以上の任意の長さのアルファベットの列を表す特殊記号であり、無限長ギャップと呼ばれる。テキストtがパターンpにマッチするとは、パターンpが表すことのできる文字列の集合にテキストtが含まれていることを言う。
 例えば、パターンpをp=(a,b,?,a,b,*)とする。パターンpは、t0=(a,b,c,a,b)やt1=(a,b,a,a,b,x,x)を表すことができるが、t2=(a,b,a,b,a)は表すことができない。したがって、前者二つのテキストt0,t1はパターンpにマッチするが、後者のテキストt2はパターンpにマッチしない。
 このようなパターンマッチングを行う場合の有力な方法は、パターンを無限長ギャップで区切られた部分文字列の配列とみなし、各部分文字列のテキスト中の出現位置を計算し、その出現位置の情報を用いてテキストがパターンにマッチしているかどうかを判定する方法である。
 パターンpを無限長ギャップ「*」で区切られた部分文字列s0,…,sk-1(si[j]∈(Σ∪{?}))を無限長ギャップ「*」で連結したベクトルとみなす。ここで、kはパターンp中の部分文字列の個数である。このとき、次式を満たせば、部分文字列siはテキストtの位置jに出現するという。
Figure JPOXMLDOC01-appb-M000011
 ただし、λiは部分文字列siのサイズである。
 例えば、テキストt=(a,a,b,a,a,b,a)、パターンp=(*,a,?,*,b,*)のとき、パターンpは無限長ギャップ「*」で二つの部分文字列(a,?),(b)に分割できる。したがって、k=2、s0=(a,?)、s1=(b)である。このとき、s0=(a,?)はj=0,1,3,4の位置に出現し、s1=(b)はj=2,5の位置に出現する。
 以下、この発明の実施の形態について詳細に説明する。なお、図面中において同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。
 実施形態の部分文字列位置検出装置1は、図1に例示するように、入力部10、第一行列生成部20、第二行列生成部30、第三行列生成部40及び出力部50を含む。
 部分文字列位置検出装置1は、例えば、中央演算処理装置(Central Processing Unit、CPU)、主記憶装置(Random Access Memory、RAM)などを有する公知又は専用のコンピュータに特別なプログラムが読み込まれて構成された特別な装置である。部分文字列位置検出装置1は、例えば、中央演算処理装置の制御のもとで各処理を実行する。部分文字列位置検出装置1に入力されたデータや各処理で得られたデータは、例えば、主記憶装置に格納され、主記憶装置に格納されたデータは必要に応じて読み出されて他の処理に利用される。
 部分文字列位置検出装置1は、長さnのテキストtの秘匿文〔t〕、長さmのパターンpの秘匿文〔p〕、長さmのベクトルcの秘匿文〔c〕及びm行n列の行列Eの秘匿文〔E〕を入力とし、m行n列の行列Hの秘匿文〔H〕を出力する。
 ベクトルcは、p[i]が任意の長さの文字列を表す無限長ギャップでない場合にはc[i]=1が設定され、そうでない場合にはc[i]=0が設定される。ここで、p[i]はパターンpのi番目の要素である。c[i]はベクトルcのi番目の要素である。
 行列Eは、c[i]=0またはp[i]=t[j]ならばE[i][j]=1が設定され、そうでない場合にはE[i][j]=0が設定される。ここで、t[i]はテキストtのi番目の要素である。E[i][j]は行列Eのi行j列目の要素である。
 行列Hは、p[i]がパターンpを無限長ギャップで分割した部分文字列sλの先頭の要素であり、かつ、部分文字列sλがテキストtのj番目の位置に出現するならばH[i][j]=1が設定され、それ以外であればH[i][j]=0が設定される。ここで、H[i][j]は行列Hのi行j列目の要素である。ここで、λは部分文字列のインデックスであり、パターンpを無限長ギャップで分割した部分文字列がL個あるとして、λ=0,…,L-1である。
 以下、図2を参照して、実施形態の部分文字列位置検出方法を説明する。
 ステップS10において、入力部10へ、テキストtの秘匿文〔t〕、パターンpの秘匿文〔p〕、ベクトルcの秘匿文〔c〕及び行列Eの秘匿文〔E〕が入力される。
 ステップS20において、第一行列生成部20は、F[i][j]=E[i][j+i mod n+1](ただし、E[i][n]=¬c[i]とみなす)となるm行(n+1)列の行列Fの秘匿文〔F〕を生成する。行列Fは、行列Eの最終列に¬cTを連結した行列を、i=0,…,m-1について第i行でiだけ左にシフトした行列となる。
 ステップS30において、第二行列生成部30は、c[i]=0である場合またはc[i]=1かつkをiから1ずつ加算したとき連続してc[k]=1であるすべてのkについてF[k][j]=1である場合にF'[i][j]=1が設定され、それ以外であればF'[i][j]=0が設定されるm行(n+1)列の行列F'の秘匿文〔F'〕を生成する。
 行列F'は以下のように生成すればよい。行列Fの第j列ベクトルをejとする。ベクトルcとベクトルejを用いて、次のようにしてベクトルe’jを生成する。ベクトルe’jは、c[i]=0∨(c[i]=1∧(c[i]以降の連続するすべてのc[k]=1を満たすkについてej[k]=1))である場合にe’j[i]=1を設定し、それ以外の場合にe’j[i]=0を設定する。行列F'はベクトルe’jを用いてF'[i][j]=e'j[i]として生成する。
 ベクトルe’jを計算する具体的な方法は、以下のようにすればよい。まず、次式で定義される二項演算
Figure JPOXMLDOC01-appb-M000012
を考える。
Figure JPOXMLDOC01-appb-M000013
 pi:=(c[i],ej[i])と定義し、次式により計算されるSiの1番目の要素Si[0]をe’j[i]とする。これにより、上記の条件を満たすベクトルe’jを生成することができる。
Figure JPOXMLDOC01-appb-M000014
 このとき二項演算
Figure JPOXMLDOC01-appb-M000015
が結合性を持つことを利用して、「Richard E. Ladner and Michael J. Fischer, “Parallel prefix computation”, J. ACM, vol. 27, no. 4, pp. 831-838, 1980.(参考文献2)」に記載された手法を適用することができる。参考文献2は、二項演算の順序を変えて効率よく計算する手法である。これにより、S1,…,Sm-1をO(m)回、O(log m)段の二項演算で計算することができ、より効率的にベクトルe’jを計算することができる。
 ステップS40において、第三行列生成部40は、〔H[i][j]〕=〔F'[i][j-i mod (n+1)]〕∧〔c[i]〕∧¬〔c[i-1]〕を計算して行列Hの秘匿文〔H〕を生成する。
 ステップS50において、出力部50は、m行n列の行列Hの秘匿文〔H〕を出力する。行列Hは、p[i]をパターンpの部分文字列sλの先頭の要素とすると、行列Hのi行目においてH[i][j]=1であるjが存在すれば、テキストtのj番目の位置に部分文字列sλが検出されることを表している。
 以下、上述の方法により部分文字列の位置を検出できることを、具体例を用いて示す。
 例えば、ステップS10において、次式に示すテキストt、パターンp、ベクトルc及び行列Eが入力されたものとする。
Figure JPOXMLDOC01-appb-M000016
 この例では、n=10、m=7である。
 ステップS20において、次式に示す行列Fが生成される。
Figure JPOXMLDOC01-appb-M000017
 ステップS30において、次式に示す行列F'が生成される。
Figure JPOXMLDOC01-appb-M000018
 ステップS40において、次式に示す行列Hが生成される。
Figure JPOXMLDOC01-appb-M000019
 例えば、パターンp=(*,a,b,*,?,b,*)の部分文字列(p[4],p[5])=(?,b)がテキストt=(a,a,b,a,b,a,b,b,a,b)で出現するのは、t[1]=(a,b), t[3]=(a,b), t[5]=(a,b), t[6]=(b,b), t[8]=(a,b)である。行列Hでは、ベクトルH[4]=(0 1 0 1 0 1 1 0 1 0)において、要素H[4][1], H[4][3], H[4][5], H[4][6], H[4][8]が1であり、その他の要素が0となっていることがわかる。このようにして、行列Hを用いてパターンpの部分文字列の出現位置を検出することが可能となっている。
<発明の効果>
 この発明の部分文字列位置検出技術によれば、テキストとパターンの文字ごとのマッチングの結果が与えられているときに、パターン中の部分文字列のテキスト中での出現位置をO(log m)ラウンド、O(mn)の通信量で実現できる。
<発明のポイント>
 この発明では、パターン中の各部分文字列のテキスト中での出現位置をパターン中の部分文字列ごとに計算するのではなく、文字ごとのマッチングの結果を使って一括で計算することにより、部分文字列ごとに計算するとΩ(m3n)の通信量を要する処理をO(mn)の通信量で実現する。
 この発明は上述の実施形態に限定されるものではなく、この発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。上記実施形態において説明した各種の処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。
[プログラム、記録媒体]
 上記実施形態で説明した各装置における各種の処理機能をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記各装置における各種の処理機能がコンピュータ上で実現される。
 この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよい。
 また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD-ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。
 このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記録媒体に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。
 また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。

Claims (5)

  1.  長さnのテキストtの秘匿文〔t〕、長さmのパターンpの秘匿文〔p〕、長さmのベクトルcの秘匿文〔c〕及びm行n列の行列Eの秘匿文〔E〕を入力とし、m行n列の行列Hの秘匿文〔H〕を出力する部分文字列位置検出装置であって、
     p[i]は上記パターンpのi番目の要素であり、t[i]は上記テキストtのi番目の要素であり、c[i]は上記ベクトルcのi番目の要素であり、E[i][j]は上記行列Eのi行j列目の要素であり、H[i][j]は上記行列Hのi行j列目の要素であり、
     上記ベクトルcは、p[i]が任意の長さの文字列を表す無限長ギャップでない場合にはc[i]=1が設定され、そうでない場合にはc[i]=0が設定されるものであり、
     上記行列Eは、c[i]=0またはp[i]=t[j]ならばE[i][j]=1が設定され、そうでない場合にはE[i][j]=0が設定されるものであり、
     上記行列Hは、p[i]が上記パターンpを上記無限長ギャップで分割した部分文字列の先頭の要素であり、かつ、上記部分文字列が上記テキストtのj番目の位置に出現するならばH[i][j]=1が設定され、それ以外であればH[i][j]=0が設定されるものであり、
     F[i][j]=E[i][j+i mod n+1](ただし、E[i][n]=¬c[i]とみなす)となるm行(n+1)列の行列Fの秘匿文〔F〕を生成する第一行列生成部と、
     c[i]=0である場合またはc[i]=1かつkをiから1ずつ加算したとき連続してc[k]=1であるすべてのkについてF[k][j]=1である場合にF'[i][j]=1が設定され、それ以外であればF'[i][j]=0が設定されるm行(n+1)列の行列F'の秘匿文〔F'〕を生成する第二行列生成部と、
     〔H[i][j]〕=〔F'[i][j-i mod n+1]〕∧〔c[i]〕∧¬〔c[i-1]〕を計算して上記秘匿文〔H〕を生成する第三行列生成部と、
     を含む部分文字列位置検出装置。
  2.  請求項1に記載の部分文字列位置検出装置であって、
    Figure JPOXMLDOC01-appb-M000001
    を、
    Figure JPOXMLDOC01-appb-M000002
    で定義される二項演算とし、pi:=(c[i],ej[i])とし、
     上記第二行列生成部は、次式により計算されるSiの1番目の要素をe’j[i]とするものである
    Figure JPOXMLDOC01-appb-M000003
     部分文字列位置検出装置。
  3.  長さnのテキストtの秘匿文〔t〕、長さmのパターンpの秘匿文〔p〕、長さmのベクトルcの秘匿文〔c〕及びm行n列の行列Eの秘匿文〔E〕を入力とし、m行n列の行列Hの秘匿文〔H〕を出力する部分文字列位置検出方法であって、
     p[i]は上記パターンpのi番目の要素であり、t[i]は上記テキストtのi番目の要素であり、c[i]は上記ベクトルcのi番目の要素であり、E[i][j]は上記行列Eのi行j列目の要素であり、H[i][j]は上記行列Hのi行j列目の要素であり、
     上記ベクトルcは、p[i]が任意の長さの文字列を表す無限長ギャップでない場合にはc[i]=1が設定され、そうでない場合にはc[i]=0が設定されるものであり、
     上記行列Eは、c[i]=0またはp[i]=t[j]ならばE[i][j]=1が設定され、そうでない場合にはE[i][j]=0が設定されるものであり、
     上記行列Hは、p[i]が上記パターンpを上記無限長ギャップで分割した部分文字列の先頭の要素であり、かつ、上記部分文字列が上記テキストtのj番目の位置に出現するならばH[i][j]=1が設定され、それ以外であればH[i][j]=0が設定されるものであり、
     第一行列生成部が、F[i][j]=E[i][j+i mod n+1](ただし、E[i][n]=¬c[i]とみなす)となるm行(n+1)列の行列Fの秘匿文〔F〕を生成する第一行列生成ステップと、
     第二行列生成部が、c[i]=0である場合またはc[i]=1かつkをiから1ずつ加算したとき連続してc[k]=1であるすべてのkについてF[k][j]=1である場合にF'[i][j]=1が設定され、それ以外であればF'[i][j]=0が設定されるm行(n+1)列の行列F'の秘匿文〔F'〕を生成する第二行列生成ステップと、
     第三行列生成部が、〔H[i][j]〕=〔F'[i][j-i mod n+1]〕∧〔c[i]〕∧¬〔c[i-1]〕を計算して上記秘匿文〔H〕を生成する第三行列生成ステップと、
     を含む部分文字列位置検出方法。
  4.  請求項3に記載の部分文字列位置検出方法であって、
    Figure JPOXMLDOC01-appb-M000004
    を、
    Figure JPOXMLDOC01-appb-M000005
    で定義される二項演算とし、pi:=(c[i],ej[i])とし、
     上記第二行列生成ステップは、次式により計算されるSiの1番目の要素をe’j[i]とするものである
    Figure JPOXMLDOC01-appb-M000006
     部分文字列位置検出方法。
  5.  請求項1または2に記載の部分文字列位置検出装置としてコンピュータを機能させるためのプログラム。
PCT/JP2015/078185 2014-10-08 2015-10-05 部分文字列位置検出装置、部分文字列位置検出方法及びプログラム WO2016056503A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201580053993.1A CN106796764B (zh) 2014-10-08 2015-10-05 部分字符串位置检测装置、方法及记录介质
US15/515,650 US10291396B2 (en) 2014-10-08 2015-10-05 Device, method and program for detecting positions of partial character strings
JP2016553093A JP6367959B2 (ja) 2014-10-08 2015-10-05 部分文字列位置検出装置、部分文字列位置検出方法及びプログラム
EP15848972.4A EP3206200B1 (en) 2014-10-08 2015-10-05 Device, method and program for detecting positions of partial character strings

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2014-206943 2014-10-08
JP2014206943 2014-10-08

Publications (1)

Publication Number Publication Date
WO2016056503A1 true WO2016056503A1 (ja) 2016-04-14

Family

ID=55653114

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/078185 WO2016056503A1 (ja) 2014-10-08 2015-10-05 部分文字列位置検出装置、部分文字列位置検出方法及びプログラム

Country Status (5)

Country Link
US (1) US10291396B2 (ja)
EP (1) EP3206200B1 (ja)
JP (1) JP6367959B2 (ja)
CN (1) CN106796764B (ja)
WO (1) WO2016056503A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018008547A1 (ja) * 2016-07-06 2018-01-11 日本電信電話株式会社 秘密計算システム、秘密計算装置、秘密計算方法、およびプログラム

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6927332B2 (ja) * 2017-12-19 2021-08-25 日本電信電話株式会社 検索装置、検索方法、プログラム、および記録媒体
US11907641B2 (en) * 2018-03-19 2024-02-20 Nippon Telegraph And Telephone Corporation Parameter setting apparatus, computation apparatus, method, program, and recoding medium thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052116A (ja) * 1999-08-06 2001-02-23 Toshiba Corp パターン列マッチング装置とパターン列マッチング方法と文字列マッチング装置と文字列マッチング方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7093137B1 (en) * 1999-09-30 2006-08-15 Casio Computer Co., Ltd. Database management apparatus and encrypting/decrypting system
US6246769B1 (en) * 2000-02-24 2001-06-12 Michael L. Kohut Authorized user verification by sequential pattern recognition and access code acquisition
US20080141363A1 (en) * 2005-01-27 2008-06-12 John Sidney White Pattern Based Password Method and System Resistant to Attack by Observation or Interception
CN101593196B (zh) * 2008-05-30 2013-09-25 日电(中国)有限公司 用于快速密文检索的方法、装置和系统
US7995764B2 (en) * 2008-08-28 2011-08-09 Red Hat, Inc. Sharing a secret using hyperplanes over GF(2m)
US9613292B1 (en) * 2012-01-26 2017-04-04 Hrl Laboratories, Llc Secure multi-dimensional pattern matching for secure search and recognition
CN101859323B (zh) * 2010-05-31 2013-01-16 广西大学 密文全文检索系统
IL213662A0 (en) * 2011-06-20 2011-11-30 Eliphaz Hibshoosh Key generation using multiple sets of secret shares
EP2747366A1 (en) * 2012-12-24 2014-06-25 British Telecommunications public limited company Client/server access authentication
CN103544208B (zh) * 2013-08-16 2016-07-06 东软集团股份有限公司 海量特征串集合的匹配方法及系统
JP5937556B2 (ja) * 2013-09-30 2016-06-22 日本電信電話株式会社 秘密計算装置、秘匿検索システム、秘密計算方法、秘匿検索方法、プログラム

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052116A (ja) * 1999-08-06 2001-02-23 Toshiba Corp パターン列マッチング装置とパターン列マッチング方法と文字列マッチング装置と文字列マッチング方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KOKI HARADA ET AL.: "Takoshiki Jikan·Ryoiki Himitsu Seiki Hyogen Shogo Algorithm", 2014 NEN ABSTRACTS OF SYMPOSIUM ON CRYPTOGRAPHY AND INFORMATION SECURITY, 21 January 2014 (2014-01-21), pages 1 - 8, XP009501782 *
See also references of EP3206200A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018008547A1 (ja) * 2016-07-06 2018-01-11 日本電信電話株式会社 秘密計算システム、秘密計算装置、秘密計算方法、およびプログラム
JPWO2018008547A1 (ja) * 2016-07-06 2019-04-04 日本電信電話株式会社 秘密計算システム、秘密計算装置、秘密計算方法、およびプログラム

Also Published As

Publication number Publication date
JP6367959B2 (ja) 2018-08-01
EP3206200A1 (en) 2017-08-16
CN106796764A (zh) 2017-05-31
EP3206200A4 (en) 2018-06-06
US20170302442A1 (en) 2017-10-19
CN106796764B (zh) 2020-03-03
EP3206200B1 (en) 2020-12-09
US10291396B2 (en) 2019-05-14
JPWO2016056503A1 (ja) 2017-07-20

Similar Documents

Publication Publication Date Title
Cheon et al. Homomorphic computation of edit distance
US8694979B2 (en) Efficient egonet computation in a weighted directed graph
US11164484B2 (en) Secure computation system, secure computation device, secure computation method, and program
JP6583970B2 (ja) 秘密乱数合成装置、秘密乱数合成方法、およびプログラム
US11121868B2 (en) Secure computation system, secure computation device, secure computation method, and program
JP6367959B2 (ja) 部分文字列位置検出装置、部分文字列位置検出方法及びプログラム
JP6585846B2 (ja) 秘密計算システム、秘密計算装置、秘密計算方法、およびプログラム
US20230254115A1 (en) Protection of transformations by intermediate randomization in cryptographic operations
JP6337133B2 (ja) 非減少列判定装置、非減少列判定方法及びプログラム
JP6067890B2 (ja) 要素複製装置、要素複製方法、およびプログラム
Lapworth Parallel encryption of input and output data for HPC applications
JP6682105B2 (ja) フィッシャー正確検定計算装置、方法及びプログラム
JP4924177B2 (ja) プログラム難読化装置及びプログラム
WO2018008543A1 (ja) 秘密計算システム、秘密計算装置、秘密計算方法、およびプログラム
Tchernykh et al. Cryptographic Primitives Optimization Based on the Concepts of the Residue Number System and Finite Ring Neural Network
Eriksson Using Neural Networks to Identify Infected Files for Protection against Ransomware
JP6093718B2 (ja) 拡大体乗算装置、拡大体乗算方法及びプログラム
CN117857004A (zh) 具有同态加密操作的装置和方法
Vedam Boolean Arithmetic Polynomials and Equivalence Checking

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15848972

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016553093

Country of ref document: JP

Kind code of ref document: A

REEP Request for entry into the european phase

Ref document number: 2015848972

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2015848972

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 15515650

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE