Cryptographic protocols

Slides:



Advertisements
Similar presentations
Security and Privacy over the Internet Chan Hing Wing, Anthony Mphil Yr. 1, CSE, CUHK Oct 19, 1998.
Advertisements

Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
More on SSL/TLS. Internet security: TLS TLS is one of the more prominent internet security protocols. TLS is one of the more prominent internet security.
Digital Signatures. Anononymity and the Internet.
Data encryption with big prime numbers
Section 3.8: More Modular Arithmetic and Public-Key Cryptography
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
CRYPTOGRAPHY WHAT IS IT GOOD FOR? Andrej Bogdanov Chinese University of Hong Kong CMSC 5719 | 6 Feb 2012.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Computer Science Public Key Management Lecture 5.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
Public-Key Cryptography CS110 Fall Conventional Encryption.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
6. Esoteric Protocols secure elections and multi-party computation Kim Hyoung-Shick.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Network Security – Special Topic on Skype Security.
Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
1 Network Security Basics. 2 Network Security Foundations: r what is security? r cryptography r authentication r message integrity r key distribution.
CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.
What use are prime numbers? ?. o All the primes, apart from 2, are odd numbers. o 1 is not a prime number. Why? o There are infinitely many prime numbers!
Chapter 12: Cryptography MAT 320 Spring Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
What is in a name? Identity-based cryptography. How public-key crypto works When you use public key cryptography, you can publish a value (public key)
Encryption Take 2: Practical details
Digital Signatures.
Lesson 2-18 AP Computer Science Principles
CS480 Cryptography and Information Security
Security Outline Encryption Algorithms Authentication Protocols
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Cryptography Much of computer security is about keeping secrets
Cryptography Reference: Network Security
Cryptography Reference: Network Security
Public Key Encryption Systems
Chapter 7 Network Security
Uses Uses of cryptography Lab today on RSA
Public-key Cryptography
Big Numbers: Mathematics and Internet Commerce
Basic Network Encryption
The TESLA Broadcast Authentication Protocol CS 218 Fall 2017
Using SSL – Secure Socket Layer
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Public Key Cryptography
Network Security Basics
Protocol ap1.0: Alice says “I am Alice”
CS2911 Week 9, Class 1 Today Discussion on RSA Video Eavesdropping
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
NET 311 Information Security
Lecture 10: Network Security.
Public-Key, Digital Signatures, Management, Security
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Basic Network Encryption
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Diffie/Hellman Key Exchange
Security: Integrity, Authentication, Non-repudiation
Public Key Encryption Systems
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Chapter 8 roadmap 8.1 What is network security?
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Key Exchange With Public Key Cryptography
Presentation transcript:

Cryptographic protocols Or how to use maths to keep secrets Vanessa Teague, March 2017 vjteague@unimelb.edu.au

Short bio I did my bachelor’s degree here at UniMelb (in maths and CS) I did my PhD at Stanford Uni in California I am interested in using cryptography for large complicated computations in which you don’t trust all the participants My favourite research application is electronic elections In which there’s a fair argument for not trusting anyone I’m also interested in online privacy, record linkage, and open data

Chapter 1: Public Key cryptography Or how to send secret messages to people you haven’t met

What’s cryptography? Sending messages that are secret from everyone but the intended recipient The sender has to “hide” the message for sending, so nobody else can understand it This is called encrypting The receiver has to “un-hide” and recover the message This is called decrypting Public key cryptography is one of the greatest ideas in computer science ever

Before public-key cryptography There was secret-key cryptography Both the sender and the receiver had to agree on the secret key in advance They had to “meet” somehow Encrypting and decrypting used the same key These are still used, e.g. AES Receiver Sender

What’s public-key cryptography? The receiver generates two keys: a public key e (for encrypting), and a private key d (for decrypting) She publicises the public key e People use this for encrypting messages She keeps the private key d secret She uses this for decrypting messages

Picture of public-key cryptography Receiver Sender RSA RSA The matching orange colour is supposed to show that this key goes with this padlock.

Example: RSA (for the mathematically inclined) The receiver thinks of two large prime numbers p,q About 300 digits long She multiplies them together to get N=pq She generates the public key e (almost any e will do) She publicises (N, e). This is her full public key. To encrypt message m, compute me mod N (This means take the remainder when me is divided by N) The receiver can decrypt because she knows p and q Take my word for this for now – it’s not supposed to be obvious Nobody else can factorise N – the computation takes too long

Example: RSA (for the even more mathematically inclined) The receiver thinks of two large prime numbers p,q About 300 digits long She multiplies them together to get N=pq She generates the public key e (almost any e will do as long as it’s coprime to (p-1)(q-1)) She publicises (N, e). This is her full public key. To encrypt message m, Pad m with a carefully chosen random string r Compute (m || r)e mod N (This means take the remainder when (m || r)e is divided by N) The receiver can decrypt because she knows p and q Take my word for this for now – it’s not supposed to be obvious But if you look up the Wikipedia RSA page at See http://en.wikipedia.org/wiki/RSA_(algorithm) and the Euler-Fermat Theorem, you’ll be able to figure it out. Nobody else can factorise N. The computation takes too long Strictly speaking, breaking RSA has never been shown to be as difficult as factorising N, but nobody has found a faster way to do it either

