This is a high level overview of how the repository is laid out. Some major folders are listed below:
- bazel/: Configuration for SPU's use of Bazel.
- psi/: Our multi-key circuit-based private set intersection protocol, built on top of PSI's RR22 implementation
- libspu/: Core C++ implementations of SPU.
- core/: Basic data structures used in SPU.
- mpc/: Various mpc protocols. This folder defines the standard interface different mpc protocols need to conform.
We prefer a Linux build. The following build has been tested on Ubuntu 22.04.
# set TARGETPLATFORM='linux/arm64' if ARM CPU is used.
# Update dependencies
apt update \
&& apt upgrade -y \
&& apt install -y gcc-11 g++-11 libasan6 \
git wget curl unzip autoconf make lld-15 \
cmake ninja-build vim-common libgl1 libglib2.0-0 \
&& apt clean \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \
&& update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-15 100
# clang is required on arm64 platform
if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then apt install -y clang-15 \
&& apt clean \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100 \
; fi
# amd64 is only reqiured on amd64 platform
if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then apt install -y nasm ; fi
# install conda
if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then CONDA_ARCH=aarch64 ; else CONDA_ARCH=x86_64 ; fi \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-py310_24.3.0-0-Linux-$CONDA_ARCH.sh \
&& bash Miniconda3-py310_24.3.0-0-Linux-$CONDA_ARCH.sh -b \
&& rm -f Miniconda3-py310_24.3.0-0-Linux-$CONDA_ARCH.sh \
&& /root/miniconda3/bin/conda init
# Add conda to path
export PATH="/root/miniconda3/bin:${PATH}"
# install bazel
if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then BAZEL_ARCH=arm64 ; else BAZEL_ARCH=amd64 ; fi \
&& wget https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-linux-$BAZEL_ARCH \
&& mv bazelisk-linux-$BAZEL_ARCH /usr/bin/bazel \
&& chmod +x /usr/bin/bazelbazel run -c opt -- psi:cpsi_test --gtest_filter=PSI/CPSITest.MultipleKeys/Server131072Client1024Payload1It might take some times to fetch the dependencies.
This repo is built from the secretflow framework.