SyMPC
A SMPC companion library for Syft
Install / Use
/learn @OpenMined/SyMPCREADME
.. raw:: html
<h1 align="center">
<br>
<a href="http://duet.openmined.org/"><img src="https://github.com/OpenMined/design-assets/raw/master/logos/OM/mark-primary-trans.png" alt="SyMPC" width="200"></a>
<br>
SyMPC
</h1>
<h4 align="center">
A library that extends PySyft with SMPC support
<br>
<br>
</h4>
<a href=""><img src="https://github.com/OpenMined/SyMPC/actions/workflows/tests.yml/badge.svg" /></a>
<a href="https://openmined.slack.com/messages/support"><img src="https://img.shields.io/badge/chat-on%20slack-7A5979.svg" /></a>
<a href="https://codecov.io/gh/OpenMined/SyMPC"><img src="https://codecov.io/gh/OpenMined/SyMPC/branch/main/graph/badge.svg?token=TS2rZyJRlo" /></a>
SyMPC /ˈsɪmpəθi/ is a library which extends PySyft <https://github.com/OpenMined/PySyft>_ ≥0.3 with SMPC support. It allows computing over encrypted data, and to train and evaluate neural networks.
Installation ############
SyMPC is a companion library for PySyft. Therefore, we will need to install PySyft among other dependencies. We recommend using a virtual environment like conda.
.. code:: bash
$ conda create -n sympc python=3.9
$ conda activate sympc
$ pip install -r requirements.txt
$ pip install .
You can also run SyMPC using docker by running the following commands.
.. code:: bash
$ docker build -t sympc -f docker-images/Dockerfile . #builds image named sympc
$ docker run -i -t sympc #runs the container
Getting Started ###############
If we want to start learning how to use SyMPC we can go to the examples folder and execute the introduction.ipynb.
.. code:: bash
$ conda activate sympc
$ pip install jupyter
$ jupyter notebook examples/introduction.ipynb
If we decided to use docker, we would need to run the image and publish the jupyter notebook port
.. code:: bash
$ sudo docker run -i -t -p 8888:8888 sympc
$ jupyter notebook examples/introduction.ipynb --allow-root --ip=0.0.0.0
Finally, we would need to copy the url shown in the docker to our browser.
Supported protocols ###################
SyMPC supports the following protocols.
.. table::
+--------------+------------------------+-----------------------+
| **Protocol** | **Security Guarantee** | **Number of Parties** |
+==============+========================+=======================+
| ABY3 | Semi-honest, Malicious | 3 |
+--------------+------------------------+-----------------------+
| Falcon | Semi-honest, Malicious | 3 |
+--------------+------------------------+-----------------------+
| FSS | Semi-honest | 2 |
+--------------+------------------------+-----------------------+
| SPDZ | Semi-honest | 2+ |
+--------------+------------------------+-----------------------+
We can see other interesting information about the supported operations and Neural
Network layers in Supported operations and Neural Network layers <SUPPORTED_OPS.rst>_.
Contributing ############
We are open to collaboration! If you want to start contributing you only need to:
- Check the
contributing guidelines <https://github.com/OpenMined/SyMPC/blob/main/CONTRIBUTING.md>_. - Search for an issue in which you would like to work. Issues for newcomers are labeled with good first issue.
- Create a PR solving the issue.
License #######
This project is licensed under the MIT License <https://github.com/OpenMined/SyMPC/blob/main/LICENSE.txt>_.
Disclaimer ##########
This library should not be used in a production environment because it is still a prototype.
Related Skills
claude-opus-4-5-migration
99.2kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
344.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
50.5k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.7kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
