Cryptography CS 555 Topic 34: SSL/TLS.

Slides:



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

Last Class: The Problem BobAlice Eve Private Message Eavesdropping.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
1 Lecture 17: SSL/TLS history, architecture basic handshake session initiation/resumption key computation negotiating cipher suites application: SET.
Cryptography and Network Security
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Internet Security Protocols
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Http Web Authentication Web authentication is used to verify a users identity before allowing access to certain web pages On web browsers you get a login.
EECC694 - Shaaban #1 lec #16 Spring Properties of Secure Network Communication Secrecy: Only the sender and intended receiver should be able.
TCP/IP Protocol Suite 1 Chapter 28 Upon completion you will be able to: Security Differentiate between two categories of cryptography schemes Understand.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Cryptography 101 Frank Hecker
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
CS555Topic 211 Cryptography CS 555 Topic 21: Digital Schemes (1)
SSL and https for Secure Web Communication CSCI 5857: Encoding and Encryption.
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Protecting Internet Communications: Encryption  Encryption: Process of transforming plain text or data into cipher text that cannot be read by anyone.
Introduction to Secure Sockets Layer (SSL) Protocol Based on:
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
- Richard Bhuleskar “At the end of the day, the goals are simple: safety and security” – Jodi Rell.
Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography (confidentiality) 8.3 Message integrity 8.4 End-point authentication.
SSL: Secure Socket Layer By: Mike Weissert. Overview Definition History & Background SSL Assurances SSL Session Problems Attacks & Defenses.
PRESENTATION ON SECURE SOCKET LAYER (SSL) BY: ARZOO THAKUR M.E. C.S.E (REGULAR) BATCH
Network security Presentation AFZAAL AHMAD ABDUL RAZAQ AHMAD SHAKIR MUHAMMD ADNAN WEB SECURITY, THREADS & SSL.
Web Security.
Executive Director and Endowed Chair
The Secure Sockets Layer (SSL) Protocol
Key management issues in PGP
Cryptography and Network Security
Public Key Cryptography
Computer Communication & Networks
Cryptography Reference: Network Security
Cryptography Reference: Network Security
Secure Sockets Layer (SSL)
COMP3220 Web Infrastructure COMP6218 Web Architecture
Originally by Yu Yang and Lilly Wang Modified by T. A. Yang
CSE 4095 Transport Layer Security TLS, Part II
Using SSL – Secure Socket Layer
CSE 4095 Transport Layer Security TLS
Cryptography Lecture 26.
Topic 11: Authenticated Encryption + CCA-Security
Public-Key Cryptography
Cryptography and Network Security
Cryptography Lecture 27.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Cryptography and Network Security
SSL (Secure Socket Layer)
Security in the Internet: IPSec, SSL/TLS, PGP, VPN, and Firewalls
CS Introduction to Operating Systems
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
The Secure Sockets Layer (SSL) Protocol
Lecture 10: Network Security.
Transport Layer Security (TLS)
CDK: Chapter 7 TvS: Chapter 9
Unit 8 Network Security.
Advanced Computer Networks
Cryptography Lecture 22.
Security at the Transport Layer
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Cryptography Lecture 25.
Cryptography and Network Security
Cryptography Lecture 27.
Chapter 8 roadmap 8.1 What is network security?
Cryptography Lecture 23.
Cryptography Lecture 26.
Presentation transcript:

Cryptography CS 555 Topic 34: SSL/TLS

Recap Digital Signatures Attacks on Plain RSA Signatures RSA-FDH Secure Identification Scheme + Fiat Shamir Transform Digital Signature Standard

What Does It Mean to “Secure Information” Confidentiality (Security/Privacy) Only intended recipient can see the communication Integrity (Authenticity) The message was actually sent by the alleged sender I love you Alice… - Bob We need to break up -Bob Alice Bob

Signcryption: Authenticity + Confidentiality Public Key: pk=(vk,ek) vk is used to verify messages ek is used to encrypt messages Secret Key: sk=(dk,sk) dk is used to decrypt messages sk is used to sign messages Goal: Design a mechanism that allows a sender S to send a message m to a receiver R Integrity Secrecy

Attempt 1: Encrypt then Authenticate Sender S computes c= Enc 𝐞𝐤 𝐑 𝑚 and sends R 𝑆,𝑐, Sign 𝐬𝐤 𝐒 𝑐 Receiver R decrypts c and then validates the signature This is the approach we used to build Authenticated Encryption with MACs Any problems here?

Attempt 1: Encrypt then Authenticate 𝐵𝑜𝑏,𝑐, Sign 𝐬𝐤 𝐁 𝑐 Devil,𝑐, Sign 𝐬𝐤 𝐃𝐞𝐯𝐢𝐥 𝑐 I wrote you this poem… I wrote you this poem… Alice Bob

Attempt 1: Encrypt then Authenticate Sender S computes c= Enc 𝐞𝐤 𝐑 𝑚 and sends R 𝑆,𝑐, Sign 𝐬𝐤 𝐒 𝑐 Receiver R decrypts c and then validates the signature This is the approach we used to build Authenticated Encryption with MACs Another Issue: How can R convince judge that sender S signed the message m? Judge can verify that S signed the ciphertext, but needs R’s key to decrypt c.

