GLWEPacking

Trait GLWEPacking 

Source
pub trait GLWEPacking<BE: Backend> {
    // Required methods
    fn glwe_pack_galois_elements(&self) -> Vec<i64>;
    fn glwe_pack_tmp_bytes<R, K>(&self, res: &R, key: &K) -> usize
       where R: GLWEInfos,
             K: GGLWEInfos;
    fn glwe_pack<R, A, K, H>(
        &self,
        res: &mut R,
        a: HashMap<usize, &mut A>,
        log_gap_out: usize,
        keys: &H,
        scratch: &mut Scratch<BE>,
    )
       where R: GLWEToMut + GLWEInfos,
             A: GLWEToMut + GLWEInfos,
             K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
             H: GLWEAutomorphismKeyHelper<K, BE>;
}

Required Methods§

Source

fn glwe_pack_galois_elements(&self) -> Vec<i64>

Source

fn glwe_pack_tmp_bytes<R, K>(&self, res: &R, key: &K) -> usize
where R: GLWEInfos, K: GGLWEInfos,

Source

fn glwe_pack<R, A, K, H>( &self, res: &mut R, a: HashMap<usize, &mut A>, log_gap_out: usize, keys: &H, scratch: &mut Scratch<BE>, )

Packs [x_0: GLWE(m_0), x_1: GLWE(m_1), …, x_i: GLWE(m_i)] to [0: GLWE(m_0 * X^x_0 + m_1 * X^x_1 + … + m_i * X^x_i)]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<BE: Backend> GLWEPacking<BE> for Module<BE>

Source§

fn glwe_pack<R, A, K, H>( &self, res: &mut R, a: HashMap<usize, &mut A>, log_gap_out: usize, keys: &H, scratch: &mut Scratch<BE>, )

Packs [x_0: GLWE(m_0), x_1: GLWE(m_1), …, x_i: GLWE(m_i)] to [0: GLWE(m_0 * X^x_0 + m_1 * X^x_1 + … + m_i * X^x_i)]

Source§

fn glwe_pack_galois_elements(&self) -> Vec<i64>

Source§

fn glwe_pack_tmp_bytes<R, K>(&self, res: &R, key: &K) -> usize
where R: GLWEInfos, K: GGLWEInfos,

Implementors§