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,