Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@
path = SEAL
url = https://github.com/microsoft/SEAL.git
branch = main
[submodule "pybind11"]
path = pybind11
url = https://github.com/pybind/pybind11.git
branch = stable
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Microsoft SEAL For Python

This is a python binding for the Microsoft SEAL library.

Microsoft [**SEAL**](https://github.com/microsoft/SEAL) is an easy-to-use open-source ([MIT licensed](https://github.com/microsoft/SEAL/blob/master/LICENSE)) homomorphic encryption library developed by the Cryptography Research group at Microsoft.

[**pybind11**](https://github.com/pybind/pybind11) is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code.

This is a python binding for the Microsoft SEAL library.

[![Supported Versions](https://img.shields.io/pypi/pyversions/SEAL-Python.svg)](https://github.com/Huelse/SEAL-Python)


Expand Down Expand Up @@ -35,6 +35,16 @@ python -m pip install seal-python

## Build

On macOS, use the same deployment target for both the SEAL static library and the Python extension to avoid linker warnings about mismatched macOS versions:

```shell
export MACOSX_DEPLOYMENT_TARGET=$(python3 - <<'PY'
import sysconfig
print(sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET") or "15.0")
PY
)
```

* ### Linux

Recommend: Clang++ (>= 10.0) or GNU G++ (>= 9.4), CMake (>= 3.16)
Expand All @@ -50,14 +60,16 @@ python -m pip install seal-python
# Install dependencies
pip3 install numpy pybind11

# Init the SEAL and pybind11
# Pull the SEAL
git submodule update --init --recursive
# Get the newest repositories (dev only)
# git submodule update --remote

# Build the SEAL lib without the msgsl zlib and zstandard compression
cd SEAL
cmake -S . -B build -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF
# macOS:
cmake -S . -B build -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
cmake --build build
cd ..

Expand All @@ -81,8 +93,8 @@ python -m pip install seal-python

```shell
# Run in "x64 Native Tools Command Prompt for VS" command prompt
cmake -S . -B build -G Ninja -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF
cmake --build build
cmake -S . -B build -G Ninja -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF
cmake --build build --config Release

# Build
pip install numpy pybind11
Expand Down
1 change: 0 additions & 1 deletion pybind11
Submodule pybind11 deleted from 04cfb4
Loading
Loading