Download presentation
Presentation is loading. Please wait.
1
Diffie-Hellman Algorithm
Network Security
2
Diffie-Hellman Algorithm
Objectives of the Topic After completing this topic, a student will be able to describe the Diffie-Hellman algorithm.
3
Diffie-Hellman Algorithm
Figures and material in this topic have been adapted from “Network Security Essentials : Applications and Standards”, 2014, by William Stallings.
4
Diffie-Hellman Algorithm
The first published public-key algorithm that defined public-key cryptography was published by Diffie and Hellman. It is generally referred to as the Diffie –Hellman key exchange.
5
Diffie-Hellman Algorithm
A number of commercial products employ this key exchange technique.
6
Diffie-Hellman Algorithm
Purpose of the algorithm is to enable two users to exchange a secret key securely that then can be used for subsequent encryption of messages The algorithm itself is limited to the exchange of the keys.
7
Diffie-Hellman Algorithm
Depends for its effectiveness on the difficulty of computing discrete logarithms.
8
Diffie-Hellman Algorithm
The Algorithm Lets assume that there are two publicly known numbers: a prime number q and an integer α that is a primitive root of q.
9
Diffie-Hellman Algorithm
For a prime number p, if α is a primitive root of p, then α, α2,…, αp-1 are distinct (mod p). E.g. for prime number 19, its primitive roots are 2, 3, 10, 13, 14, and 15. Suppose the users A and B wish to create a shared key.
10
Diffie-Hellman Algorithm
User A selects a random integer XA < q and computes YA = αXA mod q. Similarly, user B independently selects a random integer XB < q and computes YB = αXB mod q.
11
Diffie-Hellman Algorithm
Each side keeps the X value private and makes the Y value available publicly to the other side. Thus, XA is A’s private key and YA is A’s corresponding public key, The same applies for B.
12
Diffie-Hellman Algorithm
User A computes the key as K = (YB)XA mod q and User B computes the key as K = (YA)XB mod q. The result is that the two sides have exchanged a secret value.
13
Diffie-Hellman Algorithm
14
Diffie-Hellman Algorithm
Example: Lets take q = 353 and a primitive root of 353, α= 3. A and B select private keys XA = 97 and XB = 233, respectively.
15
Diffie-Hellman Algorithm
Each computes its public key: A computes YA = 397 mod 353 = 40. B computes YB = 3233 mod 353 = 248. After they exchange public keys, each can compute the common secret key:
16
Diffie-Hellman Algorithm
A computes K = (YB)XA mod 353 = mod 353 = 160. B computes K = (YA)XB mod 353 = mod 353 = 160. an attacker would have available the following information: q = 353; α = 3; YA = 40; YB = 248.
17
Diffie-Hellman Algorithm
In this simple example, it would be possible by brute force to determine the secret key 160.
18
Diffie-Hellman Algorithm
Security of the Diffie-Hellman algorithm: While it is relatively easy to calculate exponentials modulo a prime, it is very difficult to calculate discrete logarithms. For large primes, the latter task is considered infeasible. End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.