Getting Started

PETAce-Duet

Requirements

SystemToolchain
LinuxClang++ (>= 5.0) or GNU G++ (>= 5.5), CMake (>= 3.15)
Required dependencyTested versionUse
Eigen3.4.0Matrix and vector templates
Intel Paillier Cryptosystem Library (IPCL)2.0.0Paillier Encryption
Microsoft SEAL4.1.0Fully homomorphic encryption
PETAce-Solo0.4.0Cryptography primitives
PETAce-Network0.4.0Network communication protocols
PETAce-Verse0.4.0Primitive cryptographic protocols
Optional dependencyTested versionUse
GoogleTest1.12.1For running tests
Google Logging0.4.0For running benchmarks
TCLAP1.2.2For running examples and benchmarks

Building PETAce-Duet

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

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

cmake -S . -B build -DDUET_BUILD_TEST=ON -DDUET_BUILD_BENCH=ON -DDUET_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.
DUET_BUILD_SHARED_LIBSON/OFFOFFBuild a shared library if set to ON.
DUET_BUILD_BENCHON/OFFONBuild C++ benchmark if set to ON.
DUET_BUILD_EXAMPLEON/OFFONBuild C++ example if set to ON.
DUET_BUILD_TESTON/OFFONBuild C++ test if set to ON.
DUET_BUILD_DEPSON/OFFONDownload and build unmet dependencies if set to ON.

For more compilation options, such as enabling IPCL and network agents, please refer to PETAce-Solo and PETAce-Network.

We have prepared three code examples to show you how to use PETAce-Duet. You can find more details in Duet Examples.

To run c++ examples, execute the following in commands in separate terminal sessions.

./build/bin/duet_example -p 0
./build/bin/duet_example -p 1

You can also use ./build/bin/duet_example -h to learn more details.

We have also prepared a series of performance test cases for PETAce-Duet.

To run the benchmark, execute the following in commands in separate terminal sessions.

./build/bin/duet_bench -p 0 --log_path ./duet0.log
./build/bin/duet_bench -p 1 --log_path ./duet1.log

You can also use ./build/bin/duet_bench -h to learn more details.