pub struct LinearScanningORAM<ValueSize: ArrayLength<u8>> { /* private fields */ }

Implementations§

source§

impl<ValueSize: ArrayLength<u8>> LinearScanningORAM<ValueSize>

source

pub fn new(size: u64) -> Self

Trait Implementations§

source§

impl<ValueSize: ArrayLength<u8>> ORAM<ValueSize> for LinearScanningORAM<ValueSize>

source§

fn len(&self) -> u64

Get the number of values logically in the ORAM. This is also one more than the largest index that can be legally accessed.
source§

fn stash_size(&self) -> usize

Get the number of values in the ORAM’s stash for diagnostics. In prod, this number should be viewed as secret and not revealed.
source§

fn access<T, F: FnOnce(&mut A64Bytes<ValueSize>) -> T>( &mut self, query: u64, f: F ) -> T

Access the ORAM at a position, calling a lambda with the recovered value, and returning the result of the lambda. This cannot fail, but will panic if index is out of bounds. Read more
source§

fn read(&mut self, index: u64) -> A64Bytes<ValueSize>

High-level helper – when you only need to read and don’t need to write a new value, this is simpler than using access. In most ORAM there will not be a significantly faster implementation of this.
source§

fn write( &mut self, index: u64, new_val: &A64Bytes<ValueSize> ) -> A64Bytes<ValueSize>

High-level helper – when you need to write a value and want the previous value, but you don’t need to see the previous value when deciding what to write, this is simpler than using access. In most ORAM there will not be a significantly faster implementation of this.

Auto Trait Implementations§

§

impl<ValueSize> RefUnwindSafe for LinearScanningORAM<ValueSize>where <ValueSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,

§

impl<ValueSize> Send for LinearScanningORAM<ValueSize>

§

impl<ValueSize> Sync for LinearScanningORAM<ValueSize>

§

impl<ValueSize> Unpin for LinearScanningORAM<ValueSize>where <ValueSize as ArrayLength<u8>>::ArrayType: Unpin,

§

impl<ValueSize> UnwindSafe for LinearScanningORAM<ValueSize>where <ValueSize as ArrayLength<u8>>::ArrayType: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.