pub trait ZqVector {
// Required methods
fn random<R: Rng + CryptoRng>(rng: &mut R, n: usize) -> Self;
fn conjugate_automorphism(&self) -> Self;
fn multiply(&self, other: &Self) -> Self;
fn add(&self, other: &Self) -> Self;
fn inner_product(&self, other: &Self) -> Zq;
}
Required Methods§
fn random<R: Rng + CryptoRng>(rng: &mut R, n: usize) -> Self
fn conjugate_automorphism(&self) -> Self
fn multiply(&self, other: &Self) -> Self
fn add(&self, other: &Self) -> Self
fn inner_product(&self, other: &Self) -> Zq
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 ZqVector for Vec<Zq>
impl ZqVector for Vec<Zq>
Source§fn multiply(&self, other: &Vec<Zq>) -> Vec<Zq>
fn multiply(&self, other: &Vec<Zq>) -> Vec<Zq>
Note: This is a key performance bottleneck. The multiplication here is primarily used in: Prover.check_projection() which verifies the condition: p_j? = ct(sum(<σ−1(pi_i^(j)), s_i>)) Each ZqVector involved has a length of 2*lambda (default: 256). Consider optimizing this operation by applying NTT-based multiplication to improve performance.
Source§fn inner_product(&self, other: &Self) -> Zq
fn inner_product(&self, other: &Self) -> Zq
Dot product between coefficients
Source§fn conjugate_automorphism(&self) -> Vec<Zq>
fn conjugate_automorphism(&self) -> Vec<Zq>
Compute the conjugate automorphism \sigma_{-1} of vector based on B) Constraints…, Page 21.