diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f2e7d0..1f6c9ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project (OpenFHE-Python) set(OPENFHE_PYTHON_VERSION_MAJOR 0) set(OPENFHE_PYTHON_VERSION_MINOR 8) -set(OPENFHE_PYTHON_VERSION_PATCH 7) +set(OPENFHE_PYTHON_VERSION_PATCH 8) set(OPENFHE_PYTHON_VERSION ${OPENFHE_PYTHON_VERSION_MAJOR}.${OPENFHE_PYTHON_VERSION_MINOR}.${OPENFHE_PYTHON_VERSION_PATCH}) set(CMAKE_CXX_STANDARD 17) @@ -14,7 +14,7 @@ if(APPLE) set(CMAKE_CXX_VISIBILITY_PRESET default) endif() -find_package(OpenFHE 1.1.3 REQUIRED) +find_package(OpenFHE 1.2.0 REQUIRED) find_package(pybind11 REQUIRED) set( CMAKE_CXX_FLAGS ${OpenFHE_CXX_FLAGS} ) diff --git a/src/lib/bindings.cpp b/src/lib/bindings.cpp index 455d87d..639ba48 100644 --- a/src/lib/bindings.cpp +++ b/src/lib/bindings.cpp @@ -56,7 +56,7 @@ void bind_parameters(py::module &m,const std::string name) .def("GetKeySwitchCount", &CCParams::GetKeySwitchCount) .def("GetEncryptionTechnique", &CCParams::GetEncryptionTechnique) .def("GetMultiplicationTechnique", &CCParams::GetMultiplicationTechnique) - .def("GetMultiHopModSize", &CCParams::GetMultiHopModSize) + .def("GetPRENumHops", &CCParams::GetPRENumHops) .def("GetInteractiveBootCompressionLevel", &CCParams::GetInteractiveBootCompressionLevel) // setters .def("SetPlaintextModulus", &CCParams::SetPlaintextModulus) @@ -86,7 +86,7 @@ void bind_parameters(py::module &m,const std::string name) .def("SetKeySwitchCount", &CCParams::SetKeySwitchCount) .def("SetEncryptionTechnique", &CCParams::SetEncryptionTechnique) .def("SetMultiplicationTechnique", &CCParams::SetMultiplicationTechnique) - .def("SetMultiHopModSize", &CCParams::SetMultiHopModSize) + .def("SetPRENumHops", &CCParams::SetPRENumHops) .def("SetInteractiveBootCompressionLevel", &CCParams::SetInteractiveBootCompressionLevel) .def("__str__",[](const CCParams ¶ms) { std::stringstream stream; @@ -930,13 +930,11 @@ void bind_enums_and_constants(py::module &m) .value("NOT_SET", ProxyReEncryptionMode::NOT_SET) .value("INDCPA", ProxyReEncryptionMode::INDCPA) .value("FIXED_NOISE_HRA", ProxyReEncryptionMode::FIXED_NOISE_HRA) - .value("NOISE_FLOODING_HRA", ProxyReEncryptionMode::NOISE_FLOODING_HRA) - .value("DIVIDE_AND_ROUND_HRA", ProxyReEncryptionMode::DIVIDE_AND_ROUND_HRA); + .value("NOISE_FLOODING_HRA", ProxyReEncryptionMode::NOISE_FLOODING_HRA); m.attr("NOT_SET") = py::cast(ProxyReEncryptionMode::NOT_SET); m.attr("INDCPA") = py::cast(ProxyReEncryptionMode::INDCPA); m.attr("FIXED_NOISE_HRA") = py::cast(ProxyReEncryptionMode::FIXED_NOISE_HRA); m.attr("NOISE_FLOODING_HRA") = py::cast(ProxyReEncryptionMode::NOISE_FLOODING_HRA); - m.attr("DIVIDE_AND_ROUND_HRA") = py::cast(ProxyReEncryptionMode::DIVIDE_AND_ROUND_HRA); // MultipartyMode py::enum_(m, "MultipartyMode") @@ -1063,6 +1061,7 @@ void bind_encodings(py::module &m) .def("SetFormat", &PlaintextImpl::SetFormat, ptx_SetFormat_docs, py::arg("fmt")) + .def("GetCoefPackedValue", &PlaintextImpl::GetCoefPackedValue) .def("GetPackedValue", &PlaintextImpl::GetPackedValue) .def("GetCKKSPackedValue", &PlaintextImpl::GetCKKSPackedValue, ptx_GetCKKSPackedValue_docs) diff --git a/src/lib/binfhe_bindings.cpp b/src/lib/binfhe_bindings.cpp index 8c8fab8..f743673 100644 --- a/src/lib/binfhe_bindings.cpp +++ b/src/lib/binfhe_bindings.cpp @@ -160,7 +160,7 @@ void bind_binfhe_context(py::module &m) py::arg("set"), py::arg("method") = GINX) //void GenerateBinFHEContext(BINFHE_PARAMSET set, bool arbFunc, uint32_t logQ = 11, int64_t N = 0, BINFHE_METHOD method = GINX, bool timeOptimization = false) - .def("GenerateBinFHEContext", static_cast(&BinFHEContext::GenerateBinFHEContext), + .def("GenerateBinFHEContext", static_cast(&BinFHEContext::GenerateBinFHEContext), binfhe_GenerateBinFHEContext_docs, py::arg("set"), py::arg("arbFunc"),