r/programming • • Jan 16 '18

Cryptography: Diffie-Hellman key exchange explained intuitively using colors

https://youtu.be/YEBfamv-_do?t=2m18s
2.5k Upvotes

170 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jan 18 '18

If someone stole my private key they could decrypt any old messages they might have intercepted as well as any new messages if I don't revoke the key. By using short-lived ephemeral keys negotiated with DH I can ensure that old messages remain protected even if the key for previous/subsequent messages has been stolen.

1

u/DoTheThingRightNow5 Jan 18 '18

Correct. However there's no reason why one can't be long term and use a short lived ephemeral key after using the long term to authenticate eachother.

1

u/[deleted] Jan 18 '18

Isn't that basically what TLS does?