Getting Started

PETAce-Solo

Requirements

SystemToolchain
LinuxClang++ (>= 5.0) or GNU G++ (>= 5.5), CMake (>= 3.15)
Required dependencyTested versionUse
OpenSSL1.1.1Cryptographic primitives
GMP6.3.0Bignumer operations for GMP-based Paillier
Optional dependencyTested versionUse
GoogleTest1.12.1For running tests
GoogleBenchmark1.6.1For running benchmarks
Intel Paillier Cryptosystem Library495beaad1f6e70741f2b5cf1279cb919fd66d894For partially homomorphic encryption

Building PETAce-Solo

We assume that all commands presented below are executed in the root directory of PETAce-Solo.

To build PETAce-Solo library (optionally with test, benchmark, and example):

cmake -S . -B build -DSOLO_BUILD_TEST=ON -DSOLO_BUILD_BENCH=ON -DSOLO_BUILD_EXAMPLE=ON
cmake --build build

Output binaries can be found in build/lib/ and build/bin/ directories.

Compile OptionsValuesDefaultDescription
CMAKE_BUILD_TYPERelease/DebugReleaseDebug mode decreases run-time performance.
SOLO_BUILD_SHARED_LIBSON/OFFOFFBuild a shared library if set to ON.
SOLO_BUILD_BENCHON/OFFONBuild C++ benchmark if set to ON.
SOLO_BUILD_EXAMPLEON/OFFONBuild C++ example if set to ON.
SOLO_BUILD_TESTON/OFFONBuild C++ test if set to ON.
SOLO_BUILD_DEPSON/OFFONDownload and build unmet dependencies if set to ON.
SOLO_USE_IPCLON/OFFOFFBUILD IPCL-based PHE if set to ON, GMP-based PHE if set to off

Adding Partially Homomorphic Encryption

By default, the Paillier cryptosystem is a generic implementation that uses the GMP library. For power users who seek extreme performance on supported processors, we provide the option to switch to the IPCL-based implementation. To use the IPCL-based Paillier, follow instructions of Intel Paillier Cryptosystem Library and install it to ${IPCL_INSTALL_DIR}. We recommend the commit 495beaad1f6e70741f2b5cf1279cb919fd66d894 instead of v2.0.0. Build PETAce-Solo library with extra configuration:

cmake -S . -B build -DSOLO_USE_IPCL=ON -DIPCL_DIR=${IPCL_INSTALL_DIR}/lib/cmake/ipcl-2.0.0