From 1ad54f53a8a3260e38645a6d2f5b664508645138 Mon Sep 17 00:00:00 2001 From: Pro7ech Date: Fri, 14 Nov 2025 16:47:14 +0100 Subject: [PATCH] Add bddkey encrypt sk tmp_bytes --- poulpy-schemes/src/tfhe/bdd_arithmetic/key.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/poulpy-schemes/src/tfhe/bdd_arithmetic/key.rs b/poulpy-schemes/src/tfhe/bdd_arithmetic/key.rs index e3555f8..cb09748 100644 --- a/poulpy-schemes/src/tfhe/bdd_arithmetic/key.rs +++ b/poulpy-schemes/src/tfhe/bdd_arithmetic/key.rs @@ -68,6 +68,10 @@ where } pub trait BDDKeyEncryptSk { + fn bdd_key_encrypt_sk_tmp_bytes(&self, infos: &A) -> usize + where + A: BDDKeyInfos; + fn bdd_key_encrypt_sk( &self, res: &mut BDDKey, @@ -87,6 +91,14 @@ where Self: CircuitBootstrappingKeyEncryptSk + GLWEToLWESwitchingKeyEncryptSk, Scratch: ScratchTakeCore, { + fn bdd_key_encrypt_sk_tmp_bytes(&self, infos: &A) -> usize + where + A: BDDKeyInfos, + { + self.circuit_bootstrapping_key_encrypt_sk_tmp_bytes(&infos.cbt_infos()) + .max(self.glwe_to_lwe_key_encrypt_sk_tmp_bytes(&infos.ks_infos())) + } + fn bdd_key_encrypt_sk( &self, res: &mut BDDKey,