generalized-fhe: add GLWE encryption & decryption

This commit is contained in:
2025-07-09 17:17:19 +02:00
parent 17b1e9ed43
commit 2998f1761c
8 changed files with 142 additions and 3 deletions

View File

@@ -13,6 +13,9 @@ use anyhow::{anyhow, Result};
use crate::Ring;
// NOTE: currently using fixed-size arrays, but pending to see if with
// real-world parameters the stack can keep up; if not will move everything to
// use Vec.
/// PolynomialRing element, where the PolynomialRing is R = Z_q[X]/(X^n +1)
/// The implementation assumes that q is prime.
#[derive(Clone, Copy)]

View File

@@ -10,9 +10,6 @@ use std::{array, ops};
use crate::Ring;
// #[derive(Clone, Copy, Debug)]
// pub struct TR<R: Ring, const K: usize>([R; K]);
/// 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)]