Skip to content

Commit e69343d

Browse files
authored
Merge pull request #223 from openfheorg/dev
Update to v1.3.0.0
2 parents a9d90e2 + 4803708 commit e69343d

19 files changed

+1037
-467
lines changed

.github/workflows/manual.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
description: 'Compiler type'
1515
type: string
1616
required: true
17-
default: 'GLANG-14'
17+
default: 'GLANG-18'
1818
native_backend:
1919
description: 'Size of NativeInteger'
2020
type: string
@@ -34,10 +34,10 @@ on:
3434
description: 'Compiler type'
3535
type: choice
3636
options:
37-
- 'GCC-12'
38-
- 'CLANG-14'
37+
- 'GCC-14'
38+
- 'CLANG-18'
3939
required: true
40-
default: 'GLANG-14'
40+
default: 'GLANG-18'
4141
native_backend:
4242
description: 'Size of NativeInteger'
4343
type: choice

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ cmake_minimum_required (VERSION 3.5.1)
22

33
project (OpenFHE-Python)
44

5-
set(OPENFHE_PYTHON_VERSION_MAJOR 0)
6-
set(OPENFHE_PYTHON_VERSION_MINOR 8)
7-
set(OPENFHE_PYTHON_VERSION_PATCH 10)
8-
set(OPENFHE_PYTHON_VERSION ${OPENFHE_PYTHON_VERSION_MAJOR}.${OPENFHE_PYTHON_VERSION_MINOR}.${OPENFHE_PYTHON_VERSION_PATCH})
5+
set(OPENFHE_PYTHON_VERSION_MAJOR 1)
6+
set(OPENFHE_PYTHON_VERSION_MINOR 3)
7+
set(OPENFHE_PYTHON_VERSION_PATCH 0)
8+
set(OPENFHE_PYTHON_VERSION_TWEAK 0)
9+
set(OPENFHE_PYTHON_VERSION ${OPENFHE_PYTHON_VERSION_MAJOR}.${OPENFHE_PYTHON_VERSION_MINOR}.${OPENFHE_PYTHON_VERSION_PATCH}.${OPENFHE_PYTHON_VERSION_TWEAK})
910

1011
set(CMAKE_CXX_STANDARD 17)
1112
option( BUILD_STATIC "Set to ON to include static versions of the library" OFF)
@@ -14,7 +15,7 @@ if(APPLE)
1415
set(CMAKE_CXX_VISIBILITY_PRESET default)
1516
endif()
1617

17-
find_package(OpenFHE 1.2.2 REQUIRED)
18+
find_package(OpenFHE 1.3.0 REQUIRED)
1819
find_package(pybind11 REQUIRED)
1920

2021
# "CMAKE_INTERPROCEDURAL_OPTIMIZATION ON" (ON is the default value) causes link failure. see

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Please see [Instructions for the Docker setup](docker/README.md)
3535

3636
Before building, make sure you have the following dependencies installed:
3737

38-
- [OpenFHE 1.1.3+](https://github.com/openfheorg/openfhe-development) by following the instructions in [OpenFHE Documentation](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/installation.html)
38+
- [OpenFHE 1.3.0+](https://github.com/openfheorg/openfhe-development) by following the instructions in [OpenFHE Documentation](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/installation.html)
3939
- [Python 3.6+](https://www.python.org/)
4040
- [pybind11](https://pybind11.readthedocs.io/en/stable/installing.html)
4141

examples/pke/advanced-real-numbers-128.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def main():
383383
fast_rotation_demo1()
384384
fast_rotation_demo2()
385385
else:
386-
print("This demo only runs for 128-bit CKKS.\nIf you want to test it please reinstall the OpenFHE C++ with the flag -DNATIVE_INT=128, then reinstall OpenFHE-Python.")
386+
print("This demo only runs for 128-bit CKKS.\nIf you want to test it please reinstall the OpenFHE C++ with the flag -DNATIVE_SIZE=128, then reinstall OpenFHE-Python.")
387387

388388
if __name__ == "__main__":
389389
main()

src/include/bindings.h

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
//==================================================================================
12
// BSD 2-Clause License
2-
3-
// Copyright (c) 2023, OpenFHE
4-
3+
//
4+
// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
5+
//
56
// All rights reserved.
6-
7+
//
8+
// Author TPOC: [email protected]
9+
//
710
// Redistribution and use in source and binary forms, with or without
811
// modification, are permitted provided that the following conditions are met:
9-
12+
//
1013
// 1. Redistributions of source code must retain the above copyright notice, this
1114
// list of conditions and the following disclaimer.
12-
15+
//
1316
// 2. Redistributions in binary form must reproduce the above copyright notice,
1417
// this list of conditions and the following disclaimer in the documentation
1518
// and/or other materials provided with the distribution.
16-
19+
//
1720
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1821
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1922
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,9 +27,9 @@
2427
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2528
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2629
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27-
28-
#ifndef OPENFHE_BINDINGS_H
29-
#define OPENFHE_BINDINGS_H
30+
//==================================================================================
31+
#ifndef __BINDINGS_H__
32+
#define __BINDINGS_H__
3033

3134
#include <pybind11/pybind11.h>
3235

@@ -39,4 +42,5 @@ void bind_ciphertext(pybind11::module &m);
3942
void bind_serialization(pybind11::module &m);
4043
void bind_schemes(pybind11::module &m);
4144
void bind_sch_swch_params(pybind11::module &m);
42-
#endif // OPENFHE_BINDINGS_H
45+
46+
#endif // __BINDINGS_H__

src/include/binfhe/binfhecontext_wrapper.h

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
//==================================================================================
12
// BSD 2-Clause License
2-
3-
// Copyright (c) 2023, OpenFHE
4-
3+
//
4+
// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
5+
//
56
// All rights reserved.
6-
7+
//
8+
// Author TPOC: [email protected]
9+
//
710
// Redistribution and use in source and binary forms, with or without
811
// modification, are permitted provided that the following conditions are met:
9-
12+
//
1013
// 1. Redistributions of source code must retain the above copyright notice, this
1114
// list of conditions and the following disclaimer.
12-
15+
//
1316
// 2. Redistributions in binary form must reproduce the above copyright notice,
1417
// this list of conditions and the following disclaimer in the documentation
1518
// and/or other materials provided with the distribution.
16-
19+
//
1720
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1821
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1922
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,9 +27,9 @@
2427
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2528
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2629
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27-
28-
#ifndef BINFHE_CRYPTOCONTEXT_BINDINGS_H
29-
#define BINFHE_CRYPTOCONTEXT_BINDINGS_H
30+
//==================================================================================
31+
#ifndef __BINFHECONTEXT_WRAPPER_H__
32+
#define __BINFHECONTEXT_WRAPPER_H__
3033

3134
#include <pybind11/pybind11.h>
3235
#include <pybind11/stl.h>
@@ -66,4 +69,5 @@ NativeInteger StaticFunction(NativeInteger m, NativeInteger p);
6669
// extern py::function static_f;
6770

6871
LWECiphertext EvalFuncWrapper(BinFHEContext &self, ConstLWECiphertext &ct, const std::vector<uint64_t> &LUT);
69-
#endif // BINFHE_CRYPTOCONTEXT_BINDINGS_H
72+
73+
#endif // __BINFHECONTEXT_WRAPPER_H__

src/include/binfhe_bindings.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
//==================================================================================
12
// BSD 2-Clause License
2-
3-
// Copyright (c) 2023, OpenFHE
4-
3+
//
4+
// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
5+
//
56
// All rights reserved.
6-
7+
//
8+
// Author TPOC: [email protected]
9+
//
710
// Redistribution and use in source and binary forms, with or without
811
// modification, are permitted provided that the following conditions are met:
9-
12+
//
1013
// 1. Redistributions of source code must retain the above copyright notice, this
1114
// list of conditions and the following disclaimer.
12-
15+
//
1316
// 2. Redistributions in binary form must reproduce the above copyright notice,
1417
// this list of conditions and the following disclaimer in the documentation
1518
// and/or other materials provided with the distribution.
16-
19+
//
1720
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1821
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1922
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,14 +27,14 @@
2427
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2528
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2629
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27-
28-
#ifndef BINFHE_BINDINGS_H
29-
#define BINFHE_BINDINGS_H
30+
//==================================================================================
31+
#ifndef __BINFHE_BINDINGS_H__
32+
#define __BINFHE_BINDINGS_H__
3033

3134
#include <pybind11/pybind11.h>
3235

3336
void bind_binfhe_enums(pybind11::module &m);
3437
void bind_binfhe_context(pybind11::module &m);
3538
void bind_binfhe_keys(pybind11::module &m);
3639
void bind_binfhe_ciphertext(pybind11::module &m);
37-
#endif // BINFHE_BINDINGS_H
40+
#endif // __BINFHE_BINDINGS_H__

src/include/docstrings/binfhecontext_docs.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
//==================================================================================
12
// BSD 2-Clause License
2-
3-
// Copyright (c) 2023, OpenFHE
4-
3+
//
4+
// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
5+
//
56
// All rights reserved.
6-
7+
//
8+
// Author TPOC: [email protected]
9+
//
710
// Redistribution and use in source and binary forms, with or without
811
// modification, are permitted provided that the following conditions are met:
9-
12+
//
1013
// 1. Redistributions of source code must retain the above copyright notice, this
1114
// list of conditions and the following disclaimer.
12-
15+
//
1316
// 2. Redistributions in binary form must reproduce the above copyright notice,
1417
// this list of conditions and the following disclaimer in the documentation
1518
// and/or other materials provided with the distribution.
16-
19+
//
1720
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1821
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1922
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,9 +27,9 @@
2427
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2528
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2629
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27-
28-
#ifndef BINFHECONTEXT_DOCSTRINGS_H
29-
#define BINFHECONTEXT_DOCSTRINGS_H
30+
//==================================================================================
31+
#ifndef __BINFHECONTEXT_DOCS_H
32+
#define __BINFHECONTEXT_DOCS_H
3033

3134
// GenerateBinFHEContext
3235
const char* binfhe_GenerateBinFHEContext_parset_docs = R"pbdoc(
@@ -199,4 +202,4 @@ const char* binfhe_SerializedObjectName_docs = R"pbdoc(
199202
:return: object name
200203
:rtype: std::string
201204
)pbdoc";
202-
#endif // BINFHECONTEXT_DOCSTRINGS_H
205+
#endif // __BINFHECONTEXT_DOCS_H

src/include/docstrings/ciphertext_docs.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
//==================================================================================
12
// BSD 2-Clause License
2-
3-
// Copyright (c) 2023, OpenFHE
4-
3+
//
4+
// Copyright (c) 2023-2025, Duality Technologies Inc. and other contributors
5+
//
56
// All rights reserved.
6-
7+
//
8+
// Author TPOC: [email protected]
9+
//
710
// Redistribution and use in source and binary forms, with or without
811
// modification, are permitted provided that the following conditions are met:
9-
12+
//
1013
// 1. Redistributions of source code must retain the above copyright notice, this
1114
// list of conditions and the following disclaimer.
12-
15+
//
1316
// 2. Redistributions in binary form must reproduce the above copyright notice,
1417
// this list of conditions and the following disclaimer in the documentation
1518
// and/or other materials provided with the distribution.
16-
19+
//
1720
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1821
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1922
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,9 +27,9 @@
2427
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2528
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2629
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27-
28-
#ifndef CIPHERTEXT_DOCSTRINGS_H
29-
#define CIPHERTEXT_DOCSTRINGS_H
30+
//==================================================================================
31+
#ifndef __CIPHERTEXT_DOCS_H__
32+
#define __CIPHERTEXT_DOCS_H__
3033

3134
// GetLevel
3235
const char* ctx_GetLevel_docs = R"pbdoc(
@@ -58,4 +61,4 @@ const char* cc_RemoveElement_docs = R"pbdoc(
5861
:param index: The index of the element to remove.
5962
:type index: int
6063
)pbdoc";
61-
#endif // CIPHERTEXT_DOCSTRINGS_H
64+
#endif // __CIPHERTEXT_DOCS_H__

0 commit comments

Comments
 (0)