pub struct ArithmeticCircuit { /* private fields */ }Expand description
Static representation of arithmetic computation supported by fancy garbling.
Implementations§
Trait Implementations§
Source§impl CircuitType for ArithmeticCircuit
impl CircuitType for ArithmeticCircuit
Source§type Gate = ArithmeticGate
type Gate = ArithmeticGate
Gates that the circuit is composed of
Source§fn push_gates(&mut self, gate: Self::Gate)
fn push_gates(&mut self, gate: Self::Gate)
Add a gate
Source§fn push_const_ref(&mut self, xref: CircuitRef)
fn push_const_ref(&mut self, xref: CircuitRef)
Add a constant ref
Source§fn push_output_ref(&mut self, xref: CircuitRef)
fn push_output_ref(&mut self, xref: CircuitRef)
Add an output ref
Source§fn push_garbler_input_ref(&mut self, xref: CircuitRef)
fn push_garbler_input_ref(&mut self, xref: CircuitRef)
Add a garbler input ref
Source§fn push_modulus(&mut self, modulus: u16)
fn push_modulus(&mut self, modulus: u16)
Add wire moulus
Source§fn push_evaluator_input_ref(&mut self, xref: CircuitRef)
fn push_evaluator_input_ref(&mut self, xref: CircuitRef)
Add an evaluator input ref
Source§fn increment_nonfree_gates(&mut self)
fn increment_nonfree_gates(&mut self)
Increase number of nonfree gates
Source§fn get_num_nonfree_gates(&self) -> usize
fn get_num_nonfree_gates(&self) -> usize
Get number of nonfree gates
Source§fn get_output_refs(&self) -> &[CircuitRef]
fn get_output_refs(&self) -> &[CircuitRef]
Get all output refs
Source§fn get_garbler_input_refs(&self) -> &[CircuitRef]
fn get_garbler_input_refs(&self) -> &[CircuitRef]
Get all garbler input refs
Source§fn get_evaluator_input_refs(&self) -> &[CircuitRef]
fn get_evaluator_input_refs(&self) -> &[CircuitRef]
Get all evaluator input refs
Source§fn garbler_input_mod(&self, i: usize) -> u16
fn garbler_input_mod(&self, i: usize) -> u16
Return the modulus of the garbler input indexed by
i.Source§fn evaluator_input_mod(&self, i: usize) -> u16
fn evaluator_input_mod(&self, i: usize) -> u16
Return the modulus of the evaluator input indexed by
i.Source§fn num_garbler_inputs(&self) -> usize
fn num_garbler_inputs(&self) -> usize
Return the number of garbler inputs.
Source§fn num_evaluator_inputs(&self) -> usize
fn num_evaluator_inputs(&self) -> usize
Return the number of evaluator inputs.
Source§impl Clone for ArithmeticCircuit
impl Clone for ArithmeticCircuit
Source§fn clone(&self) -> ArithmeticCircuit
fn clone(&self) -> ArithmeticCircuit
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§impl Debug for ArithmeticCircuit
impl Debug for ArithmeticCircuit
Source§impl<'de> Deserialize<'de> for ArithmeticCircuit
impl<'de> Deserialize<'de> for ArithmeticCircuit
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<F: FancyArithmetic> EvaluableCircuit<F> for ArithmeticCircuit
impl<F: FancyArithmetic> EvaluableCircuit<F> for ArithmeticCircuit
Source§impl PartialEq for ArithmeticCircuit
impl PartialEq for ArithmeticCircuit
Source§impl Serialize for ArithmeticCircuit
impl Serialize for ArithmeticCircuit
impl StructuralPartialEq for ArithmeticCircuit
Auto Trait Implementations§
impl Freeze for ArithmeticCircuit
impl RefUnwindSafe for ArithmeticCircuit
impl Send for ArithmeticCircuit
impl Sync for ArithmeticCircuit
impl Unpin for ArithmeticCircuit
impl UnwindSafe for ArithmeticCircuit
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<C> CircuitInfo for C
impl<C> CircuitInfo for C
Source§fn print_info(&self) -> Result<(), DummyError>
fn print_info(&self) -> Result<(), DummyError>
Print circuit info
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