Struct mc_oblivious_ram::PathORAM [−][src]
pub struct PathORAM<ValueSize, Z, StorageType, RngType> where
ValueSize: ArrayLength<u8> + PartialDiv<U8> + PartialDiv<U64>,
Z: Unsigned + Mul<ValueSize> + Mul<U16>,
RngType: RngCore + CryptoRng + Send + Sync + 'static,
StorageType: ORAMStorage<Prod<Z, ValueSize>, Prod<Z, U16>> + Send + Sync + 'static,
Prod<Z, ValueSize>: ArrayLength<u8> + PartialDiv<U8>,
Prod<Z, U16>: ArrayLength<u8> + PartialDiv<U8>, { /* fields omitted */ }
An implementation of PathORAM, using u64 to represent leaves in metadata.
Implementations
impl<ValueSize, Z, StorageType, RngType> PathORAM<ValueSize, Z, StorageType, RngType> where
ValueSize: ArrayLength<u8> + PartialDiv<U8> + PartialDiv<U64>,
Z: Unsigned + Mul<ValueSize> + Mul<U16>,
RngType: RngCore + CryptoRng + Send + Sync + 'static,
StorageType: ORAMStorage<Prod<Z, ValueSize>, Prod<Z, U16>> + Send + Sync + 'static,
Prod<Z, ValueSize>: ArrayLength<u8> + PartialDiv<U8>,
Prod<Z, U16>: ArrayLength<u8> + PartialDiv<U8>,
[src]
ValueSize: ArrayLength<u8> + PartialDiv<U8> + PartialDiv<U64>,
Z: Unsigned + Mul<ValueSize> + Mul<U16>,
RngType: RngCore + CryptoRng + Send + Sync + 'static,
StorageType: ORAMStorage<Prod<Z, ValueSize>, Prod<Z, U16>> + Send + Sync + 'static,
Prod<Z, ValueSize>: ArrayLength<u8> + PartialDiv<U8>,
Prod<Z, U16>: ArrayLength<u8> + PartialDiv<U8>,
pub fn new<PMC: PositionMapCreator<RngType>, SC: ORAMStorageCreator<Prod<Z, ValueSize>, Prod<Z, U16>, Output = StorageType>, F: FnMut() -> RngType + 'static>(
size: u64,
stash_size: usize,
rng_maker: &mut F
) -> Self
[src]
size: u64,
stash_size: usize,
rng_maker: &mut F
) -> Self
New function creates this ORAM given a position map creator and a storage type creator and an Rng creator. The main thing that is going on here is, given the size, we are determining what the height will be, which will be like log(size) - log(bucket_size) Then we are making sure that all the various creators use this number.
Trait Implementations
impl<ValueSize, Z, StorageType, RngType> ORAM<ValueSize> for PathORAM<ValueSize, Z, StorageType, RngType> where
ValueSize: ArrayLength<u8> + PartialDiv<U8> + PartialDiv<U64>,
Z: Unsigned + Mul<ValueSize> + Mul<U16>,
RngType: RngCore + CryptoRng + Send + Sync + 'static,
StorageType: ORAMStorage<Prod<Z, ValueSize>, Prod<Z, U16>> + Send + Sync + 'static,
Prod<Z, ValueSize>: ArrayLength<u8> + PartialDiv<U8>,
Prod<Z, U16>: ArrayLength<u8> + PartialDiv<U8>,
[src]
ValueSize: ArrayLength<u8> + PartialDiv<U8> + PartialDiv<U64>,
Z: Unsigned + Mul<ValueSize> + Mul<U16>,
RngType: RngCore + CryptoRng + Send + Sync + 'static,
StorageType: ORAMStorage<Prod<Z, ValueSize>, Prod<Z, U16>> + Send + Sync + 'static,
Prod<Z, ValueSize>: ArrayLength<u8> + PartialDiv<U8>,
Prod<Z, U16>: ArrayLength<u8> + PartialDiv<U8>,
fn len(&self) -> u64
[src]
fn access<T, F: FnOnce(&mut A64Bytes<ValueSize>) -> T>(
&mut self,
key: u64,
f: F
) -> T
[src]
&mut self,
key: u64,
f: F
) -> T
pub fn read(&mut self, index: u64) -> Aligned<A64, GenericArray<u8, ValueSize>>
[src]
pub fn write(
&mut self,
index: u64,
new_val: &Aligned<A64, GenericArray<u8, ValueSize>>
) -> Aligned<A64, GenericArray<u8, ValueSize>>
[src]
&mut self,
index: u64,
new_val: &Aligned<A64, GenericArray<u8, ValueSize>>
) -> Aligned<A64, GenericArray<u8, ValueSize>>
Auto Trait Implementations
impl<ValueSize, Z, StorageType, RngType> Send for PathORAM<ValueSize, Z, StorageType, RngType>
impl<ValueSize, Z, StorageType, RngType> Sync for PathORAM<ValueSize, Z, StorageType, RngType>
impl<ValueSize, Z, StorageType, RngType> Unpin for PathORAM<ValueSize, Z, StorageType, RngType> where
RngType: Unpin,
StorageType: Unpin,
<ValueSize as ArrayLength<u8>>::ArrayType: Unpin,
<<Z as Mul<ValueSize>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
<<Z as Mul<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
RngType: Unpin,
StorageType: Unpin,
<ValueSize as ArrayLength<u8>>::ArrayType: Unpin,
<<Z as Mul<ValueSize>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
<<Z as Mul<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,