|
@@ -30,19 +30,24 @@ namespace openfhe
|
|
struct ComplexPair;
|
|
struct ComplexPair;
|
|
|
|
|
|
class CiphertextDCRTPoly;
|
|
class CiphertextDCRTPoly;
|
|
|
|
+class CryptoParametersBaseDCRTPoly;
|
|
class EvalKeyDCRTPoly;
|
|
class EvalKeyDCRTPoly;
|
|
class KeyPairDCRTPoly;
|
|
class KeyPairDCRTPoly;
|
|
class LWEPrivateKey;
|
|
class LWEPrivateKey;
|
|
class MapFromIndexToEvalKey;
|
|
class MapFromIndexToEvalKey;
|
|
|
|
+class MapFromStringToMapFromIndexToEvalKey;
|
|
|
|
+class MapFromStringToVectorOfEvalKeys;
|
|
class Plaintext;
|
|
class Plaintext;
|
|
class PrivateKeyDCRTPoly;
|
|
class PrivateKeyDCRTPoly;
|
|
class PublicKeyDCRTPoly;
|
|
class PublicKeyDCRTPoly;
|
|
|
|
+class SchemeBaseDCRTPoly;
|
|
class UnorderedMapFromIndexToDCRTPoly;
|
|
class UnorderedMapFromIndexToDCRTPoly;
|
|
class VectorOfCiphertexts;
|
|
class VectorOfCiphertexts;
|
|
class VectorOfDCRTPolys;
|
|
class VectorOfDCRTPolys;
|
|
class VectorOfEvalKeys;
|
|
class VectorOfEvalKeys;
|
|
class VectorOfLWECiphertexts;
|
|
class VectorOfLWECiphertexts;
|
|
class VectorOfPrivateKeys;
|
|
class VectorOfPrivateKeys;
|
|
|
|
+class VectorOfVectorOfCiphertexts;
|
|
|
|
|
|
using SCHEME = lbcrypto::SCHEME;
|
|
using SCHEME = lbcrypto::SCHEME;
|
|
using PKESchemeFeature = lbcrypto::PKESchemeFeature;
|
|
using PKESchemeFeature = lbcrypto::PKESchemeFeature;
|
|
@@ -423,14 +428,18 @@ public:
|
|
const CiphertextDCRTPoly& ciphertext, const uint32_t index, const uint32_t m,
|
|
const CiphertextDCRTPoly& ciphertext, const uint32_t index, const uint32_t m,
|
|
const VectorOfDCRTPolys& digits) const;
|
|
const VectorOfDCRTPolys& digits) const;
|
|
[[nodiscard]] std::unique_ptr<CiphertextDCRTPoly> EvalFastRotationExt(
|
|
[[nodiscard]] std::unique_ptr<CiphertextDCRTPoly> EvalFastRotationExt(
|
|
- const CiphertextDCRTPoly& ciphertext, const uint32_t index, const VectorOfDCRTPolys& digits,
|
|
|
|
- const bool addFirst) const;
|
|
|
|
|
|
+ const CiphertextDCRTPoly& ciphertext, const uint32_t index,
|
|
|
|
+ const VectorOfDCRTPolys& digits, const bool addFirst) const;
|
|
[[nodiscard]] std::unique_ptr<CiphertextDCRTPoly> EvalFHEWtoCKKS(
|
|
[[nodiscard]] std::unique_ptr<CiphertextDCRTPoly> EvalFHEWtoCKKS(
|
|
VectorOfLWECiphertexts& LWECiphertexts, const uint32_t numCtxts /* 0 */,
|
|
VectorOfLWECiphertexts& LWECiphertexts, const uint32_t numCtxts /* 0 */,
|
|
const uint32_t numSlots /* 0 */, const uint32_t p /* 4 */, const double pmin /* 0.0 */,
|
|
const uint32_t numSlots /* 0 */, const uint32_t p /* 4 */, const double pmin /* 0.0 */,
|
|
const double pmax /* 2.0 */, const uint32_t dim1 /* 0 */) const;
|
|
const double pmax /* 2.0 */, const uint32_t dim1 /* 0 */) const;
|
|
[[nodiscard]] std::unique_ptr<VectorOfLWECiphertexts> EvalCKKStoFHEW(
|
|
[[nodiscard]] std::unique_ptr<VectorOfLWECiphertexts> EvalCKKStoFHEW(
|
|
const CiphertextDCRTPoly& ciphertext, const uint32_t numCtxts /* 0 */) const;
|
|
const CiphertextDCRTPoly& ciphertext, const uint32_t numCtxts /* 0 */) const;
|
|
|
|
+ [[nodiscard]] std::unique_ptr<VectorOfCiphertexts> IntMPBootAdd(
|
|
|
|
+ VectorOfVectorOfCiphertexts& sharesPairVec) const;
|
|
|
|
+ [[nodiscard]] std::unique_ptr<SchemeBaseDCRTPoly> GetScheme() const;
|
|
|
|
+ [[nodiscard]] std::unique_ptr<CryptoParametersBaseDCRTPoly> GetCryptoParameters() const;
|
|
[[nodiscard]] std::shared_ptr<CryptoContextImpl> GetInternal() const;
|
|
[[nodiscard]] std::shared_ptr<CryptoContextImpl> GetInternal() const;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -455,10 +464,15 @@ void ClearEvalAutomorphismKeysByCryptoContext(const CryptoContextDCRTPoly& crypt
|
|
const std::string& keyID);
|
|
const std::string& keyID);
|
|
void InsertEvalAutomorphismKey(const MapFromIndexToEvalKey& evalKeyMap,
|
|
void InsertEvalAutomorphismKey(const MapFromIndexToEvalKey& evalKeyMap,
|
|
const std::string& keyTag /* "" */);
|
|
const std::string& keyTag /* "" */);
|
|
-void InsertEvalSumKey(const MapFromIndexToEvalKey& mapToInsert, const std::string& keyTag /* "" */);
|
|
|
|
|
|
+void InsertEvalSumKey(const MapFromIndexToEvalKey& mapToInsert,
|
|
|
|
+ const std::string& keyTag /* "" */);
|
|
[[nodiscard]] std::unique_ptr<VectorOfEvalKeys> GetCopyOfEvalMultKeyVector(
|
|
[[nodiscard]] std::unique_ptr<VectorOfEvalKeys> GetCopyOfEvalMultKeyVector(
|
|
const std::string& keyID);
|
|
const std::string& keyID);
|
|
void InsertEvalMultKey(const VectorOfEvalKeys& evalKeyVec);
|
|
void InsertEvalMultKey(const VectorOfEvalKeys& evalKeyVec);
|
|
|
|
+[[nodiscard]] std::unique_ptr<MapFromStringToVectorOfEvalKeys> GetCopyOfAllEvalMultKeys();
|
|
|
|
+[[nodiscard]] std::unique_ptr<MapFromStringToMapFromIndexToEvalKey> GetCopyOfAllEvalSumKeys();
|
|
|
|
+[[nodiscard]] std::unique_ptr<MapFromStringToMapFromIndexToEvalKey>
|
|
|
|
+ GetCopyOfAllEvalAutomorphismKeys();
|
|
|
|
|
|
// Generator functions
|
|
// Generator functions
|
|
[[nodiscard]] std::unique_ptr<CryptoContextDCRTPoly> GenNullCryptoContext();
|
|
[[nodiscard]] std::unique_ptr<CryptoContextDCRTPoly> GenNullCryptoContext();
|