Getting Started
DPCA-PSI
Requirements
- Linux
- CMake (>=3.15)
- GNU G++ (>=5.5) or Clang++ (>= 5.0)
- Python 3
Building DPCA-PSI
DPCA-PSI depends on Intel Paillier Cryptosystem Library (IPCL). We choose IPCL because it is certified for ISO compliance. Unfortunately, IPCL introduces a number of issues. Here we provide the following scripts to help users install IPCL (without sudo).
First, install NASM with apt install nasm, or build and install NASM from source code downloaded from NASM’s official page. Assume that you are working in the root directory of NASM source code.
./configure
make -j
make install
Second, build and install IPCL using the following scripts.
Assume that IPCL is cloned into the directory ${IPCL}
and will be installed to the directory ${IPCL_INSTALL_DIR}
.
cmake -B ${IPCL}/build -S ${IPCL} -DCMAKE_INSTALL_PREFIX=${IPCL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Release -DIPCL_TEST=OFF -DIPCL_BENCHMARK=OFF
cmake --build ${IPCL}/build -j
cmake --build ${IPCL}/build --target install
Third, build JSON for Modern C++ (JSON) using the following scripts.
Assume that JSON is cloned into the directory ${JSON}
.
cmake -B ${JSON}/build -S ${JSON}
cmake --build ${JSON}/build -j
At last, build DPCA-PSI using the following scripts.
Assume that DPCA-PSI is cloned into the directory ${DPCA-PSI}
.
cmake -B ${DPCA-PSI}/build -S ${DPCA-PSI} -DCMAKE_BUILD_TYPE=Release -DIPCL_DIR=${IPCL_INSTALL_DIR}/lib/cmake/ipcl-2.0.0 -Dnlohmann_json_DIR=${JSON}/build
cmake --build ${DPCA-PSI}/build -j
Output binaries can be found in ${DPCA-PSI}/build/lib/
and ${DPCA-PSI}/build/bin/
directories.
Compile Options | Values | Default | Description |
---|---|---|---|
CMAKE_BUILD_TYPE |
Release/Debug | Release | The build type. |
DPCA_PSI_BUILD_SHARED_LIBS |
ON/OFF | OFF | Build a shared library if set to ON. |
DPCA_PSI_BUILD_EXAMPLE |
ON/OFF | ON | Build C++ example if set to ON. |
DPCA_PSI_BUILD_TEST |
ON/OFF | ON | Build C++ test if set to ON. |
DPCA_PSI_BUILD_DEPS |
ON/OFF | ON | Download and build unmet dependencies if set to ON. |
DPCA-PSI further depends on OpenSSL, gflags, Google Logging, and Google Test.
The build system will try to find these dependencies if they exist or will otherwise automatically download and build them.
Running the DPCA-PSI protocol
Here we give a simple example to run our protocol. Please refer to Example running DPCA-PSI for more details.
To run Party A
cd ${DPCA-PSI}/build/example/scripts
bash sender_test.sh
To run Party B
cd ${DPCA-PSI}/build/example/scripts
bash receiver_test.sh
PPAM
Requirements
- Linux
- CMake (>=3.15)
- GNU G++ (>=5.5) or Clang++ (>= 5.0)
- Python 3
Building PPAM
PPAM depends on DPCA-PSI. You need to build the dependencies of DPCA-PSI first, and then build PPAM.
First, install NASM with apt install nasm
, or build and install NASM from source code downloaded from NASM’s official page. Assume that you are working in the root directory of NASM source code.
./configure
make -j
make install
Second, build and install IPCL using the following scripts.
Assume that IPCL is cloned into the directory ${IPCL}
and will be installed to the directory ${IPCL_INSTALL_DIR}
.
cmake -B ${IPCL}/build -S ${IPCL} -DCMAKE_INSTALL_PREFIX=${IPCL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Release -DIPCL_TEST=OFF -DIPCL_BENCHMARK=OFF
cmake --build ${IPCL}/build -j
cmake --build ${IPCL}/build --target install
Third, build JSON for Modern C++ (JSON) using the following scripts.
Assume that JSON is cloned into the directory ${JSON}
.
cmake -B ${JSON}/build -S ${JSON}
cmake --build ${JSON}/build -j
At last, build PPAM using the following scripts.
Assume that PPAM is cloned into the directory ${PPAM}
.
cmake -B ${PPAM}/build -S ${PPAM} -DCMAKE_BUILD_TYPE=Release -DIPCL_DIR=${IPCL_INSTALL_DIR}/lib/cmake/ipcl-2.0.0 -Dnlohmann_json_DIR=${JSON}/build
cmake --build ${PPAM}/build -j
Output binaries can be found in ${PPAM}/build/lib/
and ${PPAM}/build/bin/
directories.
Compile Options | Values | Default | Description |
---|---|---|---|
CMAKE_BUILD_TYPE |
Release/Debug | Release | The build type. |
PPAM_BUILD_SHARED_LIBS |
ON/OFF | OFF | Build a shared library if set to ON. |
PPAM_BUILD_EXAMPLE |
ON/OFF | ON | Build C++ example if set to ON. |
PPAM_BUILD_TEST |
ON/OFF | ON | Build C++ test if set to ON. |
PPAM_BUILD_DEPS |
ON/OFF | ON | Download and build unmet dependencies if set to ON. |
PPAM further depends on OpenSSL, Eigen, gflags, Google Logging, and Google Test. The build system will try to find these dependencies if they exist or will otherwise automatically download and build them.
Running the PPAM protocol
Here we give a simple example to run our protocol. Please refer to Example running PPAM for more details.
To run Party A
cd ${PPAM}/build/example/scripts
bash sender_test.sh
To run Party B
cd ${PPAM}/build/example/scripts
bash receiver_test.sh
MPC-DualDP
Requirements
- Linux
- CMake (>=3.15)
- GNU G++ (>=5.5) or Clang++ (>= 5.0)
- Python 3
Building MPC-DualDP
MPC-DualDP depends on PPAM. You need to build the dependencies of PPAM first, and then build MPC-DualDP.
First, install NASM with apt install nasm
, or build and install NASM from source code downloaded from NASM’s official page. Assume that you are working in the root directory of NASM source code.
./configure
make -j
make install
Second, build and install IPCL using the following scripts.
Assume that IPCL is cloned into the directory ${IPCL}
and will be installed to the directory ${IPCL_INSTALL_DIR}
.
cmake -B ${IPCL}/build -S ${IPCL} -DCMAKE_INSTALL_PREFIX=${IPCL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Release -DIPCL_TEST=OFF -DIPCL_BENCHMARK=OFF
cmake --build ${IPCL}/build -j
cmake --build ${IPCL}/build --target install
Third, build JSON for Modern C++ (JSON) using the following scripts.
Assume that JSON is cloned into the directory ${JSON}
.
cmake -B ${JSON}/build -S ${JSON}
cmake --build ${JSON}/build -j
At last, build MPC-DualDP using the following scripts.
Assume that MPC-DualDP is cloned into the directory ${MPC-DualDP}
.
cmake -B ${MPC-DualDP}/build -S ${MPC-DualDP} -DCMAKE_BUILD_TYPE=Release -DIPCL_DIR=${IPCL_INSTALL_DIR}/lib/cmake/ipcl-2.0.0 -Dnlohmann_json_DIR=${JSON}/build
cmake --build ${MPC-DualDP}/build -j
Output binaries can be found in ${MPC-DualDP}/build/lib/
and ${MPC-DualDP}/build/bin/
directories.
Compile Options | Values | Default | Description |
---|---|---|---|
CMAKE_BUILD_TYPE |
Release/Debug | Release | The build type. |
MPC-DUALDP_BUILD_SHARED_LIBS |
ON/OFF | OFF | Build a shared library if set to ON. |
MPC-DUALDP_BUILD_EXAMPLE |
ON/OFF | ON | Build C++ example if set to ON. |
MPC-DUALDP_BUILD_TEST |
ON/OFF | ON | Build C++ test if set to ON. |
MPC-DUALDP_BUILD_DEPS |
ON/OFF | ON | Download and build unmet dependencies if set to ON. |
MPC-DualDP further depends on Google Test. The build system will try to find these dependencies if they exist or will otherwise automatically download and build them.
Running the MPC-DualDP protocol
Here we give a simple example to run our protocol.
To run Party A
cd ${MPC-DualDP}/build/bin
./mpc_dualdp_example 127.0.0.1 8899 127.0.0.1 8890 0
To run Party B
cd ${MPC-DualDP}/build/bin
./mpc_dualdp_example 127.0.0.1 8890 127.0.0.1 8899 1