Secure Query Processing with Linear Complexity

Qiyao Luo,Yilei Wang,Wei Dong,Ke Yi
2024-04-23
Abstract:We present LINQ, the first join protocol with linear complexity (in both running time and communication) under the secure multi-party computation model (MPC). It can also be extended to support all free-connex queries, a large class of select-join-aggregate queries, still with linear complexity. This matches the plaintext result for the query processing problem, as free-connex queries are the largest class of queries known to be solvable in linear time in plaintext. We have then built a query processing system based on LINQ, and the experimental results show that LINQ significantly outperforms the state of the art. For example, it can finish a query on three relations with an output size of 1 million tuples in around 100s in the LAN setting, while existing protocols that support the query cannot finish in an hour. Thus LINQ brings MPC query processing closer to practicality.
Cryptography and Security,Databases
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to efficiently execute database queries in the secure multi - party computation (MPC) model, especially how to achieve linear complexity when it involves join operations of multiple tables. Specifically: 1. **Existing problems**: - In traditional MPC protocols, processing multi - table join queries (such as `select - join - aggregate` queries) usually requires high time complexity or communication complexity. - Existing MPC protocols usually use nested - loop join when dealing with multi - table joins, and its complexity is \(O(n^k)\), which is not feasible in practical applications. - Even some improved algorithms (such as algorithms based on sort - merge join) often have a complexity of \(O(n\log n + m)\), which is still not efficient enough. 2. **Goals of the paper**: - Propose a new MPC protocol, called LINQ (Linear complexity Query processing), which can execute all free - connex queries with linear complexity (i.e., \(O(n + m)\)) in the three - party honest - majority model (3PC). - By achieving linear - complexity join operations, make MPC query processing closer to the efficiency in practical applications, thereby breaking the barriers between information silos and allowing multiple non - mutually - trusting parties to conduct collaborative analysis while protecting privacy. 3. **Main challenges**: - How to achieve linear - complexity join operations in the MPC environment, especially when dealing with multi - table joins. - Solve the implementation problems of hash - join in MPC, because hash tables will lead to uneven bucket sizes and are difficult to be directly implemented in MPC. - Support selection, join, and aggregation operations in multi - table join queries and maintain linear complexity. 4. **Solutions**: - The paper proposes a hybrid join algorithm (hash - sort - merge - join) that combines hashing, sorting, and merging, which can achieve linear - complexity join operations in MPC. - By introducing the concept of consistent sort, ensure that all parties use the same order when sorting relations, thus avoiding the high complexity of traditional sorting algorithms. - Design a cost model to estimate the costs of different query plans and select the optimal query plan for execution. In summary, this paper aims to solve the efficiency problem of multi - table join queries in MPC by proposing the LINQ protocol, enabling it to process large - scale data more efficiently in practical applications while protecting the data privacy of participating parties.