Crate mc_oblivious_traits
source · [−]Expand description
Traits for different pieces of ORAM, from the level of block storage up to an oblivious map. These are all defined in terms of fixed-length chunks of bytes and the A8Bytes object from the aligned-cmov crate.
There is also a naive implementation of the ORAM storage object for tests.
Re-exports
Modules
Some generic tests that exercise objects implementing these traits
Structs
Struct representing a generic array - GenericArray<T, N>
works like [T; N]
The HeapORAMStorage is simply vector
HeapORAMStorage simply allocates a vector, and requires no special initialization support
Constants
Status code for the case that an OMAP operation found and returned a value.
Status code for the case that the OMAP algorithm rejected the key. The all zeroes key may be invalid for instance.
Status code for the case that an OMAP operation did not find a value that was searched for.
Status code for the case that an OMAP wanted to add a new value but could not because the hash table overflowed, and so the operation failed.
Traits
Trait making GenericArray
work, marking types to be used as length of an array
CMov represents types that can be (obliviously) conditionally moved.
A marker trait used to indicate that an RngCore
or BlockRngCore
implementation is supposed to be cryptographically secure.
A factory which makes ObliviousMap objects of some type, based on an ORAM
An Oblivious RAM – that is, an array like [A8Bytes
A factory which creates an ORAM of arbitrary size using recursive strategy. The result is required to have the ’static lifetime, and not be tied to the factory.
Trait that helps to debug ORAM. This should only be used in tests.
Represents trusted block storage holding aligned blocks of memory of a certain size. This is a building block for ORAM.
A factory which makes ORAMStorage objects of some type
Trait for an oblivious hash map, where READING and ACCESSING EXISTING ENTRIES have a strong oblivious property.
PositionMap trait conceptually is an array of TreeIndex. Each value in the map corresponds to a leaf in the complete binary tree, at some common height.
A factory which creates a PositionMap
The core of a random number generator.
Functions
Utility function for logs base 2 rounded up, implemented as const fn
A helper which takes an Rng implementing SeedableRng and returns a lambda
which returns newly seeded Rng’s with seeds derived from this one.
This matches the rng_maker
constraints in the above traits, and can be
used in tests when we want all the Rng’s to be seeded.