Secure Multi-Party Computation in Practice
Total Page:16
File Type:pdf, Size:1020Kb
SECURE MULTI-PARTY COMPUTATION IN PRACTICE Marcella Christine Hastings A DISSERTATION in Computer and Information Science Presented to the Faculties of the University of Pennsylvania in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy 2021 Supervisor of Dissertation Nadia Heninger Adjunct Associate Professor, University of Pennsylvania Associate Professor, University of California, San Diego Graduate Group Chairperson Mayur Naik Professor and Computer and Information Science Graduate Group Chair Dissertation Committee Brett Hemenway Falk, Research Assistant Professor Stephan A. Zdancewic, Professor Sebastian Angel, Raj and Neera Singh Term Assistant Professor abhi shelat, Associate Professor at Khoury College of Computer Sciences, Northeastern University ACKNOWLEDGMENT This dissertation would have been much less pleasant to produce without the presence of many people in my life. I would like to thank my advisor and my dissertation committee for their helpful advice, direction, and long-distance phone calls over the past six years. I would like to thank my fellow PhD students at the University of Pennsylvania, especially the ever-changing but consistently lovely office mates in the Distributed Systems Laboratory and my cohort. Our shared tea-time, cookies, disappointments, and achievements provided an essential community that brought me great joy during my time at Penn. I would like to thank the mentors and colleagues who hosted me at the Security and Privacy Lab at the University of Washington in 2018, the Software & Application Innovation Lab at Boston University in 2019, and the Cryptography and Privacy Research group at Microsoft Research in 2020. My career and happiness greatly benefited from spending these summers exploring fresh research directions and rediscovering the world outside my own work. I would like to thank profusely my colleagues at Bolt Labs, who have been relentlessly supportive of my professional goals throughout our collaboration, and who provided mentorship and direction at a time in my PhD when I was particularly uncertain. I would like to thank my family and friends who insisted on regular updates on my research progress, enthusiastically attended events typically reserved for professional colleagues, and reassured me that our relationships were not conditional on the number of degrees I held. Finally, I would like to thank my partner, who has simply been the best. ii ABSTRACT SECURE MULTI-PARTY COMPUTATION IN PRACTICE Marcella Christine Hastings Nadia Heninger Secure multi-party computation (MPC) is a cryptographic primitive for computing on private data. MPC provides strong privacy guarantees, but practical adoption requires high-quality application design, software development, and resource management. This dissertation aims to identify and reduce barriers to practical deployment of MPC applications. First, the dissertation evaluates the design, capabilities, and usability of eleven state-of-the-art MPC software frameworks. These frameworks are essential for prototyping MPC applications, but their qualities vary widely; the survey provides insight into their current abilities and limitations. A comprehensive online repository augments the survey, including complete build environments, sample programs, and additional documentation for each framework. Second, the dissertation applies these lessons in two practical applications of MPC. The first addresses algorithms for assessing stability in financial networks, traditionally designed in a full- information model with a central regulator or data aggregator. This case study describes principles to transform two such algorithms into data-oblivious versions and benchmark their execution under MPC using three frameworks. The second aims to enable unlinkability of payments made with blockchain-based cryptocurrencies. This study uses MPC in conjunction with other privacy techniques to achieve unlinkability in payment channels. Together, these studies illuminate the limitations of existing software, develop guidelines for transforming non-private algorithms into versions suitable for execution under MPC, and illustrate the current practical feasibility of MPC as a solution to a wide variety of applications. iii TABLE OF CONTENTS ACKNOWLEDGMENT ii ABSTRACT iii LIST OF TABLES vi LIST OF ILLUSTRATIONS vii 1 Introduction 1 1.1 Overview . 2 1.2 Contributions . 6 2 Preliminaries 7 2.1 Cryptographic building blocks . 7 2.2 Secure multi-party computation . 9 2.3 Simulation security . 13 3 General-Purpose Frameworks for Secure Multi-Party Computation 15 3.1 Frameworks survey . 18 3.2 Evaluation criteria . 21 3.3 Frameworks . 26 3.4 Discussion . 36 4 Privacy Preserving Network Analytics 39 4.1 MPC and network algorithms . 44 4.2 The Eisenberg & Noe network model . 48 4.3 The equity cross-holdings model . 55 4.4 Implementations with real data . 58 4.5 Discussion, limitations and conclusion . 70 iv 5 zkChannels: Fast, Unlinkable Payments for Any Blockchain using 2PC 73 5.1 zkChannels overview and intuition . 76 5.2 Preliminaries . 85 5.3 zkChannels protocol . 88 5.4 Implementation . 104 5.5 Benchmarks . 107 5.6 Related work . 109 5.7 Conclusion . 110 6 Cocoon: Production-Quality Secure Computation 111 6.1 BaRK protocol and implementation . 112 6.2 Secl¯udintegration . 113 6.3 Deployment observations . 114 6.4 Conclusion . 116 7 Conclusion 118 BIBLIOGRAPHY 121 v LIST OF TABLES 3.1 MPC framework features and usability . 19 3.2 MPC framework language capabilites . 23 3.3 MPC framework architecture and implementation . 24 4.1 Equilibrium market values of the 21-country BIS data set . 62 4.2 EMP-toolkit resource requirements in the equity model . 69 5.1 Gate counts for modules in the UpdateState circuit (K=thousand). 103 vi LIST OF ILLUSTRATIONS 2.1 Oblivious Transfer . 8 4.1 Example of a local stress test failure . 41 4.2 4-bank debt model from [JP19] . 41 4.3 Reduced communication with outsourced computation . 45 4.5 The full 21-country BIS dataset. 59 4.6 Six-country network [EGJ14]. 61 4.7 FindFix Algorithm 2 convergence over k.......................... 61 4.8 Approximate market values of the banks in Figure 4.4a . 63 4.9 Error in market values for varying k ........................... 64 4.10 SCALE-MAMBA experimental resource usage . 65 4.11 SCALE-MAMBA experimental resource usage . 67 4.12 Circuit sizes of oblivious network statistics algorithms . 69 5.1 Transactions and subprotocols in the zkChannels lifecycle . 83 5.2 2PC Establish protocol with UTXO-based arbiter: Initialize . 89 5.3 2PC Establish protocol with UTXO-based arbiter: Activate and Unlink. 90 5.4 Pay Protocol Phase 1: Prepare . 92 5.5 Pay Protocol Phase 2: Update State . 93 5.6 Pay Protocol Part 3: Unmask . 94 5.7 On-network close procedures . 96 5.8 Ideal functionality zkChannels, Timer and Establish commands. 98 F 5.9 Ideal functionality zkChannels, Pay commands. 99 F 5.10 Ideal functionality zkChannels, Close commands. 100 F 5.11 Modified ECDSA under 2PC . 104 5.12 Resource usage for MPC in the zkChannels protocol . 105 6.1 Sample use of the Cocoon framework . 112 vii 6.2 High-level OPRF protocol . 112 viii CHAPTER 1 Introduction From the first introduction of secure multi-party computation in the 1980s, theorists have developed robust, efficient algorithms; researchers have implemented optimized software frameworks; and newly identified applications abound in the real world. However, connecting these threads into effective, privacy-preserving deployments reveals a new set of challenges. This dissertation aims to identify and solve some of these challenges to encourage wider-spread adoption of this useful, privacy-enhancing primitive. Secure multi-party computation (MPC) is a cryptographic tool that allows a group of mutually distrustful parties to compute a function on their joint inputs without revealing anything beyond the output of the computation. This umbrella encompasses a wide variety of functions; some algorithms optimize for a specific function, like set intersection or signing. Others are capable of computing an arbitrary function. This dissertation focuses mainly on the latter category, trading off application-specific optimization for broad, reusable utility across many settings. However, this theoretic expressive capability requires a great deal of practical infrastructure before it can be used with real data. Lindell writes [Lin21]: \MPC still requires great expertise to deploy, and additional research breakthroughs are needed to make secure computation practical on large data sets and for complex problems, and to make it easy to use for nonexperts." This dissertation explores the question of why MPC is difficult to deploy. Although challenges to practical application exist, the academic community has successfully 1 collaborated with practitioners to develop software for MPC applications: the first software framework implementing general-purpose secure computation was introduced in 2004 [MNPS04], and the first known deployment was a blind auction for Danish sugar beets [BCD+09]. Recent applications illustrate a range of motivating factors for using privacy enhancing technologies. The ZCash foundation used MPC to compute verifiably random parameters for zk-SNARKS [BGM17, BD18]; the goal of the computation was to compute parameters with randomness that relies on only one of the 87 participants' honest behavior. The Boston Women's Workforce Council computed statistics on gender and racial wage gaps across Boston [LJDA+18], without compromising on participants' concerns of