Skip to main content

Crate mc_oblivious_traits

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§

pub use subtle;
pub use typenum;

Modules§

testing
Some generic tests that exercise objects implementing these traits

Structs§

GenericArray
Struct representing a generic array - GenericArray<T, N> works like [T; N]
HeapORAMStorage
The HeapORAMStorage is simply vector
HeapORAMStorageCreator
HeapORAMStorage simply allocates a vector, and requires no special initialization support
LinearScanningORAM

Constants§

OMAP_FOUND
Status code for the case that an OMAP operation found and returned a value.
OMAP_INVALID_KEY
Status code for the case that the OMAP algorithm rejected the key. The all zeroes key may be invalid for instance.
OMAP_NOT_FOUND
Status code for the case that an OMAP operation did not find a value that was searched for.
OMAP_OVERFLOW
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§

ArrayLength
ArrayLength is a type-level Unsigned integer used to define the number of elements in a GenericArray.
CMov
CMov represents types that can be (obliviously) conditionally moved.
CryptoRng
A marker trait for securely unpredictable infallible RNGs
OMapCreator
A factory which makes ObliviousMap objects of some type, based on an ORAM
ORAM
An Oblivious RAM – that is, an array like [A8Bytes; N] which supports access queries without memory access patterns revealing what indices were queried. (Here, N is a runtime parameter set at construction time.)
ORAMCreator
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.
ORAMDebug
Trait that helps to debug ORAM. This should only be used in tests.
ORAMStorage
Represents trusted block storage holding aligned blocks of memory of a certain size. This is a building block for ORAM.
ORAMStorageCreator
A factory which makes ORAMStorage objects of some type
ObliviousHashMap
Trait for an oblivious hash map, where READING and ACCESSING EXISTING ENTRIES have a strong oblivious property.
PositionMap
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.
PositionMapCreator
A factory which creates a PositionMap

Functions§

cswap
log2_ceil
Utility function for logs base 2 rounded up, implemented as const fn
rng_maker
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.

Type Aliases§

A8Bytes
An alias representing 8-byte aligned bytes, mainly to save typing
A64Bytes
An alias representing 64-byte aligned bytes, mainly to save typing