pub struct WireMod2 { /* private fields */ }Expand description
Representation of a mod-2 wire.
Trait Implementations§
Source§impl AddAssign for WireMod2
impl AddAssign for WireMod2
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl BinaryWireLabel for WireMod2
impl BinaryWireLabel for WireMod2
Source§fn garble_and_gate(
gate_num: usize,
A: &Self,
B: &Self,
delta: &Self,
) -> (U8x16, U8x16, Self)
fn garble_and_gate( gate_num: usize, A: &Self, B: &Self, delta: &Self, ) -> (U8x16, U8x16, Self)
Garbles an ‘and’ gate given two input wires and the delta. Read more
Source§fn evaluate_and_gate(
gate_num: usize,
A: &Self,
B: &Self,
gate0: &U8x16,
gate1: &U8x16,
) -> Self
fn evaluate_and_gate( gate_num: usize, A: &Self, B: &Self, gate0: &U8x16, gate1: &U8x16, ) -> Self
Evaluates an ‘and’ gate given two inputs wires and two half-gates from the garbler. Read more
Source§impl ConditionallySelectable for WireMod2
impl ConditionallySelectable for WireMod2
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl<'de> Deserialize<'de> for WireMod2
impl<'de> Deserialize<'de> for WireMod2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MulAssign<u16> for WireMod2
impl MulAssign<u16> for WireMod2
Source§fn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
Performs the
*= operation. Read moreSource§impl SubAssign for WireMod2
impl SubAssign for WireMod2
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl WireLabel for WireMod2
impl WireLabel for WireMod2
Source§fn hash_to_mod(hash: U8x16, q: u16) -> Self
fn hash_to_mod(hash: U8x16, q: u16) -> Self
Converts a hashed block into a valid wire of the given modulus
q. Read moreimpl Copy for WireMod2
impl StructuralPartialEq for WireMod2
Auto Trait Implementations§
impl Freeze for WireMod2
impl RefUnwindSafe for WireMod2
impl Send for WireMod2
impl Sync for WireMod2
impl Unpin for WireMod2
impl UnwindSafe for WireMod2
Blanket Implementations§
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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