Metamorphic Testing of Secure Multi-party Computation (MPC) Compilers
Yichen Li, Dongwei Xiao, Zhibo Liu, Qi Pang, Shuai Wang
Abstract
The demanding need to perform privacy-preserving computations among multiple data owners has led to the prosperous development of secure multi-party computation (MPC) protocols. MPC offers protocols for parties to jointly compute a function over their inputs while keeping those inputs private. To date, MPC has been widely adopted in various real-world, privacy-sensitive sectors, such as healthcare and finance. Moreover, to ease the adoption of MPC, industrial and academic MPC compilers have been developed to automatically translate programs describing arbitrary MPC procedures into low-level MPC executables. Compiling high-level descriptions into high-efficiency MPC executables is challenging: the compilation often involves converting high-level languages into several intermediate representations (IR), e.g., arithmetic or boolean circuits, optimizing the computation/communication cost, and picking proper MPC protocols (and underlying virtual machines) for a particular task and threat model. Various optimizations and heuristics are employed during the compilation procedure to improve the efficiency of the generated MPC executables. Despite the prosperous adoption of MPC compilers by industrial vendors and academia, a principled and systematic understanding of the correctness of MPC compilers does not yet exist. To fill this critical gap, this paper introduces MT-MPC, a metamorphic testing (MT) framework specifically designed for MPC compilers to effectively uncover erroneous compilations. Our approach proposes three metamorphic relations (MRs) that are tailored for MPC programs to mutate high-level MPC programs (compiler inputs).We then examine if MPC compilers yield semantics-equivalent MPC executables regarding the original and mutated MPC programs by comparing their execution results. Real-world MPC compilers exhibit a high level of engineering quality. Nevertheless, we detected 4,772 inputs that can result in erroneous compilations in three popular MPC compilers available on the market. While the discovered error-triggering inputs do not cause the MPC compilers to crash directly, they can lead to the generation of incorrect MPC executables, jeopardizing the underlying dependability of the computation. With substantial manual effort and help from the MPC compiler developers, we uncovered thirteen bugs in these MPC compilers by debugging them using the error-triggering inputs. Our proposed testing frameworks and findings can be used to guide developers in their efforts to improve MPC compilers.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 25ed7ae7-27c1-422e-b8df-a6dc6fc78254Cited by top-tier papers6
- Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript EnginesWai Kin Wong, Dongwei Xiao, Anthony Cheuk Tung Lai, Yiteng Peng et al.OOPSLA 2025 · 4 citations
- Divergence-Aware Testing of Graphics Shader Compiler Back-EndsDongwei Xiao, Shuai Wang, Zhibo Liu, Yiteng Peng et al.PLDI 2025 · 1 citation
- Testing and Understanding Deviation Behaviors in FHE-Hardened Machine Learning ModelsYiteng Peng, Daoyuan Wu, Zhibo Liu, Dongwei Xiao et al.ICSE 2025 · 1 citation
- MTZK: Testing and Exploring Bugs in Zero-Knowledge (ZK) CompilersDongwei Xiao, Zhibo Liu, Yiteng Peng, Shuai WangNDSS 2025
- The Phantom Menace in Crypto-Based PET-Hardened Deep Learning Models: Invisible Configuration-Induced AttacksYiteng Peng, Dongwei Xiao, Zhibo Liu, Zhenlan Ji et al.CCS 2025
Related papers
- Cost-Effective Testing of MPC CompilersSebastian Watzinger, Valentin Wüstholz, Deepak Garg, Maria ChristakisFSE 2026
- MPCDiff: Testing and Repairing MPC-Hardened Deep Learning ModelsQi Pang, Yuanyuan Yuan, Shuai WangNDSS 2024
- Metamorphic Shader Fusion for Testing Graphics Shader CompilersDongwei Xiao, Zhibo Liu, Shuai WangICSE 2023 · 12 citations
- SoK: General Purpose Compilers for Secure Multi-Party ComputationMarcella Hastings, Brett Hemenway, Daniel Noble, Steve ZdancewicS&P 2019 · 181 citations
- Generalizing the SPDZ Compiler For Other ProtocolsToshinori Araki, Assi Barak, Jun Furukawa, Marcel Keller et al.CCS 2018 · 54 citations
