Oblivious RAM
An Oblivious RAM (ORAM) simulator is a compiler that transforms an algorithm in such a way that the resulting algorithm preserves the input-output behavior of the original algorithm but the distribution of the memory access patterns of the transformed algorithm is independent of the memory access pattern of the original algorithm.[src] The use of ORAMs is motivated by the fact that an adversary can obtain nontrivial information about the execution of a program and the data that the program is using just by observing the pattern in which the program accesses various memory locations during its execution.[src] An adversary can get this information even if the data in memory is encrypted.[src] This definition is suited for settings like protected programs running on unprotected shared memory or clients running programs on their systems by accessing previously stored data on a remote server.[src] The concept was formulated by Oded Goldreich and Rafail Ostrovsky in 1996.[src]
An Oblivious RAM (ORAM) simulator is a compiler that transforms an algorithm in such a way that the resulting algorithm preserves the input-output behavior of the original algorithm but the distribution of the memory access patterns of the transformed algorithm is independent of the memory access pattern of the original algorithm.[src] The use of ORAMs is motivated by the fact that an adversary can obtain nontrivial information about the execution of a program and the data that the program is using just by observing the pattern in which the program accesses various memory locations during its execution.[src] An adversary can get this information even if the data in memory is encrypted.[src] This definition is suited for settings like protected programs running on unprotected shared memory or clients running programs on their systems by accessing previously stored data on a remote server.[src] The concept was formulated by Oded Goldreich and Rafail Ostrovsky in 1996.[src] ==Definition== A Turing machine (TM), a mathematical abstraction of a real computer (program), is said to be oblivious if, for any two inputs of the same length, the motions of the tape heads remain the same.[src] Pippenger and Fischer proved that every TM with running time T(n) can be made oblivious and that the running time of the oblivious TM is O(T(n)\log T(n)) .[src] A more realistic model of computation is the RAM model.[src] In the RAM model of computation, there is a CPU that can execute the basic mathematical, logical, and control instructions.[src] The CPU is also associated with a few registers and a physical random access memory, where it stores the operands of its instructions.[src] The CPU also has instructions to read the contents of a memory cell and write a specific value to a memory cell.[src] The definition of ORAMs captures a similar notion of obliviousness for memory accesses in the RAM model.[src] Informally, an ORAM is an algorithm at the interface of a protected CPU and the physical RAM such that it acts like a RAM to the CPU by querying the physical RAM for the CPU while hiding information about the actual memory access pattern of the CPU from the physical RAM.[src] In other words, the distribution of memory accesses of two programs that make the same number of memory accesses to the RAM is indistinguishable from each other.[src] This description will still make sense if the CPU is replaced by a client with a small storage and the physical RAM is replaced with a remote server with a large storage capacity, where the data of the client resides.[src] The following is a formal definition of ORAMs.[src] Let \Pi denote a program requiring memory of size n when executing on an input x .[src] Suppose that \Pi has instructions for basic mathematical and control operations in addition to two special instructions \mathsf{read}(l) and \mathsf{write}(l,v) , where \mathsf{read}(l) reads the value at location l and \mathsf{write}(l,v) writes the value v to l .[src] The sequence of memory cells accessed by a program \Pi during its execution is called its memory access pattern and is denoted by \tilde{\Pi}(n,x) .[src] A polynomial-time algorithm C is an Oblivious RAM (ORAM) compiler with computational overhead c(\cdot) and memory overhead m(\cdot) , if C given n\in N and a deterministic RAM program \Pi with memory-size n outputs a program \Pi_0 with memory-size m(n)\cdot n such that for any input x , the running-time of \Pi_0(n, x) is bounded by c(n)\cdot T where T is the running-time of \Pi(n, x) , and there exists a negligible function \mu such that the following properties hold: Correctness: For any n \in \mathbb{N} and any string x \in \{0, 1\}^* , with probability at least 1- \mu(n) , \Pi(n, x) = \Pi_0(n, x) .[src] Obliviousness: For any two programs \Pi_1, \Pi_2 , any n \in \mathbb{N} and any two inputs, x_1, x_2 \in \{0, 1\}^* if |\tilde{\Pi}_1(n, x_1)| = |\tilde{\Pi}_2(n, x_2)| , then {\tilde{\Pi}_1}'(n, x_1) is \mu -close to {\tilde{\Pi}_2}'(n, x_2) in statistical distance, where {\Pi_1}' = C(n, \Pi_1) and {\Pi_2}' = C(n, \Pi_2) .[src] Note that the above definition uses the notion of statistical security.[src] One can also have a similar definition for the notion of computational security.[src] ==History of ORAMs== ORAMs were introduced by Goldreich and Ostrovsky, where the key motivation was stated as providing software protection from an adversary who can observe a program's memory access pattern (but not the contents of the memory).[src] The main result in this work is that there exists an ORAM compiler that uses O(n) server space and incurs a running time overhead of {O(\log^3 n)} when making a program that uses n memory cells oblivious.[src] There are several attributes that need to be considered when comparing various ORAM constructions.[src] The most important parameters of an ORAM construction's performance are the client-side space overhead, server-side space overhead, and the time overhead required to make one memory access.[src] Based on these attributes, the construction of Asharov et al., called "OptORAMa", is the first optimal ORAM construction.[src] It achieves O(1) client storage, O(n) server storage, and O(\log n) access overhead, matching the known lower bounds.[src] Another important attribute of an ORAM construction is whether the access overhead is amortized or worst-case.[src] Several earlier ORAM constructions have good amortized access overhead guarantees but have \Omega(N) worst-case access overheads.[src] Some ORAM constructions with polylogarithmic worst-case computational overheads are.[src] The constructions of were in the random oracle model, where the client assumes access to an oracle that behaves like a random function and returns consistent answers for repeated queries.[src] Access to the oracle could be replaced by a pseudorandom function whose seed is a secret key stored by the client, if one assumes the existence of one-way functions.[src] The papers were aimed at removing this assumption completely.[src] The authors of also achieve an access overhead of O(\log^3 n) While most of the earlier works focus on proving security computationally, there are more recent works that use the stronger statistical notion of security.[src] One of the only known lower bounds on the access overhead of ORAMs is due to Goldreich et al.[src] They show a \Omega(\log{n}) lower bound for ORAM access overhead, where n is the data size.[src] Another lower bound is by Larsen and Nielsen.[src] There is also a conditional lower bound on the access overhead of ORAMs due to Boyle et al.[src] that relates this quantity with that of the size of sorting networks.[src] ==ORAM constructions== ===Trivial construction=== A trivial ORAM simulator construction, for each read or write operation, reads from and writes to every single element in the array, only performing a meaningful action for the address specified in that single operation.[src] The trivial solution thus, scans through the entire memory for each operation.[src] This scheme incurs a time overhead of \Omega(n) for each memory operation, where is the size of the memory.[src] ===A simple ORAM scheme=== A simple version of a statistically secure ORAM compiler constructed by Chung and Pass is described in the following along with an overview of a proof of its correctness.[src] The compiler on input and a program with its memory requirement , outputs an equivalent oblivious program .[src] If the input program uses registers, the output program will need r+n/{\alpha}+\text{poly}\log{n} registers, where \alpha>1 is a parameter of the construction.[src] uses O(n \text{ poly} \log n) memory and its (worst-case) access overhead is O(\text{poly}\log n) .[src] The ORAM compiler is very simple to describe.[src] Suppose that the original program has instructions for basic mathematical and control operations in addition to two special instructions \mathsf{read}(l) and \mathsf{write}(l,v) , where \mathsf{read}(l) reads the value at location and \mathsf{write}(l,v) writes the value to .[src] The ORAM compiler, when constructing , simply replaces each and instructions with subroutines and and keeps the rest of the program the same.[src] It may be noted that this construction can be made to work even for memory requests coming in an online fashion.[src] ====Memory organization of the oblivious program==== The program stores a complete binary tree of depth d=\log (n/\alpha) in its memory.[src] Each node in is represented by a binary string of length at most .[src] The root is the empty string, denoted by .[src] The left and right children of a node represented by the string \gamma are \gamma_0 and \gamma_1 respectively.[src] The program thinks of the memory of as being partitioned into blocks, where each block is a contiguous sequence of memory cells of size .[src] Thus, there are at most \lceil n /\alpha \rceil blocks in total.[src] In other words, the memory cell corresponds to block b=\lfloor r/\alpha \rfloor .[src] At any point in time, there is an association between the blocks and the leaves in .[src] To keep track of this association, also stores a data structure called a position map, denoted by Pos , using O(n/\alpha) registers.[src] This data structure, for each block , stores the leaf of associated with in Pos(b) .[src] Each node in contains an array with at most triples.[src] Each triple is of the form (b,Pos(b),v) , where is a block identifier and is the contents of the block.[src] Here, is a security parameter and is O(\text{poly} \log n) .[src] ====Description of the oblivious program==== The program starts by initializing its memory as well as registers to .[src] Describing the procedures, and is enough to complete the description of .[src] The sub-routine is given below.[src] The inputs to the sub-routine are a memory location l \in [n] and the value to be stored at the location .[src] It has three main phases, namely FETCH, PUT_BACK, and FLUSH.[src] input: a location , a value Procedure FETCH // Search for the required block.[src] b\leftarrow \lfloor l/ \alpha \rfloor // is the block containing .[src] i\leftarrow l\mod \alpha // is 's component in block .[src] pos\leftarrow Pos(b) if pos =\perp then pos\leftarrow_R [n/ \alpha] .[src] // Set to a uniformly random leaf in .[src] flag \leftarrow 0 .[src] for each node on the path from the root to do if has a triple of the form (b,pos,x) then Remove (b,pos,x) from , store in a register, and write back the updated to .[src] flag \leftarrow 1 .[src] else Write back to .[src] Procedure PUT_BACK // Add back the updated block at the root.[src] pos'\leftarrow_R [n/ \alpha] .[src] // Set to a uniformly random leaf in .[src] if flag =1 then Set to be the same as except for at the -th position.[src] else Set to be a block with at -th position and 's everywhere else.[src] if there is space left in the root then Add the triple (b,pos',x') to the root of .[src] else Abort outputting overflow.[src] Procedure FLUSH // Push the blocks present in a random path as far down as possible.[src] pos^*\leftarrow_R [n/ \alpha] .[src] // Set pos^* to a uniformly random leaf in .[src] for each triple (b,pos,v) in the nodes traversed the path from the root to pos^* Push down this triple to the node that corresponds to the longest common prefix of pos and pos^* .[src] if at any point some bucket is about to overflow then Abort outputting overflow.[src] The task of the FETCH phase is to look for the location in the tree .[src] Suppose is the leaf associated with the block containing location .[src] For each node in on the path from root to , this procedure goes over all triples in and looks for the triple corresponding to the block containing .[src] If it finds that triple in , it removes the triple from and writes back the updated state of .[src] Otherwise, it simply writes back the whole node .[src] In the next phase, it updates the block containing with the new value , associates that block with a freshly sampled uniformly random leaf of the tree, and writes back the updated triple to the root of .[src] The last phase, which is called FLUSH, is an additional operation to release the memory cells in the root and other higher internal nodes.[src] Specifically, the algorithm chooses a uniformly random leaf pos^* and then tries to push down every node as much as possible along the path from root to pos^* .[src] It aborts outputting an overflow if at any point some bucket is about to overflow its capacity.[src] The sub-routine is similar to .[src] For the sub-routine, the input is just a memory location l \in [n] and it is almost the same as .[src] In the FETCH stage, if it does not find a triple corresponding to location , it returns as the value at location .[src] In the PUT_BACK phase, it will write back the same block that it read to the root, after associating it with a freshly sampled uniformly random leaf.[src] ====Correctness of the simple ORAM scheme==== Let stand for the ORAM compiler that was described above.[src] Given a program , let denote C(\Pi) .[src] Let \Pi(n,x) denote the execution of the program on an input using memory cells.[src] Also, let \tilde{\Pi}(n,x) denote the memory access pattern of \Pi(n,x) .[src] Let denote a function such that for any n \in \mathbb{N} , for any program and for any input x \in \{0,1\}^* , the probability that \Pi'(n,x) outputs an overflow is at most \mu(n) .[src] The following lemma is easy to see from the description of .[src] Equivalence Lemma: Let n \in \mathbb{N} and x \in \{0,1\}^* .[src] Given a program , with probability at least 1 - \mu(n) , the output of \Pi'(n,x) is identical to the output of \Pi(n,x) .[src] It is easy to see that each and operation traverses root-to-leaf paths in chosen uniformly and independently at random.[src] This fact implies that the distribution of memory access patterns of any two programs that make the same number of memory accesses are indistinguishable if they both do not overflow.[src] Obliviousness Lemma: Given two programs and and two inputs x_1,x_2 \in \{0,1\}^* such that |\tilde{\Pi_1}(x_1,n)| = |\tilde{\Pi_2}(x_2,n)| , with probability at least 1 - 2\mu(n) , the access patterns \tilde{\Pi_1'}(x_1,n) and \tilde{\Pi_2'}(x_2,n) are identical.[src] The following lemma completes the proof of correctness of the ORAM scheme.[src] Overflow Lemma:There exists a negligible function such that for every program , every and input , the program \Pi'(n,x) outputs overflow with probability at most \mu(n) .[src] ====Computational and memory overheads==== During each and operation, two random root-to-leaf paths of are fully explored by .[src] This takes O(K\cdot\log (n/\alpha)) time.[src] This is the same as the computational overhead and is O(\text{poly}\log n) since is O(\text{poly}\log n) .[src] The total memory used up by is equal to the size of .[src] Each triple stored in the tree has \alpha + 2 words in it and thus there are K(\alpha + 2) words per node of the tree.[src] Since the total number of nodes in the tree is O(n/\alpha) , the total memory size is O(nK) words, which is O(n\text{ poly}\log n) .[src] Hence, the memory overhead of the construction is O(\text{poly}\log n) .[src] ==References== ==See also== Oblivious data structure Cache-oblivious algorithm[src]
130 sentences · 130 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Oblivious RAM." encyclopegia.org, 2026, https://encyclopegia.org/wiki/oblivious-ram. Accessed 05 December 2026.
Chicago
"Oblivious RAM." encyclopegia.org. Accessed December 5, 2026. https://encyclopegia.org/wiki/oblivious-ram.
APA
encyclopegia.org. (2026). Oblivious RAM. Retrieved December 5, 2026, from https://encyclopegia.org/wiki/oblivious-ram
Accessed December 5, 2026 · CC BY-SA 4.0 · citation page · JSON