Trait ocelot::ot::Receiver

source ·
pub trait Receiver
where Self: Sized,
{ type Msg: Sized + AsMut<[u8]>; // Required methods fn init<C: AbstractChannel, RNG: CryptoRng + Rng>( channel: &mut C, rng: &mut RNG ) -> Result<Self, Error>; fn receive<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, inputs: &[bool], rng: &mut RNG ) -> Result<Vec<Self::Msg>, Error>; }
Expand description

Trait for one-out-of-two oblivious transfer from the receiver’s point-of-view.

Required Associated Types§

source

type Msg: Sized + AsMut<[u8]>

Message type, restricted to types that are mutably-dereferencable as u8 arrays.

Required Methods§

source

fn init<C: AbstractChannel, RNG: CryptoRng + Rng>( channel: &mut C, rng: &mut RNG ) -> Result<Self, Error>

Runs any one-time initialization to create the oblivious transfer object.

source

fn receive<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, inputs: &[bool], rng: &mut RNG ) -> Result<Vec<Self::Msg>, Error>

Receives messages.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Receiver for ocelot::ot::chou_orlandi::Receiver

§

type Msg = Block

source§

impl Receiver for ocelot::ot::dummy::Receiver

§

type Msg = Block

source§

impl Receiver for ocelot::ot::naor_pinkas::Receiver

§

type Msg = Block

source§

impl<OT: OtSender<Msg = Block> + Malicious> Receiver for ocelot::ot::kos::Receiver<OT>

§

type Msg = Block

source§

impl<OT: OtSender<Msg = Block> + Malicious> Receiver for ocelot::ot::kos_delta::Receiver<OT>

§

type Msg = Block

source§

impl<OT: OtSender<Msg = Block> + SemiHonest> Receiver for ocelot::ot::alsz::Receiver<OT>

§

type Msg = Block