Diffie-Hellman key exchange/agreement algorithm

Slides:



Advertisements
Similar presentations
The Diffie-Hellman Algorithm
Advertisements

Diffie-Hellman Diffie-Hellman is a public key distribution scheme First public-key type scheme, proposed in 1976.
1 Key Exchange Solutions Diffie-Hellman Protocol Needham Schroeder Protocol X.509 Certification.
RSA COSC 201 ST. MARY’S COLLEGE OF MARYLAND FALL 2012 RSA.
Digital Signatures and applications Math 7290CryptographySu07.
7. Asymmetric encryption-
Public Key Algorithms …….. RAIT M. Chatterjee.
OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest.
Public Key Crytography1 From: Introduction to Algorithms Cormen, Leiserson and Rivest.
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.
Public Key Model 8. Cryptography part 2.
Rachana Y. Patil 1 1.
Lecture 7b: The Diffie-Hellman Secret Sharing Scheme Wayne Patterson SYCS 653 Fall 2009.
Cyrtographic Security Identity-based Encryption 1Dennis Kafura – CS5204 – Operating Systems.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
PUBLIC KEY CRYPTOGRAPHY ALGORITHM Concept and Example 1IT352 | Network Security |Najwa AlGhamdi.
IT 221: Introduction to Information Security Principles Lecture 4: Public-Key Cryptography For Educational Purposes Only Revised: September 15, 2002.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
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.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
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:
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
@Yuan Xue 285: Network Security CS 285 Network Security Digital Signature Yuan Xue Fall 2012.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
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.
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
Advanced Information Security 5 ECC Cryptography
Key Exchange References: Applied Cryptography, Bruce Schneier
Protocol Analysis.
Network Security Unit-III
Chapter 15 Key Management
Public-Key Cryptography and RSA
RSA and El Gamal Cryptosystems
Public Key Encryption and the RSA Algorithm
Group theory exercise.
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Message Security, User Authentication, and Key Management
Elliptic Curve Cryptography (ECC)
Public Key Infrastructure
Diffie-Hellman Secure Key Exchange 1976.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Diffie-Hellman Key-Exchange Algorithm
Celia Li Computer Science and Engineering York University
NET 311 Information Security
Elliptic Curve Cryptography (ECC)
Chapter 4 Cryptography / Encryption
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Key Management Network Systems Security
Appendix 5: Cryptography p
El Gamal and Diffie Hellman
Cryptography and Network Security Chapter 10
Key Establishment Protocols ~
Practical Aspects of Modern Cryptography
Introduction to Elliptic Curve Cryptography
Public – Private Key Cryptography
Asymmetric Cryptographic Algorithms
Formal Methods for Security Protocols
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Chapter 15 Key Management
Secure Diffie-Hellman Algorithm
Key Exchange, Man-in-the-Middle Attack
Diffie-Hellman Algorithm
Lecture 6.2: Protocols - Authentication and Key Exchange II
Presentation transcript:

Diffie-Hellman key exchange/agreement algorithm

Introduction It is provide the solution to the problem of key agreement or key exchange. Two party agree on symmetric key. This key can be used for encryption/decryption. This algorithm only for key agreement not for encryption and decryption.

Description of the algorithm Suppose Alice and Bob want to agree upon a key to be used for encryption / decryption message that would be exchanged between them. Then diffie-hellman key exchange works as follows: 1. Alice & bob agree on two large prime numbers: n and g (note: these two integer need not be kept secret, insecure channel) 2. Alice choose another large random number x and calculate A such that, 3. Alice send the number A to Bob. 4. Bob independently choose another large random integer y and calculate B such that, 5. Bob send the number B to Alice. 6. Alice, now compute the secret key K1 as follows: A = gx mod n B = gy mod n K1 = Bx mod n

Description of the algorithm 7. Bob, now compute the secret key K2 as follows: 8. Surprise, K1=K2=K (which is symmetric key) K2 = Ay mod n

Example of the Diffie -Hellman algorithm Large Prime Number Alice n=11,g=7 Bob Large Random Number x=3 y=6 Large Random Number A = 73 mod 11 = 2 B = 76 mod 11 = 4 B = 4 A = 2 K1 = 43 mod 11 = 9 K2 = 26 mod 11 = 9 K1 = K2 = K Note: A,B,K1,K2 are Private to others

Mathematics Theory behind the algorithm 1) Alice perform K1 Now what is B? If we put B value into K1 then, 2) Bob perform K2 Now what is A? If we put A value into K2 then, Now Basic Mathematics says that, K1 = Bx mod n B = gy mod n K1 = (gy mod n)x mod n K1 = gyx mod n K2 = Ay mod n A = gx mod n K2 = (gx mod n)y mod n K2 = gxy mod n Kyx = Kxy so that K1=K2=K (Proof)

Problem with the Algorithm Can diffie-hellman solve our problem associated with key exchange? Unfortunately, not quite! This algorithm fall into “man in the middle attack” This work as follows: Step-1: Alice want to communicate to Bob so as usual they use diffie-hellman key exchange so Let n=11 & g=7. they find K1 and K2 . Step-2: Alice does not realize that the attacker TOM is listening the conversation between her and Bob. TOM simply pick up the value of n and g. (n=11,g=7) Alice TOM Bob Step-3: Now let us assume that Alice, TOM & Bob select random number x & y as bellow: Alice TOM Bob n=11,g=7 n=11,g=7 n=11,g=7 x=3 x=8,y=6 y=9

Problem with the Algorithm Step-4: Now all these person calculate the value of A and B. A=gx mod n A=gx mod n B=gy mod n =73 mod 11 =2 =78 mod 11 = 9 =79 mod 11 = 8 B=gy mod n =76 mod 11 = 4 Step-5: Alice TOM Bob A=2 TOM intercept The value of A And send Bob his Own value of A A=9 TOM intercept The value of B And send Alice his Own value of B B=4 B=8

Problem with the Algorithm Step-6: So at last value of A,B to users are: * indicate value of A and B changed. Step-7: Based on these values, all the three person now calculate their Keys. A=2,B=4* A=2,B=8 A=9*,B=8 Alice TOM Bob K1=Bx mod n =43 mod 11 =9 K1=Bx mod n =88 mod 11 =5 K2=Ay mod n =26 mod 11 =9 K2=Ay mod n =99 mod 11 =5 Solution: ? ( User authentication required )