Trait ocelot::oprf::Sender

source ·
pub trait Sender: ObliviousPrf
where Self: Sized,
{ // 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, m: usize, rng: &mut RNG ) -> Result<Vec<Self::Seed>, Error>; fn compute(&self, seed: Self::Seed, input: Self::Input) -> Self::Output; }
Expand description

Trait for an oblivious PRF sender.

Required Methods§

source

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

Runs any one-time initialization.

source

fn send<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, m: usize, rng: &mut RNG ) -> Result<Vec<Self::Seed>, Error>

Runs m OPRF instances as the sender, returning the OPRF seeds.

source

fn compute(&self, seed: Self::Seed, input: Self::Input) -> Self::Output

Computes the oblivious PRF on seed seed and input input.

Object Safety§

This trait is not object safe.

Implementors§

source§

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