Affiliation:
1. Hong Kong University of Science and Technology, Hong Kong, China
2. Carnegie Mellon University, Pittsburgh, USA
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.
Publisher
Association for Computing Machinery (ACM)