ArcEDB: An Arbitrary-Precision Encrypted Database via (Amortized) Modular Homomorphic Encryption

Zhou Zhang, Song Bian, Zian Zhao, Ran Mao, Haoyi Zhou, Jiafeng Hua, Yier Jin, Zhenyu Guan

TL;DR

This paper introduces ArcEDB, a novel encrypted database system that overcomes the long-standing trade-off between data precision and query speed in fully homomorphic encryption (FHE). By developing new plaintext encoding schemes and efficient homomorphic operators, ArcEDB achieves arbitrary-precision data processing and significantly faster query execution, making secure outsourced databases more practical.

What Problem Does This Paper Address?

The dream of outsourcing sensitive data to the cloud while maintaining confidentiality through encryption has been hampered by two major challenges in existing Fully Homomorphic Encryption (FHE)-based Encrypted Databases (EDBs): low data precision and high computational latency. Current FHE-based EDBs often sacrifice precision to achieve faster query times, which is unacceptable for many real-world applications like time-series databases where exact timestamps or high-precision numerical values are crucial. Conversely, maintaining high precision often leads to prohibitively slow query processing, especially for complex SQL operations like filtering and aggregation. This paper tackles this precision-performance dilemma head-on, aiming to deliver both arbitrary-precision data handling and efficient query evaluation.

Methods

ArcEDB's core innovation lies in its novel FHE infrastructure built upon a variant of modular homomorphic encryption (MFHE). Key techniques include:

  • New Plaintext Encoding Schemes: ArcEDB introduces innovative plaintext encoding schemes, particularly an "exponent encoding," which allows for efficient homomorphic comparisons. This is a departure from traditional methods that often rely on polynomial approximations or bit-wise encryption, which can be slow or imprecise.
  • Arbitrary-Precision Homomorphic Comparison (ArbHCMP): By combining the exponent encoding with a new homomorphic multiplexer (GateMUX) and modular MFHE, ArcEDB achieves arbitrary-precision ciphertext-to-ciphertext comparisons. This is crucial for accurate filtering and sorting.
  • Amortized Arbitrary-Precision Filtering (SIMDArbHCMP): To further boost performance, ArcEDB introduces a SIMD (Single Instruction, Multiple Data) version of its comparison operator. This allows for batch processing of multiple data rows simultaneously, significantly reducing latency.
  • Efficient Conversion Algorithms: ArcEDB proposes efficient algorithms to convert between different encoding schemes. This is vital for supporting complex SQL statements that might require different encoding types for different operations (e.g., exponent encoding for filtering and coefficient encoding for aggregation).
  • Synchronized Sorting and Aggregation: The system supports multi-column synchronized sorting, ensuring that the order of one column is maintained across other columns, a feature often missing in prior work.

Datasets

The paper evaluates ArcEDB using standard benchmarks and real-world datasets:

  • TPC-H benchmarks: Used for evaluating general SQL query performance. The authors note that JOIN conditions were removed to align with previous work.
  • Real-world time-series databases: Used to demonstrate ArcEDB's capability in handling time-series data, a key application area where precision is critical.
  • No new benchmarks were introduced.

Key Insights and Ideas

  • Exponent Encoding is Key: The paper highlights that a well-designed plaintext encoding scheme (exponent encoding) can dramatically speed up homomorphic comparisons, which are the bottleneck in many FHE-based EDB operations.
  • Batching is Essential for Scale: For large datasets, amortizing the cost of homomorphic operations through SIMD processing (batching) is not just beneficial but necessary for practical performance.
  • Interoperability of FHE Schemes: ArcEDB demonstrates the power of a "cross-scheme" approach, leveraging different FHE primitives (like BFV, CKKS, TFHE) and their strengths for various tasks.
  • Precision and Speed are Not Mutually Exclusive: The core insight is that with the right cryptographic techniques and data structures, it's possible to achieve both high data precision and fast query execution in encrypted databases, breaking the traditional trade-off.

Key Results

  • Filtering Speedup: ArcEDB's ArbHCMP operator is up to 56x faster than state-of-the-art (SOTA) methods for relational comparisons and up to 112x faster for equality comparisons. The SIMDArbHCMP operator provides a 20x to 112x speedup.
  • Filter-Aggregation Speedup: ArcEDB achieves a 4x to 7x speedup over HE³DB [16] for 10K records and a 36x to 102x acceleration for 32K records.
  • ORDER BY Performance: ArcEDB is 2x-3x faster than HE³DB [16] and TFHE-rs [111] for single-column sorting and 3x-8x faster than Onion Ring ORAM [22] for synchronized sorting.
  • End-to-End SQL Queries: ArcEDB is, on average, 16x faster than HE³DB [16] and 72x faster than HEDA [99] on relational databases and 19x faster than HE³DB and 75x faster than HEDA on time-series databases.
  • Time-Series Query Performance: A SQL query over a 10K-row time-series EDB with 64-bit timestamps completes in under one minute, a feat not achievable by prior FHE-based EDBs.
  • Memory Usage: ArcEDB uses on average 1.6x less memory than HE³DB [16] for 16-bit precision queries and 4.7x less for 32K time-series queries.

Limitations and Future Work

  • Latency Improvement Needed: While ArcEDB offers significant improvements, the authors acknowledge that further latency reduction is needed for real-world adoption.
  • Future Work: The authors suggest exploring more advanced cryptographic primitives and hardware-based accelerations to further enhance efficiency and adapt to real-world scenarios.

Summary updated

BibTeX
@article{zhang2024arcedb,
  author = {Zhou Zhang and Song Bian and Zian Zhao and Ran Mao and Haoyi Zhou and Jiafeng Hua and Yier Jin and Zhenyu Guan},
  title = {{ArcEDB: An Arbitrary-Precision Encrypted Database via (Amortized) Modular Homomorphic Encryption}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2024},
  url = {https://openreview.net/forum?id=XZGadXh9ut},
}
Figure