Secure and Practical Functional Dependency Discovery in Outsourced Databases

Xinle Cao, Yuhan Li, Dmytro Bogatov, Jian Liu, Kui Ren

TL;DR

This paper introduces the first formal framework and practical protocols for secure Functional Dependency (FD) discovery in encrypted outsourced databases. By leveraging cryptographic primitives like Oblivious RAM (ORAM) and oblivious sorting, the authors develop methods that reveal nothing to a cloud provider except the database size and the final discovered rules, achieving up to a 22,000x speedup when integrated with secure enclaves like Intel SGX.

What Problem Does This Paper Address?

As businesses increasingly move data to the cloud, they use encryption to protect sensitive information from potentially untrusted cloud providers. However, encryption makes "database maintenance"—tasks essential for query optimization, data cleaning, and schema normalization—extremely difficult.

A core maintenance task is Functional Dependency (FD) discovery. An FD (e.g., Zipcode -> City) means the value of one attribute uniquely determines another. Finding these rules is vital for optimizing databases, but doing so on encrypted data usually leaks sensitive information. Even if the data values are hidden, a cloud provider can observe access patterns (which rows are accessed together) or frequency patterns (how often certain values appear), which can be used to reverse-engineer the original data. This paper aims to perform FD discovery while maintaining "minimal leakage" and "obliviousness."

Methods

The authors propose a partition-based approach to FD discovery, where they check if the number of distinct values in attribute set $A$ is equal to the number of distinct values in the union of sets $A$ and $B$. To do this securely, they introduce two main protocols:

  1. ORAM-based Protocol: Designed for dynamic databases. It uses PathORAM to store and count distinct values. This allows the client to insert or delete records without the server learning which values are being modified.
  2. Sorting-based Protocol: Optimized for static databases. It relies on oblivious sorting (specifically bitonic sorting). While it has a higher theoretical complexity than ORAM, it is highly parallelizable and much simpler to implement in secure hardware environments.

Key Technical Innovation: Attribute Compression To avoid comparing long strings (which is slow and leaks length info), the authors developed a secure "Attribute Compression" technique. It maps complex attribute sets into unique, fixed-length integers. This ensures that the cost of checking an FD doesn't increase even as the number of attributes in the set grows.

Datasets

The researchers evaluated their protocols using four datasets:

  • Adult: Census data (14 columns, ~49k rows).
  • Letter: English alphabet features (16 columns, 20k rows).
  • Flight: Flight route data (20 columns, 500k rows).
  • RND: A synthetic dataset with randomly generated values used to test scalability and prove obliviousness.

Key Insights and Ideas

  • The "Minimal Leakage" Standard: The authors formally define what a secure FD protocol should look like: it should leak only the database size and the final FDs. This sets a new security benchmark for the field.
  • Obliviousness is Mandatory: Simply encrypting data isn't enough. The authors show that FD discovery protocols must be "oblivious"—meaning the sequence of memory addresses accessed must be independent of the data values—to prevent sophisticated side-channel attacks.
  • Parallelism Trumps Complexity: In practice, the sorting-based method (despite a higher $O(n \log^2 n)$ complexity) often outperformed ORAM because it could be split across 16+ threads, whereas ORAM is more sequential.
  • Hardware Acceleration: The paper demonstrates that combining these algorithms with Secure Enclaves (Intel SGX) provides a massive performance boost by reducing the need for expensive data transfers between the client and the server.

Key Results

  • Security Validation: Using the Kolmogorov–Smirnov (KS) test, the authors proved their protocols are truly oblivious; the server could not distinguish between runs on different datasets (p-values > 0.35).
  • Massive Speedups: When running the sorting-based protocol inside an SGX enclave, they achieved a 22,000x speedup compared to a standard client-server implementation. A task that took 1,500 seconds was completed in just 66 milliseconds.
  • Scalability: The ORAM-based method showed better "row scalability" for very large datasets ($n > 2^{14}$) because its complexity grows more slowly than the sorting method.
  • Efficiency in Dynamics: The extended ORAM protocol handled insertions and deletions in roughly 22–43 milliseconds, making it viable for real-time database updates.

Limitations and Future Work

  • Deletion Complexity: While the ORAM protocol supports deletions, it requires tracking value frequencies, which adds storage overhead compared to the simpler "insertion-only" version.
  • Static vs. Dynamic Trade-offs: There is no "one size fits all" solution; users must choose between the parallel efficiency of sorting (static) and the flexibility of ORAM (dynamic).
  • Future Directions: The authors suggest extending this work to other maintenance tasks, such as discovering Approximate Functional Dependencies (rules that hold for most of the data) or handling data with missing values.

Summary updated

BibTeX
@inproceedings{cao2024secure,
  author = {Xinle Cao and Yuhan Li and Dmytro Bogatov and Jian Liu and Kui Ren},
  title = {{Secure and Practical Functional Dependency Discovery in Outsourced Databases}},
  booktitle = {ICDE},
  year = {2024},
  doi = {10.1109/icde60146.2024.00134},
}
Figure