pub struct BinaryArithmeticShare {
pub value1: [u8; 8],
pub value2: [u8; 8],
}Fields§
§value1: [u8; 8]§value2: [u8; 8]Implementations§
Sourcepub const ZERO: BinaryArithmeticShare
pub const ZERO: BinaryArithmeticShare
ZERO BinaryArithmeticShare
pub fn new(value1: [u8; 8], value2: [u8; 8]) -> BinaryArithmeticShare
Sourcepub fn from_constant(c: &FieldElement, party_index: usize) -> Self
pub fn from_constant(c: &FieldElement, party_index: usize) -> Self
Returns party share for constant value
Sourcepub fn reconstruct(&self, other: &BinaryArithmetic) -> BinaryArithmetic
pub fn reconstruct(&self, other: &BinaryArithmetic) -> BinaryArithmetic
Reconstruct value with value1 from previous party
pub fn from_own_and_other( own: &BinaryArithmetic, other: &BinaryArithmetic, ) -> BinaryArithmeticShare
Create BinaryArithmeticShare from BinaryShare
pub fn from_choice(c: &BinaryShare) -> Self
pub fn xor(&self, other: &Self) -> BinaryArithmeticShare
pub fn not(&self) -> Self
pub fn and_bitwise( &self, other: &Self, randomness: &mut CommonRandomness, ) -> BinaryArithmetic
pub fn left_shift(&self, shift: usize) -> BinaryArithmeticShare
Trait Implementations§
Source§fn clone(&self) -> BinaryArithmeticShare
fn clone(&self) -> BinaryArithmeticShare
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> BinaryArithmeticShare
fn default() -> BinaryArithmeticShare
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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