[][src]Struct fancy_garbling::circuit::Circuit

pub struct Circuit { /* fields omitted */ }

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]

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]

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]

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_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Circuit[src]

Auto Trait Implementations

impl Send for Circuit

impl Sync for Circuit

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> FromCast<T> for T

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> FromBits<T> for T

impl<T> Same<T> for T

type Output = T

Should always be Self