TL;DR
This paper introduces L1, a new intermediate language designed to make Secure Computation (SC) both faster and more flexible. By allowing developers to mix different cryptographic protocols (like Garbled Circuits and Homomorphic Encryption) and implement specialized algorithms, L1 achieves performance gains of several orders of magnitude over traditional, single-protocol SC compilers.
What Problem Does This Paper Address?
Secure Computation (SC) allows multiple parties to compute a function over their private data without ever revealing the data itself—only the result is made public. While theoretically powerful, SC is notoriously slow, often running tens of thousands of times slower than standard programs.
Existing SC compilers (like FairPlay) typically force a "one-size-fits-all" approach: they translate a program into a single type of cryptographic protocol (usually binary "Garbled Circuits"). However, different protocols have different strengths; for instance, Garbled Circuits are great for comparisons but terrible at multiplication. Furthermore, general-purpose compilers cannot easily implement "specialized" algorithms that could significantly optimize specific tasks like finding a median or performing division.
Methods
The authors propose L1, an intermediate language that sits between high-level descriptions and executable code. Its key features include:
- Mixed-Protocol Support: Developers can use different protocols for different parts of a program (e.g., using Homomorphic Encryption for math and Garbled Circuits for logic).
- Parallel Execution: L1 introduces specific syntax (angle brackets
< >) to easily spawn parallel threads, taking advantage of multi-core CPUs to speed up heavy cryptographic lifting. - Player-Specific Code: It allows developers to write different code for different participants (e.g., Alice vs. Bob), which is necessary for many advanced protocols.
- Extensibility: L1 is designed to be a "plumbing" layer. It abstracts away network communication and low-level crypto, allowing researchers to plug in new encryption schemes or protocols as "built-in functions."
- Compiler Backend: The L1 compiler translates the code into interacting Java programs that handle the actual distributed execution.
Datasets
As this is a systems and programming language paper, it does not use standard ML datasets. Instead, the authors evaluated L1 using three specific case studies:
- Secure Median: Computing the median of two private sets.
- Weighted Average: Computing $(c+d)(w_A+w_B) / (n+m)$ where inputs are split between parties.
- Secure Division: Comparing Long Division (LD) and Newton-Raphson (NR) algorithms across different protocols.
The performance was measured on 2GHz Intel CoreDuo machines with 2GB RAM, simulating various network conditions (WAN/LAN) using tools like dummynet.
Key Insights and Ideas
- The Power of "Public Selection": In the median case study, the authors show that if a protocol allows the result of an intermediate comparison to be public, the parties can discard half their data in each step. Traditional compilers can't do this, but L1 can, leading to massive speedups.
- Hybrid is Better: For weighted averages, the authors mixed Garbled Circuits (GC) with Homomorphic Encryption (HE). Since HE handles multiplication much more efficiently than binary circuits, the hybrid approach crushed the pure GC approach.
- Algorithm-Protocol Co-design: The division case study revealed that the "best" way to do SC isn't just about the fastest crypto or the best algorithm—it's about the combination. For example, the Newton-Raphson algorithm was the slowest in one protocol but among the fastest in another.
Key Results
- Median: L1 outperformed the FairPlay compiler significantly. For 64 elements (32-bit), L1 took ~3.2 seconds, while FairPlay took ~96.1 seconds—a 30x speedup.
- Weighted Average: The mixed-protocol (GC + HE) approach was roughly 6x faster than using Garbled Circuits alone for 32-bit inputs (11 seconds vs. 69 seconds).
- Division: The study showed that neither the algorithm nor the protocol alone determines the winner. The "LDGC" (Long Division + Garbled Circuits) and "NRHE" (Newton-Raphson + Homomorphic Encryption) variants emerged as the top performers, while other combinations were an order of magnitude slower.
Limitations and Future Work
The primary limitation acknowledged by the authors is security verification. Unlike compilers that use a single, proven general protocol, L1 allows developers to write custom, mixed protocols. If the developer isn't careful, they might accidentally leak private information. Currently, L1 does not automatically check if a custom protocol is "secure."
Future Work: * L2 Language: The authors plan to build a higher-level language (L2) that provides more abstract "secure data types" which compile down into optimized L1 code. * Automated Verification: Integrating formal verification tools to ensure that the mixed protocols written in L1 maintain the required security guarantees.
Summary updated