From e35924f44cc77a987f0b142720281eecb7481e43 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bossuat Date: Tue, 6 May 2025 16:43:06 +0200 Subject: [PATCH] small fix to base2k rlwe encryption example --- base2k/examples/rlwe_encrypt.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/base2k/examples/rlwe_encrypt.rs b/base2k/examples/rlwe_encrypt.rs index 1a9f4b3..4d2961c 100644 --- a/base2k/examples/rlwe_encrypt.rs +++ b/base2k/examples/rlwe_encrypt.rs @@ -43,7 +43,7 @@ fn main() { module.vec_znx_dft(&mut buf_dft, 0, &ct, 1); // Applies DFT(ct[1]) * DFT(s) - module.svp_apply_dft_inplace( + module.svp_apply_inplace( &mut buf_dft, // DFT(ct[1] * s) 0, // Selects the first column of res &s_dft, // DFT(s) @@ -102,13 +102,12 @@ fn main() { // Decryption // DFT(ct[1] * s) - module.svp_apply( + module.vec_znx_dft(&mut buf_dft, 0, &ct, 1); + module.svp_apply_inplace( &mut buf_dft, 0, // Selects the first column of res. &s_dft, 0, - &ct, - 1, // Selects the second column of ct (ct[1]) ); // BIG(c1 * s) = IDFT(DFT(c1 * s))