#cryptography #crypto #constant-time #oblivious-ram

no-std mc-oblivious-ram

Implementations of Oblivious RAM data structures

3 stable releases

2.2.0 Mar 12, 2022
2.0.0 Apr 17, 2021
1.0.0 Mar 9, 2021

#600 in Data structures

Download history 1262/week @ 2022-11-27 1504/week @ 2022-12-04 518/week @ 2022-12-11 34/week @ 2022-12-18 7/week @ 2022-12-25 1093/week @ 2023-01-01 1672/week @ 2023-01-08 435/week @ 2023-01-15 1131/week @ 2023-01-22 1423/week @ 2023-01-29 794/week @ 2023-02-05 986/week @ 2023-02-12 1092/week @ 2023-02-19 1047/week @ 2023-02-26 748/week @ 2023-03-05 1586/week @ 2023-03-12

4,541 downloads per month

GPL-3.0 license

160KB
2.5K SLoC

mc-oblivious-ram

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

lib.rs:

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.

Dependencies

~330KB