Diffie-Hellman-Merkle Ramki Thurimella. 2 Key Exchange Protocol Establishing secret keys for N people Requires N(N-1)/2 separate keys This is a quadratic.

Slides:



Advertisements
Similar presentations
Diffie-Hellman Diffie-Hellman is a public key distribution scheme First public-key type scheme, proposed in 1976.
Advertisements

1 Key Exchange Solutions Diffie-Hellman Protocol Needham Schroeder Protocol X.509 Certification.
7. Asymmetric encryption-
Public Key Algorithms …….. RAIT M. Chatterjee.
UCB Security Jean Walrand EECS. UCB Outline Threats Cryptography Basic Mechanisms Secret Key Public Key Hashing Security Systems Integrity Key Management.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the orderQuestions? Review.
Windows Core Security1© 2006 Microsoft Corp Cryptography: Helping Number Theorists Bring Home the Bacon Since 1977 Dan Shumow SDE Windows Core Security.
Cryptography1 CPSC 3730 Cryptography Chapter 10 Key Management.
Introduction to Modern Cryptography Lecture 5 Number Theory: 1. Quadratic residues. 2. The discrete log problem. Intro to Public Key Cryptography Diffie.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering.
CS470, A.SelcukPublic Key Cryptography1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CSE331: Introduction to Networks and Security Lecture 20 Fall 2002.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Topic 5 Essential Public Key Crypto Methods.
Public Key Algorithms 4/17/2017 M. Chatterjee.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Dan Boneh Basic key exchange The Diffie-Hellman protocol Online Cryptography Course Dan Boneh.
Diffie-Hellman Key Exchange
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.
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
ElGamal Public Key Cryptography CS 303 Alg. Number Theory & Cryptography Jeremy Johnson Taher ElGamal, "A Public-Key Cryptosystem and a Signature Scheme.
Lecture 7b: The Diffie-Hellman Secret Sharing Scheme Wayne Patterson SYCS 653 Fall 2009.
Great Theoretical Ideas in Computer Science.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the order Teams mostly.
Cyrtographic Security Identity-based Encryption 1Dennis Kafura – CS5204 – Operating Systems.
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
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 
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Diffie-Hellman Key Exchange Color Mixing Example Rick Stroud 21 September 2015 CSCE 522.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Elliptic Curves Number Theory and Cryptography. A Pile of Cannonballs A Square of Cannonballs.
Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2006 Lecture 15Oct 17, 2006Carnegie Mellon University Algebraic Structures: Groups,
Key Management Network Systems Security Mort Anvari.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
What is the Smallest RSA Private Key Why is there, at all, such a thing? Why is it not 42? Why is the smallest public key not 35? Or,
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Elliptic Curve Public Key Cryptography Why ? ● ECC offers greater security for a given key size. ● The smaller key size also makes possible much more compact.
Outline Primitive Element Theorem Diffie Hellman Key Distribution
Encryption and Integrity
Key Exchange References: Applied Cryptography, Bruce Schneier
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
Factoring large integers
Chap 6: Security and Protection
CS 154, Lecture 6: Communication Complexity
Diffie-Hellman Key-Exchange Algorithm
Public Key Cryptography Diffie-Hellman, Discrete Log, RSA
Cryptography: Basics (2)
Practical Aspects of Modern Cryptography
Public Key Cryptography
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Key Management Network Systems Security
Efficient Short-Password Key Exchange (ESP-KE)
El Gamal and Diffie Hellman
Diffie-Hellman key exchange/agreement algorithm
Practical Aspects of Modern Cryptography
CSCI284 Spring 2009 GWU Sections 5.1, 5.2.2, 5.3
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Presentation transcript:

Diffie-Hellman-Merkle Ramki Thurimella

2 Key Exchange Protocol Establishing secret keys for N people Requires N(N-1)/2 separate keys This is a quadratic function that grows rapidly For e.g., when N=30, you need 435 keys DH protocol was invented to reduce this complexity Two people communication over an insecure line Can agree on the same key Eavesdropper cannot figure out the key

