Trusted 3rd parties Basic key exchange

Slides:



Advertisements
Similar presentations
Merkle Puzzles Are Optimal
Advertisements

Public Key Cryptography Nick Feamster CS 6262 Spring 2009.
1 Key Exchange Solutions Diffie-Hellman Protocol Needham Schroeder Protocol X.509 Certification.
Public Key Encryptions CS461/ECE422 Fall Reading Material Text Chapters 2 and 20 Handbook of Applied Cryptography, Chapter 8 –
Dan Boneh Message integrity Message Auth. Codes Online Cryptography Course Dan Boneh.
CNS2010lecture 6 :: key management1 ELEC5616 computer and network security matt barrie
ElGamal Security Public key encryption from Diffie-Hellman
Public Key Cryptography INFSCI 1075: Network Security – Spring 2013 Amir Masoumzadeh.
Public Key Cryptography David Brumley Carnegie Mellon University Credits: Many slides from Dan Boneh’s June 2012 Coursera crypto class,
An Introduction to Pairing Based Cryptography Dustin Moody October 31, 2008.
CIS 725 Key Exchange Protocols. Alice ( PB Bob (M, PR Alice (hash(M))) PB Alice Confidentiality, Integrity and Authenication PR Bob M, hash(M) M, PR Alice.
Dan Boneh Public key encryption from Diffie-Hellman ElGamal Variants With Better Security Online Cryptography Course Dan Boneh.
CS555Topic 191 Cryptography CS 555 Topic 19: Formalization of Public Key Encrpytion.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Public Key Algorithms …….. RAIT M. Chatterjee.
CS555Spring 2012/Topic 161 Cryptography CS 555 Topic 16: Key Management and The Need for Public Key Cryptography.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Elliptic Curve Cryptography (ECC) Mustafa Demirhan Bhaskar Anepu Ajit Kunjal.
Introduction to Modern Cryptography Lecture 5 Number Theory: 1. Quadratic residues. 2. The discrete log problem. Intro to Public Key Cryptography Diffie.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Public Key Algorithms 4/17/2017 M. Chatterjee.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
Dan Boneh Basic key exchange The Diffie-Hellman protocol Online Cryptography Course Dan Boneh.
Dan Boneh Basic key exchange Public-key encryption Online Cryptography Course Dan Boneh.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
Dan Boneh Public Key Encryption from trapdoor permutations The RSA trapdoor permutation Online Cryptography Course Dan Boneh.
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
0x1A Great Papers in Computer Security
Computer Science Public Key Management Lecture 5.
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Dan Boneh Authenticated Encryption Definitions Online Cryptography Course Dan Boneh.
Dan Boneh Intro. Number Theory Intractable problems Online Cryptography Course Dan Boneh.
Dan Boneh Public Key Encryption from trapdoor permutations Public key encryption: definitions and security Online Cryptography Course Dan Boneh.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Dan Boneh Stream ciphers The One Time Pad Online Cryptography Course Dan Boneh.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Dan Boneh Public key encryption from Diffie-Hellman The ElGamal Public-key System Online Cryptography Course Dan Boneh.
Lecture 14 ISAKMP / IKE Internet Security Association and Key Management Protocol / Internet Key Exchange CIS CIS 5357 Network Security.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Dan Boneh Public key encryption from Diffie-Hellman The ElGamal Public-key System Online Cryptography Course Dan Boneh.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Dan Boneh Basic key exchange Merkle Puzzles Online Cryptography Course Dan Boneh.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Dan Boneh Stream ciphers Stream ciphers are semantically secure Online Cryptography Course Dan Boneh Goal: secure PRG ⇒ semantically secure stream cipher.
Key Management Network Systems Security Mort Anvari.
Dan Boneh Basic key exchange Trusted 3 rd parties Online Cryptography Course Dan Boneh.
Dan Boneh Odds and ends Deterministic Encryption Online Cryptography Course Dan Boneh.
1 Authenticated Key Exchange Rocky K. C. Chang 20 March 2007.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Dan Boneh Public Key Encryption from trapdoor permutations Constructions Online Cryptography Course Dan Boneh Goal: construct chosen-ciphertext secure.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys – use of public-key.
Encryption and Integrity
Group theory exercise.
Cryptography Lecture 24.
The power of Pairings towards standard model security
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Secure Diffie-Hellman Algorithm
Cryptography Lecture 23.
Lecture 6.2: Protocols - Authentication and Key Exchange II
Presentation transcript:

Trusted 3rd parties Basic key exchange Online Cryptography Course Dan Boneh Basic key exchange Trusted 3rd parties Now that we know how two users can protect data using a shared key, the next question is how these two users generate a shared key. This question will take us into the world of public-key crypto. In this module we will look at a few toy key exchange protocols as a way to introduce the main ideas of public-key crypto. We will come back to key exchange and design secure key exchange protocols after we build a few more public-key tools.

Key management Problem: n users. Storing mutual secret keys is difficult Total: O(n) keys per user

A better solution Online Trusted 3rd Party (TTP) TTP Users u1, …, un. And alice and bob. They have shared keys Ka, Kb. Every user only remembers one key.

Generating keys: a toy protocol Alice wants a shared key with Bob. Eavesdropping security only. Bob (kB) Alice (kA) TTP “Alice wants key with Bob” choose random kAB ticket kAB kAB (E,D) a CPA-secure cipher

Generating keys: a toy protocol Alice wants a shared key with Bob. Eavesdropping security only. Eavesdropper sees: E(kA, “A, B” ll kAB ) ; E(kB, “A, B” ll kAB ) (E,D) is CPA-secure ⇒ eavesdropper learns nothing about kAB Note: TTP needed for every key exchange, knows all session keys. (basis of Kerberos system)

Toy protocol: insecure against active attacks Example: insecure against replay attacks Attacker records session between Alice and merchant Bob For example a book order Attacker replays session to Bob Bob thinks Alice is ordering another copy of book

Key question Can we generate shared keys without an online trusted 3rd party? Answer: yes! Starting point of public-key cryptography: Merkle (1974), Diffie-Hellman (1976), RSA (1977) More recently: ID-based enc. (BF 2001), Functional enc. (BSW 2011)

End of Segment

Online Cryptography Course Dan Boneh Basic key exchange Merkle Puzzles

Key exchange without an online TTP? Goal: Alice and Bob want shared key, unknown to eavesdropper For now: security against eavesdropping only (no tampering) Alice Bob eavesdropper ?? Can this be done using generic symmetric crypto?

Merkle Puzzles (1974) Answer: yes, but very inefficient Main tool: puzzles Problems that can be solved with some effort Example: E(k,m) a symmetric cipher with k ∈ {0,1}128 puzzle(P) = E(P, “message”) where P = 096 ll b1… b32 Goal: find P by trying all 232 possibilities

Merkle puzzles Alice: prepare 232 puzzles For i=1, …, 232 choose random Pi ∈{0,1}32 and xi, ki ∈{0,1}128 set puzzlei ⟵ E( 096 ll Pi , “Puzzle # xi” ll ki ) Send puzzle1 , … , puzzle232 to Bob Bob: choose a random puzzlej and solve it. Obtain ( xj, kj ) . Send xj to Alice Alice: lookup puzzle with number xj . Use kj as shared secret

In a figure kj kj puzzle1 , … , puzzlen Alice Bob xj Alice’s work: O(n) (prepare n puzzles) Bob’s work: O(n) (solve one puzzle) Eavesdropper’s work: O( n2 ) (e.g. 264 time)

Impossibility Result Can we achieve a better gap using a general symmetric cipher? Answer: unknown But: roughly speaking, quadratic gap is best possible if we treat cipher as a black box oracle [IR’89, BM’09] Any key exchange protocol where participants make n queries to the cipher oracle, can be broken with O(n^2) queries to the cipher oracle. 2009: Boaz Barak, Mohammad Mahmoody-Ghidary 1989: Impagliazzo and Rudich

End of Segment

The Diffie-Hellman protocol Online Cryptography Course Dan Boneh Basic key exchange The Diffie-Hellman protocol

Key exchange without an online TTP? Goal: Alice and Bob want shared secret, unknown to eavesdropper For now: security against eavesdropping only (no tampering) Alice Bob eavesdropper ?? Can this be done with an exponential gap?

The Diffie-Hellman protocol (informally) Fix a large prime p (e.g. 600 digits) Fix an integer g in {1, …, p} Alice Bob choose random a in {1,…,p-1} choose random b in {1,…,p-1} Ba (mod p) = (gb)a = = (ga)b = Ab (mod p) “Alice”, A = ga (mod p) ; “Bob”, B = gb (mod p) kAB = gab (mod p)

Security (much more on this later) Eavesdropper sees: p, g, A=ga (mod p), and B=gb (mod p) Can she compute gab (mod p) ?? More generally: define DHg(ga, gb) = gab (mod p) How hard is the DH function mod p?

How hard is the DH function mod p? Suppose prime p is n bits long. Best known algorithm (GNFS): run time exp( ) cipher key size modulus size 80 bits 1024 bits 128 bits 3072 bits 256 bits (AES) 15360 bits As a result: slow transition away from (mod p) to elliptic curves Elliptic Curve size 160 bits 256 bits 512 bits

Elliptic curve Diffie-Hellman

Insecure against man-in-the-middle As described, the protocol is insecure against active attacks Alice MiTM Bob

⋯ Another look at DH ga gb gc gd Facebook Alice a Bob b Charlie c David d ⋯ KAC=gac KAC=gac For two users: DH. For three users: Joux. Beyond three users ???

⋯ An open problem ga gb gc gd Facebook Alice a Bob b Charlie c David d KABCD KABCD KABCD KABCD For two users: DH. For three users: Joux. Beyond three users ???

End of Segment

Public-key encryption Online Cryptography Course Dan Boneh Basic key exchange Public-key encryption

Establishing a shared secret Goal: Alice and Bob want shared secret, unknown to eavesdropper For now: security against eavesdropping only (no tampering) Alice Bob eavesdropper ?? This segment: a different approach

Public key encryption Alice Bob E D Picture of cipher

Public key encryption Def: a public-key encryption system is a triple of algs. (G, E, D) G(): randomized alg. outputs a key pair (pk, sk) E(pk, m): randomized alg. that takes m∈M and outputs c ∈C D(sk,c): det. alg. that takes c∈C and outputs m∈M or ⊥ Consistency: ∀(pk, sk) output by G : ∀m∈M: D(sk, E(pk, m) ) = m

Semantic Security For b=0,1 define experiments EXP(0) and EXP(1) as: b Def: E =(G,E,D) is sem. secure (a.k.a IND-CPA) if for all efficient A: AdvSS [A,E] = |Pr[EXP(0)=1] – Pr[EXP(1)=1] | < negligible pk b Chal. Adv. A m0 , m1  M : |m0| = |m1| (pk,sk)G() c  E(pk, mb) b’  {0,1} EXP(b)

Establishing a shared secret Alice Bob (pk, sk) ⟵ G() “Alice”, pk choose random x ∈ {0,1}128

Security (eavesdropping) Adversary sees pk, E(pk, x) and wants x ∈M Semantic security ⇒ adversary cannot distinguish { pk, E(pk, x), x } from { pk, E(pk, x), rand∈M } ⇒ can derive session key from x. Note: protocol is vulnerable to man-in-the-middle

Insecure against man in the middle As described, the protocol is insecure against active attacks Alice MiTM Bob (pk, sk) ⟵ G() (pk’, sk’) ⟵ G() “Alice”, pk choose random x ∈ {0,1}128 “Bob”, E(pk’, x) “Bob”, E(pk, x)

Public key encryption: constructions Constructions generally rely on hard problems from number theory and algebra Next module: Brief detour to catch up on the relevant background

Further readings Merkle Puzzles are Optimal, B. Barak, M. Mahmoody-Ghidary, Crypto ’09 On formal models of key exchange (sections 7-9) V. Shoup, 1999

End of Segment