Trait Dpf

Source
pub trait Dpf<const IN_BLEN: usize, const OUT_BLEN: usize, G>
where G: Group<OUT_BLEN>,
{ // Required methods fn gen( &self, f: &PointFn<IN_BLEN, OUT_BLEN, G>, s0s: [&[u8; OUT_BLEN]; 2], ) -> Share<OUT_BLEN, G>; fn eval( &self, b: bool, k: &Share<OUT_BLEN, G>, xs: &[&[u8; IN_BLEN]], ys: &mut [&mut G], ); fn full_eval(&self, b: bool, k: &Share<OUT_BLEN, G>, ys: &mut [&mut G]); }
Expand description

API of distributed point functions (DPFs).

PointFn used here means $f(x) = \beta$ iff. $x = \alpha$, otherwise $f(x) = 0$.

  • See PointFn for IN_BLEN and OUT_BLEN.
  • See DpfImpl for the implementation.

Required Methods§

Source

fn gen( &self, f: &PointFn<IN_BLEN, OUT_BLEN, G>, s0s: [&[u8; OUT_BLEN]; 2], ) -> Share<OUT_BLEN, G>

s0s is $s^{(0)}_0$ and $s^{(0)}_1$ which should be randomly sampled.

Source

fn eval( &self, b: bool, k: &Share<OUT_BLEN, G>, xs: &[&[u8; IN_BLEN]], ys: &mut [&mut G], )

b is the party. false is 0 and true is 1.

Source

fn full_eval(&self, b: bool, k: &Share<OUT_BLEN, G>, ys: &mut [&mut G])

Full domain eval. See Dpf::eval for b. The corresponding xs to ys is the big endian representation of 0..=u*::MAX.

Implementors§

Source§

impl<const IN_BLEN: usize, const OUT_BLEN: usize, P, G> Dpf<IN_BLEN, OUT_BLEN, G> for DpfImpl<IN_BLEN, OUT_BLEN, P>
where P: Prg<OUT_BLEN, 1>, G: Group<OUT_BLEN>,