This repository contains code and benchmark results from the paper "Arithmetic Circuit Implementations of S-boxes for SKINNY and PHOTON in MPC" by Aysajan Abidin, Erik Pohle and Bart Preneel published at ESORICS 2023 [eprint].
If content of this repository has been useful to you for academic work, please consider citing
@inproceedings{DBLP:conf/esorics/AbidinPP23,
author = {Aysajan Abidin and Erik Pohle and Bart Preneel},
editor = {Gene Tsudik and Mauro Conti and Kaitai Liang and Georgios Smaragdakis},
title = {Arithmetic Circuit Implementations of S-boxes for {SKINNY} and {PHOTON} in {MPC}},
booktitle = {Computer Security - {ESORICS} 2023 - 28th European Symposium on Research in Computer Security, Proceedings, Part {I}},
series = {Lecture Notes in Computer Science},
volume = {14344},
pages = {86--105},
publisher = {Springer},
year = {2023},
url = {https://doi.org/10.1007/978-3-031-50594-2\_5},
doi = {10.1007/978-3-031-50594-2\_5},
}
- The two jupyter notebooks,
Skinny.ipynb
andPhoton.ipynb
contain example SageMath code how to find parameters for SKINNY and PHOTON. The code to find interpolation, polynomial decomposition and embedding parameters for binary fields with any modulus can be found incrv.py
,embedding.py
andspnutils.py
. - The folder
MP-SPDZ code
contains source code for the implementations for the MP-SPDZ framework. Instructions on how to use the source code are detailed below. - The folder
benchmark results
contains the raw and aggregated data (time and communication data) of the MPC benchmark that is reported in the paper.
- Copy the contents of
MP-SPDZ code
intoPrograms/Source/
of the MP-SPDZ framework. - Compile the benchmark with
./compile.py skinny_benchmark <circuit> <SIMD>
(from the MP-SPDZ root directory) Seeskinny_benchmark.mpc
for all available circuits and options. For example useenc_skinny_64_128_mul_sq1
to compile the SQ1 implementation orenc_skinny_64_128_crv
for the CRV implementation of SKINNY-64-128. - Make sure that
USE_GF2N_LONG = 0
is set inCONFIG.mine
in MP-SPDZ, otherwise the embeddings yield wrong results - The benchmark in the paper was run with the MASCOT virtual machine, i.e.,
mascot-party.x