@@ -497,11 +497,34 @@ void bind_crypto_context(py::module &m)
497497 py::arg (" originalPrivateKey" ),
498498 py::arg (" newPrivateKey" ),
499499 py::arg (" evalKey" ))
500+ .def (" MultiEvalAtIndexKeyGen" ,
501+ [](CryptoContextImpl<DCRTPoly>* self,
502+ const PrivateKey<DCRTPoly>& privateKey,
503+ std::shared_ptr<std::map<unsigned int , EvalKey<DCRTPoly>>> evalKeyMap,
504+ const std::vector<int32_t >& indexList,
505+ const std::string& keyId) {
506+ return self->MultiEvalAtIndexKeyGen (privateKey, evalKeyMap, indexList, keyId);
507+ },
508+ cc_MultiEvalAtIndexKeyGen_docs,
509+ py::arg (" privateKey" ),
510+ py::arg (" evalKeyMap" ),
511+ py::arg (" indexList" ),
512+ py::arg (" keyId" ) = " " )
500513 .def (" MultiEvalSumKeyGen" , &CryptoContextImpl<DCRTPoly>::MultiEvalSumKeyGen,
501514 cc_MultiEvalSumKeyGen_docs,
502515 py::arg (" privateKey" ),
503516 py::arg (" evalKeyMap" ),
504517 py::arg (" keyId" ) = " " )
518+ .def (" MultiAddEvalAutomorphismKeys" , &CryptoContextImpl<DCRTPoly>::MultiAddEvalAutomorphismKeys,
519+ cc_MultiAddEvalAutomorphismKeys_docs,
520+ py::arg (" evalKeyMap1" ),
521+ py::arg (" evalKeyMap1" ),
522+ py::arg (" keyId" ) = " " )
523+ .def (" MultiAddPubKeys" , &CryptoContextImpl<DCRTPoly>::MultiAddPubKeys,
524+ cc_MultiAddPubKeys_docs,
525+ py::arg (" publicKey1" ),
526+ py::arg (" publicKey2" ),
527+ py::arg (" keyId" ) = " " )
505528 .def (" MultiAddEvalKeys" , &CryptoContextImpl<DCRTPoly>::MultiAddEvalKeys,
506529 cc_MultiAddEvalKeys_docs,
507530 py::arg (" evalKey1" ),
@@ -686,11 +709,12 @@ void bind_crypto_context(py::module &m)
686709 py::arg (" pLWE" ) = 0 ,
687710 py::arg (" scaleSign" ) = 1.0 )
688711 // TODO (Oliveira, R.): Solve pointer handling bug when returning EvalKeyMap objects for the next functions
689- .def (" EvalAutomorphismKeyGen" , &EvalAutomorphismKeyGenWrapper,
712+ .def (" EvalAutomorphismKeyGen" ,
713+ static_cast <std::shared_ptr<std::map<usint, EvalKey<DCRTPoly>>> (CryptoContextImpl<DCRTPoly>::*)(const PrivateKey<DCRTPoly>, const std::vector<usint>&) const >
714+ (&CryptoContextImpl<DCRTPoly>::EvalAutomorphismKeyGen),
690715 cc_EvalAutomorphismKeyGen_docs,
691716 py::arg (" privateKey" ),
692- py::arg (" indexList" ),
693- py::return_value_policy::reference_internal)
717+ py::arg (" indexList" ))
694718 .def (" EvalLinearWSumMutable" ,
695719 static_cast <lbcrypto::Ciphertext<DCRTPoly> (lbcrypto::CryptoContextImpl<DCRTPoly>::*)(
696720 const std::vector<double >&,
@@ -729,11 +753,13 @@ void bind_crypto_context(py::module &m)
729753 " ClearEvalAutomorphismKeys" , []()
730754 { CryptoContextImpl<DCRTPoly>::ClearEvalAutomorphismKeys (); },
731755 cc_ClearEvalAutomorphismKeys_docs)
732- .def (" GetEvalSumKeyMap" , &GetEvalSumKeyMapWrapper,
733- cc_GetEvalSumKeyMap_docs,
756+ .def_static (" GetEvalAutomorphismKeyMap" , &CryptoContextImpl<DCRTPoly>::GetEvalAutomorphismKeyMap,
757+ cc_GetEvalAutomorphismKeyMap_docs,
758+ py::arg (" keyId" ) = " " ,
734759 py::return_value_policy::reference)
735- .def (" GetBinCCForSchemeSwitch" , &CryptoContextImpl<DCRTPoly>::GetBinCCForSchemeSwitch,
736- py::return_value_policy::reference_internal)
760+ .def (" GetEvalSumKeyMap" , &GetEvalSumKeyMapWrapper,
761+ cc_GetEvalSumKeyMap_docs)
762+ .def (" GetBinCCForSchemeSwitch" , &CryptoContextImpl<DCRTPoly>::GetBinCCForSchemeSwitch)
737763 .def_static (
738764 " SerializeEvalMultKey" , [](const std::string &filename, const SerType::SERBINARY &sertype, std::string id = " " )
739765 {
0 commit comments