Attempt 2: Authenticate then Encrypt Sender S computes σ= Sign 𝐬𝐤 𝐒 𝑚 and sends R 𝑆, Enc 𝐞𝐤 𝐑 𝑚∥σ Receiver R decrypts ciphertext to obtain m and then validates the signature σ Solve the issue of non-repudiation. Receiver obtains a signature σ for m Any other Issues?

Attempt 2: Authenticate then Encrypt You are despicable Alice 𝐵𝑜𝑏, Enc 𝐞𝐤 𝐀𝐥𝐢𝐜𝐞 𝑚∥σ 𝐵𝑜𝑏, Enc 𝐞𝐤 𝐃𝐞𝐯𝐢𝐥 𝑚∥σ You are despicable Bob

Attempt 3: Sender S computes σ= Sign 𝐬𝐤 𝐒 𝑚∥𝑅 and sends R 𝑆, Enc 𝐞𝐤 𝐑 𝑆∥𝑚∥σ This works  So does encrypt then authenticate with c= Enc 𝐞𝐤 𝐑 𝑆∥𝑚 𝑆,𝑐, Sign 𝐬𝐤 𝐒 𝑐∥𝑅 Rule of Thumb: When signing a message with your secret key include identity of receiver When encrypting message with someone’s public key include your identity in message

