From efdadb9592deff8a51e1b17e7a156ccac07b09ab Mon Sep 17 00:00:00 2001 From: Pro7ech Date: Fri, 14 Nov 2025 16:44:12 +0100 Subject: [PATCH] Add circuit bootstrapping encrypt sk tmp_bytes --- .../src/tfhe/circuit_bootstrapping/key.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/poulpy-schemes/src/tfhe/circuit_bootstrapping/key.rs b/poulpy-schemes/src/tfhe/circuit_bootstrapping/key.rs index 633f080..fd68106 100644 --- a/poulpy-schemes/src/tfhe/circuit_bootstrapping/key.rs +++ b/poulpy-schemes/src/tfhe/circuit_bootstrapping/key.rs @@ -51,6 +51,10 @@ impl CircuitBootstrappingKeyInfos for CircuitBootstrappingKeyLayout { } pub trait CircuitBootstrappingKeyEncryptSk { + fn circuit_bootstrapping_key_encrypt_sk_tmp_bytes(&self, infos: &A) -> usize + where + A: CircuitBootstrappingKeyInfos; + #[allow(clippy::too_many_arguments)] fn circuit_bootstrapping_key_encrypt_sk( &self, @@ -123,6 +127,15 @@ where + GLWESecretPreparedFactory, Scratch: ScratchTakeCore, { + fn circuit_bootstrapping_key_encrypt_sk_tmp_bytes(&self, infos: &A) -> usize + where + A: CircuitBootstrappingKeyInfos, + { + self.glwe_automorphism_key_encrypt_sk_tmp_bytes(&infos.atk_infos()) + .max(self.blind_rotation_key_encrypt_sk_tmp_bytes(&infos.brk_infos())) + .max(self.gglwe_to_ggsw_key_encrypt_sk_tmp_bytes(&infos.tsk_infos())) + } + fn circuit_bootstrapping_key_encrypt_sk( &self, res: &mut CircuitBootstrappingKey,