Inferensys

Glossary

Oblivious RAM (ORAM)

A cryptographic technique that hides the memory access patterns of a program from an untrusted server, preventing the leakage of sensitive information through observed physical addresses.
Moody home-office setup in a converted highrise loft, analyst working late with multiple screens showing knowledge graph visualizations, city lights through large windows behind.
CRYPTOGRAPHIC ACCESS PATTERN HIDING

What is Oblivious RAM (ORAM)?

Oblivious RAM (ORAM) is a cryptographic protocol that conceals a program's memory access patterns from an untrusted physical observer, ensuring that the sequence of read/write operations reveals no information about the underlying computation or sensitive data.

Oblivious RAM (ORAM) is a cryptographic primitive that transforms a program's logical memory accesses into a randomized sequence of physical accesses, making them statistically independent of the actual data being processed. By continuously re-encrypting and reshuffling data blocks on every access, ORAM prevents an adversary observing the address bus or storage medium from inferring proprietary algorithms or sensitive information, even if the memory contents themselves are encrypted.

The core security guarantee is that for any two input sequences of equal length, the observed physical access distributions are computationally indistinguishable. Implementations like Path ORAM organize storage as a binary tree, reading and rewriting entire paths to hide which specific node was targeted. This technique is critical for encrypted vector databases and Trusted Execution Environments (TEEs), where it mitigates side-channel leakage through memory bus monitoring.

ARCHITECTURAL PROPERTIES

Key Features of ORAM

Oblivious RAM fundamentally transforms how a processor interacts with remote memory by cryptographically hiding the access pattern. The following properties define a secure ORAM construction.

01

Access Pattern Indistinguishability

The foundational security guarantee of ORAM. For any two sequences of logical memory accesses of the same length, the observed sequence of physical memory accesses must be computationally indistinguishable.

  • Prevents an untrusted server from distinguishing between a linear scan and a random access.
  • Achieved by continuously re-encrypting and shuffling data blocks after each access.
  • Even if the server observes a physical address being read, it cannot determine if that address was ever read before.
02

Recursive ORAM Construction

A space-efficient technique where the client stores only a constant amount of local memory by recursively storing the position map inside a smaller ORAM.

  • The position map, which tracks where each logical block physically resides, is itself treated as data and stored in a secondary ORAM.
  • This recursion continues until the final position map fits entirely in the client's trusted memory.
  • Enables O(log N) or polylog(N) overhead while the client maintains only O(1) local storage blocks.
03

Path ORAM Binary Tree Structure

The most practical and widely implemented ORAM scheme, organizing server storage as a complete binary tree of buckets.

  • Each logical block is randomly mapped to a leaf node; the block resides somewhere along the path from the root to that leaf.
  • On access, the client reads the entire path, retrieves the target block, reassigns it to a new random leaf, and writes the path back.
  • A small local stash temporarily holds overflowing blocks, with the probability of stash overflow being negligible.
04

Poly-logarithmic Bandwidth Overhead

The asymptotic cost of hiding access patterns, measured as the ratio of physical data transferred to logical data requested.

  • Trivial ORAM (reading the entire memory on every access) incurs O(N) overhead.
  • Hierarchical ORAM schemes achieve O(log³ N) overhead.
  • Path ORAM achieves O(log² N) overhead, making it feasible for gigabyte-scale datasets.
  • Practical implementations using Circuit ORAM further optimize the constant factors hidden by asymptotic notation.
05

Oblivious Sorting Primitives

Many ORAM constructions rely on data-oblivious sorting algorithms as a core building block for periodically reshuffling memory.

  • An oblivious sort executes a fixed sequence of comparisons and swaps regardless of the input data values.
  • Batcher's odd-even mergesort and AKS networks are classic examples.
  • During a reshuffle, blocks are decrypted, sorted by a new random tag, and re-encrypted, leaving no correlation between physical location and logical address.
06

Tree-Top Caching for Locality

An optimization that exploits the observation that the top levels of the Path ORAM tree are accessed far more frequently than the leaves.

  • The top log N levels of the tree are small enough to fit in the client's trusted memory or a secure enclave.
  • Caching these levels drastically reduces the number of physical blocks that must be fetched from the untrusted server.
  • Reduces practical bandwidth overhead by a significant constant factor without weakening the cryptographic security guarantees.
ORAM FUNDAMENTALS

Frequently Asked Questions

Explore the core concepts behind Oblivious RAM, a cryptographic primitive that conceals memory access patterns to prevent data leakage through observed physical addresses.

Oblivious RAM (ORAM) is a cryptographic protocol that completely hides the memory access pattern of a program from an untrusted server or observer. It works by continuously reshuffling and re-encrypting data blocks on the server while accessing multiple physical locations for every logical read or write request. The fundamental mechanism ensures that the sequence of physical memory addresses accessed—whether a read or a write—appears statistically independent of the actual logical data being processed. This prevents an adversary from inferring sensitive information, such as which database record is being queried or which branch of an algorithm is executing, by simply monitoring the bus traffic or memory controller activity. Modern ORAM constructions, such as Path ORAM and Circuit ORAM, organize server storage as a binary tree of buckets, where each data block is mapped to a random leaf path. During an access, the client reads and rewrites the entire path from the root to that leaf, flushing the block into a local stash and then evicting it along a new random path, thereby destroying any correlation between logical access frequency and physical location.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.