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
@misc{cryptoeprint:2023/1426,
author = {Aysajan Abidin and Erik Pohle and Bart Preneel},
title = {Arithmetic Circuit Implementations of S-boxes for SKINNY and PHOTON in MPC},
howpublished = {Cryptology ePrint Archive, Paper 2023/1426},
year = {2023},
note = {\url{https://eprint.iacr.org/2023/1426}},
url = {https://eprint.iacr.org/2023/1426}
}
- 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