---
title: "Technology Deep Dive: Building a Faster ORAM Layer for Enclaves"
description: "Signal replaced linear-scan oblivious memory access in its SGX enclaves with a Path ORAM layer, so contact discovery can run efficient algorithms like binary search without leaking which phone numbers are looked up through RAM access patterns."
url: "https://swe.quest/articles/technology-deep-dive-building-a-faster-oram-layer-for-enclaves-6cb958aaa2507db9"
canonical: "https://signal.org/blog/building-faster-oram/"
source: "Signal"
published: "2022-08-19"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 16
tags: ["privacy","cryptography","sandboxing","algorithms","communications"]
---

# Technology Deep Dive: Building a Faster ORAM Layer for Enclaves

A post on [Signal](https://swe.quest/sources/signal.md), published 2022-08-19, 16 min read, Deep dive. Original: [https://signal.org/blog/building-faster-oram/](https://signal.org/blog/building-faster-oram/)

## Summary

Signal replaced linear-scan oblivious memory access in its SGX enclaves with a Path ORAM layer, so contact discovery can run efficient algorithms like binary search without leaking which phone numbers are looked up through RAM access patterns. Encrypted enclave memory alone isn't enough, because the order and location of memory accesses still reveal data. Path ORAM stores fixed-size blocks in a binary tree. Each read pulls an entire root-to-leaf path into a small stash, linearly scans the stash, remaps the block to a uniformly random leaf, and writes the path back. As a result, repeated lookups never produce the same access pattern. The change cuts CPU cost compared with scanning a billion entries and lays groundwork for usernames and phone number privacy.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Privacy](https://swe.quest/tags/privacy.md) (Security)
- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Communications](https://swe.quest/tags/communications.md) (Domains)

## Prerequisites

- binary search ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- trusted execution enclaves
- memory access side channels

## Keywords

Path ORAM, Intel SGX, Signal, contact discovery, remote attestation, Oblix, Snoopy

## Related posts

- [How Advanced Browsing Protection Works in Messenger](https://swe.quest/articles/how-advanced-browsing-protection-works-in-messenger-7c673f722bfcb274.md): Meta Engineering · 2026-03-09 · Hard · 12 min read · Privacy, Cryptography, Sandboxing & isolation, Communications, Security
  Advanced Browsing Protection checks links clicked in end-to-end encrypted Messenger chats against a large, frequently updated blocklist while revealing as little as possible about the URL to Meta.
- [Private analytics via zero-trust aggregation](https://swe.quest/articles/private-analytics-via-zero-trust-aggregation-060bfb6ed5bdc13c.md): Google Research · 2026-05-27 · Hard · 6 min read · Cryptography, Privacy, Analytics & OLAP, Security
  Google's private analytics service now layers a new lattice-based, one-shot secure aggregation protocol on top of TEE execution, so individual device data is never decrypted in server memory even if the enclave is compromised by side-channel attacks.
- [Introducing Automatic Key Verification](https://swe.quest/articles/introducing-automatic-key-verification-2aaa055daad25a08.md): Signal · 2026-08-11 · Medium · 17 min read · Cryptography, Communications, Security, Data structures
  Signal's automatic key verification uses key transparency to confirm that the binding between a phone number or username and its public key is globally consistent, giving the same protection against a compromised directory as comparing safety numbers, without meeting in person.
- [Building end-to-end security for Messenger](https://swe.quest/articles/building-end-to-end-security-for-messenger-0573da5f5bbc2217.md): Meta Engineering · 2023-12-07 · Easy · 7 min read · Cryptography, Communications, Privacy, Security
  Messenger is rolling out end-to-end encryption by default for personal one-to-one chats, built on the Signal protocol and accompanied by two whitepapers covering the messaging protocol and Labyrinth, a new encrypted storage protocol.
- [PrivacyLib: Privacy Controls at the Data Access Boundary](https://swe.quest/articles/privacylib-privacy-controls-at-the-data-access-boundary-f868c0b03bdc9ad2.md): Meta Engineering · 2026-10-27 · Medium · 17 min read · Privacy, System design, Identity & auth, AI agents, Performance engineering
  PrivacyLib is a common library embedded in the clients of hundreds of Meta data and processing systems that enforces and observes privacy requirements at the point of data access.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
