Trait mc_oblivious_traits::ORAMStorageCreator[][src]

pub trait ORAMStorageCreator<BlockSize: ArrayLength<u8>, MetaSize: ArrayLength<u8>> {
    type Output: ORAMStorage<BlockSize, MetaSize> + Send + Sync + 'static;
    type Error: Display + Debug;
    fn create<R: RngCore + CryptoRng>(
        size: u64,
        csprng: &mut R
    ) -> Result<Self::Output, Self::Error>; }

A factory which makes ORAMStorage objects of some type

In case of tests, it may simply create Vec objects. In production, it likely calls out to untrusted and asks to allocate block storage for an ORAM.

The result is required to have the ’static lifetime, there is no in-enclave “manager” object which these objects can refer to. Instead they are either wrapping a vector, or e.g. they hold integer handles which they use when they make OCALL’s to untrusted. So there is no manager object in the enclave which they cannot outlive.

Associated Types

type Output: ORAMStorage<BlockSize, MetaSize> + Send + Sync + 'static[src]

The storage type produced

type Error: Display + Debug[src]

The error type produced

Loading content...

Required methods

fn create<R: RngCore + CryptoRng>(
    size: u64,
    csprng: &mut R
) -> Result<Self::Output, Self::Error>
[src]

Create OramStorage, giving it a size and a CSPRNG for initialization. This should usually be RDRAND but in tests it might have a seed.

It is expected that all storage will be zeroed from the caller’s point of view, the first time that they access any of it.

Loading content...

Implementors

impl<BlockSize: ArrayLength<u8> + 'static, MetaSize: ArrayLength<u8> + 'static> ORAMStorageCreator<BlockSize, MetaSize> for HeapORAMStorageCreator[src]

type Output = HeapORAMStorage<BlockSize, MetaSize>

type Error = HeapORAMStorageCreatorError

Loading content...