This repository contains reproducible benchmarks related to several implementations of ORAM, Oblivious Maps and other oblivious algorithms targeting TEEs (Trusted Execution Environments). To reproduce, simply run go.sh. Our goal with this repo is to provide transparent analysis of the performance of several oblivious algorithms, and to incentivize the development of efficient implementations of oblivious algorithms.
See benchmark types for information about the algorithms that are being benchmarked and implementations for each algorithm and benchmark results for a summary of the results of each implementation. Contributions with new implementations are welcome, see CONTRIBUTING.md for information on how to add new benchmarks.
| Name | Description | Measured Parameters | Independent Variables |
|---|---|---|---|
| NRORAM | Non recursive ORAM (Requires storing the position somewhere for accesses) | Read Latency, Read Throughput, Initialization Time, Memory Usage | N (ORAM size), K (Address size), V (Value size) |
| RORAM | Recursive ORAM - Basically an array | Read Latency, Read Throughput, Initialization Time, Memory Usage | N (ORAM size), K (Address size), V (Value size) |
| UMAP | Unordered Map / Key-Value Store (Many disperse keys) | Read Latency, Read Throughput, Initialization Time, Memory Usage | N (ORAM size), K (Key size), V (Value size) |
| Sharded-UMAP | Sharded UMap | Batch Read Latency, Batch Read Throughput, Initialization Time, Memory Usage | N (ORAM size), K (Key size), V (Value size), P (Number of Partitions), B (Queries per batch) |
| Name | Description | Language | Types |
|---|---|---|---|
| olabs_oram | Oblivious Labs's SGX implementation of ORAM and UMAP | C++ | NRORAM, RORAM, UMAP, Sharded-UMAP |
| signal_icelake | Signal's implemenation of ORAM and UMAP for Private Contact Discovery | C++ | UMAP, Sharded-UMAP |
| olabs_rostl | Oblivious Labs's Rust Oblivious Standard Library implementation of ORAM and UMAP | Rust | NRORAM, RORAM, UMAP, Sharded-UMAP |
| mc_oblivious | Mobilecoin's implementation of ORAM and UMAP | Rust | RORAM, UMAP |
| meta_oram | Meta's implementation of RORAM | Rust | RORAM |
All the benchmarks are ran on the same environment. A mini server with an AMD Ryzen 9 7945HX with 64GB of RAM, and an WD Black SN850 SSD, running an up to date version of arch linux.
Latency (us) vs ORAM number of entries (N), using 8 byte keys, 8 byte values
| N | olabs_rostl | olabs_oram |
|---|---|---|
| 0.47 | 0.55 | |
| 0.51 | 0.60 | |
| 0.53 | 0.67 | |
| 0.56 | 0.69 | |
| 0.61 | 0.74 | |
| 0.65 | 0.77 | |
| 0.70 | 0.82 | |
| 0.75 | 0.83 | |
| 0.80 | 0.87 | |
| 0.88 | 0.91 | |
| 0.99 | 1.02 | |
| 1.02 | 1.03 | |
| 1.10 | 1.08 | |
| 1.16 | 1.08 | |
| 1.30 | 1.16 | |
| 1.49 | 1.31 | |
| 1.71 | 1.44 | |
| 1.98 | 1.55 | |
| 2.24 | 1.78 |
Latency (us) vs ORAM number of entries (N), using 8 byte keys, 8 byte values
| N | meta_oram | olabs_oram | olabs_rostl |
|---|---|---|---|
| 31.99 | 0.32 | 0.54 | |
| 36.34 | 0.38 | 0.62 | |
| 42.41 | 0.91 | 1.32 | |
| 51.34 | 0.96 | 1.32 | |
| 66.21 | 1.13 | 1.38 | |
| 91.63 | 1.81 | 1.40 | |
| 139.80 | 2.01 | 2.40 | |
| 229.08 | 2.40 | 2.39 | |
| 149.55 | 3.18 | 2.50 | |
| 201.49 | 3.70 | 2.60 | |
| 296.34 | 4.21 | 4.20 | |
| 219.94 | 5.22 | 4.25 | |
| 276.29 | 5.85 | 4.34 | |
| 376.70 | 6.79 | 4.33 | |
| 304.79 | 7.94 | 6.58 | |
| 367.06 | 8.68 | 6.73 | |
| 470.23 | 9.59 | 7.04 | |
| 11.05 | 7.16 | ||
| 12.26 |
Latency (us) vs Map number of entries (N), using 8 byte keys, 56 byte values
| N | Signal | olabs_rostl | olabs_umap_shortkv | olabs_umap |
|---|---|---|---|---|
| 7.65 | 2.07 | 3.44 | 1.51 | |
| 8.81 | 2.28 | 2.18 | 2.11 | |
| 10.57 | 2.50 | 2.36 | 2.53 | |
| 12.96 | 4.07 | 2.76 | 2.62 | |
| 14.75 | 4.30 | 3.29 | 3.04 | |
| 16.61 | 4.50 | 3.68 | 3.61 | |
| 19.36 | 5.22 | 4.07 | 4.11 | |
| 24.37 | 7.91 | 4.57 | 4.39 | |
| 33.81 | 8.60 | 5.53 | 5.02 | |
| 33.96 | 9.01 | 6.17 | 5.90 | |
| 38.28 | 9.48 | 6.94 | 6.77 | |
| 43.11 | 13.20 | 7.59 | 7.38 | |
| 48.77 | 13.89 | 8.62 | 8.13 | |
| 56.38 | 14.51 | 9.53 | 9.03 | |
| 65.83 | 15.24 | 10.30 | 10.04 | |
| 81.48 | 20.29 | 11.29 | 11.07 | |
| 21.27 | 12.30 |
Latency (us) vs Map number of entries (N), using 8 byte keys, 8 byte values
| N | mc_oblivious | Signal | olabs_rostl | olabs_umap_shortkv | olabs_umap |
|---|---|---|---|---|---|
| 80.37 | 5.45 | 1.29 | 1.58 | 1.45 | |
| 99.40 | 6.28 | 1.43 | 1.82 | 2.05 | |
| 120.18 | 7.98 | 1.62 | 2.24 | 2.37 | |
| 142.36 | 8.92 | 3.06 | 2.51 | 2.58 | |
| 167.51 | 11.10 | 3.17 | 3.63 | 3.01 | |
| 195.07 | 12.50 | 3.30 | 4.08 | 3.44 | |
| 224.88 | 15.10 | 3.44 | 4.90 | 4.05 | |
| 307.50 | 16.47 | 6.20 | 5.74 | 4.33 | |
| 354.76 | 19.84 | 6.41 | 7.34 | 4.76 | |
| 404.10 | 25.06 | 6.74 | 8.11 | 5.60 | |
| 457.49 | 33.67 | 6.91 | 8.94 | 6.50 | |
| 514.50 | 34.65 | 10.24 | 10.18 | 7.16 | |
| 573.55 | 38.36 | 10.84 | 9.95 | 7.88 | |
| 637.82 | 43.17 | 11.27 | 12.39 | 8.85 | |
| 706.21 | 48.47 | 12.01 | 14.16 | 9.88 | |
| 828.20 | 55.93 | 16.56 | 16.35 | 10.80 | |
| 915.86 | 65.39 | 17.23 | 20.45 |
Latency (us) vs Map number of entries (N) vs BatchSize, using 8 byte keys, 56 byte values, 15 Shards
| N | olabs_umap_sharded-4096 | olabs_rostl_sharded-4096 | Signal_Sharded-4096 |
|---|---|---|---|
| 13749.73 | 2734.09 | ||
| 6501.88 | 4365.58 | ||
| 3318.85 | 3087.36 | 20643.84 | |
| 2983.10 | 3089.08 | 31498.24 | |
| 5902.74 | 4792.69 | 13639.68 | |
| 5772.58 | 15032.32 | ||
| 5064.08 | 16302.08 | ||
| 4149.23 | 6646.30 | 22446.08 | |
| 5302.63 | 6902.83 | 26583.04 | |
| 5458.54 | 7568.51 | 32399.36 | |
| 5738.74 | 9806.74 | 36659.20 | |
| 6368.66 | 43950.08 | ||
| 6878.30 | 13159.35 | 48128.00 | |
| 8357.75 | 14957.24 | 64552.96 | |
| 8836.04 | 17268.20 | 65904.64 | |
| 9651.10 | 33917.48 | 84336.64 | |
| 10353.66 | 81551.36 |
Througput (queries per second) vs Map number of entries (N), using 8 byte keys, 56 byte values, 15 Shards
| N | olabs_umap_sharded-4096 | olabs_rostl_sharded-4096 | Signal_Sharded-4096 |
|---|---|---|---|
| 297896.72 | 1498119.61 | ||
| 629971.25 | 938247.71 | ||
| 1234160.95 | 1326697.91 | 198452.91 | |
| 1373069.90 | 1325960.58 | 130044.45 | |
| 693914.76 | 854634.36 | 300086.56 | |
| 709560.87 | 272384.73 | ||
| 808834.46 | 251091.91 | ||
| 987172.01 | 616283.04 | 182582.01 | |
| 772447.25 | 593379.67 | 154155.17 | |
| 750383.43 | 541189.95 | 126428.27 | |
| 713745.44 | 417672.05 | 111731.96 | |
| 643148.98 | 93213.90 | ||
| 595496.22 | 311261.68 | 85082.81 | |
| 490083.88 | 273847.26 | 63448.79 | |
| 463556.08 | 237199.07 | 62168.17 | |
| 424407.51 | 120763.67 | 48556.98 | |
| 395608.99 | 102460.02 | 50216.89 |
Use the go.sh script to initiate benchmarking processes:
./go.shTo generate figures from benchmark data, use the draw.sh script:
./scripts/draw.shMake sure you edit the files=... line in draw.sh to match the benchmark result files you want to draw.
To generate tables from benchmark data, like the ones in the README.md, use the generate_Readme_body.sh script:
./scripts/generate_readme_body.sh.shMake sure you edit the files=... line in generate_Readme_body.sh to match the benchmark result files you want to table.
- go.sh: A script to initiate benchmarking processes.
Contains the code for each benchmarked implementation. Typically we sepparate each folder in setup.sh (setup all the benchmark environment in build/) and run.sh (cd into the build file an run the benchmark):
Contains PNG files visualizing benchmark results, such as:
- Initialization times
- Memory usage
- Latency and throughput metrics
Contains logs from benchmarking runs, organized by system and timestamp.
Contains processed results from benchmarking runs.
Contains utility scripts for managing and visualizing benchmarks:
- draw_figure.py: A Python script for generating figures from benchmark data.
- draw.sh: A shell script for automating figure generation, it generates all the images in
figures/from the log outputs. - setup.sh: A setup script for preparing the environment.
- parse.py: An auxiliary python script for parsing benchmark logs in
logs/into the json format inresults/. - generate_readme_body.sh: A shell script for generating tables from benchmark data, like the ones in the
README.md. - config_ubuntu.sh: A shell script for setting up the environment on Ubuntu systems, including installing dependencies like Rust, Docker, and others.
- draw_table.py: A Python script for automatically generating tables for a given set of parameters.
- parse_util.py: A Python utility script containing helper functions for parsing and filtering benchmark data.
Feel free to contribute to this repository by adding new benchmarks, improving scripts, or updating documentation. Take a look at CONTRIBUTING.md for details on how to contribute.