feat: accept no evaluation keys

This commit is contained in:
rudy
2022-09-19 15:01:55 +02:00
committed by rudy-6-4
parent 08ed2fc49b
commit cb2c9ef6bf
7 changed files with 82 additions and 47 deletions

View File

@@ -37,6 +37,8 @@ using concretelang::error::StringError;
const std::string SMALL_KEY = "small";
const std::string BIG_KEY = "big";
const std::string BOOTSTRAP_KEY = "bsk_v0";
const std::string KEYSWITCH_KEY = "ksk_v0";
const std::string CLIENT_PARAMETERS_EXT = ".concrete.params.json";

View File

@@ -87,8 +87,11 @@ public:
}
EvaluationKeys evaluationKeys() {
auto kskIt = this->keyswitchKeys.find("ksk_v0");
auto bskIt = this->bootstrapKeys.find("bsk_v0");
if (this->bootstrapKeys.empty() && this->keyswitchKeys.empty()) {
return EvaluationKeys();
}
auto kskIt = this->keyswitchKeys.find(clientlib::KEYSWITCH_KEY);
auto bskIt = this->bootstrapKeys.find(clientlib::BOOTSTRAP_KEY);
if (kskIt != this->keyswitchKeys.end() &&
bskIt != this->bootstrapKeys.end()) {
auto sharedKsk = std::get<1>(kskIt->second);