What is Ephemeral Diffie-Hellman Key Exchange TLS SSL Handshake | How HTTPS Protocol Works - DevOps

Опубликовано: 17 Март 2025
на канале: Ajeet Khan
671
8

If you found this video helpful and want to support the channel, consider buying me a coffee through my Buy Me a Coffee link – your support means a lot! ☕💖 - https://buymeacoffee.com/ajeetkhan

Important DevOps Interview Question

Diffie-Hellman Algorithm is another algorithm used for SSL/TLS Handshake when an HTTPS connection happens.

he Diffie-Hellman key exchange was one of the most important developments in public-key cryptography and it is still frequently implemented in a range of today’s different security protocols.

It allows two parties who have not previously met to securely establish a key which they can use to secure their communications. In this article, we’ll explain what it’s used for, how it works on a step-by-step basis, its different variations, as well as the security considerations that need to be noted in order to implement it safely.

Step 1: Alice and Bob get public numbers P = 23, G = 9

Step 2: Alice selected a private key a = 4 and
Bob selected a private key b = 3

Step 3: Alice and Bob compute public values
Alice: x =(9^4 mod 23) = (6561 mod 23) = 6
Bob: y = (9^3 mod 23) = (729 mod 23) = 16

Step 4: Alice and Bob exchange public numbers

Step 5: Alice receives public key y =16 and
Bob receives public key x = 6

Step 6: Alice and Bob compute symmetric keys
Alice: ka = y^a mod p = 65536 mod 23 = 9
Bob: kb = x^b mod p = 216 mod 23 = 9

Step 7: 9 is the shared secret.