Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Private Decision Tree Evaluation (PDTE) Protocols

By Ágnes Kiss (ENCRYPTO, TU Darmstadt), Masoud Naderpour (University of Helsinki), Jian Liu (University of California, Berkeley), N. Asokan (Aalto University) and Thomas Schneider (ENCRYPTO, TU Darmstadt) in PoPETs'19(2). Paper available here


Our implementation for private decision tree evaluation protocols includes the protocols HHH, HGH, GGH, GGG and HGG (it can also be used to benchmark the last and most inefficient protocol HHG). The implementation of (SelH+)CompH and PathH is based on the mcl library ( that implements efficient lifted ElGamal encryption over elliptic curves, more specifically on the XCMP protocol implementation which implements the DGK comparison protocol ( The implementation of SelH, SelG, CompG and PathG are based on the ABY framework ( which provides an efficient implementation of Yao's garbled circuit protocol as well as of the Paillier homomorphic encryption scheme.

This code is provided as a experimental implementation for testing purposes and should not be used in a productive environment. We cannot guarantee security and correctness.


The requirements are the same as that of and

PDTE Implementation

  1. Clone a copy of the main PDTE git repository by running:
git clone --recursive git://
  1. Enter the UC directory: cd PDTE

(SelH+)CompH and PathH Implementation

  1. Clone/download the XCMP repository in the PDTE folder
  2. Place/replace the files from XCMP_files into the respective location in the XCMP folder
  3. Add the following lines at the enf of XCMP/benchmark_gt/CMakeLists.txt:
add_executable(hhh hhh.cpp)
target_link_libraries(hhh boost_system pthread ${ECC_LIB})
  1. Run the following commands:
cd benchmark_gt
mkdir build & cd build
cmake .. -DCMAKE_BUILD_TYPE=Release & make
  1. In two separate terminals, run ./hhh 0 and ./hhh 1 for the server and client applications. You can configure the DT and PROT variables in the beginning of the file benchmark_dt/hhh.cpp for running different protocol parts and decision trees.

SelG, SelH, CompG and PathG Implementation

  1. Clone/download the ABY repository
  2. Place the dectree folder from ABY_example in ABY/src/examples and add the line

in ABY/src/examples/CMakeLists.txt. 10. Add the following line in ABY/src/abycore/sharing/yaoserversharing.h in line 74:

CBitVector get_R(){ return m_vR;}
  1. Add the following lines in ABY/src/abycore/circuit/booleancircuits.h in line 474:
BYTE* GetEvaluatedKey(uint32_t gateid) { return m_vGates[gateid].gs.yval; };
BYTE* GetServerRandomKey(uint32_t gateid) {return m_vGates[gateid].gs.yinput.outKey; };
BYTE* GetPi(uint32_t gateid) {return m_vGates[gateid].gs.yinput.pi; };
  1. Build ABY with the examples as indicated at


Private Decision Tree Evaluation protocols







No releases published


No packages published