pub trait FancyReveal: Fancy {
// Required method
fn reveal(
&mut self,
x: &Self::Item,
channel: &mut Channel<'_>,
) -> Result<u16>;
// Provided methods
fn reveal_many(
&mut self,
xs: &[Self::Item],
channel: &mut Channel<'_>,
) -> Result<Vec<u16>> { ... }
fn reveal_bundle(
&mut self,
x: &Bundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<Vec<u16>> { ... }
fn reveal_many_bundles(
&mut self,
xs: &[Bundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Vec<Vec<u16>>> { ... }
fn crt_reveal(
&mut self,
x: &CrtBundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<u128> { ... }
fn crt_reveal_many(
&mut self,
xs: &[CrtBundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Vec<u128>> { ... }
fn bin_reveal(
&mut self,
x: &BinaryBundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<u128> { ... }
fn bin_reveal_many(
&mut self,
xs: &[BinaryBundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Vec<u128>> { ... }
}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§
Provided Methods§
Sourcefn reveal_many(
&mut self,
xs: &[Self::Item],
channel: &mut Channel<'_>,
) -> Result<Vec<u16>>
fn reveal_many( &mut self, xs: &[Self::Item], channel: &mut Channel<'_>, ) -> Result<Vec<u16>>
Reveal a slice of items to all parties.
Sourcefn reveal_bundle(
&mut self,
x: &Bundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<Vec<u16>>
fn reveal_bundle( &mut self, x: &Bundle<Self::Item>, channel: &mut Channel<'_>, ) -> Result<Vec<u16>>
Reveal a bundle to all parties.
Sourcefn reveal_many_bundles(
&mut self,
xs: &[Bundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Vec<Vec<u16>>>
fn reveal_many_bundles( &mut self, xs: &[Bundle<Self::Item>], channel: &mut Channel<'_>, ) -> Result<Vec<Vec<u16>>>
Reveal many bundles to all parties.
Sourcefn crt_reveal(
&mut self,
x: &CrtBundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<u128>
fn crt_reveal( &mut self, x: &CrtBundle<Self::Item>, channel: &mut Channel<'_>, ) -> Result<u128>
Reveal a CRT bundle to all parties.
Sourcefn crt_reveal_many(
&mut self,
xs: &[CrtBundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Vec<u128>>
fn crt_reveal_many( &mut self, xs: &[CrtBundle<Self::Item>], channel: &mut Channel<'_>, ) -> Result<Vec<u128>>
Reveal many CRT bundles to all parties.
Sourcefn bin_reveal(
&mut self,
x: &BinaryBundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<u128>
fn bin_reveal( &mut self, x: &BinaryBundle<Self::Item>, channel: &mut Channel<'_>, ) -> Result<u128>
Reveal a binary bundle to all parties.
Sourcefn bin_reveal_many(
&mut self,
xs: &[BinaryBundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Vec<u128>>
fn bin_reveal_many( &mut self, xs: &[BinaryBundle<Self::Item>], channel: &mut Channel<'_>, ) -> Result<Vec<u128>>
Reveal many binary bundles to all parties.