Abstract
Hardware enclaves such as Intel SGX are a promising technology for improving the security of databases outsourced to the cloud. These enclaves provide an execution environment isolated from the hypervisor/OS, and encrypt data in RAM. However, for applications that use large amounts of memory, including most databases, enclaves do not protect against access pattern leaks, which let attackers gain a large amount of information about the data. Moreover, the naive way to address this issue, using Oblivious RAM (ORAM) primitives, adds substantial overhead. ObliDB is an oblivious database engine design that provides obliviousness for general database read workloads over multiple access methods. ObliDB supports a broad range of queries, including aggregation, joins, insertions, deletions and point queries. Evaluation shows that ObliDB is 1.1-19x faster than Opaque and comes within 2.6x of Spark SQL, while supporting point queries with 3-10ms latency.
Introduction
When organizations outsource databases to the cloud, they often use hardware enclaves (like Intel SGX) to isolate data from a potentially compromised OS or hypervisor. While enclaves encrypt data in RAM, they remain vulnerable to access pattern attacks. An attacker controlling the OS can observe which memory addresses or disk blocks are accessed. Even if the data is encrypted, the sequence of accesses can reveal sensitive information, such as identifying a specific record because it’s frequently updated or knowing a query's parameters based on which index nodes are touched.
Standard solutions like Oblivious RAM (ORAM) provide a "black box" way to hide these patterns but introduce massive overhead. Existing research systems are usually specialized, handling either big data analytics or simple point lookups, but failing to support complex, general-purpose SQL workloads efficiently.
System Architecture
ObliDB introduces a hybrid architecture that chooses the best "oblivious" path for a query by interacting with untrusted components through a secure hardware enclave.
The system supports dual storage methods to balance performance and security:
- Linear Storage: Data is stored in adjacent blocks. To remain oblivious, every query must scan the entire table, making it ideal for high-volume analytics.
- Indexed Storage: A novel Oblivious B+ Tree built over ORAM. The tree is optimized by removing parent pointers to reduce write-back overhead and padding all operations with dummy ORAM accesses to ensure every insertion or deletion appears identical to an observer.
Oblivious Query Processing
Instead of a one-size-fits-all approach, ObliDB utilizes a suite of specialized physical operators. At runtime, the enclave performs a fast, oblivious scan to determine query selectivity. It then picks the most efficient operator for that specific selectivity. This "mandatory" scan for statistics is essentially free in an oblivious context because the system must touch every record anyway.
The system employs four primary SELECT algorithms as detailed above: Small, Large, Continuous, and Hash. To ensure data integrity, ObliDB uses Merkle-tree-like structures and revision numbers, preventing the untrusted OS from tampering with or rolling back the database state.
Evaluation and Results
ObliDB was evaluated using datasets including CFPB customer complaints, server logs (USERVISITS), and PageRanks (RANKINGS), with synthetic data used for scaling tests up to 1.4 million rows.
Key results include:
- Analytics Performance: ObliDB is 1.1–19x faster than Opaque on the Big Data Benchmark and achieves performance within 2.6x of Spark SQL, which provides no access pattern protection.
- Transactional Latency: Point queries achieve 3–10ms latency, which is 7–22x faster than previous encryption-based oblivious index systems like HIRB.
- Efficiency: Custom operators provide up to a 329x speedup for aggregates compared to a naive ORAM implementation.
Conclusion
ObliDB demonstrates that general-purpose SQL workloads can be executed obliviously with high efficiency. By leveraging selectivity to choose between specialized operators and optimizing ORAM-based indexing, it bridges the gap between secure but slow ORAM and fast but insecure traditional databases. Future work includes extending the system for disk persistence and full ACID compliance.
Summary updated