Studies in Program Obfuscation Mayank Varia
Total Page:16
File Type:pdf, Size:1020Kb
Studies in Program Obfuscation by Mayank Varia B.S.E., Duke University, 2005 Submitted to the Department of Mathematics in partial fulfillment of the requirements for the degree of Doctor of Philosophy at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 2010 c 2010 Mayank Varia. All rights reserved. The author hereby grants to MIT permission to reproduce and to distribute publicly paper and electronic copies of this thesis document in whole or in part in any medium now known or hereafter created. Author................................................................................... Department of Mathematics August 6, 2010 Certified by............................................................................... Ran Canetti Associate Professor, School of Computer Science, Tel Aviv University Thesis Supervisor Accepted by.............................................................................. Michel Goemans Chairman, Applied Mathematics Committee 2 Studies in Program Obfuscation by Mayank Varia Submitted to the Department of Mathematics on August 6, 2010, in partial fulfillment of the requirements for the degree of Doctor of Philosophy Abstract Program obfuscation is the software analog to the problem of tamper-proofing hardware. The goal of program obfuscation is to construct a compiler, called an \obfuscator," that garbles the code of a computer program while maintaining its functionality. Commercial products exist to perform this procedure, but they do not provide a rigorous se- curity guarantee. Over the past decade, program obfuscation has been studied by the theoretical cryptography community, where rigorous definitions of security have been proposed and obfuscators have been constructed for some families of programs. This thesis presents three contributions based on the virtual black-box security definition of Barak et al [10]. First, we show tight connections between obfuscation and symmetric-key encryption. Specifi- cally, obfuscation can be used to construct an encryption scheme with strong leakage resilience and key-dependent message security. The converse is also true, and these connections scale with the level of security desired. As a result, the known constructions and impossibility results for each primitive carry over to the other. Second, we present two new security definitions that augment the virtual black-box property to incorporate non-malleability. The virtual black-box definition does not prevent an adversary from modifying an obfuscated program intelligently. By contrast, our new definitions provide software with the same security guarantees as tamper-proof and tamper-evident hardware, respectively. The first definition prohibits tampering, and the second definition requires that tampering is detectable after the fact. We construct non-malleable obfuscators of both flavors for some program families of interest. Third, we present an obfuscator for programs that test for membership in a hyperplane. This generalizes prior works that obfuscate equality testing. We prove the security of the obfuscator under a new strong variant of the Decisional Diffie-Hellman assumption that holds in the generic group model. Additionally, we show a cryptographic application of the new obfuscator to leakage- resilient one-time digital signatures. The thesis also includes a survey of the prior results in the field. Thesis Supervisor: Ran Canetti Title: Associate Professor, School of Computer Science, Tel Aviv University 3 4 Acknowledgments I am very grateful to many colleagues, friends, and family for their help and support throughout my graduate studies. First and foremost, I am indebted to my advisor Ran Canetti for his guidance for the past four years. As a mathematician working with a computer scientist, we approached most problems from different angles, and understanding his perspective often resulted in solutions and always contributed to my growth as a scientist. Even if we were not able to solve a problem, I knew that Ran would at least provide a list of topical, relevant papers to examine, and the accuracy rate of his suggestions amazes me to this day. Perhaps the highest compliment I can pay him is that he is more helpful from halfway across the world than most people are from halfway across the building. I am also grateful to my co-authors Yael Kalai, Guy Rothblum, and Daniel Wichs for introducing me to their fields of study and making sense of my rambling thoughts. They were a pleasure to work with, both during the times of intensive study and leisurely banter. I also want to thank Nir Bitanski and Ronny Dakdouk for finding bugs, suggesting improvements, and proving new results in the non-malleable obfuscation and hyperplane membership testing problems. Additionally, I thank Michael Sipser and Peter Shor for serving on my thesis committee. As my internal advisor, Mike also provided valuable advice on my graduate research and job hunt. Additionally, I want to acknowledge the applied math department for their flexibility in allowing me to find the proper field of research, and the NDSEG fellowship for supporting me for three years, making the transition much easier. I thank Ron Rivest, Eran Tromer, and all of the graduate students in the cryptography reading group for providing an excellent learning environment and cementing my decision to study cryptography. During the past five years, I have been fortunate to have an outstanding group of officemates, including Victor Chen, Andy Drucker, Matthew Gelvin, Dah-Yoh Lim, and Rotem Oshman. They occasionally helped me with my work and often provided humorous anecdotes and informative conversations. (I promise that the relative frequency of these two events is a reflection on me, not them.) I also thank my friends in the poker group for providing me with a weekly connection to the developments in the math community. Finally, I thank my parents for their love and support. Without their active interest in my education and well-being, I would never have been in a position to start graduate school, let alone finish it. 5 6 Contents 1 Introduction to Obfuscation 9 1.1 Obfuscation in applied cryptography . 10 1.2 Obfuscation in theoretical cryptography . 11 1.2.1 Comparison with encryption . 11 1.2.2 Possible definitions . 13 1.2.3 Negative results . 14 1.2.4 Positive results . 15 1.3 Our results . 17 1.3.1 Obfuscation and symmetric encryption . 18 1.3.2 Non-malleable obfuscation . 21 1.3.3 Obfuscation of hyperplane membership . 26 1.4 Organization . 28 2 Definitions 29 2.1 Circuit families . 29 2.2 Obfuscation . 31 2.2.1 Functionality . 31 2.2.2 Virtual black-box property . 32 3 Survey of Prior Works 35 3.1 Definitions . 35 3.1.1 Virtual black-box . 35 3.1.2 Auxiliary input and composability . 39 3.1.3 Average-case obfuscation . 41 3.2 Positive results . 42 3.2.1 Point circuits and generalizations . 42 3.2.2 Cryptographic applications . 50 3.3 Connections . 54 3.3.1 Impossibility . 54 3.3.2 Separations . 57 3.3.3 Composability . 58 4 Obfuscation and Symmetric Encryption 61 4.1 Introduction . 61 4.2 Definitions . 62 4.2.1 Obfuscation . 62 4.2.2 Encryption with weak keys . 64 7 4.2.3 Proof of Theorem 4.2 . 67 4.2.4 Comparison of α-obfuscation definitions . 70 4.3 Encryption with weak keys and obfuscation with independent messages . 72 4.3.1 Semantically secure encryption . 72 4.3.2 CPA encryption and self-composable obfuscation . 73 4.4 Auxiliary input . 75 4.5 KDM encryption . 76 4.5.1 Semantically secure KDM encryption . 76 4.5.2 Multi-KDM encryption and self-composable obfuscation . 78 4.6 Implications . 79 4.6.1 Encryption with fully weak keys . 79 4.6.2 Achieving obfuscation with independent messages . 80 4.6.3 Difficulty of obfuscation with dependent messages . 82 5 Non-malleable Obfuscation 83 5.1 Introduction . 83 5.2 Defining non-malleable obfuscation . 84 5.2.1 Tamper-proof obfuscation . 84 5.2.2 Discussion . 86 5.2.3 Tamper-evident obfuscation . 92 5.2.4 Models with setup assumptions . 97 5.2.5 Comparison . 99 5.3 Constructions of tamper-proof obfuscators . 100 5.3.1 Single-point circuits . 100 5.3.2 Multi-point circuits . 104 5.4 Constructions of tamper-evident obfuscators . 113 5.4.1 Random oracle model . 113 5.4.2 Common reference string model . 118 6 Obfuscation of Hyperplane Membership 125 6.1 Introduction . 125 6.2 Finite vector spaces . 127 6.3 Assumption . 128 6.3.1 Hierarchy of assumptions . 129 6.3.2 Generic group model . 131 6.3.3 Adaptivity . 137 6.4 Construction . 139 6.5 Multi-bit output . 143 6.6 One-time signature scheme . 145 7 Future work 149 List of Symbols 151 List of Algorithms 155 List of Figures 157 Bibliography 159 8 Chapter 1 Introduction to Obfuscation Cryptography examines how information can be protected while still being used in a meaningful way. The latter part of the goal is particularly important, but often forgotten. Many people view cryptography simply as the art of keeping secrets, but this is not the case. In fact, it is very simple to keep something secret if you never need to recall or use it: simply forget it and continue on as if you had never learned it. The diverse set of problems that cryptographers study all balance the need to use information (a functionality guarantee) with the desire to keep something hidden (a security guarantee). For instance, classical cryptographic problems such as encryption or digital signatures provide the functionality of being able to send a message to one party with security guarantees against malice by others. In this work, we consider the problem of program obfuscation, in which we wish to hide the details of how a computer program works while preserving its functionality. We illustrate the concept with an example involving two people named Alice and Bob. Suppose Bob discovers an algorithm that factors integers quickly. He wants to show the algo- rithm to Alice (along with the rest of the world), but in a responsible manner that does not allow her to break most of the public-key cryptography standards.