English | 中文
PrimiHub is a platform that supports Multi-Party Computing(MPC), Federated Learning, Private set intersection (PSI), and Private Information Retrieval (PIR) features, and supports extensions of data source access, data consumption, access application, syntax, semantic and security protocols. For details, see PrimiHub core feature.
Run an Multi-Party Computing application in 5 minutes
two options you have to choose, Download the latest release version (released binary or source code)
- download binary (skip build step)latest release
- download redis
x86_64
aarch64 - build with source code build
Attention: the release binary is compiled on os ubuntu20.04
change to redis dir
./run_redis.sh
change dir which parallel with bazel-bin
waring !!!!!! if server is build by bazel build, before run script start_server.sh, comment the definition of PYTHONPATH
./start_server.sh
the server log will be record into log_node0, log_node1, log_node2 seperately
if all server run success, using cmd ps -ef |grep bin/node, you will see the following process
root 4915 1 0 3月13 ? 00:08:49 ./redis-server 127.0.0.1:7379
root 4172627 1 0 10:03 pts/6 00:00:00 ./bazel-bin/node --node_id=node0 --service_port=50050 --config=./config/node0.yaml
root 4172628 1 0 10:03 pts/6 00:00:00 ./bazel-bin/node --node_id=node1 --service_port=50051 --config=./config/node1.yaml
root 4172629 1 0 10:03 pts/6 00:00:00 ./bazel-bin/node --node_id=node2 --service_port=50052 --config=./config/node2.yaml
choose one of server which is used to submit task run the follwing cmd
./bazel-bin/cli --server="${SERVER_IP}:${SERVER_PORT}" --task_config_file="example/mpc_lr_task_conf.json"
or ./client_run.sh will execute all case
Install docker and docker-compose
Download the code and switch to the code root path
git clone https://github.com/primihub/primihub.git
cd primihub
Start three docker containers using docker-compose. The container includes: one simple bootstrap node, one redis, three nodes
docker-compose up -d
or, you could specific the container register and version, such as:
echo -e "REGISTRY=registry.cn-beijing.aliyuncs.com\nTAG=1.5.0" >> .env && docker-compose up -d
Check out the running docker container
docker-compose ps
NAME COMMAND SERVICE STATUS PORTS
primihub-node0 "/bin/bash -c './pri…" node0 running 0.0.0.0:6666->6666/tcp, 0.0.0.0:8050->50050/tcp
primihub-node1 "/bin/bash -c './pri…" node1 running 0.0.0.0:6667->6667/tcp, 0.0.0.0:8051->50051/tcp
primihub-node2 "/bin/bash -c './pri…" node2 running 0.0.0.0:6668->6668/tcp, 0.0.0.0:8052->50052/tcp
redis "docker-entrypoint.s…" redis running 0.0.0.0:6379->6379/tcp
simple_bootstrap_node "/app/simple-bootstr…" simple_bootstrap_node running 0.0.0.0:4001->4001/tcp
Let three nodes jointly perform a logistic regression task of multi-party secure computation (MPC)
docker run --network=host -it primihub/primihub-node:latest ./primihub-cli --server=127.0.0.1:8050
💡 The node response the task
You can request computing tasks from any node in the computing cluster
💡 Available task parameters
The following parameters can be specified through primihub-cli:
- Which node is requested to start the task.
- Which shared datasets are used.
- What kind of private computing tasks to do.
In this example, primihub-cli will use the default parameters to request an ABY3 tripartite logistic regression test task from node 0. For the parameters that can be specified by cli, please refer to Create task
To learn how to start from native applications and how to use PrimiHub features to implement more applications, see Advanced Usage
- For how to build, see Build
If you want to contribute to this project, feel free to create an issue at our Issue page (e.g., documentation, new idea and proposal).
Also, you can learn about our community PrimiHub Open Source Community Governance
This is an active open source project for everyone, and we are always open to everyone who want to use this system or contribute to it.
- Wechat Official Account: