add ckks encrypt & decrypt

This commit is contained in:
2025-07-05 16:25:46 +02:00
parent a8117140fc
commit 6090116a8b
2 changed files with 176 additions and 3 deletions

View File

@@ -105,7 +105,7 @@ impl<const Q: u64, const N: usize, const T: u64> BFV<Q, N, T> {
let Xi_err = Normal::new(0_f64, ERR_SIGMA)?;
// secret key
// let s = Rq::<Q, N>::rand_f64(&mut rng, Xi_key)?;
// let mut s = Rq::<Q, N>::rand_f64(&mut rng, Xi_key)?;
let mut s = Rq::<Q, N>::rand_u64(&mut rng, Xi_key)?;
// since s is going to be multiplied by other Rq elements, already
// compute its NTT