pub struct Evaluator<Wire> { /* private fields */ }Expand description
Streaming evaluator using a callback to receive ciphertexts as needed.
Evaluates a garbled circuit on the fly, using messages containing ciphertexts and wires. Parallelizable.
Implementations§
Trait Implementations§
Source§impl<Wire: WireLabel + ArithmeticWire> FancyArithmetic for Evaluator<Wire>
impl<Wire: WireLabel + ArithmeticWire> FancyArithmetic for Evaluator<Wire>
Source§impl FancyBinary for Evaluator<AllWire>
impl FancyBinary for Evaluator<AllWire>
Source§impl<W: BinaryWireLabel> FancyBinary for Evaluator<W>
impl<W: BinaryWireLabel> FancyBinary for Evaluator<W>
Source§impl<Wire: WireLabel> FancyEncode for Evaluator<Wire>
impl<Wire: WireLabel> FancyEncode for Evaluator<Wire>
Source§fn encode_many(
&mut self,
_values: &[u16],
_moduli: &[u16],
_: &mut Channel<'_>,
) -> Result<Vec<Self::Item>>
fn encode_many( &mut self, _values: &[u16], _moduli: &[u16], _: &mut Channel<'_>, ) -> Result<Vec<Self::Item>>
Encode many wires for known values.
Source§fn receive_many(
&mut self,
moduli: &[u16],
channel: &mut Channel<'_>,
) -> Result<Vec<Self::Item>>
fn receive_many( &mut self, moduli: &[u16], channel: &mut Channel<'_>, ) -> Result<Vec<Self::Item>>
Receive many wires for unknown values.
Auto Trait Implementations§
impl<Wire> Freeze for Evaluator<Wire>where
Wire: Freeze,
impl<Wire> RefUnwindSafe for Evaluator<Wire>where
Wire: RefUnwindSafe,
impl<Wire> Send for Evaluator<Wire>where
Wire: Send,
impl<Wire> Sync for Evaluator<Wire>where
Wire: Sync,
impl<Wire> Unpin for Evaluator<Wire>where
Wire: Unpin,
impl<Wire> UnsafeUnpin for Evaluator<Wire>where
Wire: UnsafeUnpin,
impl<Wire> UnwindSafe for Evaluator<Wire>where
Wire: UnwindSafe,
Blanket Implementations§
Source§impl<F> BinaryGadgets for F
impl<F> BinaryGadgets for F
Source§fn bin_encode(
&mut self,
value: u128,
nbits: usize,
channel: &mut Channel<'_>,
) -> Result<BinaryBundle<Self::Item>>
fn bin_encode( &mut self, value: u128, nbits: usize, channel: &mut Channel<'_>, ) -> Result<BinaryBundle<Self::Item>>
Encode a binary input bundle.
Source§fn bin_receive(
&mut self,
nbits: usize,
channel: &mut Channel<'_>,
) -> Result<BinaryBundle<Self::Item>>
fn bin_receive( &mut self, nbits: usize, channel: &mut Channel<'_>, ) -> Result<BinaryBundle<Self::Item>>
Receive an binary input bundle.
Source§fn bin_encode_many(
&mut self,
values: &[u128],
nbits: usize,
channel: &mut Channel<'_>,
) -> Result<Vec<BinaryBundle<Self::Item>>>
fn bin_encode_many( &mut self, values: &[u128], nbits: usize, channel: &mut Channel<'_>, ) -> Result<Vec<BinaryBundle<Self::Item>>>
Encode many binary input bundles.
Source§fn bin_receive_many(
&mut self,
ninputs: usize,
nbits: usize,
channel: &mut Channel<'_>,
) -> Result<Vec<BinaryBundle<Self::Item>>>
fn bin_receive_many( &mut self, ninputs: usize, nbits: usize, channel: &mut Channel<'_>, ) -> Result<Vec<BinaryBundle<Self::Item>>>
Receive many binary input bundles.
Source§fn bin_output(
&mut self,
x: &BinaryBundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<Option<u128>>
fn bin_output( &mut self, x: &BinaryBundle<Self::Item>, channel: &mut Channel<'_>, ) -> Result<Option<u128>>
Output a binary bundle and interpret the result as a
u128.Source§fn bin_outputs(
&mut self,
xs: &[BinaryBundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Option<Vec<u128>>>
fn bin_outputs( &mut self, xs: &[BinaryBundle<Self::Item>], channel: &mut Channel<'_>, ) -> Result<Option<Vec<u128>>>
Output a slice of binary bundles and interpret the results as a
u128.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F> CrtGadgets for F
impl<F> CrtGadgets for F
Source§fn crt_encode(
&mut self,
value: u128,
modulus: u128,
channel: &mut Channel<'_>,
) -> Result<CrtBundle<Self::Item>>
fn crt_encode( &mut self, value: u128, modulus: u128, channel: &mut Channel<'_>, ) -> Result<CrtBundle<Self::Item>>
Encode a CRT input bundle.
Source§fn crt_receive(
&mut self,
modulus: u128,
channel: &mut Channel<'_>,
) -> Result<CrtBundle<Self::Item>>
fn crt_receive( &mut self, modulus: u128, channel: &mut Channel<'_>, ) -> Result<CrtBundle<Self::Item>>
Receive an CRT input bundle.
Source§fn crt_encode_many(
&mut self,
values: &[u128],
modulus: u128,
channel: &mut Channel<'_>,
) -> Result<Vec<CrtBundle<Self::Item>>>
fn crt_encode_many( &mut self, values: &[u128], modulus: u128, channel: &mut Channel<'_>, ) -> Result<Vec<CrtBundle<Self::Item>>>
Encode many CRT input bundles.
Source§fn crt_receive_many(
&mut self,
n: usize,
modulus: u128,
channel: &mut Channel<'_>,
) -> Result<Vec<CrtBundle<Self::Item>>>
fn crt_receive_many( &mut self, n: usize, modulus: u128, channel: &mut Channel<'_>, ) -> Result<Vec<CrtBundle<Self::Item>>>
Receive many CRT input bundles.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IsSameType<T> for T
impl<T> IsSameType<T> for T
§type EqualityProposition = TrueEqualityProposition
type EqualityProposition = TrueEqualityProposition
The [
EqualityProposition] that Self == T