Struct ZeroConstantFunctionsAggregation

Source
pub struct ZeroConstantFunctionsAggregation<'a> { /* private fields */ }
Expand description

This struct serves as aggregation of functions with constant value 0.

Implementations§

Source§

impl<'a> ZeroConstantFunctionsAggregation<'a>

Source

pub fn new(parameters: &'a EnvironmentParameters) -> Self

Source

pub fn calculate_agg_a_double_prime( &mut self, vector_psi: &[Vec<Zq>], a_prime: &[RqMatrix], )

Calculate a_double_primes from a_prime, a_{i,j}^{’‘k} = \sum_{l=1}^{L}\psi_l^{k}a_{ij}^{’(l)}

@param: vector_psi: \psi_l^k @param: a_prime: a_{ij}^{’(l)}, each a_{ij} is a ring element (PolyRing)

@return: a_{ij}^{‘’(k)}, return a vector length k of matrix a_{ij}^{‘’}

Source

pub fn calculate_agg_phi_double_prime( &mut self, phi_prime: &[Vec<RqVector>], conjugated_pi: &[RqMatrix], vector_psi: &[Vec<Zq>], vector_omega: &[Vec<Zq>], )

calculate \phi_{i}^{‘’(k)} = \sum_{l=1}^{L}\psi_l^{k}\phi_{i}^{’(l)} + \sum(\omega_j^{k} * \sigma_{-1} * pi_i^{j}) in the prover process, page 17 from the paper.

@param: phi_ct: \phi_{i}^{’(l)} @param: pi: pi_i^{j} @param: random_psi: \psi_l^{k} @param: random_omega: \omega_j^{k}

return: \phi_{i}^{‘’(k)}

Source

pub fn calculate_agg_b_double_prime(&mut self, witness: &[RqVector]) -> RqVector

calculate b^{‘’(k)} = \sum_{i,j=1}^{r} a_{ij}^{‘’(k)} * <s_i, s_j> + \sum_{i=1}^{r} <\phi_{i}^{‘’(k)} * s_i>

@param: a_ct_aggr: a_{ij}^{‘’(k)} @param: phi_ct_aggr: \phi_{i}^{‘’(k)} @param: witness: s_i

@return: b^{‘’(k)}

Source

pub fn get_alpha_double_prime(&self) -> &[RqMatrix]

Source

pub fn get_phi_double_prime(&self) -> &[Vec<RqVector>]

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V