From 942b41d07ce5fb7c3f7592c4301cad39902a2e80 Mon Sep 17 00:00:00 2001 From: youben11 Date: Thu, 1 Sep 2022 12:26:27 +0100 Subject: [PATCH] fix: destroy glwe secret key after use --- compiler/lib/ClientLib/KeySet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/lib/ClientLib/KeySet.cpp b/compiler/lib/ClientLib/KeySet.cpp index eb322acfc..22f79d4bd 100644 --- a/compiler/lib/ClientLib/KeySet.cpp +++ b/compiler/lib/ClientLib/KeySet.cpp @@ -205,6 +205,8 @@ KeySet::generateBootstrapKey(BootstrapKeyID id, BootstrapKeyParam param) { CAPI_ASSERT_ERROR(destroy_lwe_bootstrap_key_u64(bsk)); + CAPI_ASSERT_ERROR(destroy_glwe_secret_key_u64(output_glwe_sk)); + // Store the bootstrap key bootstrapKeys[id] = {param, std::make_shared(fbsk)};