pub struct GarbagePolynomials {
pub g: RqMatrix,
pub h: RqMatrix,
/* private fields */
}
Fields§
§g: RqMatrix
§h: RqMatrix
Implementations§
Source§impl GarbagePolynomials
impl GarbagePolynomials
pub fn new(witness_vector: Vec<RqVector>) -> Self
Sourcepub fn compute_g(&mut self)
pub fn compute_g(&mut self)
Calculate the garbage polynomials g_{ij} = <s_i, s_j> Exploits symmetry by only calculating for i ≤ j since g_{ij} = g_{ji}
Sourcepub fn compute_h(&mut self, phi: &[RqVector])
pub fn compute_h(&mut self, phi: &[RqVector])
Calculate the h_{ij} = <φ_i, s_j> + <φ_j, s_i> garbage polynomials In the paper, h_{ij} is defined with a factor of 1/2 in front However, since we’re using q = 2^32, division by 2 is problematic in Z_q So we store h’{ij} = 2*h{ij} = <φ_i, s_j> + <φ_j, s_i> directly Exploits symmetry by only calculating for i ≤ j since h_{ij} = h_{ji}
Auto Trait Implementations§
impl Freeze for GarbagePolynomials
impl RefUnwindSafe for GarbagePolynomials
impl Send for GarbagePolynomials
impl Sync for GarbagePolynomials
impl Unpin for GarbagePolynomials
impl UnwindSafe for GarbagePolynomials
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more