mirror of
https://github.com/arnaucube/fhe-study.git
synced 2026-01-24 04:33:52 +01:00
generalized-fhe: add GLWE encryption & decryption
This commit is contained in:
@@ -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)]
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user