Skip to content

Commit

Permalink
Removed an overloaded version of InsertEvalMultKey() as it caused pro…
Browse files Browse the repository at this point in the history
…blems for openfhe-python
  • Loading branch information
dsuponitskiy-duality committed Jul 30, 2024
1 parent 64e6f91 commit 0cce137
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/pke/include/cryptocontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,6 @@ class CryptoContextImpl : public Serializable {
*/
static void InsertEvalMultKey(const std::vector<EvalKey<Element>>& evalKeyVec,
const std::string& keyTag = std::string());
static void InsertEvalMultKey(std::vector<EvalKey<Element>>&& evalKeyVec,
const std::string& keyTag = std::string());

/**
* SerializeEvalSumKey for a single EvalSum key or all of the EvalSum keys
Expand Down
12 changes: 0 additions & 12 deletions src/pke/lib/cryptocontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,6 @@ void CryptoContextImpl<Element>::InsertEvalMultKey(const std::vector<EvalKey<Ele
CryptoContextImpl<Element>::s_evalMultKeyMap[tag] = vectorToInsert;
}

template <typename Element>
void CryptoContextImpl<Element>::InsertEvalMultKey(std::vector<EvalKey<Element>>&& vectorToInsert,
const std::string& keyTag) {
const std::string tag = (keyTag.empty()) ? vectorToInsert[0]->GetKeyTag() : keyTag;
if (CryptoContextImpl<Element>::s_evalMultKeyMap.find(tag) != CryptoContextImpl<Element>::s_evalMultKeyMap.end()) {
// we do not allow to override the existing key vector if its keyTag is identical to the keyTag of the new keys
OPENFHE_THROW("Can not save a EvalMultKeys vector as there is a key vector for the given keyTag");
}

CryptoContextImpl<Element>::s_evalMultKeyMap[tag] = std::move(vectorToInsert);
}

/////////////////////////////////////////
// ADVANCED SHE
/////////////////////////////////////////
Expand Down

0 comments on commit 0cce137

Please sign in to comment.