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.
Glossary
Oblivious RAM (ORAM)

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Oblivious RAM relies on a constellation of cryptographic primitives and data structures to hide memory access patterns. These related concepts form the technical foundation for understanding how ORAM achieves its privacy guarantees.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us