3 Groups p is a large prime (2000 – 4000 bits long) DH protocol uses ℤ * p – multiplicative group mod p For an element g from the group, let q be the smallest positive integer value such that g q = 1 mod p q is the order of g Example: Consider ℤ * 7 and let g be 4. Then the powers of 4 are (4 1 )%7 = 4, (4 2 )%7 = 2, (4 3 )%7=64%7=1. So, q = 3. Example: Let g be 3. (3 1 )%7 = 3, (3 2 )%7 = 2, (3 3 )%7=27%7=6,(3 4 )%7 = 81%7=4, (3 5 )%7 = 243%7=5, (3 6 )%7=(((3 3 )%7)*((3 3 )%7))%7= 36%7=1 So, q = 6.

4 Groups (cont.) An element whose order is p-1 is a primitive element of the group, i.e. it generates the whole group In the previous example, 3 is primitive but not 4 Some mathematical facts For any g, the order of g is a divisor of p-1 For any a of the group, a p-1 = 1 Proof: Let g be a generator of ℤ * p Let x be such that g x = a ( ∵ g is a generator, such an x must exist ) a p-1 = g x(p-1) = (g p-1 ) x = (1) x = 1 □

5 Diffie-Hellman(-Merkle)(1976) Fact: (g a mod p) b mod p = (g b mod p) a mod p All computations over a group of integers modulo p for some large prime p Easy to compute powers mod a prime but hard to reverse, for large integers ( discrete log problem) p a prime > 300 digits, a and b > 100 digits, even the best algorithms could not find a given g, p, and g a mod p, even using all of mankind's computing power. g = 2 or 5

6 Diffie-Hellman (DH) cont. Alice and Bob agree on a large prime p and a generator g Alice picks a random number a, 0<a<p, sends g a to Bob, and keeps a secret Bob picks a random number b, 0<b<p, sends g b to Alice, and keeps b secret Alice computes (g b ) a Bob computes (g a ) b

7 Diffie-Hellman (DH) (cont.) (g b ) a and (g a ) b are equal because multiplication in groups is associative Only a, b and g ab = g ba mod p are kept secret. All the other values— p, g, g a mod p, and g b mod p —are sent in the clear.

8 Man-In-The-Middle (MITM) Eve Bob x ∈R ℤ*px ∈R ℤ*p Random member ∈ R Alice v ∈R ℤ*pv ∈R ℤ*p gvgv gxgx y ∈R ℤ*py ∈R ℤ*p gvgv w ∈R ℤ*pw ∈R ℤ*p gwgw k = (gw)xk = (gw)x k = (g x ) w k = (g y ) v k = ( g v ) y

9 MITM defense for a special case If the key k is being used to encrypt voice or video link Have Bob read the first few bits of h(k) Have Alice read the next few bits of h(k) Assume Alice and Bob can recognize each other, they can verify that they have the same key Eve cannot compute the preimage of h(k)

10 Pitfalls What if Eve replaces g x and g y with 1 while they are in transit? The key would be 1 ! Check that these values are not 1 What if order q of g is much smaller than p-1 ? The key k would come from a small set { 1,g 1,…,g q } Check that p is prime and that order of g is p-1

11 Safe Primes To avoid problems with subgroups, pick a safe prime A safe prime is a large prime p of the form 2q+1 where q is also prime Such ℤ * p has 4 subgroups, one corresponding to each of the divisors of p-1 or 2q {1} {1,p-1} {1,2,…,q} {1,2,…,2q}

12 Safe Primes Example Let p = 23, then q = 11 Such ℤ * 23 has 4 subgroups, one corresponding to each of the divisors of p-1 or 22 { 1 } { 1,22 } note: 222 % 23 =1 { 1,2,3,4,6,8,9,12,13,16,18 } Order of this subgroup is 11 Verify that this subgroup is closed under * (i.e. for any x,y from this subgroup ( x*y ) %23 should also be in the subgroup) { 1,2,…,22 }

13