ENCRYPTO, TU Darmstadt), Alejandro Molina (AI & ML Lab, TU Darmstadt), Christian Weinert (ENCRYPTO, TU Darmstadt), Thomas Schneider (ENCRYPTO, TU Darmstadt), and Kristian Kersting (AI & ML Lab, TU Darmstadt).by Amos Treiber (
In this repository, we provide the code for CryptoSPN, an extension of SPFlow to allow for privacy-preserving SPN inference.
This code provides an interface between SPFlow and the ABY secure computation framework. Details can be found in our paper. Essentially, it works like SPFlow's C++ functionality, but with an automatic compilation of the exported ABY C++ files into private executables. This is an experimental research prototype to evaluate benchmarks and not intended for real-world deployment. We make no guarantees about its security and correctness.
- Install SPFlow and download and build ABY.
- Enter the paths to your CryptoSPN and ABY instances in
- In your CryptoSPN directory, add executable permission to the compile script:
chmod +x CryptoSPN/compiling/compile.sh
spn_to_aby_file(spn)on a SPFlow
spnto create an ABY
.cppfile. CryptoSPN also provides an interface to automatically compile your SPN into an ABY executable by calling
spn_to_aby_exec. You can specify filenames, precision, and whether to obliviously select client RVs via an oblivious selection network.
- The created executable can be called like, e.g.,
./example -r 0 -a 127.0.0.1 -b 64 -i 50 -f "all_data.txt". The following parameters can be set:
-r [Role: 0/1, required] -n [Number of parallel operation elements, optional] -b [Bit-length, default 32, optional] -s [Symmetric Security Bits, default: 128, optional] -a [IP-address, default: localhost, optional] -p [Port, default: 7766, optional] -t [Single test (leave out for all operations), default: off, optional] -y [Type of Sharing used, 0: S_BOOL, 1: S_YAO, default: 1, optional] -i [Number of iterations for evaluation, default: 1, optional] -f [Input file of user RVs, default: all_data.txt, optional]
example.pyfor more details.
- Supported leave types as of now are:
Bernoulli, Histogram, Gaussian, Poisson. Note that for Histogram the domain size is leaked.
- Utility is currently restricted to one bottom-up pass of the network.
This code includes the oblivious selection network ABY implementation of https://github.com/encryptogroup/PDTE by Masoud Naderpour.