Trait ocelot::ot::Sender

source ·
pub trait Sender
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 send<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, inputs: &[(Self::Msg, Self::Msg)], rng: &mut RNG ) -> Result<(), Error>; }
Expand description

Trait for one-out-of-two oblivious transfer from the sender’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 send<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, inputs: &[(Self::Msg, Self::Msg)], rng: &mut RNG ) -> Result<(), Error>

Sends messages.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Sender for ocelot::ot::chou_orlandi::Sender

§

type Msg = Block

source§

impl Sender for ocelot::ot::dummy::Sender

§

type Msg = Block

source§

impl Sender for ocelot::ot::naor_pinkas::Sender

§

type Msg = Block

source§

impl<OT: OtReceiver<Msg = Block> + Malicious> Sender for ocelot::ot::kos::Sender<OT>

§

type Msg = Block

source§

impl<OT: OtReceiver<Msg = Block> + Malicious> Sender for ocelot::ot::kos_delta::Sender<OT>

§

type Msg = Block

source§

impl<OT: OtReceiver<Msg = Block> + SemiHonest> Sender for ocelot::ot::alsz::Sender<OT>

§

type Msg = Block