pub trait FancyInput {
    type Item: Clone + HasModulus;
    type Error: From<FancyError>;

Show 16 methods fn encode_many(
        &mut self,
        values: &[u16],
        moduli: &[u16]
    ) -> Result<Vec<Self::Item>, Self::Error>; fn receive_many(
        &mut self,
        moduli: &[u16]
    ) -> Result<Vec<Self::Item>, Self::Error>; fn encode(
        &mut self,
        value: u16,
        modulus: u16
    ) -> Result<Self::Item, Self::Error> { ... } fn receive(&mut self, modulus: u16) -> Result<Self::Item, Self::Error> { ... } fn encode_bundle(
        &mut self,
        values: &[u16],
        moduli: &[u16]
    ) -> Result<Bundle<Self::Item>, Self::Error> { ... } fn receive_bundle(
        &mut self,
        moduli: &[u16]
    ) -> Result<Bundle<Self::Item>, Self::Error> { ... } fn encode_bundles(
        &mut self,
        values: &[Vec<u16>],
        moduli: &[Vec<u16>]
    ) -> Result<Vec<Bundle<Self::Item>>, Self::Error> { ... } fn receive_many_bundles(
        &mut self,
        moduli: &[Vec<u16>]
    ) -> Result<Vec<Bundle<Self::Item>>, Self::Error> { ... } fn crt_encode(
        &mut self,
        value: u128,
        modulus: u128
    ) -> Result<CrtBundle<Self::Item>, Self::Error> { ... } fn crt_receive(
        &mut self,
        modulus: u128
    ) -> Result<CrtBundle<Self::Item>, Self::Error> { ... } fn crt_encode_many(
        &mut self,
        values: &[u128],
        modulus: u128
    ) -> Result<Vec<CrtBundle<Self::Item>>, Self::Error> { ... } fn crt_receive_many(
        &mut self,
        n: usize,
        modulus: u128
    ) -> Result<Vec<CrtBundle<Self::Item>>, Self::Error> { ... } fn bin_encode(
        &mut self,
        value: u128,
        nbits: usize
    ) -> Result<BinaryBundle<Self::Item>, Self::Error> { ... } fn bin_receive(
        &mut self,
        nbits: usize
    ) -> Result<BinaryBundle<Self::Item>, Self::Error> { ... } fn bin_encode_many(
        &mut self,
        values: &[u128],
        nbits: usize
    ) -> Result<Vec<BinaryBundle<Self::Item>>, Self::Error> { ... } fn bin_receive_many(
        &mut self,
        ninputs: usize,
        nbits: usize
    ) -> Result<Vec<BinaryBundle<Self::Item>>, Self::Error> { ... }
}
Expand description

Convenience functions for encoding input to Fancy objects.

Required Associated Types

The type that this Fancy object operates over.

The type of error that this Fancy object emits.

Required Methods

Encode many values where the actual input is known.

When writing a garbler, the return value must correspond to the zero wire label.

Receive many values where the input is not known.

Provided Methods

Encode a single value.

When writing a garbler, the return value must correspond to the zero wire label.

Receive a single value.

Encode a bundle.

Receive a bundle.

Encode many input bundles.

Receive many input bundles.

Encode a CRT input bundle.

Receive an CRT input bundle.

Encode many CRT input bundles.

Receive many CRT input bundles.

Encode a binary input bundle.

Receive an binary input bundle.

Encode many binary input bundles.

Receive many binary input bundles.

Implementors