4 stable releases

2.3.0 Mar 24, 2023
2.2.0 Mar 12, 2022
2.0.0 Apr 17, 2021
1.0.0 Mar 9, 2021

#9 in #constant-time

Download history 1216/week @ 2023-07-18 901/week @ 2023-07-25 422/week @ 2023-08-01 931/week @ 2023-08-08 521/week @ 2023-08-15 414/week @ 2023-08-22 35/week @ 2023-08-29 344/week @ 2023-09-05 524/week @ 2023-09-12 626/week @ 2023-09-19 652/week @ 2023-09-26 424/week @ 2023-10-03 581/week @ 2023-10-10 1172/week @ 2023-10-17 1105/week @ 2023-10-24 500/week @ 2023-10-31

3,410 downloads per month
Used in mc-oblivious-map

GPL-3.0 license

3.5K SLoC


This crate provides implementations of Oblivious RAM data structures, suitable for use in an Intel SGX environment.

In crate right now:

  • Adaptation of Path ORAM
  • Adaptation of Circuit ORAM


One of the main ideas in PathORAM is to use a position map, which is recursively an ORAM. The position map is built on top of an ORAM implementation.

Tuning the characteristics of the position map is important for overall performance, and the PathORAM doesn't really care about those details. So in this implementation, PathORAM contains Box, which allows for sizing and tuning to be done at runtime.

PositionMap also has slightly different initialization from ORAM. You want the PositionMap to begin in a random state, not a zeroed state. But writing random values to all the position maps on initialization is slow. To avoid the need for this, we "implicitly" initialize each position to a value which is the output of a secure block cipher.

The core PathORAM implementation, using PositionMap as a block box, appears in the path_oram module. PathORAM must also use the ORAMStorage to fetch, scan, and return branches in the storage and execute the path ORAM eviction algorithm.