#![cfg_attr(not(feature = "stable"), feature(portable_simd))]
use group::Group;
pub mod dcf;
pub mod dpf;
pub mod group;
#[cfg(feature = "prg")]
pub mod prg;
pub mod utils;
pub struct PointFn<const IN_BLEN: usize, const OUT_BLEN: usize, G>
where
G: Group<OUT_BLEN>,
{
pub alpha: [u8; IN_BLEN],
pub beta: G,
}
pub trait Prg<const BLEN: usize, const BLEN_N: usize>: Sync {
fn gen(&self, seed: &[u8; BLEN]) -> [([[u8; BLEN]; BLEN_N], bool); 2];
}
#[derive(Clone)]
pub struct Cw<const OUT_BLEN: usize, G>
where
G: Group<OUT_BLEN>,
{
pub s: [u8; OUT_BLEN],
pub v: G,
pub tl: bool,
pub tr: bool,
}
#[derive(Clone)]
pub struct Share<const OUT_BLEN: usize, G>
where
G: Group<OUT_BLEN>,
{
pub s0s: Vec<[u8; OUT_BLEN]>,
pub cws: Vec<Cw<OUT_BLEN, G>>,
pub cw_np1: G,
}