1.1 Authenticated Encryption
Total Page:16
File Type:pdf, Size:1020Kb
UC San Diego UC San Diego Electronic Theses and Dissertations Title Authenticated encryption in practice : generalized composition methods and the Secure Shell, CWC, and WinZip schemes Permalink https://escholarship.org/uc/item/7tz0v522 Author Kohno, Tadayoshi Publication Date 2006 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California UNIVERSITY OF CALIFORNIA, SAN DIEGO Authenticated Encryption in Practice: Generalized Composition Methods and the Secure Shell, CWC, and WinZip Schemes A dissertation submitted in partial satisfaction of the requirements for the degree Doctor of Philosophy in Computer Science by Tadayoshi Kohno Committee in charge: Professor Mihir Bellare, Chair Professor Rene Cruz Professor Bill Lin Professor Daniele Micciancio Professor Stefan Savage 2006 Copyright Tadayoshi Kohno, 2006 All rights reserved. The dissertation of Tadayoshi Kohno is approved, and it is acceptable in quality and form for publication on microfilm: Chair University of California, San Diego 2006 iii To Taryn and Seth Kohno. iv TABLE OF CONTENTS Signature Page . iii Dedication . iv Table of Contents . v List of Figures . viii List of Tables . viii Acknowledgments . ix Vita and Publications . xiii Abstract . xvi 1 Introduction . 1 1.1 Authenticated Encryption . 1 1.2 Provable Security . 3 1.3 The Secure Shell Protocol and Composition-Based Authenticated En- cryption Schemes . 4 1.4 The CWC Authenticated Encryption Scheme . 5 1.5 The WinZip Authenticated Encryption Scheme . 6 2 Background . 8 2.1 Notation . 8 2.2 Pseudorandom Functions . 9 2.3 Pseudorandom Permutations (Block Ciphers) . 9 2.4 Symmetric Encryption . 11 2.5 Message Authentication . 14 2.6 Authenticated Encryption . 16 2.6.1 Relations Between Notions . 18 2.6.2 Definitional Variations . 19 2.6.3 Generic Composition . 19 2.6.4 Encryption with Redundancy . 22 2.6.5 Encode-then-Encipher . 24 2.6.6 Block Cipher-Based Constructions . 27 3 The Secure Shell Authenticated Encryption Scheme . 29 3.1 Overview . 30 3.2 The SSH Binary Packet Protocol (SSH BPP) . 33 3.3 Attacking the Standard Implementation of SSH . 35 v 3.4 Attacking a Natural “Fix” . 36 3.5 Secure Fixes to SSH . 41 3.6 Definitions and the Encode-then-E&M Paradigm . 43 3.7 General Security Results for the Encode-then-E&M Paradigm . 52 3.7.1 Chosen-Plaintext Privacy . 53 3.7.2 Integrity of Plaintexts . 53 3.7.3 Proof of Theorem 3.7.1 . 55 3.8 SSH Security Results . 61 3.8.1 Collision-Resistance of the SSH Encoding Scheme . 62 3.8.2 Integrity and Privacy of Our Recommendations . 64 3.9 Discussion and Recommendations . 68 4 Generalized Composition Methods for Authenticated Encryption . 74 4.1 Authenticated Encryption with Associated Data . 77 4.1.1 Syntax . 78 4.1.2 Consistency and Security . 78 4.2 Building Blocks . 88 4.2.1 Encryption Schemes . 88 4.2.2 Message Authentication Schemes . 89 4.3 Encoding Schemes . 92 4.3.1 Overview . 92 4.3.2 Syntax, Consistency, and Security . 94 4.4 Composition Methods . 105 4.5 Generalized Encode-then-E&M Security . 108 4.5.1 Privacy . 108 4.5.2 Integrity . 109 4.6 Generalized Encode-then-MtE Security . 115 4.6.1 Privacy . 115 4.6.2 Integrity . 116 4.7 Generalized Encode-then-EtM Security . 118 4.7.1 Privacy . 118 4.7.2 Integrity . 119 5 The CWC Authenticated Encryption Scheme . 122 5.1 Overview . 123 5.2 Preliminaries . 127 5.3 Specification . 129 5.4 Theorem Statements . 131 5.4.1 Privacy . 131 5.4.2 Integrity . 133 5.5 Design Decisions . 134 5.6 Performance . 142 5.7 Security Proofs . 147 5.7.1 More Definitions . 147 vi 5.7.2 The General CWC Construction . 149 5.7.3 Security of the General CWC Construction . 151 5.7.4 Proofs of Theorem 5.4.1 and Theorem 5.4.2 . 152 5.7.5 Proof of Lemma 5.7.2 . 154 5.7.6 Proof of Lemma 5.7.3 . 162 6 The WinZip Authenticated Encryption Scheme . 164 6.1 Overview . 165 6.2 The WinZip Compression and Encryption Method . 175 6.3 Information Leakage . 178 6.4 Exploiting the Interaction Between Compression and Encryption . 179 6.5 Exploiting the Association of Applications to Filenames . 181 6.6 Exploiting the Interaction Between AE-1 and AE-2 . 181 6.7 Attacking Zip Encryption at the File Level . 183 6.8 Keystream Reuse . 185 6.9 Dictionary Attacks . 185 6.10 Fixes . 186 Bibliography . 194 vii LIST OF FIGURES 3.1 The SSH authenticated encryption scheme. 34 3.2 The SSH encoding scheme EC = (Encode, Decode) for l-bit blocks, where l ≡ 0 (mod 8) and 64 ≤ l ≤ 252 · 8............... 62 4.1 The generalized Encode-then-E&M paradigm. 75 4.2 The generalized Encode-then-MtE paradigm. 75 4.3 The generalized Encode-then-EtM paradigm. 76 LIST OF TABLES 5.1 Software performance in clocks per byte for CWC-AES, CCM-AES, and EAX-AES on a Pentium III. Values are averaged over 50 000 sam- ples. 125 viii ACKNOWLEDGMENTS ACADEMIC COLLABORATORS AND FRIENDS. I thank my fantastic advisor, Mihir Bel- lare, for all the wonderful advice and guidance that he has given me over the years. I truly believe that I would not be who I am now if it were not for him. I am indebted to Stefan Savage for all of his generosity and guidance and for helping me find my “dream job.” I thank Avi Rubin for his continual mentoring and constant generosity both professionally and socially. I thank Sid Karin and Dan Wallach for all their help and advice and for watching over my graduate career. I thank my summer mentors and past supervisors, kc claffy, David Conrad, Mark McGovern, Gary McGraw, Fabian Monrose, Bruce Schneier, David Wagner, Tammy Welcome, and Phil Winterbottom. I thank Rene Cruz, Bill Lin, and Daniele Micciancio for overseeing this dissertation. I thank Hal Gabow and Evi Nemeth for overseeing my undergraduate career. In addition to Mihir Bellare, I thank John Black, Chanathip Namprempre, Adriana Palacio, John Viega, and Doug Whiting for co-authoring with me some of the material that appears in this dissertation. I also thank all my other co-authors and collaborators, Michel Abdalla, J. T. Bloch, Andre Broido, Dario Catalano, Niels Ferguson, Kevin Fu, Chris Hall, Tetsu Iwata, Seny Kamara, John Kelsey, Eike Kiltz, Lars Knudsen, Tanja Lange, Stefan Lucks, John Malone-Lee, David Molnar, Gregory Neven, Pascal Paillier, Bruce Potter, Naveen Sastry, Haixia Shi, Mike Stay, and Adam Stubblefield. I thank Emile Aben, Dan Andersen, Matt Bishop, Alexandra Boldyreva, Dan Brown, Cindy Cohn, Don Coppersmith, Frank Dabek, David Dill, Morris Dworkin, Hal Finney, Michael Freedman, Beth Friedman, Patricia Gabow, Brian Gladman, Philippe Golle, Bill Griswold, Peter Gutmann, Stuart Haber, Susan Hohenberger, Tim Hollebeek, Young Hyun, Russell Impagliazzo, David Jefferson, Rob Johnson, Frans Kaashoek, Chris Karlof, Ulrich Kuehn, Mahesh Kallahalla, David Mazieres,` David McGrew, David Moore, Badri Natarajan, Bart Preneel, Christian Rechberger, Mike Reiter, Ron Rivest, Phil Rogaway, Felix Schleer, Rich Schroeppel, Jason Schultz, Umesh Shankar, Colleen Shannon, abhi shelat, Tsutomu Shimomura, Emil Sit, Nigel Smart, Bill Sommerfeld, ix Alex Snoeren, Jeremy Stribling, Ram Swaminathan, Win Treese, Darryl Veitch, Tracy Volz, Brendan White, Richard Wiebe, Michael Wiener, Pat Wilson, Matt Zimmerman, and Robert Zuccherato for commenting on my papers and contributing to my research. I thank Phil Zimmermann for introducing me to modern applied cryptography. I addition- ally thank Josh Benaloh, Brad Calder, Trent Jaeger, Patrick McDaniel, Dave Schroeder, Dan Simon, Hiroyuki Tanabe, Geoff Voelker, and Bennet Yee for all their contributions to my career. I thank all the other members of the UCSD cryptography and security group, including Jee Hea An, Marc Fischlin, Alejandro Hevia, Matt Hohlfeld, Anton Mityagin, Saurabh Panjwani, Barath Raghavan, Tom Ristenpart, Sarah Shoup, Bogdan Warinschi, and Scott Yilek. I am grateful for all the help from Julie Conner and Kathy Reed and rest of the UCSD CSE staff, and Steve Hopper and the rest CSEHelp. I thank everyone else that I have had contact with academically and socially. FAMILY. I am deeply grateful for all that my wife Taryn and son Seth have contributed to all aspects of my life. I could mention a few things, like Taryn always putting my education and career before herself, but I honestly do not believe that any summary of their contributions will do them justice. Indeed, in any short summary I would be forced to exclude many of their critical contributions and sacrifices. I have always had an interest in the maths and sciences, and for that I thank my family, and in particular my parents, Tadahiko and Beth. I thank my parents for also end- lessly investing in my education, including the many computers and electronic equip- ment that they purchased for me as a child and the many hours that they spent shuttling me back and forth between Fairview and CU. FUNDING AND SUPPORT. My graduate research was supported in part by a National Defense Science and Engineering Graduate Fellowship, an IBM Ph.D. Fellowship, the SciDAC program of the US Department of Energy (award DE-FC02-01ER25466), and NSF grants ANR-0129617, CCR-0093337, and CCR-0208842. I thank the Usenix As- sociation for a Student Grant supporting my work on SSH. I thank The Johns Hopkins University Information Security Institute (Avi Rubin and Fabian Monrose) for hosting me the summer of 2003, the Cooperative Association for Internet Data Analysis (kc x claffy) for hosting me the summer of 2004, and the University of California at Berkeley (David Wagner) for hosting me the summer of 2005. PAPERS INCLUDED IN THIS DISSERTATION.