Просмотр исходного кода

Bind EvalAddMany and minor disclaimer correction

Dmitriy Suponitskiy 10 месяцев назад
Родитель
Сommit
0ea3e6bd85

+ 1 - 1
src/include/bindings.h

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //

+ 11 - 8
src/include/binfhe/binfhecontext_wrapper.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __BINFHECONTEXT_WRAPPER_H__
 #define __BINFHECONTEXT_WRAPPER_H__
 

+ 11 - 8
src/include/binfhe_bindings.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __BINFHE_BINDINGS_H__
 #define __BINFHE_BINDINGS_H__
 

+ 11 - 8
src/include/docstrings/binfhecontext_docs.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __BINFHECONTEXT_DOCS_H
 #define __BINFHECONTEXT_DOCS_H
 

+ 11 - 8
src/include/docstrings/ciphertext_docs.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __CIPHERTEXT_DOCS_H__
 #define __CIPHERTEXT_DOCS_H__
 

+ 11 - 8
src/include/docstrings/cryptocontext_docs.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __CRYPTOCONTEXT_DOCS_H__
 #define __CRYPTOCONTEXT_DOCS_H__
 

+ 11 - 8
src/include/docstrings/cryptoparameters_docs.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __CRYPTOPARAMETERS_DOCS_H__
 #define __CRYPTOPARAMETERS_DOCS_H__
 

+ 11 - 8
src/include/docstrings/plaintext_docs.h

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #ifndef __PLAINTEXT_DOCS_H__
 #define __PLAINTEXT_DOCS_H__
 

+ 1 - 1
src/include/pke/cryptocontext_wrapper.h

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //

+ 1 - 1
src/include/pke/serialization.h

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //

+ 3 - 1
src/lib/bindings.cpp

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //
@@ -772,6 +772,8 @@ void bind_crypto_context(py::module &m)
             py::arg("towersLeft"))
         .def("EvalMultMany", &CryptoContextImpl<DCRTPoly>::EvalMultMany,
             py::arg("ciphertextVec"))
+        .def("EvalAddMany", &CryptoContextImpl<DCRTPoly>::EvalAddManyInPlace,
+            py::arg("ciphertextVec"))
         .def("EvalAddManyInPlace", &CryptoContextImpl<DCRTPoly>::EvalAddManyInPlace,
             py::arg("ciphertextVec"))
         .def("FindAutomorphismIndex", &CryptoContextImpl<DCRTPoly>::FindAutomorphismIndex,

+ 11 - 8
src/lib/binfhe/binfhecontext_wrapper.cpp

@@ -1,19 +1,22 @@
+//==================================================================================
 // BSD 2-Clause License
-
-// Copyright (c) 2023, OpenFHE
-
+//
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
+//
 // All rights reserved.
-
+//
+// Author TPOC: contact@openfhe.org
+//
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
-
+//
 // 1. Redistributions of source code must retain the above copyright notice, this
 //    list of conditions and the following disclaimer.
-
+//
 // 2. Redistributions in binary form must reproduce the above copyright notice,
 //    this list of conditions and the following disclaimer in the documentation
 //    and/or other materials provided with the distribution.
-
+//
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,7 +27,7 @@
 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+//==================================================================================
 #include <pybind11/pybind11.h>
 #include <pybind11/stl.h>
 #include <openfhe.h>

+ 1 - 1
src/lib/binfhe_bindings.cpp

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //

+ 1 - 1
src/lib/pke/cryptocontext_wrapper.cpp

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //

+ 1 - 1
src/lib/pke/serialization.cpp

@@ -1,7 +1,7 @@
 //==================================================================================
 // BSD 2-Clause License
 //
-// Copyright (c) 2014-2025, NJIT, Duality Technologies Inc. and other contributors
+// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
 //
 // All rights reserved.
 //