OptORAMa: Optimal Oblivious RAM

Gilad Asharov, Ilan Komargodski, Wei Kai Lin, Kartik Nayak, Enoch Peserico, Elaine Shi

Research output: Contribution to journalArticlepeer-review


Oblivious RAM (ORAM), first introduced in the ground-breaking work of Goldreich and Ostrovsky (STOC '87 and J. ACM '96) is a technique for provably obfuscating programs' access patterns, such that the access patterns leak no information about the programs' secret inputs. To compile a general program to an oblivious counterpart, it is well-known that ω (log N) amortized blowup in memory accesses is necessary, where N is the size of the logical memory. This was shown in Goldreich and Ostrovksy's original ORAM work for statistical security and in a somewhat restricted model (the so-called balls-and-bins model), and recently by Larsen and Nielsen (CRYPTO '18) for computational security.A long-standing open question is whether there exists an optimal ORAM construction that matches the aforementioned logarithmic lower bounds (without making large memory word assumptions, and assuming a constant number of CPU registers). In this article, we resolve this problem and present the first secure ORAM with O(log N) amortized blowup, assuming one-way functions. Our result is inspired by and non-trivially improves on the recent beautiful work of Patel et al. (FOCS '18) who gave a construction with O(log Ng log log N) amortized blowup, assuming one-way functions. One of our building blocks of independent interest is a linear-time deterministic oblivious algorithm for tight compaction: Given an array of n elements where some elements are marked, we permute the elements in the array so that all marked elements end up in the front of the array. Our O(n) algorithm improves the previously best-known deterministic or randomized algorithms whose running time is O(n g log n) or O(n g log log n), respectively.

Original languageEnglish
Article number4
Pages (from-to)4:1-4:70
Number of pages70
JournalJournal of the ACM
Issue number1
StatePublished - 19 Dec 2022

Bibliographical note

Funding Information:
G. A. was supported in part by a Simons Foundation junior fellow award, and by the Israel Science Foundation (grant No. 2439/20). I. K. is the incumbent of the Harry & Abe Sherman Senior Lectureship at the School of Computer Science and Engineering, supported in part by an Alon Young Faculty Fellowship, by a grant from the Israel Science Foundation (ISF Grant No. 1774/20), and by a grant from the US-Israel Binational Science Foundation and the US National Science Foundation (BSF-NSF Grant No. 2020643). This work was supposed by an AFOSR Award FA9550-18-1-0267, NSF grant CNS-1601879, a DARPA Brandeis award, a Packard Fellowship, a Sloan Fellowship, Google Faculty Research Awards, a VMware Research Award, and a Baidu Research Award. G. A. and I. K. were with Cornell Tech during most of this research.

Publisher Copyright:
© 2022 Association for Computing Machinery.


  • Oblivious RAM
  • oblivious tight compaction


Dive into the research topics of 'OptORAMa: Optimal Oblivious RAM'. Together they form a unique fingerprint.

Cite this