Cryptology ePrint Archive: Report 2021/797

LLVM-based Circuit Compilation for Practical Secure Computation

Tim Heldmann and Thomas Schneider and Oleksandr Tkachenko and Christian Weinert and Hossein Yalame

Abstract: Multi-party computation (MPC) allows two or more parties to jointly and securely compute functions over private inputs. Cryptographic protocols that realize MPC require functions to be expressed as Boolean or arithmetic circuits. Deriving such circuits is either done manually, or with hardware synthesis tools and specialized MPC compilers. Unfortunately, such existing tools compile only from a single front-end language and neglect decades of research for optimizing regular compilers.

In this paper, we make MPC practical for developers by automating circuit compilation based on the compiler toolchain LLVM. For this, we develop an LLVM optimizer suite consisting of multiple transform passes that operate on the LLVM intermediate representation (IR) and gradually lower functions to circuit level. Our approach supports various front-end languages (currently C, C++, and Fortran) and takes advantage of powerful source code optimizations built into LLVM. We furthermore make sure to produce circuits that are optimized for MPC, and even offer fully automated post-processing for efficient post-quantum MPC.

We empirically measure the quality of our compilation results and compare them to the state-of-the-art specialized MPC compiler HyCC (B├╝scher et al., CCS'2018). For all benchmarked HyCC example applications (e.g., biomatch and linear equation solving), our highly generalizable approach achieves similar quality in terms of gate count and composition.

Category / Keywords: cryptographic protocols / MPC, Circuit Compilation, LLVM, Hardware Synthesis

Original Publication (with minor differences): ACNS 2021

Date: received 11 Jun 2021

Contact author: schneider at encrypto cs tu-darmstadt de, tkachenko at encrypto cs tu-darmstadt de, weinert at encrypto cs tu-darmstadt de, yalame at encrypto cs tu-darmstadt de

Available format(s): PDF | BibTeX Citation

Version: 20210614:134817 (All versions of this report)

Short URL:

[ Cryptology ePrint archive ]