Blog IT

Cryptography & Security | May 1996

Software Protection and Simulation on Oblivious RAMs

Authors: Oded Goldreich & Rafail Ostrovsky (Summary by Blog IT)

This seminal paper establishes the theoretical foundations for software protection through oblivious computation, introducing the concept of Oblivious RAM (ORAM) and demonstrating how to achieve polylogarithmic overhead in hiding memory access patterns during program execution.

The Software Protection Problem

Software piracy represents a fundamental challenge: software is expensive to create but trivial to copy. Traditional approaches lack theoretical foundations. This paper provides rigorous treatment by identifying a key problem—preventing adversaries from learning about programs through execution observation.

The authors distinguish two protection types:

The Hardware-Software Hybrid Approach

Pure software solutions are impossible—any program is ultimately a copyable binary sequence. The paper adopts a Software-Hardware package (SH-package) consisting of:

While encryption protects instruction contents, it leaves the memory access pattern visible—a critical vulnerability this paper addresses.

What Can Adversaries Learn?

The paper investigates what adversaries can learn by experimenting with SH-packages. Adversaries can:

However, adversaries cannot inspect CPU internal registers or access its random oracle.

Oblivious RAMs: The Core Concept

An Oblivious RAM is a probabilistic RAM where the probability distribution of memory addresses accessed during execution depends only on running time, revealing nothing about actual input beyond execution time.

Key Insight: If two inputs have identical running times, their access patterns must be identically distributed.

The Reduction: Software Protection to Oblivious Simulation

Protection Against Nontampering Adversaries

The solution combines two techniques:

The CPU maintains a counter and encrypts values as: (v ⊕ f(counter), counter). Since each counter value is used once, this provides perfect security.

Protection Against Tampering Adversaries

For adversaries who can modify messages, the solution adds authentication tags using version numbers. To store encrypted value v at address a:

send (store, a, (v, f(a, version(a), v)))

Upon retrieval, the CPU verifies the tag matches. This prevents value modification, address substitution, and replay attacks.

The "Square Root" Solution

This preliminary approach provides intuition for the final hierarchical solution:

Data Structure:

Algorithm (per epoch of √m virtual accesses):

Overhead: O(√m · log² m) per virtual access—a significant improvement over trivial O(m) but still not optimal.

The Hierarchical Solution: Main Result

Theorem: Any t ≤ 2^k steps of arbitrary RAM_k can be obliviously simulated by probabilistic-RAM with overhead O((log t)³). Furthermore, simulation is on-line and time-labeled.

Key Innovation: Hierarchy of Buffers

Instead of a single hash table, use multiple buffers with different sizes and reshuffling frequencies:

Design Principle: Balance buffer size and reshuffling frequency. Smaller buffers reshuffled frequently (low per-reshuffling cost), larger buffers reshuffled rarely (amortizing higher costs).

Simulation Algorithm

Virtual Access to Address V at Time t:

Oblivious Hashing: The 12-Step Procedure

Merging buffer contents obliviously requires careful protocol:

Key Property: Access pattern is oblivious and independent of actual data values. Overflow probability ≤ n · exp{-m}.

Complexity Analysis

Per Virtual Access Costs:

Total Amortized Overhead: O((log t)³)

Using Batcher's Sorting Network yields O((log t)⁴) in practice, while AKS Sorting Network achieves the theoretical O((log t)³).

Lower Bound: Optimality

Theorem: Any oblivious simulation must make at least Ω(t·log t) accesses to simulate t steps.

Proof via Game Theory: Model simulation as a game where a player (CPU) with limited memory must serve requests while an observer sees only which "cells" are accessed. Counting argument shows q ≥ t · log m accesses required.

Significance: The O(log³ t) upper bound is within a quadratic factor of optimal Ω(log t) lower bound.

Main Theorems

Information-Theoretic Result

There exists a software-protecting compiler C such that for any probabilistic-RAM, C protects software against tampering adversaries with overhead O((log t)³).

Practical Result

Assuming one-way functions exist: There exists a compiler with overhead poly(k) that is secure against all poly(k)-time tampering adversaries.

The practical version replaces random oracles with pseudorandom functions, maintaining security against polynomial-time adversaries.

Extensions and Applications

Secure Distributed Databases

Apply ORAM to databases distributed across trusted sites connected by insecure channels. Sites model memory cells, requesting site plays CPU role, ensuring access patterns reveal nothing about queried data.

Data Structure Checking

Maintain data structures with small reliable memory while most data resides in potentially tampered unreliable memory. Oblivious time-labeled simulation provides both content authentication and access pattern hiding.

Paging-Level Security

All results apply at any execution granularity. For virtual memory systems, replace single page access with oblivious sequence of page accesses.

Implementation Considerations

Protected Hardware Requirements:

Performance Characteristics:

Space Overhead:

Theoretical Significance

Fundamental Contributions:

Complexity-Theoretic Insights:

Impact and Open Problems

Follow-up Research:

Remaining Open Problems:

Limitations and Assumptions

Model Assumptions:

Practical Concerns:

Conclusions

This seminal paper establishes theoretical foundations for software protection through oblivious computation. Main achievements:

The work demonstrates that strong software protection is theoretically achievable with moderate overhead, transforming an ad-hoc engineering problem into rigorous computer science theory with practical applications.

"Complete software protection requires both content hiding (via encryption) and access pattern hiding (via oblivious simulation). The hierarchical ORAM construction shows that efficient access pattern hiding is possible."