Browse Source

Adding some functional

Hovsep Papoyan 1 month ago
parent
commit
4bbc6e7898

+ 19 - 12
build.rs

@@ -1,18 +1,21 @@
 fn main()
 {
     cxx_build::bridge("src/lib.rs")
+        .file("src/AssociativeContainerOfOpaqueTypes.cc")
         .file("src/Ciphertext.cc")
         .file("src/CryptoContext.cc")
+        .file("src/CryptoParametersBase.cc")
+        .file("src/EvalKey.cc")
         .file("src/KeyPair.cc")
+        .file("src/LWEPrivateKey.cc")
         .file("src/Params.cc")
         .file("src/Plaintext.cc")
         .file("src/PrivateKey.cc")
         .file("src/PublicKey.cc")
-        .file("src/SerialDeserial.cc")
-        .file("src/EvalKey.cc")
-        .file("src/LWEPrivateKey.cc")
+        .file("src/SchemeBase.cc")
         .file("src/SequenceContainerOfOpaqueTypes.cc")
-        .file("src/AssociativeContainerOfOpaqueTypes.cc")
+        .file("src/SerialDeserial.cc")
+
         .include("/usr/local/include/openfhe")
         .include("/usr/local/include/openfhe/third-party/include")
         .include("/usr/local/include/openfhe/core")
@@ -30,12 +33,20 @@ fn main()
         .compile("openfhe");
 
     println!("cargo::rerun-if-changed=src/lib.rs");
+    println!("cargo::rerun-if-changed=src/AssociativeContainerOfOpaqueTypes.h");
+    println!("cargo::rerun-if-changed=src/AssociativeContainerOfOpaqueTypes.cc");
     println!("cargo::rerun-if-changed=src/Ciphertext.h");
     println!("cargo::rerun-if-changed=src/Ciphertext.cc");
     println!("cargo::rerun-if-changed=src/CryptoContext.h");
     println!("cargo::rerun-if-changed=src/CryptoContext.cc");
+    println!("cargo::rerun-if-changed=src/CryptoParametersBase.h");
+    println!("cargo::rerun-if-changed=src/CryptoParametersBase.cc");
+    println!("cargo::rerun-if-changed=src/EvalKey.h");
+    println!("cargo::rerun-if-changed=src/EvalKey.cc");
     println!("cargo::rerun-if-changed=src/KeyPair.h");
     println!("cargo::rerun-if-changed=src/KeyPair.cc");
+    println!("cargo::rerun-if-changed=src/LWEPrivateKey.h");
+    println!("cargo::rerun-if-changed=src/LWEPrivateKey.cc");
     println!("cargo::rerun-if-changed=src/Params.h");
     println!("cargo::rerun-if-changed=src/Params.cc");
     println!("cargo::rerun-if-changed=src/Plaintext.h");
@@ -44,16 +55,12 @@ fn main()
     println!("cargo::rerun-if-changed=src/PrivateKey.cc");
     println!("cargo::rerun-if-changed=src/PublicKey.h");
     println!("cargo::rerun-if-changed=src/PublicKey.cc");
-    println!("cargo::rerun-if-changed=src/SerialDeserial.h");
-    println!("cargo::rerun-if-changed=src/SerialDeserial.cc");
-    println!("cargo::rerun-if-changed=src/EvalKey.h");
-    println!("cargo::rerun-if-changed=src/EvalKey.cc");
-    println!("cargo::rerun-if-changed=src/LWEPrivateKey.h");
-    println!("cargo::rerun-if-changed=src/LWEPrivateKey.cc");
+    println!("cargo::rerun-if-changed=src/SchemeBase.h");
+    println!("cargo::rerun-if-changed=src/SchemeBase.cc");
     println!("cargo::rerun-if-changed=src/SequenceContainerOfOpaqueTypes.h");
     println!("cargo::rerun-if-changed=src/SequenceContainerOfOpaqueTypes.cc");
-    println!("cargo::rerun-if-changed=src/AssociativeContainerOfOpaqueTypes.h");
-    println!("cargo::rerun-if-changed=src/AssociativeContainerOfOpaqueTypes.cc");
+    println!("cargo::rerun-if-changed=src/SerialDeserial.h");
+    println!("cargo::rerun-if-changed=src/SerialDeserial.cc");
 
     // linking openFHE
     println!("cargo::rustc-link-arg=-L/usr/local/lib");

+ 11 - 0
src/AssociativeContainerOfOpaqueTypes.cc

@@ -28,4 +28,15 @@ std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>
     return m_sharedPtrToindexToEvalKeyDCRTPolyMap;
 }
 
