0Pricing
Cryptology Academy · Lesson

ORAM in Cloud Storage and Secure Processors

Explore ORAM applications in trusted execution environments (SGX, TrustZone) and encrypted cloud databases.

ORAM in Cloud Storage and Secure Processors is a free Cryptology Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Intel SGX and Access Pattern Leakage

Intel SGX (Software Guard Extensions) provides hardware-isolated enclaves where code and data are encrypted and authenticated. However, the operating system can still observe which memory pages the enclave accesses by monitoring page table entries. This page-level access pattern can be exploited in side-channel attacks. A classic attack is the "controlled channel attack" by Xu, Cui, and Peinado (2015), which reconstructed RSA keys from SGX memory access patterns.

Cache-Timing Side Channels in SGX

Beyond page-level access patterns, SGX is vulnerable to cache-timing side channels. An attacker sharing the processor can observe cache hits and misses caused by the enclave, inferring fine-grained (cache-line level) access patterns. These attacks work because the CPU cache is shared between the enclave and untrusted code. Mitigations include constant-time programming and ORAM to randomize memory access patterns.

ZeroTrace: ORAM Inside SGX

ZeroTrace (Sasy, Jha, Kerschbaum, 2018) implements Path ORAM inside an Intel SGX enclave to provide oblivious memory access. The untrusted host OS provides the ORAM server (the binary tree of buckets) while the SGX enclave acts as the ORAM client. ZeroTrace adds an SGX-specific optimization: the position map is kept inside the enclave (trusted memory), eliminating recursive ORAM for the position map.

Graphene-SGX and SCONE ORAM Integration

Graphene-SGX (now Gramine) and SCONE are SGX container frameworks that allow running unmodified Linux applications inside enclaves. Both frameworks have been extended with ORAM support to hide access patterns from the OS. SCONE with ORAM integration allows oblivious execution of Python, Go, and Java programs in SGX without code modification, making ORAM accessible to applications without manual integration.

Shroud: Oblivious Data Structures for SGX

Shroud (Volos, Jaleel, Emer, Burtscher, Forlin, 2018) implements oblivious versions of fundamental data structures (arrays, stacks, queues, maps) for use inside SGX enclaves. Shroud uses a combination of ORAM and data-independent algorithms to ensure that enclave memory access patterns do not depend on the data values. This is more efficient than applying ORAM to entire application memory, targeting only sensitive data structures.

AWS Nitro Enclaves and Memory Confidentiality

AWS Nitro Enclaves provide isolated compute environments for processing highly sensitive data (payment card numbers, healthcare records). Unlike SGX, Nitro Enclaves isolate at the virtual machine level rather than the process level. AWS does not provide ORAM by default in Nitro Enclaves, but confidentiality guarantees cover memory content. For access pattern privacy, applications running in Nitro Enclaves must implement their own ORAM if needed.

ARM TrustZone ORAM Applications

ARM TrustZone provides a trusted execution environment (Secure World) isolated from the normal OS. Like SGX, TrustZone does not inherently hide memory access patterns. Research systems such as TrustORAM (Brasser, Dmitrienko, Sadeghi, Crane, Larsen, Franz) implement ORAM within TrustZone to protect sensitive data access in mobile devices and IoT. TrustZone is present on all modern ARM processors, making ORAM-enabled TrustZone widely deployable.

ObliDB and Opaque: Oblivious Databases

ObliDB (Eskandarian and Boneh, 2017) is an oblivious database that hides access patterns for standard SQL queries. It uses ORAM for point queries and oblivious sorting for range queries. Opaque (Zheng, Dave, Beekman, Popa, Hellerstein, Stoica, 2017) runs SQL queries obliviously over Apache Spark using Intel SGX and ORAM. Opaque demonstrates that production-scale data analytics (millions of records) is feasible with ORAM overhead.

Private Information Retrieval

Private Information Retrieval (PIR) is a related primitive for read-only access pattern hiding. PIR allows a client to retrieve a database element without the server learning which element was retrieved. Computationally PIR (cPIR) achieves this with O(1) server storage overhead and O(sqrt(n)) or O(polylog n) communication. PIR is more efficient than ORAM for read-only workloads but cannot support oblivious writes.

ORAM vs PIR Trade-offs

For read-only access, PIR is more communication-efficient than ORAM: single-server cPIR requires O(n^epsilon) communication while ORAM requires O(log n) blocks per access. However, PIR requires server-side computation (linear in database size for single-server PIR), while ORAM puts all computation on the client. Multi-server PIR (information-theoretically secure with 2 non-colluding servers) is very efficient and suitable for CDN deployments.

Future Directions for ORAM

Research directions in ORAM include: reducing communication overhead toward the theoretical O(log n) lower bound (OptORAMa achieves this asymptotically), ORAM for quantum RAM (QRAM), differentially private ORAM (hiding whether the same block is accessed twice), and ORAM in homomorphic encryption (FHE-ORAM for outsourced computation). The integration of ORAM with hardware trusted execution environments remains the most practically impactful research direction.

SGX Access Pattern Quiz

Why does Intel SGX alone fail to fully protect against access pattern leakage?

ORAM in Cloud Storage and Secure Processors Recap

Intel SGX leaks page-level and cache-level access patterns, enabling controlled-channel and cache-timing attacks. ZeroTrace implements Path ORAM inside SGX to eliminate these leaks. Graphene-SGX and SCONE provide container-level ORAM integration. ObliDB and Opaque demonstrate oblivious SQL over ORAM at production scale. PIR is an efficient alternative for read-only access. ORAM research continues toward the log n communication lower bound and integration with homomorphic encryption.

Frequently asked questions

Is the “ORAM in Cloud Storage and Secure Processors” lesson free?

Yes — the full text of “ORAM in Cloud Storage and Secure Processors” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.

What will I learn in “ORAM in Cloud Storage and Secure Processors”?

Explore ORAM applications in trusted execution environments (SGX, TrustZone) and encrypted cloud databases. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cryptology Academy?

No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “ORAM in Cloud Storage and Secure Processors” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cryptology Academy lesson?

Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. The Access Pattern Leakage Threat
  2. Path ORAM: Hiding Memory Access
  3. Circuit ORAM and Practical Performance
  4. ORAM in Cloud Storage and Secure Processors
← Back to Cryptology Academy