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

no-std mc-oblivious-map

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

3 stable releases

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

#251 in Cryptography

Download history 1698/week @ 2022-06-12 1123/week @ 2022-06-19 622/week @ 2022-06-26 574/week @ 2022-07-03 1126/week @ 2022-07-10 609/week @ 2022-07-17 580/week @ 2022-07-24 1515/week @ 2022-07-31 1778/week @ 2022-08-07 811/week @ 2022-08-14 629/week @ 2022-08-21 915/week @ 2022-08-28 1531/week @ 2022-09-04 1778/week @ 2022-09-11 2408/week @ 2022-09-18 1397/week @ 2022-09-25

7,116 downloads per month

GPL-3.0 license



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.