Some Aspects of Cryptographic Protocols
Total Page:16
File Type:pdf, Size:1020Kb
Some aspects of cryptographic protocols with applications in electronic voting and digital watermarking BJÖRN TERELIUS Doctoral Thesis Stockholm, Sweden 2015 TRITA CSC 2015:08 KTH ISSN 1653-5723 School of Computer Science and Communication ISRN KTH/CSC/A--15/08--SE SE-100 44 Stockholm ISBN 978-91-7595-545-2 SWEDEN Akademisk avhandling som med tillstånd av Kungl Tekniska högskolan framläg- ges till offentlig granskning för avläggande av teknologie doktorsexamen i datalogi den 22 maj 2015 klockan 14:00 i Kollegiesalen, Administrationsbyggnaden, Kungl Tekniska högskolan, Valhallavägen 79, Stockholm. © Björn Terelius, May 2015 Tryck: Universitetsservice US AB iii Abstract Cryptographic protocols are widely used on the internet, from relatively simple tasks such as key-agreement and authentication to much more com- plex problems like digital cash and electronic voting. Electronic voting in particular is a problem we investigate in this thesis. In a typical election, the main goals are to ensure that the votes are counted correctly and that the voters remain anonymous, i.e. that nobody, not even the election authorities, can trace a particular vote back to the voter. There are several ways to achieve these properties, the most general being a mix-net with a proof of a shuffle to ensure correctness. We propose a new, conceptually simple, proof of a shuffle. We also investigate a mix-net which omits the proof of a shuffle in favor of a faster, heuristically secure verification. We demonstrate that this mix-net is susceptible to both attacks on correctness and anonymity. A version of this mix-net was tested in the 2011 elections in Norway. We also look at a simple and widely used proof of knowledge of a discrete logarithm in groups of prime order. While the requirement of prime order is well known, we give a precise characterization of what the protocol proves in a group of composite order. Furthermore, we present attacks against a class of protocols of the same form, which shows that the protocol cannot easily be extended to groups where the order is composite or unknown. We finally look at the problem of music and video piracy. Using a buyer- seller watermark to embed a unique watermark in each sold copy has been proposed as a deterrent since it allows a seller who discovers a pirated copy to extract the watermark and find out which buyer released it. Existing buyer- seller watermarking schemes assume that all copies are downloaded directly from the seller. In practice, however, the seller wants to save bandwidth by allowing a paying customer to download most of the content from other buy- ers. We introduce this as an interesting open research problem and present a proof-of-concept protocol which allows transfer of content between buy- ers while keeping the seller’s communication proportional to the size of the watermark rather than the size of the content. iv Sammanfattning Kryptografiska protokoll används i stor omfattning på internet, för att lösa allt från enkla uppgifter som nyckelutbyte och autentisering till komplexa problem som digitala pengar och elektroniska val. I den här avhandlingen är elektroniska val av speciellt intresse. I ett typiskt valsystem är målen att garantera att rösterna räknas kor- rekt och att ingen, inte ens valförrättaren, kan spåra en röst tillbaka till den röstande. Det finns flera metoder för att åstadkomma detta, men den mest generella är mixnät med ett så kallat “proof of a shuffle” för att garantera korrekthet. Vi föreslår i avhandlingen ett nytt, konceptuellt enkelt, “proof of a shuffle”. Vi undersöker också ett mixnät som använder ett snabbt heuristiskt argument för korrekthet istället för ett “proof of a shuffle”. Vi demonstrerar att både korrekthet och anonymitet kan angripas i det mixnätet. En version av samma mixnät användes i valet 2011 i Norge. Vi undersöker också ett enkelt bevis av kunskap om en diskret logaritm i en grupp. Det är sedan länge välkänt att just det protokollet kräver att gruppen har primtalsordning, men vi ger en karaktärisering av vad som händer i en grupp av sammansatt ordning. Vidare presenterar vi attacker mot en klass av protokoll med samma struktur, vilket visar att protokollet inte enkelt kan utvidgas till grupper av okänd eller sammansatt ordning. Slutligen studerar vi problemet med piratkopiering av film och musik. Det har föreslagits att vattenmärkning kan användas för att bädda in ett unikt vattenmärke i varje såld kopia. En säljare som upptäcker en piratkopia kan extrahera vattenmärket och därmed avslöja vilken köpare som läckte kopi- an. Existerande vattenmärkningssystem förutsätter att alla kopior laddas ner direkt från säljaren, men i praktiken vill säljaren ofta reducera mängden da- tatrafik genom att låta en ny betalande kund ladda ner kopian från tidigare köpare. Vi introducerar detta som ett intressant öppet problem och presen- terar ett protokoll som tillåter överföring av data mellan köpare och som bara kräver att säljaren kommunicerar data proportionellt mot storleken på vattenmärket istället för mot storleken på filen. Contents Contents v Acknowledgements vii List of Papers and Organization of this Thesis ix 1 Introduction 1 1.1 Cryptographic protocols . 2 1.2 Provable security . 4 1.3 Computational complexity and hard problems . 4 1.4 Interactive proofs and zero-knowledge . 6 1.5 Contributions . 7 2 Cryptographic primitives 11 2.1 Encryption schemes . 11 2.2 Commitment schemes . 17 2.3 Zero-knowledge proofs . 20 2.4 Proofs of knowledge . 24 2.5 The birthday paradox . 24 3 Σ-protocols and groups of unknown order 27 3.1 Schnorr’s proof of knowledge . 27 3.2 Σ-protocols . 32 3.3 Why require prime order groups? . 34 3.4 Previous work and our contributions . 36 4 Application: Electronic voting 39 4.1 Goals of the election system . 39 4.2 Homomorphic tallying . 41 4.3 Mix-nets . 42 4.4 Randomized partial checking . 47 5 Application: Digital watermarking 51 v vi CONTENTS 5.1 Watermarking . 51 5.2 Buyer-seller protocols . 54 5.3 Collusion attacks and collusion resistance . 55 5.4 Contributions . 56 6 Discussion 59 Bibliography 61 I Included papers 67 Acknowledgements I would like to first thank my main supervisor Douglas Wikström both for intro- ducing me to the area of cryptographic protocols, and for always taking the time to share his knowledge, discuss ideas or give feedback. I also want to thank Johan Håstad for reading this thesis and providing many helpful comments. Johan has an ability to immediately understand any problem that always amazes me. I have spent my graduate years in the theoretical computer science group at the Royal Institute of Technology which has provided a great environment to work and study in. I am grateful to all of its members. There are, however, some people I want to mention in particular. I shared an office with Karl Palmskog for more than five years. During this time we have had many interesting discussions on a wide range of topics including philosophy, politics, ethics and the foundations of mathematics. Initially, Karl and I did not have a whiteboard in the office. This was remedied by our fellow PhD student Torbjörn Granlund, who brought a whiteboard with the comment “You can’t do research without a whiteboard”. He did not say where he procured the whiteboard and I preferred to not make inquiries. Torbjörn and I have also helped each other both to procrastinate and not to procrastinate our studies and I am very grateful for it. During shorter periods I also shared the office with Pedro de Carvalho Gomes and later with Daniel Bosk, both being great company. I would also like to mention Gunnar Kreitz who was the only other student doing cryptography when I started, and Emma Enström who I had met already during my first undergraduate courses in physics. I am also grateful to my friends outside of academia, who will probably never read this, for providing welcome distractions from time to time. And last, but certainly not the least, thanks goes to my family for their support, in particular to Ylva Terelius for reading and commenting on much of this thesis. Thank you! vii List of Papers and Organization of this Thesis This thesis is based on the following four papers. [59] B. Terelius and D. Wikström. “Efficiency Limitations of Σ-Protocols for Group Homomorphisms Revisited”. In SCN 2012, volume 7485 of Lecture Notes in Computer Science, pages 461-476. Springer, 2012. [58] B. Terelius and D. Wikström. “Proofs of Restricted Shuffles”. In Africacrypt 2010, volume 6055 of Lecture Notes in Computer Science, pages 100-113. Springer, 2010. [29] S. Khazaei, B. Terelius and D. Wikström. “Cryptanalysis of a Universally Ver- ifiable Re-encryption Mixnet”. In EVT/WOTE 2012. USENIX Association, 2012. [57] B. Terelius. “Towards Transferable Watermarks in Buyer-Seller Watermarking Protocols”. In WIFS 2013, pages 197-202. IEEE, 2013. The thesis is split into two parts. Although the papers are intended to be self-contained, the first part provides a more general introduction and establishes the context for each paper. More specifically, Chapter 1 contains an introduction and high-level summary accessible to a general reader. Chapter 2 introduces the necessary cryptographic background and standard definitions that are used in the remainder of the text. Chapter 3 covers Σ-protocols and the results of paper [59]. Chapter 4 discusses the problems of electronic voting and various solutions, in particular mix-nets. It provides the context for paper [58] and [29]. Chapter 5 introduces buyer-seller watermarking for copyright protection and states the results of paper [57]. The second part of the thesis contains the four papers with the technical details. ix Chapter 1 Introduction Cryptography, or the art of writing secret messages, has a very long history.