+MapFromStringToVectorOfEvalKeys::MapFromStringToVectorOfEvalKeys(
+    std::map<std::string, std::vector<std::shared_ptr<EvalKeyImpl>>> stringToVectorOfEvalKeysMap)
+    : m_stringToVectorOfEvalKeysMap(std::move(stringToVectorOfEvalKeysMap))
+{ }
+
+MapFromStringToMapFromIndexToEvalKey::MapFromStringToMapFromIndexToEvalKey(
+    std::map<std::string, std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>>
+    stringToMapFromIndexToEvalKeyMap)
+    : m_stringToMapFromIndexToEvalKeyMap(std::move(stringToMapFromIndexToEvalKeyMap))
+{ }
+
 } // openfhe

+ 20 - 1
src/AssociativeContainerOfOpaqueTypes.h

@@ -37,7 +37,26 @@ public:
         indexToEvalKeyDCRTPolyMap);
     [[nodiscard]] const std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>& GetInternalMap() const;
     [[nodiscard]] std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>
-	    GetInternal() const;
+	      GetInternal() const;
+};
+
+class MapFromStringToVectorOfEvalKeys final
+{
+    std::map<std::string, std::vector<std::shared_ptr<EvalKeyImpl>>> m_stringToVectorOfEvalKeysMap;
+public:
+    explicit MapFromStringToVectorOfEvalKeys(
+        std::map<std::string, std::vector<std::shared_ptr<EvalKeyImpl>>>
+        stringToVectorOfEvalKeysMap);
+};
+
+class MapFromStringToMapFromIndexToEvalKey final
+{
+    std::map<std::string, std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>>
+        m_stringToMapFromIndexToEvalKeyMap;
+public:
+    explicit MapFromStringToMapFromIndexToEvalKey(
+        std::map<std::string, std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>>
+        stringToMapFromIndexToEvalKeyMap);
 };
 
 } // openfhe

+ 34 - 1
src/CryptoContext.cc

@@ -10,12 +10,14 @@
 
 #include "AssociativeContainerOfOpaqueTypes.h"
 #include "Ciphertext.h"
+#include "CryptoParametersBase.h"
 #include "EvalKey.h"
 #include "KeyPair.h"
 #include "LWEPrivateKey.h"
 #include "Plaintext.h"
 #include "PrivateKey.h"
 #include "PublicKey.h"
+#include "SchemeBase.h"
 #include "SequenceContainerOfOpaqueTypes.h"
 
 namespace openfhe
@@ -1034,6 +1036,21 @@ std::unique_ptr<VectorOfLWECiphertexts> CryptoContextDCRTPoly::EvalCKKStoFHEW(
     return std::make_unique<VectorOfLWECiphertexts>(m_cryptoContextImplSharedPtr->EvalCKKStoFHEW(
         ciphertext.GetInternal(), numCtxts));
 }
