TenSEAL 开源项目教程
TenSEALA library for doing homomorphic encryption operations on tensors项目地址:https://gitcode.com/gh_mirrors/te/TenSEAL
1. 项目的目录结构及介绍
TenSEAL 是一个用于同态加密操作的 Python 库。以下是其主要目录结构的介绍:
/tenseal/
: 包含 TenSEAL 库的核心实现代码。/tenseal/encoders/
: 包含各种编码器的实现。/tenseal/context/
: 包含上下文管理的实现。/tenseal/sealapi/
: 包含与 Microsoft SEAL 库的接口。
/examples/
: 包含使用 TenSEAL 的示例代码。/tests/
: 包含测试代码,用于验证库的正确性。/docs/
: 包含项目的文档。/scripts/
: 包含一些辅助脚本。
2. 项目的启动文件介绍
TenSEAL 的启动文件主要是 setup.py
,它负责项目的安装和配置。以下是 setup.py
的主要内容:
from setuptools import setup, find_packages
setup(
name="TenSEAL",
version="0.3.0",
packages=find_packages(),
install_requires=[
"numpy",
"pybind11",
"seal",
],
author="OpenMined",
author_email="info@openmined.org",
description="A library for homomorphic encryption operations on tensors",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/OpenMined/TenSEAL",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
)
3. 项目的配置文件介绍
TenSEAL 的配置文件主要是 pyproject.toml
,它定义了项目的构建系统和依赖项。以下是 pyproject.toml
的主要内容:
[build-system]
requires = ["setuptools", "wheel", "pybind11"]
build-backend = "setuptools.build_meta"
[project]
name = "TenSEAL"
version = "0.3.0"
description = "A library for homomorphic encryption operations on tensors"
authors = [
{ name="OpenMined", email="info@openmined.org" }
]
dependencies = [
"numpy",
"pybind11",
"seal"
]
这些配置文件确保了 TenSEAL 库的正确安装和运行。
TenSEALA library for doing homomorphic encryption operations on tensors项目地址:https://gitcode.com/gh_mirrors/te/TenSEAL