add GLWE ciphertext-ciphertext addition, and ciphertext-plaintext addition

This commit is contained in:
2025-07-09 17:52:59 +02:00
parent 2998f1761c
commit 92b6f50ccc
3 changed files with 85 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ use crate::Ring;
/// Tuple of K Ring (Rq) elements. We use Vec<R> to allocate it in the heap,
/// since if using a fixed-size array it would overflow the stack.
#[derive(Clone, Debug)]
pub struct TR<R: Ring, const K: usize>(Vec<R>);
pub struct TR<R: Ring, const K: usize>(pub Vec<R>);
impl<R: Ring, const K: usize> TR<R, K> {
pub fn rand(mut rng: impl Rng, dist: impl Distribution<f64>) -> Self {