#constant-time #oblivious-ram #hash-table #crypto

no-std mc-oblivious-map

Implementation of Oblivious Hash Map data structures on top of Oblivious RAM

4 stable releases

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

#657 in Data structures

Download history 597/week @ 2023-12-04 869/week @ 2023-12-11 60/week @ 2023-12-18 689/week @ 2024-01-01 587/week @ 2024-01-08 322/week @ 2024-01-15 389/week @ 2024-01-22 225/week @ 2024-01-29 378/week @ 2024-02-05 310/week @ 2024-02-12 441/week @ 2024-02-19 404/week @ 2024-02-26 69/week @ 2024-03-04 41/week @ 2024-03-11 32/week @ 2024-03-18

554 downloads per month

GPL-3.0 license

155KB
2.5K SLoC

mc-oblivious-map

This crate provides an implementation of an oblivious hashmap on top of oblivious RAM, meeting the requirements in the trait described in mc-oblivious-traits.

In crate right now:

  • An implementation of Cuckoo hashing with buckets, using Oblivious RAM as the cuckoo hashing arena. See wikipedia for background. This is close to or the same as CUCKOO-DISJOINT algorithm described by this paper, except for the use of Oblivious RAM. The access-or-insert method is novel in this work, see code comments for discussion.

For more background, see also "power of two choices" hashing (ABKU99, Mitzenmacher). And wikipedia for additional background. This is conceptually an ancestor of cuckoo hashing. The main reason to use this, or cuckoo hashing, in our context, is that it guarantees that reads make exactly two accesses to the table, which makes the constant-time property easy to verify. Cuckoo hashing achieves good memory utilization, better than "power of two choices", which is what we tried first.

Dependencies

~435KB