MLR meets MPC – Utilizing Muli-Level Compilation for Automated Protocol Translation
Bachelor Thesis, Master Thesis
Motivation
Secure Multi-Party Computation (MPC) allows two or more mutually distrusting parties to compute a function on their private inputs such that nothing beyond the output data is revealed to the other parties. It has found a wide range of applications, such as secure auctions, money-laundering detection, and secure cloud computing. Besides the theoretical efforts to make MPC protocols more and more efficient on paper, the practical side of MPC is concerned with improving the efficiency of the protocols’ implementations.
One particular challenge is the compilation of a given program in a high-level language, such as C/C++, Java, or Python, into a function representation that allows different MPC frameworks to assign efficient protocols for specific program parts. Taking Machine Learning (ML) as an example application for MPC, there are frameworks which support highly optimized protocols for the ReLU layer, but others that do not. Now the following question arises: “How do we represent a function such that we can both opt in for special ReLU protocols but on the other hand also fall back to ‘general-purpose’ MPC protocols (i.e., Add, Sub, Mul) when there are no special ReLU protocols available?”
This problem of compilation for secure computation has been addressed by the Secretflow-SPU [1] for MPC and HECO compiler [2] for Fully Homomorphic Encryption. Both frameworks build on top of MLIR [3] which itself is built upon the well-known LLVM compiler framework. MLIR allows to define dialects to support building domain specific compilers.
Goal
The goal of this topic is to design and use dialects in MLIR to achieve a similarly easy framework as HECO for MPC. In our efforts to move from C++ to Rust, the student should implement at least two MPC dialects with MLIR in Rust and corresponding conversion passes. Additionally, more dialects or passes can be implemented.
Requirements
- Programming skills in Rust, (maybe a little) C++
- Basic knowledge of cryptography
- Familiarity with compilers
- High motivation + ability to work independently
- Knowledge of the English language, Git, LaTeX, etc.
References
- [1] J. Ma and Y. Zheng and J. Feng and D. Zhgao and H. Wu and W. Fang and J. Tan and C. Yu and B. Zhang and L. Wang. “SecretFlow-SPU: A Performant and User-Friendly Framework for Privacy-Preserving Machine Learning”. USENIX ATC 2023.
(opens in new tab) https://www.usenix.org/system/files/atc23-ma.pdf
https://github.com/secretflow/spu - [2] A. Viand and P. Jattke and M. Haller and A. Hithnawi. “HECO: Fully Homomorphic Encryption Compiler”. USENIX Security 2023.
(opens in new tab) https://www.usenix.org/system/files/usenixsecurity23-viand.pdf
https://github.com/MarbleHE/HECO/ - [3] C. Lattner, M. Amini, U. Bondhugula, A. Cohen, A. Davis, J. Pienaar, R. Riddle, T. Shpeisman, N. Vasilache, O. Zinenko. “MLIR: Scaling Compiler Infrastructure for Domain Specific Computation”. International Symposium on Code Generation and Optimization (CGO) 2021.
https://doi.org/10.1109/CGO51591.2021.9370308
https://github.com/llvm/llvm-project/tree/main/mlir
Supervisors
- ( Nora Khayatakhayata@encrypto.cs.tu-…)
- Prof. Dr.-Ing. Thomas Schneider