Trait FancyReveal

Source
pub trait FancyReveal: Fancy {
    // Required method
    fn reveal(&mut self, x: &Self::Item) -> Result<u16, Self::Error>;

    // Provided methods
    fn reveal_many(
        &mut self,
        xs: &[Self::Item],
    ) -> Result<Vec<u16>, Self::Error> { ... }
    fn reveal_bundle(
        &mut self,
        x: &Bundle<Self::Item>,
    ) -> Result<Vec<u16>, Self::Error> { ... }
    fn reveal_many_bundles(
        &mut self,
        xs: &[Bundle<Self::Item>],
    ) -> Result<Vec<Vec<u16>>, Self::Error> { ... }
    fn crt_reveal(
        &mut self,
        x: &CrtBundle<Self::Item>,
    ) -> Result<u128, Self::Error> { ... }
    fn crt_reveal_many(
        &mut self,
        xs: &[CrtBundle<Self::Item>],
    ) -> Result<Vec<u128>, Self::Error> { ... }
    fn bin_reveal(
        &mut self,
        x: &BinaryBundle<Self::Item>,
    ) -> Result<u128, Self::Error> { ... }
    fn bin_reveal_many(
        &mut self,
        xs: &[BinaryBundle<Self::Item>],
    ) -> Result<Vec<u128>, Self::Error> { ... }
}
Expand description

Trait to describe Fancy objects which can reveal outputs to both parties. For many simple Fancy objects in this library such as Dummy, this is simply output. For Garbler and Evaluator, it is more complicated since the BMR16 protocol outputs to the Evaluator only.

Required Methods§

Source

fn reveal(&mut self, x: &Self::Item) -> Result<u16, Self::Error>

Reveal the contents of x to all parties.

Provided Methods§

Source

fn reveal_many(&mut self, xs: &[Self::Item]) -> Result<Vec<u16>, Self::Error>

Reveal a slice of items to all parties.

Source

fn reveal_bundle( &mut self, x: &Bundle<Self::Item>, ) -> Result<Vec<u16>, Self::Error>

Reveal a bundle to all parties.

Source

fn reveal_many_bundles( &mut self, xs: &[Bundle<Self::Item>], ) -> Result<Vec<Vec<u16>>, Self::Error>

Reveal many bundles to all parties.

Source

fn crt_reveal(&mut self, x: &CrtBundle<Self::Item>) -> Result<u128, Self::Error>

Reveal a CRT bundle to all parties.

Source

fn crt_reveal_many( &mut self, xs: &[CrtBundle<Self::Item>], ) -> Result<Vec<u128>, Self::Error>

Reveal many CRT bundles to all parties.

Source

fn bin_reveal( &mut self, x: &BinaryBundle<Self::Item>, ) -> Result<u128, Self::Error>

Reveal a binary bundle to all parties.

Source

fn bin_reveal_many( &mut self, xs: &[BinaryBundle<Self::Item>], ) -> Result<Vec<u128>, Self::Error>

Reveal many binary bundles to all parties.

Implementors§

Source§

impl FancyReveal for DepthInformer

Source§

impl FancyReveal for Dummy

Source§

impl<C: AbstractChannel, RNG: CryptoRng + Rng, OT, Wire: WireLabel> FancyReveal for fancy_garbling::twopac::semihonest::Evaluator<C, RNG, OT, Wire>

Source§

impl<C: AbstractChannel, RNG: CryptoRng + Rng, OT, Wire: WireLabel> FancyReveal for fancy_garbling::twopac::semihonest::Garbler<C, RNG, OT, Wire>

Source§

impl<C: AbstractChannel, RNG: RngCore + CryptoRng, Wire: WireLabel> FancyReveal for fancy_garbling::Garbler<C, RNG, Wire>

Source§

impl<C: AbstractChannel, Wire: WireLabel> FancyReveal for fancy_garbling::Evaluator<C, Wire>

Source§

impl<F: Fancy + FancyReveal> FancyReveal for Informer<F>