Transport Security Layer (TLS) Standardized protocol based on processor SSL (Secure Socket Layer) Used for https connections by your browser Multiple Versions TLS 1.0, 1.1, 1.2 (version 1.3 in progress https://tools.ietf.org/html/draft-ietf-tls-tls13-18 ) We will focus only on high level details

Transport Security Layer (TLS) First Goal: Agree on a set of keys For Confidentiality Also Authentication Handshake Precondition: Client has a subset of {pk1,…pkn} --- public keys for several Certificate Authorities Server has a key-pair (pks,sks) for a KEM Client C begins by sending S a message indicating Protocol Versions + Ciphertext suites that he can run A random “nonce” NC

Transport Security Layer (TLS) Client C begins by sending S a message indicating Protocol Versions + Ciphertext suites that he can run A random “nonce” NC S responds by selecting the most recent version of the protocol it supports as well as an appropriate ciphersuite Also sends pkS and certificate 𝑐𝑒𝑟𝑡 𝑖→𝑆 (signed message form certificate authority i validating pkS) A nonce NS C checks to see if it has pki for CAi. Yes? Verify the certificate and ensure that it is not expired/revoked No? Abort/Ask Again

Transport Security Layer (TLS) Client C begins by sending S a message indicating Protocol Versions + Ciphertext suites that he can run A random “nonce” NC S responds by selecting the most recent version of the protocol it supports as well as an appropriate ciphersuite Also sends pkS and certificate 𝑐𝑒𝑟𝑡 𝑖→𝑆 (signed message form certificate authority i validating pkS) A nonce NS C checks to see if it has pki for CAi. Assuming pkS is validated… C runs 𝑐,𝑝𝑚𝑘 ← Encaps 𝑝𝑘 𝑆 1 𝑛 (pmk is pre-master key) C sends c to S (who will later use c and skS to recover pmk) C computes mk=KDF(pmk,NC,NS) (mk is master key) C computes four keys kC,kC’,kS,kS’= PRG(mk) C computes 𝜏 𝐶 ← MAC 𝑚𝑘 𝑡𝑟𝑎𝑛𝑠𝑐𝑟𝑖𝑝𝑡 and sends 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 to S

Transport Security Layer (TLS) Client Sends Message Sever Sends Message Encryption kC kS MAC kC’ kS’ Client C begins by sending S a message indicating Protocol Versions + Ciphertext suites that he can run A random “nonce” NC S responds by selecting the most recent version of the protocol it supports as well as an appropriate ciphersuite Also sends pkS and certificate 𝑐𝑒𝑟𝑡 𝑖→𝑆 (signed message form certificate authority i validating pkS) A nonce NS C checks to see if it has pki for CAi. Assuming pkS is validated… C runs 𝑐,𝑝𝑚𝑘 ← Encaps 𝑝𝑘 𝑆 1 𝑛 (pmk is pre-master key) C sends c to S who recovers pmk C computes mk=KDF(pmk,NC,NS) (mk is master key) C computes four keys kC,kC’,kS,kS’= PRG(mk) C computes 𝜏 𝐶 ← MAC 𝑚𝑘 𝑡𝑟𝑎𝑛𝑠𝑐𝑟𝑖𝑝𝑡 and sends 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 to S

Transport Security Layer (TLS) C checks to see if it has pki for CAi. Assuming pkS is validated… C runs 𝑐,𝑝𝑚𝑘 ← Encaps 𝑝𝑘 𝑆 1 𝑛 (pmk is pre-master key) C sends c to S who recovers pmk C computes mk=KDF(pmk,NC,NS) (mk is master key) C computes four keys kC,kC’,kS,kS’= PRG(mk) C computes 𝜏 𝐶 ← MAC 𝑚𝑘 𝑡𝑟𝑎𝑛𝑠𝑐𝑟𝑖𝑝𝑡 and sends 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 to S Sever Computes 𝑝𝑚𝑘← Decaps 𝑠𝑘 𝑆 𝑐 Computes mk=KDF(pmk,NC,NS) (mk is master key) Computes four keys kC,kC’,kS,kS’= PRG(mk) Validates 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 by Decrypt 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 with to obtain 𝜏 𝐶 If Vrfy 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 ≠1 or Vrfy 𝑚𝑘 𝑡𝑟𝑎𝑛𝑠𝑐𝑟𝑖𝑝𝑡, 𝜏 𝐶 ≠1 then abort Otherwise server and client agree so far on communication

Transport Security Layer (TLS) Sever Computes 𝑝𝑚𝑘← Decaps 𝑠𝑘 𝑆 𝑐 Computes mk=KDF(pmk,NC,NS) (mk is master key) Computes four keys kC,kC’,kS,kS’= PRG(mk) Validates 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 by Decrypt 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 with to obtain 𝜏 𝐶 If Vrfy 𝑘′ 𝑐 𝜏 𝐶 , MAC 𝑘′ 𝑐 𝐸𝑛𝑐 𝑘 𝑐 𝜏 𝐶 ≠1 or Vrfy 𝑚𝑘 𝑡𝑟𝑎𝑛𝑠𝑐𝑟𝑖𝑝𝑡, 𝜏 𝐶 ≠1 then abort Otherwise server and client agree so far on communication S computes 𝜏 𝑆 ← MAC 𝑚𝑘 𝑡𝑟𝑎𝑛𝑠𝑐𝑟𝑖𝑝𝑡′ and sends 𝐸𝑛𝑐 𝑘 𝑆 𝜏 𝑆 , MAC 𝑘′ 𝑆 𝐸𝑛𝑐 𝑘 𝑆 𝜏 𝐶 to C Client validates 𝜏 𝑆 ; otherwise aborts

Security Intuition C verifies certificate so it knows it is talking to S Knows that only legitimate S can learn pmk and mk If protocol finishes successfully then C knows that it shares four keys kC,kC’,kS,kS’ with S MAC on transcript? Ensures consistency Man-in-the-Middle attacker may attempt to modify ciphersuite E.g., force C and S to use old version of cipher with security bugs etc…

Transport Security Layer (TLS) Record Layer Protocol once C and S share keys they start communication Sequence numbers prevent replay attacks TLS 1.2 used authenticate-then-encrypt (can be problematic) Client Sends Message Sever Sends Message Encryption kC kS MAC kC’ kS’

Building Authenticated Encryption Attempt 3: (Authenticate-then-encrypt) Let Enc 𝐾 𝐸 ′ 𝑚 be a CPA- Secure encryption scheme and let Mac 𝐾 𝑀 ′ 𝑚 be a secure MAC. Let 𝐾= 𝐾 𝐸 , 𝐾 𝑀 then 𝐸𝑛𝑐 𝐾 𝑚 = Enc 𝐾 𝐸 ′ 𝑚∥𝑡 , where t=Mac 𝐾 𝑀 ′ 𝑚 Can be problematic for some CPA-Secure schemes…

Building Authenticated Encryption Attempt 3: (Authenticate-then-encrypt) Let Enc 𝐾 𝐸 ′ 𝑚 be a CPA- Secure encryption scheme and let Mac 𝐾 𝑀 ′ 𝑚 be a secure MAC. Let 𝐾= 𝐾 𝐸 , 𝐾 𝑀 then 𝐸𝑛𝑐 𝐾 𝑚 = Enc 𝐾 𝐸 ′ 𝑚∥𝑡 , where t=Mac 𝐾 𝑀 ′ 𝑚 𝐷𝑒𝑐 𝐾 𝑐 = 𝑚 = Dec 𝐾 𝐸 ′ 𝑐 . If 𝑚 is not padded correctly return “bad padding” Parse as 𝑚∥𝑡. If Vrfy 𝐾 𝑀 ′ 𝑚,𝑡 =1 return m. otherwise output “authentication failure”

Building Authenticated Encryption 𝐷𝑒𝑐 𝐾 𝑐 = 𝑚 = Dec 𝐾 𝐸 ′ 𝑐 . If is not padded correctly return “bad padding” Parse as 𝑚∥𝑡. If Vrfy 𝐾 𝑀 ′ 𝑚,𝑡 =1 return m. otherwise output “authentication failure” It is hard to ensure that the error messages cannot be distinguished! Timing Attacks Debugging Generic Integration of MAC scheme with Encryption scheme?

Next Class: Multiparty Computation Finished with Katz and Lindell! Read Wikipedia entry on Secure Multi-party computation Read Katz and Lindell page 187-188 (commitment schemes) OK, almost done 