The Chinese remainder theorem https://en.wikipedia.org/wiki/RSA_%28cryptosystem%29#Using_the_Chinese_remainder_algorithm

Q: How long does e need to be? A: Not very long, because padding m with random junk ensures that me mod N is always many times larger than N. Choosing e = 1 + 216 = 65,537 is popular because it makes me easy to compute quickly. There are subtle reasons why very small e is insecure. If you’re really interested, see http://crypto.stanford.edu/~dabo/abstracts/RSAattack-survey.html

What is that good for? Exchanging a secret key for secret-key cryptography The sender generates a secret key, encrypts a message with the secret key, encrypts the secret key with the receiver’s public key, and sends the encrypted message and the encrypted key. The receiver Uses her private key to decrypt the secret key Uses the secret key to decrypt the message This is (almost but not quite) how SSL/TLS works, when you get a comforting little lock at the bottom of your screen before you send your credit card number Exercise: draw a picture of this protocol, using boxes, padlocks and keys

What else is that good for? Lots of people sending to the same receiver e.g. in electronic voting, everyone sends their vote to the Electoral Commission Encrypted with the Commission’s public key

OK, great, now everything is perfectly secure, right? 1. Only if the RSA parameters are properly generated (with strong randomness) to prevent forgery 2. A signature is only as good as your confidence you’ve got the right public key So how do you find the right public key?

Chapter 2: Certificates Or how to identify the public key of the person you want to communicate with

Certificate A certificate is just a special kind of signed message, in which The message says “XYZ is the public key of So-and-so” With some other data, e.g. a date. The signer is supposed to be someone (whose public key) you already know A typical web browser has lots of certificate authorities’ public keys installed when it ships. Sometimes they’re used in chains When you know the beginning, and what to check the public key of the end You can check them yourself E.g. using the “examine certificate” option in Windows, Or by using “openssl verify” on nutmeg/dimefox

Chapter 3: Things can go wrong on the Internet (a very short intro)

Cloudbleed From The Register: /* generated code. p = pointer, pe = end of buffer */ if ( ++p == pe ) goto _test_eof; What happens is that elsewhere p becomes greater than pe, thus it avoids the length check, allowing the buffer to overflow with extra information. https://www.theregister.co.uk/2017/02/24/cloudbleed_buffer_overflow_bug_spaffs_personal_data/

Chapter 4: Internet voting Or how to use maths to save democracy

What’s wrong with this picture? Election outcome PCs Encrypted votes Voters RSA RSA Electoral Commission server with decryption key RSA

Answers from the class

Security Requirements Verifiability, so that no-one can manipulate the output Only eligible voters vote At most once Voters should get evidence that their vote was Cast as they intended Counted as cast Everyone gets evidence votes were properly tallied Privacy, so coercers can't manipulate the inputs Even if the voter tries to prove how they voted (receipt- freeness) Achieving both is hard, especially for remote voting I don’t know how to solve the problem completely, and neither does anybody else

Factoring RSA Export keys (FREAK) First some history: In ancient times (around the 1990s) the US government restricted the export of strong crypto, in particular of RSA using more than 512 bit keys. Web servers and clients within the US could use strong RSA parameters; Software made outside the US was (obviously) not bound by the restriction, but Software produced in the US but exported outside was restricted to this “Export grade” crypto So lots of servers (and clients) maintained the option to use “export grade” crypto, just in case they had to communicate with a restricted computer Unfortunately, many still do (or did until very recently) Many servers used the same 512-bit key over and over again. 512-bit “export grade” RSA now costs about $100 to break running overnight on Amazon’s EC2 cloud. (https://www.cis.upenn.edu/~nadiah/projects/faas/)

FREAK – intercepting SSL/TLS key establishment 1. Client hello: I’d like to use 1024 bit RSA Or 2048 bit RSA Or … 3. Server response: OK, here’s my 512-bit RSA-EXP Key (with valid Certificate chain) 4. (Buggy) Client: Accepts 512-bit key Uses it to encrypt. 2. Client hello: I can only use 512 bit RSA 5. Attacker: Uses factored 512-bit key to control SSL/TLS session

NSW iVote Internet voting security The iVote internet voting system was trusted recently in the NSW state election for the return of 280,000 electronic ballots During the election period, Alex Halderman and I found a serious security hole that left votes open to manipulation and privacy breach using the FREAK attack We notified the Australian CERT, who notified the NSW Electoral Commission, who fixed it, but by then 66,000 votes had been cast The final margin of the last seat in the NSW Legislative Council was 3177 votes