Cryptografie Aan Het Werk
Total Page:16
File Type:pdf, Size:1020Kb
Cryptogra¯e aan het Werk Cryptogra¯e aan het Werk Gerard Tel (Red.) iv Inhoudsopgave Inhoudsopgave v Voorwoord ix 1 Calling with Skype and Zfone (R¶emonvan de Kamp ) 1 1.1 The Public Switched Telephone Network . 1 1.2 Skype . 2 1.3 Zfone . 4 Summary and Conclusions . 7 2 Sleuteluitwisseling (Eelco Lempsink ) 9 2.1 Veiligheidseisen . 9 2.2 Protocollen . 10 Samenvatting en conclusies . 15 3 NTRU (Mark Stobbe ) 17 3.1 NTRU . 17 3.2 Aanvallen . 20 Samenvatting en conclusies . 21 4 Microsoft Crypto API (Pieter Hoogestijn ) 23 4.1 Cryptographic Service Providers . 23 4.2 Welke applicaties maken gebruik van de Crypto API . 24 4.3 NSA invloeden op de CryptoAPI . 26 4.4 CryptoAPI in de aanval . 27 5 OpenPGP (Sander Schuckman ) 29 5.1 Werking . 29 5.2 Berichtformaat . 31 5.3 Aanvallen . 33 Samenvatting en conclusies . 37 6 Side Channel Attacks (Kasper Brink ) 39 6.1 Achtergrond . 39 6.2 Simple Branch Prediction Analysis . 43 6.3 Di®erential Power Analysis . 47 Samenvatting en conclusies . 52 v vi Inhoudsopgave 7 Hellman Voorbij (Max Waaijers ) 53 7.1 Time/Memory tradeo® aanvallen . 53 7.2 Time/Memory/Data tradeo® aanvallen . 56 7.3 T/M/K aanval op UNIX wachtwoorden . 58 7.4 Ondergrens . 59 Samenvatting en conclusies . 60 8 UPnPTM (Paul Bouman ) 61 8.1 Doelstelling van UPnPTM .......................... 61 8.2 Ontwerp van UPnPTM ............................ 62 8.3 Cryptogra¯e in UPnPTM ........................... 67 8.4 UPnPTM in de praktijk . 71 Samenvatting en conclusies . 73 9 Smashing SMASH (Roeland Luitwieler ) 75 9.1 Inleiding . 75 9.2 SMASH . 76 9.3 Het breken van SMASH . 82 Samenvatting en conclusies . 84 10 Privacy-Preserving Data Mining (Henno Vermeulen ) 85 10.1 Data Mining . 86 10.2 Secure Multiparty Computation . 87 10.3 Mining Association Rules . 89 10.4 Secure Scalar Product Computation . 94 Summary and Conclusions . 99 11 Loterijen (Ruben van der Zwaan ) 101 11.1 Aanvallen . 103 11.2 Eigenschappen van loterijen . 104 11.3 Implementatie van een Elektronische Loterij . 105 11.4 Technieken . 108 11.5 Samenvatting . 109 12 Digitale identi¯catie (R.A. van den Beukel ) 111 12.1 De¯nities . 112 12.2 Internetbankieren . 114 12.3 Elektronische Overheid . 118 12.4 Een gevaarlijke chaos . 120 Samenvatting en conclusies . 122 13 Hardeschijf versleuteling (Martin Warmer ) 123 13.1 Bestands versleuteling . 123 13.2 Een eerste oplossing . 124 13.3 Getweakte versleuteling . 125 13.4 LRW-AES . 126 13.5 XTS-AES . 127 Cryptogra¯e aan het Werk vii Samenvatting en conclusies . 129 14 Valkuilen bij kleine exponenten in RSA (Jefrey Lij±jt ) 131 14.1 Introductie in het kraken van RSA . 131 14.2 Oude bekenden . 132 14.3 Het kettingbreukalgoritme . 133 14.4 Het roosteralgoritme . 134 14.5 Uit balans . 135 14.6 Staat van de kunst . 135 Samenvatting en conclusies . 136 15 Een geheugen e±ciÄente achterdeur in RSA (Jos Roseboom ) 137 15.1 Elliptische krommen . 138 15.2 SETUP . 142 Samenvatting en conclusies . 145 Bibliogra¯e 147 Index 155 viii Inhoudsopgave Voorwoord Deze bundel bevat literatuurstudies die besproken zijn op een klein symposium, genaamd Cryptogra¯e aan het werk, gehouden op 25 januari 2007 aan de Universiteit Utrecht. Deelname aan het symposium en schrijven in deze bundel waren verplichtingen in het college Cryptogra¯e (november 2006 tot januari 2007). Er werden 17 presentaties gehpuden (door 18 sprekers), verdeeld over de thema's Systemen, Aanvallen, Nieuwe toepassingen en Onderzoeksthema's: Ik hoop dat deze bundel de lezer een idee zal gevan van het symposium en van de inzet van de studenten. Gerard Tel, juli 2007. email: [email protected] ix Chapter 1 Calling with Skype and Zfone Written by R¶emonvan de Kamp This chapter is about security in Skype and Zfone. For completeness and comparison, a small section about calling via the Public Switched Telephone Network (PSTN ) is included. Througout this chapter, after the short overview of the PSTN, the encryption used in Skype and Zfone (The PSTN uses no encryption) will be described in terms of installation, call establishment and during a call. Skype will be described ¯rst and Zfone will be described after that. 1.1 The Public Switched Telephone Network The best known and most used way of calling is through the PSTN, the Public Switched Telephone Network. This is a circuit-switched network, meaning that when person A calls person B, a physical connection is made through the network between the two phones. All information goes through this connection, nothing is routed in other routes through the network. Because of this and because by default calls made this way are not in any way encrypted, calls can be eavesdropped only by persons who have physical access to either the call switching hardware within the phone company or the local loop1. Eavesdropping in the local loop is very unlikely, because one would have to dig into the ground to reveal the phone line and this digging in public will of course draw lot attention. There exist phones that are able to encrypt calls, given that both ends of the conversation have the same type of phone, but this falls out of the scope of this chapter. 1The local loop is the last section of phone line that goes from the local phone junction to the customer's house. 1 2 Calling with Skype and Zfone 1.2 Skype Skype is an immensely popular program for making calls. Originally it was created by Niklas Zennstrom and Janus Friis, who also developed KaZaA, but now it is in the hands of eBay, who bought it for $2.6 billion. From the beginning, despite several requests to disclose this, the creators have been vague about the encryption techniques used in Skype. So Skype relies on security by disclosure. Other systems have also relied on the disclosure of their cryptography, but have been revealed by reverse engineering2. However the Skype executable uses anti-debug tech- niques, code obfuscation and an heavily encrypted executable, which is decrypted at run-time, directly after which the code for decryption is erased from memory, making it impossible to get a decrypted version of the whole executable[BD06]. As a result, there is no public information available about the real Skype encryption. Therefore, this section will be based on a document [Ber05] by Tom Berson of the Anagram Lab- oratories [KAMa]. He has worked for Skype for some time to analyze and criticize the cryptography used in their program. This makes it questionable how reliable a source he is (because he worked for Skype, Skype could have ordered him to bias his report). The rest of this section is information taken from his document, and can therefore unfortunately not be assumed to be the absolute truth about the workings of Skype. 1.2.1 Installation The cryptographic secret in Skype is the Skype Central Server's private signing key SS. Each client has the corresponding public veri¯cation key SV hard-coded in the executable. When a user uses Skype for the ¯rst time3, he or she will be asked to provide a username (A) and a password (PA). The application will then generate an RSA keypair VA,SA 4 and send A, Hash (PA) and VA to the Skype Central Server, using AES with a session key that is created using random functions from the user's Operating System5. The client can, and will check, that it is actually talking to the Skype Central Server6. The Skype Central Server will check if the username is unique and otherwise acceptable 7 under Skype naming rules . If this is the case, the server will store (A, Hash(Hash(PA)) in its user database. Next, it forms and signs an Identity Certi¯cate for A, ICA, which 8 contains, among other things , the Skype Central Server signature binding A and VA, S fA, VAgS and the key identi¯er of the SS. The Skype Central Server's Signing key used is determined by the fact wether the user has subscribed to extra options such as 2For instance the encryption mechanism of mobile phones 3Assuming he or she doesn't have a username/password combination already 4It is currently unknown what hash-function Skype uses 5It is currently unknown how this connection is established exactly 6It is currently unknown how this is achieved, but probably via a challenge from the client which gets returned and signed by the server's signing key SS 7For example that it has no invalid characters in it and is between 6 and 32 characters long, all of which is also checked client-side 8It is currently unknown what other 'things' 1.2 Skype 3 SkypeOut or SkypeIn. If the latter is the case, a SS with a modulus of 1536 bits will be used, otherwise a SS of 2048 bits will be used. After this process is done, ICA will be returned to A. 1.2.2 Establishing a call When a Skype user (U1) calls another Skype user (U2), a peer-to-peer connection will be made through the internet. How this connection is established falls out of the scope of this chapter. Once the connection is established, the peers challenge each other with 64 bits nonces9. The peers modify these received nonces in a standard way10, sign it with their own RSA private signing key SU1 and SU2 respectively, and send the result back to the sender. After this, they exchange their Identity Certi¯cates ICP1 and ICP2 . The receivers can verify that these Identity Certi¯cates are signed by the server because they have the Skype Central Server's public veri¯cation key encoded in their executables.