[−][src]Struct fancy_garbling::circuit::Circuit
Static representation of the type of computation supported by fancy garbling.
Methods
impl Circuit
[src]
pub fn new(ngates: Option<usize>) -> Circuit
[src]
Make a new Circuit
object.
pub fn eval<F: Fancy>(
&mut self,
f: &mut F,
garbler_inputs: &[F::Item],
evaluator_inputs: &[F::Item]
) -> Result<Vec<F::Item>, F::Error>
[src]
&mut self,
f: &mut F,
garbler_inputs: &[F::Item],
evaluator_inputs: &[F::Item]
) -> Result<Vec<F::Item>, F::Error>
Evaluate the circuit using fancy object f
.
pub fn process_outputs<F: Fancy>(
&mut self,
outputs: &[F::Item],
f: &mut F
) -> Result<(), F::Error>
[src]
&mut self,
outputs: &[F::Item],
f: &mut F
) -> Result<(), F::Error>
Process the outputs provided by outputs
using fancy object f
.
pub fn eval_plain(
&mut self,
garbler_inputs: &[u16],
evaluator_inputs: &[u16]
) -> Result<Vec<u16>, DummyError>
[src]
&mut self,
garbler_inputs: &[u16],
evaluator_inputs: &[u16]
) -> Result<Vec<u16>, DummyError>
Evaluate the circuit in plaintext.
pub fn print_info(&mut self) -> Result<(), InformerError>
[src]
Print circuit info.
pub fn num_garbler_inputs(&self) -> usize
[src]
Return the number of garbler inputs.
pub fn num_evaluator_inputs(&self) -> usize
[src]
Return the number of evaluator inputs.
pub fn noutputs(&self) -> usize
[src]
Return the number of outputs.
pub fn modulus(&self, i: usize) -> u16
[src]
Return the modulus of the gate indexed by i
.
pub fn garbler_input_mod(&self, i: usize) -> u16
[src]
Return the modulus of the garbler input indexed by i
.
pub fn evaluator_input_mod(&self, i: usize) -> u16
[src]
Return the modulus of the evaluator input indexed by i
.
impl Circuit
[src]
pub fn parse(filename: &str) -> Result<Self, Error>
[src]
Generates a new Circuit
from file filename
. The file must follow the
format given here: https://homes.esat.kuleuven.be/~nsmart/MPC/,
otherwise a CircuitParserError
is returned.
Trait Implementations
impl PartialEq<Circuit> for Circuit
[src]
impl Clone for Circuit
[src]
fn clone(&self) -> Circuit
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Circuit
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
fn into_bits(self) -> U
impl<T> FromCast<T> for T
fn from_cast(t: T) -> T
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<T> FromBits<T> for T
fn from_bits(t: T) -> T
impl<T> Same<T> for T
type Output = T
Should always be Self