+std::unique_ptr<VectorOfCiphertexts> CryptoContextDCRTPoly::IntMPBootAdd(
+    VectorOfVectorOfCiphertexts& sharesPairVec) const
+{
+    return std::make_unique<VectorOfCiphertexts>(m_cryptoContextImplSharedPtr->IntMPBootAdd(
+        sharesPairVec.GetInternal()));
+}
+std::unique_ptr<SchemeBaseDCRTPoly> CryptoContextDCRTPoly::GetScheme() const
+{
+    return std::make_unique<SchemeBaseDCRTPoly>(m_cryptoContextImplSharedPtr->GetScheme());
+}
+std::unique_ptr<CryptoParametersBaseDCRTPoly> CryptoContextDCRTPoly::GetCryptoParameters() const
+{
+    return std::make_unique<CryptoParametersBaseDCRTPoly>(
+        m_cryptoContextImplSharedPtr->GetCryptoParameters());
+}
 std::shared_ptr<CryptoContextImpl> CryptoContextDCRTPoly::GetInternal() const
 {
     return m_cryptoContextImplSharedPtr;
@@ -1101,7 +1118,8 @@ std::unique_ptr<MapFromIndexToEvalKey> GetCopyOfEvalSumKeyMap(const std::string&
 }
 std::unique_ptr<MapFromIndexToEvalKey> GetEvalAutomorphismKeyMapPtr(const std::string& keyID)
 {
-    return std::make_unique<MapFromIndexToEvalKey>(CryptoContextImpl::GetEvalAutomorphismKeyMapPtr(keyID));
+    return std::make_unique<MapFromIndexToEvalKey>(CryptoContextImpl::GetEvalAutomorphismKeyMapPtr(
+        keyID));
 }
 void InsertEvalAutomorphismKey(const MapFromIndexToEvalKey& evalKeyMap, const std::string& keyTag)
 {
@@ -1119,6 +1137,21 @@ void InsertEvalMultKey(const VectorOfEvalKeys& evalKeyVec)
 {
     CryptoContextImpl::InsertEvalMultKey(evalKeyVec.GetInternal());
 }
+std::unique_ptr<MapFromStringToVectorOfEvalKeys> GetCopyOfAllEvalMultKeys()
+{
+    return std::make_unique<MapFromStringToVectorOfEvalKeys>(
+        CryptoContextImpl::GetAllEvalMultKeys());
+}
+std::unique_ptr<MapFromStringToMapFromIndexToEvalKey> GetCopyOfAllEvalSumKeys()
+{
+    return std::make_unique<MapFromStringToMapFromIndexToEvalKey>(
+        CryptoContextImpl::GetAllEvalSumKeys());
+}
+std::unique_ptr<MapFromStringToMapFromIndexToEvalKey> GetCopyOfAllEvalAutomorphismKeys()
+{
+    return std::make_unique<MapFromStringToMapFromIndexToEvalKey>(
+        CryptoContextImpl::GetAllEvalAutomorphismKeys());
+}
 
 // Generator functions
 std::unique_ptr<CryptoContextDCRTPoly> GenNullCryptoContext()

+ 17 - 3
src/CryptoContext.h

@@ -30,19 +30,24 @@ namespace openfhe
 struct ComplexPair;
 
 class CiphertextDCRTPoly;
+class CryptoParametersBaseDCRTPoly;
 class EvalKeyDCRTPoly;
 class KeyPairDCRTPoly;
 class LWEPrivateKey;
 class MapFromIndexToEvalKey;
+class MapFromStringToMapFromIndexToEvalKey;
+class MapFromStringToVectorOfEvalKeys;
 class Plaintext;
 class PrivateKeyDCRTPoly;
 class PublicKeyDCRTPoly;
+class SchemeBaseDCRTPoly;
 class UnorderedMapFromIndexToDCRTPoly;
 class VectorOfCiphertexts;
 class VectorOfDCRTPolys;
 class VectorOfEvalKeys;
 class VectorOfLWECiphertexts;
 class VectorOfPrivateKeys;
+class VectorOfVectorOfCiphertexts;
 
 using SCHEME = lbcrypto::SCHEME;
 using PKESchemeFeature = lbcrypto::PKESchemeFeature;
@@ -423,14 +428,18 @@ public:
         const CiphertextDCRTPoly& ciphertext, const uint32_t index, const uint32_t m,
         const VectorOfDCRTPolys& digits) const;
     [[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(
         VectorOfLWECiphertexts& LWECiphertexts, const uint32_t numCtxts /* 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;
     [[nodiscard]] std::unique_ptr<VectorOfLWECiphertexts> EvalCKKStoFHEW(
         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;
 };
 
@@ -455,10 +464,15 @@ void ClearEvalAutomorphismKeysByCryptoContext(const CryptoContextDCRTPoly& crypt
     const std::string& keyID);
 void InsertEvalAutomorphismKey(const MapFromIndexToEvalKey& evalKeyMap,
     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(
     const std::string& keyID);
 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
 [[nodiscard]] std::unique_ptr<CryptoContextDCRTPoly> GenNullCryptoContext();

+ 13 - 0
src/CryptoParametersBase.cc

@@ -0,0 +1,13 @@
+#include "CryptoParametersBase.h"
+
+#include "openfhe/pke/schemebase/base-cryptoparameters.h"
+
+namespace openfhe
+{
+
+CryptoParametersBaseDCRTPoly::CryptoParametersBaseDCRTPoly(
+    const std::shared_ptr<CryptoParametersBase>& cryptoParametersBase)
+    : m_cryptoParametersBase(cryptoParametersBase)
+{ }
+
+} // openfhe

+ 33 - 0
src/CryptoParametersBase.h

@@ -0,0 +1,33 @@
+#pragma once
+
+#include "openfhe/core/lattice/hal/lat-backend.h"
+
+#include <memory>
+
+namespace lbcrypto
+{
+
+template <class Element>
+class CryptoParametersBase;
+
+} // lbcrypto
+
+namespace openfhe
+{
+
+using CryptoParametersBase = lbcrypto::CryptoParametersBase<lbcrypto::DCRTPoly>;
+
+class CryptoParametersBaseDCRTPoly final
+{
+    std::shared_ptr<CryptoParametersBase> m_cryptoParametersBase;
+public:
+    CryptoParametersBaseDCRTPoly() = default;
+    explicit CryptoParametersBaseDCRTPoly(
+        const std::shared_ptr<CryptoParametersBase>& cryptoParametersBase);
+    CryptoParametersBaseDCRTPoly(const CryptoParametersBaseDCRTPoly&) = delete;
+    CryptoParametersBaseDCRTPoly(CryptoParametersBaseDCRTPoly&&) = delete;
+    CryptoParametersBaseDCRTPoly& operator=(const CryptoParametersBaseDCRTPoly&) = delete;
+    CryptoParametersBaseDCRTPoly& operator=(CryptoParametersBaseDCRTPoly&&) = delete;
+};
+
+} // openfhe

+ 12 - 0
src/SchemeBase.cc

@@ -0,0 +1,12 @@
+#include "SchemeBase.h"
+
+#include "openfhe/pke/schemebase/base-scheme.h"
+
+namespace openfhe
+{
+
+SchemeBaseDCRTPoly::SchemeBaseDCRTPoly(const std::shared_ptr<SchemeBase>& schemeBase)
+    : m_schemeBase(schemeBase)
+{ }
+
+} // openfhe

+ 32 - 0
src/SchemeBase.h

@@ -0,0 +1,32 @@
+#pragma once
+
+#include "openfhe/core/lattice/hal/lat-backend.h"
+
+#include <memory>
+
+namespace lbcrypto
+{
+
+template <class Element>
+class SchemeBase;
+
+} // lbcrypto
+
+namespace openfhe
+{
+
+using SchemeBase = lbcrypto::SchemeBase<lbcrypto::DCRTPoly>;
+
+class SchemeBaseDCRTPoly final
+{
+    std::shared_ptr<SchemeBase> m_schemeBase;
+public:
+    SchemeBaseDCRTPoly() = default;
+    explicit SchemeBaseDCRTPoly(const std::shared_ptr<SchemeBase>& schemeBase);
+    SchemeBaseDCRTPoly(const SchemeBaseDCRTPoly&) = delete;
+    SchemeBaseDCRTPoly(SchemeBaseDCRTPoly&&) = delete;
+    SchemeBaseDCRTPoly& operator=(const SchemeBaseDCRTPoly&) = delete;
+    SchemeBaseDCRTPoly& operator=(SchemeBaseDCRTPoly&&) = delete;
+};
+
+} // openfhe

+ 10 - 0
src/SequenceContainerOfOpaqueTypes.cc

@@ -15,6 +15,16 @@ std::vector<std::shared_ptr<CiphertextImpl>>& VectorOfCiphertexts::GetInternal()
     return m_ciphertexts;
 }
 
+VectorOfVectorOfCiphertexts::VectorOfVectorOfCiphertexts(
+    std::vector<std::vector<std::shared_ptr<CiphertextImpl>>> ciphertexts)
+    : m_ciphertexts(std::move(ciphertexts))
+{ }
+std::vector<std::vector<std::shared_ptr<CiphertextImpl>>>&
+    VectorOfVectorOfCiphertexts::GetInternal()
+{
+    return m_ciphertexts;
+}
+
 VectorOfPrivateKeys::VectorOfPrivateKeys(std::vector<std::shared_ptr<PrivateKeyImpl>> privateKeys)
     : m_privateKeys(std::move(privateKeys))
 { }

+ 11 - 1
src/SequenceContainerOfOpaqueTypes.h

@@ -24,6 +24,15 @@ public:
     [[nodiscard]] std::vector<std::shared_ptr<CiphertextImpl>>& GetInternal();
 };
 
+class VectorOfVectorOfCiphertexts final
+{
+    std::vector<std::vector<std::shared_ptr<CiphertextImpl>>> m_ciphertexts;
+public:
+    explicit VectorOfVectorOfCiphertexts(
+        std::vector<std::vector<std::shared_ptr<CiphertextImpl>>> ciphertexts);
+    [[nodiscard]] std::vector<std::vector<std::shared_ptr<CiphertextImpl>>>& GetInternal();
+};
+
 using PrivateKeyImpl = lbcrypto::PrivateKeyImpl<lbcrypto::DCRTPoly>;
 
 class VectorOfPrivateKeys final
@@ -58,7 +67,8 @@ class VectorOfLWECiphertexts final
 {
     std::vector<std::shared_ptr<LWECiphertextImpl>> m_lweCiphertexts;
 public:
-    explicit VectorOfLWECiphertexts(std::vector<std::shared_ptr<LWECiphertextImpl>> lweCiphertexts);
+    explicit VectorOfLWECiphertexts(
+        std::vector<std::shared_ptr<LWECiphertextImpl>> lweCiphertexts);
     [[nodiscard]] std::vector<std::shared_ptr<LWECiphertextImpl>>& GetInternal();
 };
 

+ 24 - 8
src/lib.rs

@@ -146,23 +146,26 @@ pub mod ffi
 
     unsafe extern "C++"
     {
+        include!("openfhe/src/AssociativeContainerOfOpaqueTypes.h");
         include!("openfhe/src/Ciphertext.h");
         include!("openfhe/src/CryptoContext.h");
+        include!("openfhe/src/CryptoParametersBase.h");
+        include!("openfhe/src/EvalKey.h");
         include!("openfhe/src/KeyPair.h");
+        include!("openfhe/src/LWEPrivateKey.h");
         include!("openfhe/src/Params.h");
         include!("openfhe/src/Plaintext.h");
         include!("openfhe/src/PrivateKey.h");
         include!("openfhe/src/PublicKey.h");
-        include!("openfhe/src/SerialDeserial.h");
-        include!("openfhe/src/EvalKey.h");
-        include!("openfhe/src/LWEPrivateKey.h");
+        include!("openfhe/src/SchemeBase.h");
         include!("openfhe/src/SequenceContainerOfOpaqueTypes.h");
-        include!("openfhe/src/AssociativeContainerOfOpaqueTypes.h");
+        include!("openfhe/src/SerialDeserial.h");
 
         type COMPRESSION_LEVEL;
         type DecryptionNoiseMode;
         type EncryptionTechnique;
         type ExecutionMode;
+        type Format;
         type KeySwitchTechnique;
         type MultipartyMode;
         type MultiplicationTechnique;
@@ -173,13 +176,18 @@ pub mod ffi
         type SecretKeyDist;
         type SecurityLevel;
         type SerialMode;
-        type Format;
 
         type CiphertextDCRTPoly;
         type CryptoContextDCRTPoly;
+        type CryptoParametersBaseDCRTPoly;
         type DCRTPolyParams;
         type DecryptResult;
+        type EvalKeyDCRTPoly;
         type KeyPairDCRTPoly;
+        type LWEPrivateKey;
+        type MapFromIndexToEvalKey;
+        type MapFromStringToMapFromIndexToEvalKey;
+        type MapFromStringToVectorOfEvalKeys;
         type Params;
         type ParamsBFVRNS;
         type ParamsBGVRNS;
@@ -187,15 +195,14 @@ pub mod ffi
         type Plaintext;
         type PrivateKeyDCRTPoly;
         type PublicKeyDCRTPoly;
-        type EvalKeyDCRTPoly;
-        type LWEPrivateKey;
-        type MapFromIndexToEvalKey;
+        type SchemeBaseDCRTPoly;
         type UnorderedMapFromIndexToDCRTPoly;
         type VectorOfCiphertexts;
         type VectorOfDCRTPolys;
         type VectorOfEvalKeys;
         type VectorOfLWECiphertexts;
         type VectorOfPrivateKeys;
+        type VectorOfVectorOfCiphertexts;
     }
 
     // Params
@@ -950,6 +957,12 @@ pub mod ffi
                           pmax: /* 2.0 */ f64, dim1: /* 0 */ u32) -> UniquePtr<CiphertextDCRTPoly>;
         fn EvalCKKStoFHEW(self: &CryptoContextDCRTPoly, ciphertext: &CiphertextDCRTPoly,
                           numCtxts: /* 0 */ u32) -> UniquePtr<VectorOfLWECiphertexts>;
+        fn IntMPBootAdd(self: &CryptoContextDCRTPoly,
+                        sharesPairVec: Pin<&mut VectorOfVectorOfCiphertexts>)
+                        -> UniquePtr<VectorOfCiphertexts>;
+        fn GetScheme(self: &CryptoContextDCRTPoly) -> UniquePtr<SchemeBaseDCRTPoly>;
+        fn GetCryptoParameters(self: &CryptoContextDCRTPoly)
+                               -> UniquePtr<CryptoParametersBaseDCRTPoly>;
 
         // cxx currently does not support static class methods
         fn ClearEvalMultKeys();
@@ -972,6 +985,9 @@ pub mod ffi
         fn InsertEvalSumKey(mapToInsert: &MapFromIndexToEvalKey, keyTag: /* "" */ &CxxString);
         fn GetCopyOfEvalMultKeyVector(keyID: &CxxString) -> UniquePtr<VectorOfEvalKeys>;
         fn InsertEvalMultKey(evalKeyVec: &VectorOfEvalKeys);
+        fn GetCopyOfAllEvalMultKeys() -> UniquePtr<MapFromStringToVectorOfEvalKeys>;
+        fn GetCopyOfAllEvalSumKeys() -> UniquePtr<MapFromStringToMapFromIndexToEvalKey>;
+        fn GetCopyOfAllEvalAutomorphismKeys() -> UniquePtr<MapFromStringToMapFromIndexToEvalKey>;
     }
 
     // Serialize / Deserialize