fix: destroy glwe secret key after use

This commit is contained in:
youben11
2022-09-01 12:26:27 +01:00
committed by Ayoub Benaissa
parent 4a6b9148d1
commit 942b41d07c

View File

@@ -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<LweBootstrapKey>(fbsk)};