WO2023157118A1 - 秘密計算装置、秘密計算方法、プログラム - Google Patents

秘密計算装置、秘密計算方法、プログラム Download PDF

Info

Publication number
WO2023157118A1
WO2023157118A1 PCT/JP2022/006128 JP2022006128W WO2023157118A1 WO 2023157118 A1 WO2023157118 A1 WO 2023157118A1 JP 2022006128 W JP2022006128 W JP 2022006128W WO 2023157118 A1 WO2023157118 A1 WO 2023157118A1
Authority
WO
WIPO (PCT)
Prior art keywords
window frame
string
frame flag
flag string
value
Prior art date
Application number
PCT/JP2022/006128
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 PCT/JP2022/006128 priority Critical patent/WO2023157118A1/ja
Publication of WO2023157118A1 publication Critical patent/WO2023157118A1/ja

Links

Images

Classifications

    • 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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to a secure computing device, a secure computing method, and a program for securely computing a database.
  • the Window function is a function that groups records by key attributes, and performs aggregation within a "window" of a specified width based on each row. For example, in the case of a total for one column before and after, the input and output are as shown in Table 1. Note that the values in different groups are not summed up at this time. There is a Group by function that is similar to the Window function, but the Group by function aggregates each group into a single value, while the Window function aggregates each row within the window frame and outputs the result. different in that Patent Document 1 and Non-Patent Document 1 are available as conventional technologies related to Group By.
  • the secure computing device of the present invention is a secure computing device that performs calculations while concealing a database containing a key string k ⁇ that is an attribute string and a data string v ⁇ that is a value string.
  • the group flag string g ⁇ represents a vector whose value is 1 at the position where the value of the key string changes and whose value is 0 at other positions.
  • [[x]] denote the share of value x by Shamir secret sharing
  • i denote the current row number, s the window start position, t the window end position, and the key columns and Assume that the number of rows in the data string is l, and the current row number i is incremented by 1 each time all flag string generation processing is completed within the range of 0 to less than l.
  • the secure computing device of the present invention includes a first half window frame flag string generator, a second half window frame flag string generator, a window frame flag string generator, an inverted window frame flag string generator, a share converter, and a sum-of-products Includes calculation part.
  • the first-half window frame flag string generator extracts the s+1-th element to the i-th element of ⁇ g ⁇ ⁇ for the vector subVector ( ⁇ g ⁇ ⁇ ,s+1,i), each position from the end A bit string obtained by ORing all bits up to is generated as the first half window frame flag string ⁇ w f ⁇ ⁇ .
  • the second half window frame flag string generator extracts the i+1th to tth elements of ⁇ g ⁇ ⁇ for the vector subVector ( ⁇ g ⁇ ⁇ , i+1, t), from the beginning to each position A bit string obtained by ORing all bits is generated as the second half window frame flag string ⁇ w l ⁇ ⁇ .
  • the window frame flag string generator combines the first half window frame flag string ⁇ w f ⁇ ⁇ from the front and the second half window frame flag string ⁇ w l ⁇ ⁇ from the back, with ⁇ 0 ⁇ interposed to combine them. Generates ⁇ w ⁇ ⁇ .
  • the reversed window frame flag string generator generates a reversed window frame flag string ⁇ w' ⁇ ⁇ by performing a NOT operation on the window frame flag string ⁇ w ⁇ ⁇ .
  • the share conversion unit converts the reversed window frame flag string ⁇ w' ⁇ ⁇ to the reversed window frame flag string [[w' ⁇ ]].
  • the sum-of-products operation part extracts the elements from s to t of the data string [[v' ⁇ ] ] sorted in ascending order. t) and the inverted window frame flag string [[w' ⁇ ]].
  • the secure computing device of the present invention it is possible to calculate the sum operation of the window function with low-cost operations.
  • FIG. 2 is a block diagram showing the functional configuration of the secure computing device according to the first embodiment
  • FIG. 4 is a flowchart showing the operation of the secure computing device of the first embodiment
  • FIG. 3 is a block diagram showing the functional configuration of a secure computing device according to Modification 1
  • 10 is a flowchart showing the operation of the secure computing device of Modification 1; The figure which shows the functional structural example of a computer.
  • c ⁇ max(a,b) is calculated in plaintext and outputs the plaintext a or b, whichever has the larger value.
  • c ⁇ min(a,b) outputs the smaller value of plaintext a and b in plaintext calculation.
  • Secret sharing is an encryption method that divides data into multiple values and distributes them to multiple parties.
  • the secure computing device of the following embodiment encrypts data by (k, n) threshold secret sharing.
  • (k,n) threshold secret sharing means that the data is divided into n random values (called shares), the original data can be recovered by collecting more than k shares, and the original data can be recovered from less than k shares.
  • the secure computing devices of the following embodiments use Shamir secret sharing (reference non-patent document 1) and replication secret sharing (reference non-patent documents 2 and 3).
  • Reference non-patent document 1 Adi Shamir. How to share a secret. Communications of the ACM, Vol. 22, No. 11, pp. 612-613, 1979.
  • Reference non-patent document 2 Mitsuru Ito, Akira Saito, and Takao Nishizeki. Secret sharing scheme realizing general access structure. Electronics and Communications in Japan (Part III: Fundamental Electronic Science), Vol. 72, No. 9, pp. 56 -64, 1989.)
  • Reference Non-Patent Document 3 Ronald Cramer, Ivan Damgard, and Yuval Ishai. Share conversion, pseudorandom secret-sharing and applications to secure computation. In Theory of Cryptography Conference, pp. 342-362.
  • the share of the value x by Shamir secret sharing is represented as [[x]].
  • the share of the value x by replication secret sharing is expressed as ⁇ x ⁇ . Since replication secret sharing is particularly efficient for processing 1-bit data, it is used selectively in the following examples. Also, the value obtained by sharing the permutation ⁇ is expressed as ⁇ >.
  • the OR operation is an operation that inputs ciphertexts ⁇ a ⁇ and ⁇ b ⁇ of 1-bit values a and b and outputs a ciphertext of the calculation result c of aORb, and is described as follows.
  • PrefixOR is an operation that returns a bit string obtained by ORing all bits from the beginning to each position for the bit string b ⁇ .
  • the output is c ⁇
  • SuffixOR is an operation that returns a bit string obtained by ORing all bits from the end of c ⁇ to each position.
  • a secure stable sort is a protocol for stable sorting of vectors.
  • the secure stable sort consists of the following algorithms. ⁇ > ⁇ GenPerm([[k ⁇ ]]): Outputs a permutation ⁇ that stably sorts the key string k ⁇ in ascending order. [[v' ⁇ ]] ⁇ Sort( ⁇ >, [[v ⁇ ]]): Outputs [[v' ⁇ ]] sorted by applying ⁇ to v ⁇ .
  • Reference Non-Patent Document 4 and the like are known as a high-speed mounting method for realizing this.
  • the second line shows a process of stably encrypting the key string [[k ⁇ ]] by ⁇ and outputting the result of sorting [[k′ ⁇ ]].
  • the third line shows a process of performing anonymity stable sorting on the data string [[v ⁇ ]] by ⁇ and outputting the sort result [[v′ ⁇ ]].
  • the fourth line sets the top value ⁇ eq ⁇ ⁇ 0 of the vector ⁇ eq ⁇ ⁇ to ⁇ 0 ⁇ , and sets the top value ⁇ g ⁇ ⁇ 0 of the group flag string ⁇ g ⁇ ⁇ to ⁇ 1 ⁇ . processing.
  • the 5th line indicates that the processing of the 6th and 7th lines is repeated.
  • Line 6 replaces i-th value ⁇ eq ⁇ ⁇ i of vector ⁇ eq ⁇ ⁇ with Eq([[k ⁇ ]] i-1 ,[[k ⁇ ]] i ), i.e. i-1 If the value [[k ⁇ ]] i ⁇ 1 and the i-th value [[k ⁇ ]] i are equal, 1 is given, and if they are different, 0 is given. Therefore, the vector eq ⁇ is a vector characterized by a series of 1s until reaching the point where the value of the key string changes, a point of 0 at the point where the value of the key string changes, and a series of 1s until the next point where the value of the key string changes. is.
  • Line 7 sets the i-th value ⁇ g ⁇ ⁇ i of the group flag string ⁇ g ⁇ ⁇ to Not( ⁇ eq ⁇ ⁇ i ). represents a vector whose value is 1 and whose value is 0 at other positions.
  • the 8th line indicates the end of the iteration process, and the 9th line is the output of Algorithm 1: grouped key column [[k' ⁇ ]], grouped data column [[v' ⁇ ]] , represents the group flag sequence ⁇ g ⁇ ⁇ .
  • Algorithm 2 shows the details of the method for generating the window frame flag string for executing the window function on secure computation, which is a method unique to the present invention.
  • Input Group flag string ⁇ g ⁇ ⁇ , current line number i, window frame start position s, window frame end position t (however, s ⁇ i ⁇ t)
  • Output window frame flag string ⁇ w ⁇ ⁇ 1: ⁇ w f ⁇ ⁇ SuffixOr(subVector( ⁇ g ⁇ ⁇ ,s+1,i)) 2: ⁇ w l ⁇ ⁇ PrefixOr(subVector( ⁇ g ⁇ ⁇ ,i+1,t)) 3: ⁇ w ⁇ ⁇ w f ⁇ ⁇
  • the first line of Algorithm 2 is a vector subVector( ⁇ g ⁇ ⁇ ,s+1 , i), SuffixOr, ie, a bit string obtained by ORing all bits from the end to each position, is generated as the first
  • the second line is PrefixOr , that is, the beginning to each position is generated as the second half window frame flag string ⁇ w l ⁇ ⁇ . Therefore, if a position where the value of the key string changes appears on the way from the beginning to the end, all the elements located at the end from this position will be 1, so 0,...,0,1,...,1 Such a result is obtained.
  • Lines 3 and 4 indicate that ⁇ w ⁇ ⁇ is generated and output by combining ⁇ w f ⁇ ⁇ from the front, ⁇ w l ⁇ ⁇ from the back, and ⁇ 0 ⁇ in between. . That is, ⁇ 0 ⁇ corresponds to the current line number.
  • the vector w ⁇ has the characteristic that it indicates the value 0 for elements belonging to the group containing the current row number, and the value 1 for elements belonging to a group different from the group containing the current row number. For example, if the element corresponding to the current line number is represented by > ⁇ , then the vector w ⁇ is 1,...,1,0,...,>0 ⁇ ,...,0,1,...,1 An example output is possible.
  • the second line indicates that the processing up to the 9th line is repeatedly executed.
  • the 3rd line is i-poffset, that is, the position offset from the current line number i by the window frame start position offset poffset is set as the window frame start position s, and all exceptions where i-poffset is 0 or less are treated as 0. To do so, the process of calculating the window frame start position s as s ⁇ max(i-poffset, 0) is shown.
  • i + foffset that is, the position offset by the window frame end position offset foffset from the current line number i is the window frame end position t
  • i + foffset is l-1 or more
  • the fifth line shows processing for calculating the window frame flag string ⁇ w ⁇ ⁇ by Algorithm 2.
  • the sixth line shows processing for generating a reversed window frame flag string ⁇ w' ⁇ ⁇ by performing NOT operation on the window frame flag string ⁇ w ⁇ ⁇ .
  • the 7th line shows the process of converting ⁇ w' ⁇ ⁇ , which is the shared secret sharing share, into the share [[w' ⁇ ]] of Shamir secret sharing.
  • the 7th line is performed to execute the PSum processing in the following 8th line.
  • the eighth line is a subVector ([[v' ⁇ ]],s,t that extracts the elements from the window frame start position s to the window frame end position t of the data string [[v' ⁇ ]] sorted in ascending order ) and [[w' ⁇ ]].
  • the value remains as the product only for the positions of the aggregation target, and the other products are all 0, so the aggregation result column [[u ⁇ ]] indicates the result of the Sum operation for the aggregation target.
  • the ninth line shows the end of the iterative process, and the tenth line shows the process of outputting the grouped key string [[k' ⁇ ]] and aggregation result string [[u ⁇ ]].
  • the data columns are sorted in ascending order within the group.
  • ⁇ w ⁇ ⁇ which is a flag string, is generated such that 0 is set for positions to be counted and 1 is set for positions that are not.
  • ⁇ g ⁇ ⁇ is a flag string in which the element at the end of the group is indicated by 1 in Non-Patent Document 1, but if it is regarded as a flag associated with the boundary of the group, it is regarded as a bit string in which the group boundary is indicated by 1. can be fixed.
  • Algorithm 2 by taking Suffix/Prefix OR in the vertical direction, it is possible to generate a flag string in which the elements beyond the group boundary are 1. However, the current row is always counted, so the initial value is 0.
  • ⁇ w ⁇ ⁇ is a flag string in which 0 is the position to be tallied and 1 is not.
  • the secure computing device 1 of this embodiment includes an input data storage unit 10A, a first half window frame flag string generator 10, a second half window frame flag string generator 11, and a window frame flag string generator 12. , an inverted window frame flag string generation unit 13, a share conversion unit 14, a sum-of-products operation unit 15, and an output data storage unit 10B.
  • the input data storage unit 10A stores in advance data to be input to the secure computing device. In this embodiment, it is assumed that Algorithm 1 has already been executed, and the input data storage unit 10A stores a grouped key string [[k' ⁇ ]], a grouped data string [[v' ⁇ ]], It remembers the group flag sequence ⁇ g ⁇ ⁇ .
  • the input data storage unit 10A also stores in advance a window frame start position offset poffset and a window frame end position offset foffset, which are parameters arbitrarily set by the user.
  • the input data storage unit 10A stores a key string [[k ⁇ ]], a data string [[v ⁇ ]], a window frame start position offset poffset, a window frame
  • the end position offset foffset should be stored in advance.
  • the first-half window frame flag string generator 10 executes the 3rd to 5th lines of Algorithm 3 (the 1st line of Algorithm 2 referenced by the 5th line) according to the repetition condition of the 2nd line of Algorithm 3 .
  • the first half window frame flag string generator 10 acquires the window frame start position s and the window frame end position t, and extracts the elements from the s+1-th element of ⁇ g ⁇ ⁇ to the i-th element.
  • the vector subVector ( ⁇ g ⁇ ⁇ , s+1, i) consisting of the following, a bit string obtained by ORing all bits from the end to each position is generated as the first half window frame flag string ⁇ w f ⁇ ⁇ (S10 ).
  • the second half window frame flag string generating unit 11 executes the 3rd to 5th lines of Algorithm 3 (the 2nd line of Algorithm 2 referred to by the 5th line) according to the repetition condition of the 2nd line of Algorithm 3 .
  • the second half window frame flag string generator 11 obtains the window frame start position s and the window frame end position t, and extracts the i+1-th to t-th elements of ⁇ g ⁇ ⁇ .
  • the vector subVector ( ⁇ g ⁇ ⁇ , i+1, t)
  • a bit string obtained by ORing all bits from the beginning to each position is generated as the second half window frame flag string ⁇ w l ⁇ ⁇ (S11).
  • the window frame flag string generator 12 executes the 5th line of Algorithm 3 (the 3rd line of Algorithm 2 referenced by the 5th line) according to the repeat condition of the 2nd line of Algorithm 3 .
  • the window frame flag string generation unit 12 joins the first half window frame flag string ⁇ w f ⁇ ⁇ from the front and the second half window frame flag string ⁇ w l ⁇ ⁇ from the rear, sandwiching ⁇ 0 ⁇ . Thus, a window frame flag string ⁇ w ⁇ ⁇ is generated (S12).
  • the inversion window frame flag string generator 13 executes the sixth line of Algorithm 3 according to the repetition condition of the second line of Algorithm 3 .
  • the reversed window frame flag string generator 13 generates a reversed window frame flag string ⁇ w' ⁇ ⁇ by performing a NOT operation on the window frame flag string ⁇ w ⁇ ⁇ (S13).
  • the share conversion unit 14 converts the reversed window frame flag string ⁇ w' ⁇ ⁇ into the reversed window frame flag string [[w' ⁇ ]] (S14).
  • the sum-of-products operation unit 15 executes the 8th line of Algorithm 3 according to the repetition condition of the 2nd line of Algorithm 3 .
  • the sum-of-products operation unit 15 extracts the elements from s to t of the data string [[v' ⁇ ]] obtained by sorting the data string [[v ⁇ ]] in ascending order. ⁇ ]], s, t) and the inverted window frame flag string [[w' ⁇ ]] are sum-of-products (S15).
  • the output data storage unit 10B stores [[k' ⁇ ]] and [[u ⁇ ]], which are the outputs of Algorithm 3 .
  • the secure computing device includes a database 2 composed of pre-anonymized data, a data anonymizing unit 3 for anonymizing the data in the database 2, and the same processing as the secure computing device 1. (secure computing device 100 of modified example 1, steps S3 and S1).
  • the apparatus of the present invention includes, for example, a single hardware entity, which includes an input unit to which a keyboard can be connected, an output unit to which a liquid crystal display can be connected, and a communication device (for example, a communication cable) capable of communicating with the outside of the hardware entity.
  • a communication device for example, a communication cable
  • CPU Central Processing Unit, which may include cache memory, registers, etc.
  • memory RAM and ROM external storage device such as hard disk
  • input unit, output unit, communication unit a CPU, a RAM, a ROM, and a bus for connecting data to and from an external storage device.
  • the hardware entity may be provided with a device (drive) capable of reading and writing a recording medium such as a CD-ROM.
  • a physical entity with such hardware resources includes a general purpose computer.
  • the external storage device of the hardware entity stores the programs necessary for realizing the functions described above and the data required for the processing of these programs (not limited to the external storage device; It may be stored in a ROM, which is a dedicated storage device). Data obtained by processing these programs are appropriately stored in a RAM, an external storage device, or the like.
  • each program stored in an external storage device or ROM, etc.
  • the data necessary for processing each program are read into the memory as needed, and interpreted, executed and processed by the CPU as appropriate.
  • the CPU realizes a predetermined function (each component expressed as above, . . . unit, . . . means, etc.).
  • a program that describes this process can be recorded on a computer-readable recording medium.
  • Any computer-readable recording medium may be used, for example, a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, or the like.
  • magnetic recording devices hard disk devices, flexible disks, magnetic tapes, etc., as optical discs, DVD (Digital Versatile Disc), DVD-RAM (Random Access Memory), CD-ROM (Compact Disc Read Only Memory), CD-R (Recordable) / RW (ReWritable), etc., MO (Magneto-Optical disc) etc. as a magneto-optical recording medium, EEP-ROM (Electrically Erasable and Programmable-Read Only Memory) etc. as a semiconductor memory can be used.
  • EEP-ROM Electrical Erasable and Programmable-Read Only Memory
  • this program is carried out, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded.
  • the program may be distributed by storing the program in the storage device of the server computer and transferring the program from the server computer to other computers via the network.
  • a computer that executes such a program for example, first stores the program recorded on a portable recording medium or the program transferred from the server computer once in its own storage device. Then, when executing the process, this computer reads the program stored in its own recording medium and executes the process according to the read program. Also, as another execution form of this program, the computer may read the program directly from a portable recording medium and execute processing according to the program, and the program is transferred from the server computer to this computer. Each time, the processing according to the received program may be executed sequentially. In addition, the above-mentioned processing is executed by a so-called ASP (Application Service Provider) type service, which does not transfer the program from the server computer to this computer, and realizes the processing function only by its execution instruction and result acquisition. may be It should be noted that the program in this embodiment includes information that is used for processing by a computer and that conforms to the program (data that is not a direct instruction to the computer but has the property of prescribing the processing of the computer, etc.).
  • ASP
  • a hardware entity is configured by executing a predetermined program on a computer, but at least part of these processing contents may be implemented by hardware.

Abstract

秘密計算装置は、subVector({g},s+1,i)について、末尾から各位置までの全ビットのORを演算したbit列を{wf→}として生成する前半ウィンドウフレームフラグ列生成部と、subVector({g},i+1,t)について、先頭から各位置までの全ビットのORを演算したbit列を{wl→}として生成する後半ウィンドウフレームフラグ列生成部と、{wf→}と{wl→}を結合することにより{w}を生成するウィンドウフレームフラグ列生成部と、{w}にNOT演算を行うことにより、{w'}を生成する反転ウィンドウフレームフラグ列生成部と、{w'}を[[w']]に変換するシェア変換部と、subVector([[v']],s,t)と[[w']]の積和演算を実行する積和演算部を含む。

Description

秘密計算装置、秘密計算方法、プログラム
 本発明は、データベースを秘密計算する秘密計算装置、秘密計算方法、プログラムに関する。
 Window関数はキー属性でレコードをグループ分けしたうえで、各行を基準として、指定する幅の「窓」内で集計等を行う関数である。例えば前後1列を集計対象とした合計の場合、表1に示す入出力となる。このとき、別グループの値は合計されていないことに注意する。
Figure JPOXMLDOC01-appb-T000001
 
 Window関数に類似する機能としてGroup by機能があるが、Group by機能はグループごとに一つの値に集約するのに対し、Window関数は各行に対して窓枠内での集計が行われ結果が出力される点で異なる。Group Byに関する従来技術として、特許文献1、非特許文献1がある。
特許第6989006号公報
菊池亮、濱田浩気、五十嵐大、高橋元、「横断的動線分析を秘密計算でやってみよう」、In SCIS2020(2020年暗号と情報セキュリティシンポジウム)、pp. 1-8, 2020.
 Window関数を秘密計算上で実現する手法については何れの文献にも報告されていない。SQL機能のうちWindow関数はキー属性でグループ分けしたうえで、さらに窓枠内で集計する必要がある。しかし、秘密計算で実現する場合、グループ分け及び窓枠の境界を暗号化したまま中身を見ずに計算する点が課題となる。
 そこで本発明では、低コストの演算でWindow関数のSum演算を計算することができる秘密計算装置を提供することを目的とする。
 本発明の秘密計算装置は、属性の列であるキー列kと、値の列であるデータ列vを含むデータベースを秘匿したまま演算する秘密計算装置である。
 グループフラグ列gはキー列の値が変わる位置において値が1となり、それ以外の位置については値が0となるベクトルを表すものとし、値xの複製秘密分散によるシェアを{x}と表すものとし、値xのShamir秘密分散によるシェアを[[x]]と表すものとし、現在の行番号をi、窓枠開始位置をs、窓枠終了位置をtと表すものとし、キー列およびデータ列の行数をlとし、現在の行番号iは0以上l未満の範囲において全てのフラグ列生成処理が1回終了するごとに1ずつインクリメントされるものとする。
 本発明の秘密計算装置は、前半ウィンドウフレームフラグ列生成部と、後半ウィンドウフレームフラグ列生成部と、ウィンドウフレームフラグ列生成部と、反転ウィンドウフレームフラグ列生成部と、シェア変換部と、積和演算部を含む。 前半ウィンドウフレームフラグ列生成部は、{g}のs+1番目の要素からi番目までの要素を抜き出してなるベクトルsubVector({g},s+1,i)について、末尾から各位置までの全ビットのORを演算したbit列を、前半ウィンドウフレームフラグ列{wf→}として生成する。
 後半ウィンドウフレームフラグ列生成部は、{g}のi+1番目からt番目までの要素を抜き出してなるベクトルsubVector({g},i+1,t)について、先頭から各位置までの全ビットのORを演算したbit列を、後半ウィンドウフレームフラグ列{wl→}として生成する。
 ウィンドウフレームフラグ列生成部は、前半ウィンドウフレームフラグ列{wf→}を前方から、後半ウィンドウフレームフラグ列{wl→}を後方から、{0}を挟み込んで結合することによりウィンドウフレームフラグ列{w}を生成する。
 反転ウィンドウフレームフラグ列生成部は、ウィンドウフレームフラグ列{w}にNOT演算を行うことにより、反転ウィンドウフレームフラグ列{w'}を生成する。
 シェア変換部は、反転ウィンドウフレームフラグ列{w'}を反転ウィンドウフレームフラグ列[[w']]に変換する。
 積和演算部は、データ列[[v]]を昇順にソートしたデータ列[[v']]のsからtまでの要素を抜き出したsubVector([[v']],s,t)と反転ウィンドウフレームフラグ列[[w']]の積和演算を実行する。
 本発明の秘密計算装置によれば、低コストの演算でWindow関数のSum演算を計算することができる。
実施例1の秘密計算装置の機能構成を示すブロック図。 実施例1の秘密計算装置の動作を示すフローチャート。 変形例1の秘密計算装置の機能構成を示すブロック図。 変形例1の秘密計算装置の動作を示すフローチャート。 コンピュータの機能構成例を示す図。
 以下、本発明の実施の形態について、詳細に説明する。なお、同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。
<記法>
 ベクトルをvと記述する。ベクトルのi番目の要素はvi で表す。v|uはベクトルvの末尾へのuの結合を表す。σ(v)はvベクトルをσにより置換したベクトルを表す。
 また、ベクトルvのiからj番目までの要素のベクトルv'を抜き出す操作をv'←subVector(v,i,j)と表す。
 c←max(a,b)は平文での計算で平文a,bのうち値が大きい方を出力する。c←min(a,b)は平文での計算で平文a,bのうち値が小さい方を出力する。
<秘密分散>
 秘密分散とはデータを複数の値に分けて複数パーティに分散する暗号化手法である。以下の実施例の秘密計算装置は(k,n)閾値秘密分散によりデータを暗号化する。(k,n)閾値秘密分散とは、データをn個のランダムな値(シェアと呼ばれる)に分割して、k個以上のシェアを集めると元のデータを復元でき、k個未満のシェアからは元データの情報を得られないような性質を持つ秘密分散法である。具体的には、以下の実施例の秘密計算装置はShamir秘密分散(参考非特許文献1)や複製秘密分散(参考非特許文献2、3)を用いる。
(参考非特許文献1:Adi Shamir. How to share a secret. Communications of the ACM, Vol. 22, No. 11, pp. 612-613, 1979.)
(参考非特許文献2:Mitsuru Ito, Akira Saito, and Takao Nishizeki. Secret sharing scheme realizing general access structure. Electronics and Communications in Japan (Part III: Fundamental Electronic Science), Vol. 72, No. 9, pp. 56-64, 1989.)
(参考非特許文献3:Ronald Cramer, Ivan Damgard, and Yuval Ishai. Share conversion, pseudorandom secret-sharing and applications to secure computation. In Theory of Cryptography Conference, pp. 342-362. Springer,2005.)
 本明細書では値xのShamir秘密分散によるシェアを[[x]]のように表す。値xの複製秘密分散によるシェアを{x}のように表す。複製秘密分散は特に1bitデータの処理に対し効率が良いため、以下の実施例において使い分ける。また、置換σをシェアした値は<σ>と表す。
<構成要素>
≪加減算、定数倍≫
 シェア同士の加減算及び定数倍は通信を要さず計算できる。加減算及び定数倍は次のように記述する。
[[x]]+[[y]]、c[[x]]
≪積和演算≫
 aとbの積和演算を以下のように書く。
[[c]]←PSum([[a]],[[b]])
≪論理演算≫
 OR演算は、1bitの値a,bの暗号文{a},{b}を入力とし、aORbの計算結果cの暗号文を出力する演算とし、以下のように記述する。
{c}←Or({a},{b})
 AND演算、XOR演算など他の論理演算についても同様に記述する。
≪Prefix/Suffix OR≫
 PrefixORはbit列bに対し、先頭から各位置までの全てのORを取ったbit列を返す演算とする。つまり出力をcとすると、ci ←ci-1 ORbi 、ただし、c0 ←b0 である。これを、{c}←PrefixOr({b})と書く。SuffixORは逆にcの末尾から各位置までの全ビットのORを取ったbit列を返す演算とする。
≪等号判定≫
 等号判定の演算は、a、bの分散値[[a]],[[b]]を入力とし、a==bの真偽値cの分散値を出力する演算とし、以下のように記述する。
{c}←Eq([[a]],[[b]])
≪秘匿安定ソート≫
 秘匿安定ソートは、ベクトルを安定ソートするプロトコルである。秘匿安定ソートは下記のアルゴリズムからなる。<π>←GenPerm([[k]]):キー列kを昇順に安定ソートする置換πを出力する。[[v']]←Sort(<π>,[[v]]):πをvに適用して並び替えた[[v']]を出力する。これを実現する高速な実装方法として参考非特許文献4などが知られている。
(参考非特許文献4:五十嵐大、濱田浩気、菊池亮、千田浩司、「超高速秘密計算ソートの設計と実装:秘密計算がスクリプト言語に並ぶ日」、コンピュータセキュリティシンポジウム2017論文集 2017(2), pp. 1-8, 2017-10-16)
 キー列として複数列の組を用いる場合は、以下のように書くこととする。ただし、先に指定したキーから優先してソートすることとする。
<π>←GenPerm([[k1 ]],[[k2 ]])
≪モジュラス変換≫
 1bitの{a}から[[a]]へ変換する処理を下記のように記述する。
[[a]]←ModConv({a})
 具体的には参考非特許文献5の菊池らの手法が知られている。
(参考非特許文献5: Ryo Kikuchi, Dai Ikarashi, Takahiro Matsuda, Koki Hamada, and Koji Chida. Efficient bitdecomposition and modulus-conversion protocols with an honest majority. In Willy Susilo and Guomin Yang, editors, Information Security and Privacy, pp. 64-82, Cham, 2018. Springer International Publishing.)
≪共通処理≫
 共通処理は、キー列とデータ列を与え、出力としてキー列の同じ値でグループ化したときの、グループ先頭要素が1となるフラグ列、グループごとに並び替えられたデータ列、キー列を返す処理である。具体的には菊池らの手法(非特許文献1)により実現できる。以下の実施例で開示する方法と関連が深いため菊池らの手法(非特許文献1)の詳細をAlgorithm 1に示す。
[Algorithm 1:GroupByCommon]
Input:キー列[[k]]、データ列[[v]]、(ただし、[[k]]は行数l、[[v]]は行数lとする)
Output:グループ化されたキー列[[k']]、グループ化されたデータ列[[v']]、グループフラグ列{g}(ただし、[[k']]は行数l,[[v']]は行数l、{g}はグループの先頭位置のときのみ1それ以外0となる長さlのベクトルとする)
1:<σ>←GenPerm([[k]],[[v]])
2:[[k']]←Sort([[k]],<σ>)
3:[[v']]←Sort([[v]],<σ>)
4:{eq}0←{0};{g}0←{1}
5:for 1≦i<l do in parallel
6:{eq}i←Eq([[k]]i-1,[[k]]i)
7:{g}i←Not({eq}i)
8:end for
9:return [[k']],[[v']],{g}
[Algorithm 1終わり]
 Algorithm 1の1行目は、GenPermによる、キー列k、データ列vを昇順に秘匿安定ソートする置換σを出力する処理を示している。
 2行目は、σによりキー列[[k]]を秘匿安定ソートして、ソート結果[[k']]を出力する処理を示している。
 3行目は、σによりデータ列[[v]]を秘匿安定ソートして、ソート結果[[v']]を出力する処理を示している。
 4行目は、ベクトル{eq}の先頭の値{eq}0を{0}に設定し、グループフラグ列{g}の先頭の値{g}0を{1}に設定する処理を示している。
 5行目は、6~7行目の処理を繰り返し実行することを示している。
 6行目はベクトル{eq}のi番目の値{eq}iをEq([[k]]i-1,[[k]]i)、すなわちキー列のi-1番目の値[[k]]i-1とi番目の値[[k]]iが等しければ1、異なれば0とすることを示している。従ってベクトルeqはキー列の値の変わり目に差し掛かるまで1が連続し、キー列の値が変わる位置において0となり、次のキー列の値の変わり目まで1が連続することを特徴とするベクトルである。
 7行目はグループフラグ列{g}のi番目の値{g}iをNot({eq}i)とする、すなわち、グループフラグ列gはキー列の値が変わる位置において値が1となり、それ以外の位置については値が0となるベクトルを表す。
 8行目は繰り返し処理の終了を示しており、9行目はAlgorithm 1の出力であるグループ化されたキー列[[k']]、グループ化されたデータ列[[v']]、グループフラグ列{g}を表す。
 以下、本発明独自の手法であり、Window関数を秘密計算上で実行するためのウィンドウフレームフラグ列を生成する手法の詳細をAlgorithm 2に示す。
[Algorithm 2:GenWindowFrame]
Input:グループフラグ列{g}、現在行番号i、窓枠開始位置s、窓枠終了位置t(ただし、s≦i≦tとする)
Output:ウィンドウフレームフラグ列{w}
1:{wf→}←SuffixOr(subVector({g},s+1,i))
2:{wl→}←PrefixOr(subVector({g},i+1,t))
3:{w}←{wf→}|{0}|{wl→}
4:return {w}
[Algorithm 2終わり]
 Algorithm 2の1行目は、{g}の窓枠開始位置の1つ先(s+1番目)の要素からi番目までの要素を抜き出してなるベクトルsubVector({g},s+1,i)について、SuffixOr、すなわち末尾から各位置までの全ビットのORを演算したbit列を、前半ウィンドウフレームフラグ列{wf→}として生成することを示している。従って、末尾から先頭に向かう途中でキー列の値が変わる位置が出現した場合には、この位置よりも先頭に位置する要素は全て1となるため、1,…,1,0,…,0といった結果になる。
 2行目は、{g}のi+1番目から窓枠終了位置(t番目)までの要素を抜き出してなるベクトルsubVector({g},i+1,t)について、PrefixOr、すなわち先頭から各位置までの全ビットのORを演算したbit列を、後半ウィンドウフレームフラグ列{wl→}として生成することを示している。従って、先頭から末尾に向かう途中でキー列の値が変わる位置が出現した場合には、この位置よりも末尾に位置する要素は全て1となるため、0,…,0,1,…,1といった結果になる。
 3、4行目は、{wf→}を前方から、{wl→}を後方から、{0}を挟み込んで結合することにより{w}を生成して出力することを示している。すなわち、{0}は現在の行番号に該当する位置にあたる。ベクトルwは、現在の行番号を含むグループに属する要素について値0を示し、現在の行番号を含むグループと異なるグループに属する要素については値1を示すという特徴がある。例えば、現在の行番号にあたる要素を><で挟んで表すものとすると、ベクトルwとして、1,…,1,0,…,>0<,…,0,1,…,1のような出力例がありうる。
 Window関数のSum演算を計算する手法の詳細を以下のAlgorithm 3に示す。
[Algorithm 3:WindowSum]
Input:キー列[[k]]、データ列[[v]]、窓枠開始位置オフセットpoffset、窓枠終了位置オフセットfoffset(ただし、[[k]]は行数l、[[v]]は行数lとする)
Output:グループ化されたキー列[[k']]、集計結果列[[u]](ただし、[[k']]は行数l、[[u]]は行数lとする)
1:[[k']]、[[v']]、{g}←GroupByCommon([[k]],[[v]])
2:for 0≦i<l do in parallel
3:s←max(i-poffset,0)
4:t←min(i+foffset,l-1)
5:{w}←GenWindowFrame({g},i,s,t)
6:{w'}←Not({w})
7:[[w']]←ModConv({w'})
8:[[u]]i←PSum([[w']],subVector([[v']],s,t))
9:end for
10:return [[k']],[[u]]
[Algorithm 3終わり]
 Algorithm 3の1行目は、Algorithm 1により、グループ化されたキー列[[k']]、グループ化されたデータ列[[v']]、グループフラグ列{g}を生成する処理を示している。
 2行目は、9行目までの処理を繰り返し実行することを示している。
 3行目は、i-poffset、すなわち現在行番号iから窓枠開始位置オフセットpoffset分だけオフセットした位置を窓枠開始位置sとし、i-poffsetが0以下になる例外については、全て0として処理するためにs←max(i-poffset,0)として窓枠開始位置sを計算する処理を示している。
 4行目は、i+foffset、すなわち現在行番号iから窓枠終了位置オフセットfoffset分だけオフセットした位置を窓枠終了位置tとし、i+foffsetがl-1以上になる例外については、全てl-1として処理するためにt←min(i+foffset,l-1)として窓枠終了位置tを計算する処理を示している。
 5行目は、Algorithm 2によりウィンドウフレームフラグ列{w}を計算する処理を示している。
 6行目は、ウィンドウフレームフラグ列{w}にNOT演算を行うことにより、反転ウィンドウフレームフラグ列{w'}を生成する処理を示している。 7行目は、複製秘密分散のシェアであった{w'}をShamir秘密分散のシェア[[w']]に変換する処理を示している。7行目は、続く8行目におけるPSum処理を実行するために行われる。
 8行目は、昇順にソートされたデータ列[[v']]の窓枠開始位置sから窓枠終了位置tまでの要素を抜き出したsubVector([[v']],s,t)と[[w']]のPSumを実行することを示している。これにより、集計対象の位置のみ積として値が残り、その他の積は全て0となるので、集計結果列[[u]]は集計対象に対するSum演算の結果を示すものである。 9行目は繰り返し処理の終了を示しており、10行目は、グループ化されたキー列[[k']]、集計結果列[[u]]を出力する処理を示している。
 1行目でGroupByCommonを実行することにより、データ列はグループ内で昇順にソートされている。
 まず、5行目において集計対象となる位置が0、そうでない位置が1となるようなフラグ列である{w}を生成する。{g}は非特許文献1ではグループ末尾の要素が1で示されるフラグ列となっているが、グループの境界に紐づくフラグと捉えると、グループ境界が1で示されるようなビット列ととらえ直すことができる。すると、Algorithm 2に示した通り、上下方向にSuffix/Prefix ORを取ることでグループ境界を越えた要素が1となるようなフラグ列を生成することができる。ただし、現在行については常に集計対象とするため初期値0とする。
 上述したように{w}は集計対象となる位置が0、そうでない位置が1となるフラグ列である。窓枠内のSumを計算するためにはwが0である位置に対応するv'の要素を合計すればよい。
 そこで6行目においてフラグ列{w}にNot演算を実行し、集計対象となる位置が1となり、それ以外の位置が全て0となるフラグ列{w'}を計算している。
ベクトル[[v']]に対して順にIfThen(乗算を要する)を適用し、全ての要素を加算する方法でも計算できるが、代わりにPSumを用いることにより計算コストのみならず、通信量も削減できる。
 SQLにおいては窓枠開始位置の指定オプションとして、グループ内の最初から始まることを表す”UNBOUNDED PRECEDINGS”、および、窓枠終了位置の指定オプションとして、グループ内の最後までであることを表す”UNBOUNDED PRECEDINGS”がある。グループフラグが公開値でないため、poffset、foffsetをグループ内の最初/最後に指定することはできないが、”UNBOUNDED PRECEDINGS”の場合、窓枠開始位置オフセットをpoffset=-n、”UNBOUNDED FOLLOWING”の場合、窓枠終了位置オフセットfoffset=nとすることで同じ結果を得ることができる。開始/終了位置の指定オプションとして現在行を表す”CURRENT ROW”を指定する場合は窓枠開始位置/終了位置オフセットを0とする。
 以下、図1を参照してAlgorithm 3を実行することにより、Window関数のSum演算を実行する実施例1の秘密計算装置の構成を説明する。同図に示すように本実施例の秘密計算装置1は、入力データ記憶部10Aと、前半ウィンドウフレームフラグ列生成部10と、後半ウィンドウフレームフラグ列生成部11と、ウィンドウフレームフラグ列生成部12と、反転ウィンドウフレームフラグ列生成部13と、シェア変換部14と、積和演算部15と、出力データ記憶部10Bを含む構成である。
<入力データ記憶部10A>
 入力データ記憶部10Aは、本秘密計算装置に入力されるデータを予め記憶している。本実施例ではAlgorithm 1は既に実行済みであるものとし、入力データ記憶部10Aは、グループ化されたキー列[[k']]、グループ化されたデータ列[[v']]、グループフラグ列{g}を記憶している。また入力データ記憶部10Aは、ユーザが任意に設定するパラメータである窓枠開始位置オフセットpoffset、窓枠終了位置オフセットfoffsetを予め記憶している。
 なお、本秘密計算装置でAlgorithm 1も実行する場合には、入力データ記憶部10Aは、キー列[[k]]、データ列[[v]]、窓枠開始位置オフセットpoffset、窓枠終了位置オフセットfoffsetを予め記憶していればよい。
 以下、図2を参照して、各構成要件の詳細な動作を説明する。
<前半ウィンドウフレームフラグ列生成部10>
 前半ウィンドウフレームフラグ列生成部10は、Algorithm 3の3行目から5行目(5行目の参照先のAlgorithm 2の1行目)を、Algorithm 3の2行目の繰り返し条件に従って実行する。
 具体的には、前半ウィンドウフレームフラグ列生成部10は、窓枠開始位置s、窓枠終了位置tを取得して、{g}のs+1番目の要素からi番目までの要素を抜き出してなるベクトルsubVector({g},s+1,i)について、末尾から各位置までの全ビットのORを演算したbit列を、前半ウィンドウフレームフラグ列{wf→}として生成する(S10)。
<後半ウィンドウフレームフラグ列生成部11>
 後半ウィンドウフレームフラグ列生成部11は、Algorithm 3の3行目から5行目(5行目の参照先のAlgorithm 2の2行目)を、Algorithm 3の2行目の繰り返し条件に従って実行する。
 具体的には、後半ウィンドウフレームフラグ列生成部11は、窓枠開始位置s、窓枠終了位置tを取得して、{g}のi+1番目からt番目までの要素を抜き出してなるベクトルsubVector({g},i+1,t)について、先頭から各位置までの全ビットのORを演算したbit列を、後半ウィンドウフレームフラグ列{wl→}として生成する(S11)。
<ウィンドウフレームフラグ列生成部12>
 ウィンドウフレームフラグ列生成部12は、Algorithm 3の5行目(5行目の参照先のAlgorithm 2の3行目)を、Algorithm 3の2行目の繰り返し条件に従って実行する。
 具体的には、ウィンドウフレームフラグ列生成部12は、前半ウィンドウフレームフラグ列{wf→}を前方から、後半ウィンドウフレームフラグ列{wl→}を後方から、{0}を挟み込んで結合することによりウィンドウフレームフラグ列{w}を生成する(S12)。
<反転ウィンドウフレームフラグ列生成部13>
 反転ウィンドウフレームフラグ列生成部13は、Algorithm 3の6行目を、Algorithm 3の2行目の繰り返し条件に従って実行する。
 具体的には、反転ウィンドウフレームフラグ列生成部13は、ウィンドウフレームフラグ列{w}にNOT演算を行うことにより、反転ウィンドウフレームフラグ列{w'}を生成する(S13)。<シェア変換部14>
 シェア変換部14は、Algorithm 3の7行目を、Algorithm 3の2行目の繰り返し条件に従って実行する。
 具体的には、シェア変換部14は、反転ウィンドウフレームフラグ列{w'}を反転ウィンドウフレームフラグ列[[w']]に変換する(S14)。
<積和演算部15>
 積和演算部15は、Algorithm 3の8行目を、Algorithm 3の2行目の繰り返し条件に従って実行する。
 具体的には、積和演算部15は、データ列[[v]]を昇順にソートしたデータ列[[v']]のsからtまでの要素を抜き出したsubVector([[v']],s,t)と反転ウィンドウフレームフラグ列[[w']]の積和演算を実行する(S15)。
<出力データ記憶部10B>
 出力データ記憶部10Bは、Algorithm 3の出力である[[k']]および[[u]]を記憶する。
<変形例>
 図3、図4に示すように、秘密計算装置は、秘匿化前のデータにより構成されるデータベース2と、データベース2のデータを秘匿化するデータ秘匿化部3と、秘密計算装置1と同じ処理を実行する秘密計算部1により構成されてもよい(変形例1の秘密計算装置100、ステップS3、S1)。
<補記>
 本発明の装置は、例えば単一のハードウェアエンティティとして、キーボードなどが接続可能な入力部、液晶ディスプレイなどが接続可能な出力部、ハードウェアエンティティの外部に通信可能な通信装置(例えば通信ケーブル)が接続可能な通信部、CPU(Central Processing Unit、キャッシュメモリやレジスタなどを備えていてもよい)、メモリであるRAMやROM、ハードディスクである外部記憶装置並びにこれらの入力部、出力部、通信部、CPU、RAM、ROM、外部記憶装置の間のデータのやり取りが可能なように接続するバスを有している。また必要に応じて、ハードウェアエンティティに、CD-ROMなどの記録媒体を読み書きできる装置(ドライブ)などを設けることとしてもよい。このようなハードウェア資源を備えた物理的実体としては、汎用コンピュータなどがある。
 ハードウェアエンティティの外部記憶装置には、上述の機能を実現するために必要となるプログラムおよびこのプログラムの処理において必要となるデータなどが記憶されている(外部記憶装置に限らず、例えばプログラムを読み出し専用記憶装置であるROMに記憶させておくこととしてもよい)。また、これらのプログラムの処理によって得られるデータなどは、RAMや外部記憶装置などに適宜に記憶される。
 ハードウェアエンティティでは、外部記憶装置(あるいはROMなど)に記憶された各プログラムとこの各プログラムの処理に必要なデータが必要に応じてメモリに読み込まれて、適宜にCPUで解釈実行・処理される。その結果、CPUが所定の機能(上記、…部、…手段などと表した各構成要件)を実現する。
 本発明は上述の実施形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で適宜変更が可能である。また、上記実施形態において説明した処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されるとしてもよい。
 既述のように、上記実施形態において説明したハードウェアエンティティ(本発明の装置)における処理機能をコンピュータによって実現する場合、ハードウェアエンティティが有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記ハードウェアエンティティにおける処理機能がコンピュータ上で実現される。
 上述の各種の処理は、図5に示すコンピュータ10000の記録部10020に、上記方法の各ステップを実行させるプログラムを読み込ませ、制御部10010、入力部10030、出力部10040などに動作させることで実施できる。
 この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよい。具体的には、例えば、磁気記録装置として、ハードディスク装置、フレキシブルディスク、磁気テープ等を、光ディスクとして、DVD(Digital Versatile Disc)、DVD-RAM(Random Access Memory)、CD-ROM(Compact Disc Read Only Memory)、CD-R(Recordable)/RW(ReWritable)等を、光磁気記録媒体として、MO(Magneto-Optical disc)等を、半導体メモリとしてEEP-ROM(Electrically Erasable and Programmable-Read Only Memory)等を用いることができる。
 また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD-ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。
 このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記録媒体に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。
 また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、ハードウェアエンティティを構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。

Claims (3)

  1.  属性の列であるキー列kと、値の列であるデータ列vを含むデータベースを秘匿したまま演算する秘密計算装置であって、
     グループフラグ列gは前記キー列の値が変わる位置において値が1となり、それ以外の位置については値が0となるベクトルを表すものとし、
     値xの複製秘密分散によるシェアを{x}と表すものとし、
     値xのShamir秘密分散によるシェアを[[x]]と表すものとし、
     現在の行番号をi、窓枠開始位置をs、窓枠終了位置をtと表すものとし、
     前記キー列および前記データ列の行数をlとし、現在の行番号iは0以上l未満の範囲において全てのフラグ列生成処理が1回終了するごとに1ずつインクリメントされるものとし、
     {g}のs+1番目の要素からi番目までの要素を抜き出してなるベクトルsubVector({g},s+1,i)について、末尾から各位置までの全ビットのORを演算したbit列を、前半ウィンドウフレームフラグ列{wf→}として生成する前半ウィンドウフレームフラグ列生成部と、
     {g}のi+1番目からt番目までの要素を抜き出してなるベクトルsubVector({g},i+1,t)について、先頭から各位置までの全ビットのORを演算したbit列を、後半ウィンドウフレームフラグ列{wl→}として生成する後半ウィンドウフレームフラグ列生成部と、
     前記前半ウィンドウフレームフラグ列{wf→}を前方から、前記後半ウィンドウフレームフラグ列{wl→}を後方から、{0}を挟み込んで結合することによりウィンドウフレームフラグ列{w}を生成するウィンドウフレームフラグ列生成部と、
     前記ウィンドウフレームフラグ列{w}にNOT演算を行うことにより、反転ウィンドウフレームフラグ列{w'}を生成する反転ウィンドウフレームフラグ列生成部と、
     前記反転ウィンドウフレームフラグ列{w'}を反転ウィンドウフレームフラグ列[[w']]に変換するシェア変換部と、
     データ列[[v]]を昇順にソートしたデータ列[[v']]のsからtまでの要素を抜き出したsubVector([[v']],s,t)と反転ウィンドウフレームフラグ列[[w']]の積和演算を実行する積和演算部を含む
     秘密計算装置。
  2.  属性の列であるキー列kと、値の列であるデータ列vを含むデータベースを秘匿したまま演算する秘密計算方法であって、
     グループフラグ列gは前記キー列の値が変わる位置において値が1となり、それ以外の位置については値が0となるベクトルを表すものとし、
     値xの複製秘密分散によるシェアを{x}と表すものとし、
     値xのShamir秘密分散によるシェアを[[x]]と表すものとし、
     現在の行番号をi、窓枠開始位置をs、窓枠終了位置をtと表すものとし、
     前記キー列および前記データ列の行数をlとし、現在の行番号iは0以上l未満の範囲において全てのフラグ列生成処理が1回終了するごとに1ずつインクリメントされるものとし、
     {g}のs+1番目の要素からi番目までの要素を抜き出してなるベクトルsubVector({g},s+1,i)について、末尾から各位置までの全ビットのORを演算したbit列を、前半ウィンドウフレームフラグ列{wf→}として生成するステップと、
     {g}のi+1番目からt番目までの要素を抜き出してなるベクトルsubVector({g},i+1,t)について、先頭から各位置までの全ビットのORを演算したbit列を、後半ウィンドウフレームフラグ列{wl→}として生成するステップと、
     前記前半ウィンドウフレームフラグ列{wf→}を前方から、前記後半ウィンドウフレームフラグ列{wl→}を後方から、{0}を挟み込んで結合することによりウィンドウフレームフラグ列{w}を生成するステップと、
     前記ウィンドウフレームフラグ列{w}にNOT演算を行うことにより、反転ウィンドウフレームフラグ列{w'}を生成するステップと、
     前記反転ウィンドウフレームフラグ列{w'}を反転ウィンドウフレームフラグ列[[w']]に変換するステップと、
     データ列[[v]]を昇順にソートしたデータ列[[v']]のsからtまでの要素を抜き出したsubVector([[v']],s,t)と反転ウィンドウフレームフラグ列[[w']]の積和演算を実行するステップを含む
     秘密計算方法。
  3.  コンピュータを請求項1に記載の秘密計算装置として機能させるプログラム。
PCT/JP2022/006128 2022-02-16 2022-02-16 秘密計算装置、秘密計算方法、プログラム WO2023157118A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/006128 WO2023157118A1 (ja) 2022-02-16 2022-02-16 秘密計算装置、秘密計算方法、プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/006128 WO2023157118A1 (ja) 2022-02-16 2022-02-16 秘密計算装置、秘密計算方法、プログラム

Publications (1)

Publication Number Publication Date
WO2023157118A1 true WO2023157118A1 (ja) 2023-08-24

Family

ID=87577802

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/006128 WO2023157118A1 (ja) 2022-02-16 2022-02-16 秘密計算装置、秘密計算方法、プログラム

Country Status (1)

Country Link
WO (1) WO2023157118A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019203262A1 (ja) * 2018-04-20 2019-10-24 日本電信電話株式会社 秘密集約順位システム、秘密計算装置、秘密集約順位方法、およびプログラム
WO2019208484A1 (ja) * 2018-04-25 2019-10-31 日本電信電話株式会社 秘密集約総和システム、秘密計算装置、秘密集約総和方法、およびプログラム
WO2019208486A1 (ja) * 2018-04-26 2019-10-31 日本電信電話株式会社 秘密集約中央値システム、秘密計算装置、秘密集約中央値方法、およびプログラム
WO2019208485A1 (ja) * 2018-04-25 2019-10-31 日本電信電話株式会社 秘密集約最大値システム、秘密集約最小値システム、秘密計算装置、秘密集約最大値方法、秘密集約最小値方法、およびプログラム
WO2019221108A1 (ja) * 2018-05-17 2019-11-21 日本電信電話株式会社 秘密クロス集計システム、秘密計算装置、秘密クロス集計方法、およびプログラム
WO2019225401A1 (ja) * 2018-05-25 2019-11-28 日本電信電話株式会社 秘密集約関数計算システム、秘密計算装置、秘密集約関数計算方法、およびプログラム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019203262A1 (ja) * 2018-04-20 2019-10-24 日本電信電話株式会社 秘密集約順位システム、秘密計算装置、秘密集約順位方法、およびプログラム
WO2019208484A1 (ja) * 2018-04-25 2019-10-31 日本電信電話株式会社 秘密集約総和システム、秘密計算装置、秘密集約総和方法、およびプログラム
WO2019208485A1 (ja) * 2018-04-25 2019-10-31 日本電信電話株式会社 秘密集約最大値システム、秘密集約最小値システム、秘密計算装置、秘密集約最大値方法、秘密集約最小値方法、およびプログラム
WO2019208486A1 (ja) * 2018-04-26 2019-10-31 日本電信電話株式会社 秘密集約中央値システム、秘密計算装置、秘密集約中央値方法、およびプログラム
WO2019221108A1 (ja) * 2018-05-17 2019-11-21 日本電信電話株式会社 秘密クロス集計システム、秘密計算装置、秘密クロス集計方法、およびプログラム
WO2019225401A1 (ja) * 2018-05-25 2019-11-28 日本電信電話株式会社 秘密集約関数計算システム、秘密計算装置、秘密集約関数計算方法、およびプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RYO KIKUCHI, KOKI HAMADA, DAI IGARASHI, GEN TAKAHASHI, KATSUMI TAKAHASHI: "3C2-1 Secure cross-sector customer-flow invention", 2020 SYMPOSIUM ON CRYPTOGRAPHY AND INFORMATION SECURITY; KOCHI, JAPAN; JANUARY 28-31, 2020, IEICE, JP, 20 January 2020 (2020-01-20) - 31 January 2020 (2020-01-31), JP, pages 1 - 8, XP009542487 *

Similar Documents

Publication Publication Date Title
US10296709B2 (en) Privacy-preserving genomic prediction
JP6605746B2 (ja) 秘密等結合システム、秘密等結合装置、秘密等結合方法、プログラム
WO2022035909A1 (en) Methods for somewhat homomorphic encryption and key updates based on geometric algebra for distributed ledger technology
JP2023063430A (ja) 暗号システム、鍵生成装置、暗号化装置、復号装置、方法及びプログラム
JP7031682B2 (ja) 秘密計算装置、システム、方法、プログラム
EP4016506B1 (en) Softmax function secret calculation system, softmax function secret calculation device, softmax function secret calculation method, neural network secret calculation system, neural network secret learning system, and program
US20230155815A1 (en) Secure integer comparison using binary trees
JP7047838B2 (ja) 秘密計算装置、比較方法、比較プログラム、および秘密計算システム
JP6844897B2 (ja) ビット分解秘密計算装置、ビット結合秘密計算装置、方法およびプログラム
Lu et al. Multicenter privacy-preserving cox analysis based on homomorphic encryption
JP7315032B2 (ja) 暗号化データ分析装置、暗号化データ分析方法、プログラム
Biasse et al. A trade-off between classical and quantum circuit size for an attack against CSIDH
Mounica et al. Implementation of 5-Qubit approach-based Shor's Algorithm in IBM Qiskit
WO2023157118A1 (ja) 秘密計算装置、秘密計算方法、プログラム
WO2022201791A1 (ja) 暗号処理装置、暗号処理方法、及び暗号処理プログラム
WO2023157117A1 (ja) 秘密計算装置、秘密計算方法、プログラム
JP7327511B2 (ja) 秘密乱数生成システム、秘密計算装置、秘密乱数生成方法、およびプログラム
US11343070B2 (en) System and method for performing a fully homomorphic encryption on a plain text
JP2023064452A (ja) 暗号処理装置、暗号処理方法、及び暗号処理プログラム
WO2023281693A1 (ja) 秘密計算システム、装置、方法及びプログラム
WO2023281694A1 (ja) 秘密計算システム、装置、方法及びプログラム
WO2024018504A1 (ja) クライアント装置、秘密テーブル管理システム、レコード登録要求生成方法、レコード登録方法、処理要求実行方法、プログラム
CN116841750B (zh) 集成加密算法的边缘计算设备
WO2023233622A1 (ja) 秘密計算装置、秘密計算方法、プログラム
KR102337865B1 (ko) 동형 암호에 기초한 산술 연산 시스템 및 이를 이용한 동형 암호 산술 연산 방법

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

Country of ref document: EP

Kind code of ref document: A1