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>; }
Expand description

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

The storage type produced

The error type produced

Required methods

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.

Implementors