HackerTubewatch
Surprise me
Frame from Diffie-Hellman Key Exchange Plays via YouTube's privacy-enhanced embed

Diffie-Hellman Key Exchange

Art of the Problem
Explainers
YouTube
9 HN users recommended this explainer8 months2016–2024 score 9.5
Years with an HN recommendation, 2007–2026

It is the go-to beginner explanation of Diffie-Hellman, recommended because the paint analogy makes the idea click without prior cryptography knowledge.

A short explainer on the history and mechanics of public key cryptography and the Diffie-Hellman key exchange. It uses a mixing-paint-colors analogy to show how two parties can agree on a shared secret in public.

“I found this video, Public key cryptography - Diffie-Hellman Key Exchange (full version), to be completely enlightening” (HN, 2016)

3 strong recommendations · 6 recommendations · 2 citations · Explainers

11 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@zappo2938 Dec 2016 Strongly recommends
on HN thread Crypto 101 – Introductory course on cryptography
For idiots like myself, I found this video, Public key cryptography - Diffie-Hellman Key Exchange (full version), to be completely enlightening using mixed colors to explain the most basic features of a cryptography algorithm.[0] [0] [this video]
Mixed-color analogy makes key exchange basics click
@ndesaulniers Jun 2020 Strongly recommends
on HN thread Postbank to replace 12M bank cards after employees steal 'master key'
Interesting, thanks for sharing (I too was curious). This is my favorite video on Diffie-Hellman key exchange which is a slightly different problem (sharing a secret, without the constraint of dividing the key): [this video] (oh, hey, same channel! Guess I'll need to check out more videos from here!)
Favorite explanation of Diffie-Hellman key exchange
@throw1234651234 May 2023 Strongly recommends
on HN thread Public Key Crypto Explained in 0 words
This is the only video that ever explained it concisely and clearly, IF you don't care about trying to actually implement it: [this video]
Concise, clear explanation of public key crypto concepts
@jzl Nov 2016 Recommends
on HN thread Ask HN: Is there a “ground-up” explanation of PGP/GnuPG?
This is a great pair of videos that intuitively explain Diffie-Helman key exchange and then the RSA algorithm in a way that requires no previous knowledge of cryptography: "Public key cryptography - Diffie-Hellman Key Exchange" [this video] "Public Key Cryptography: RSA Encryption Algorithm" [link] Good coverage of the fundamentals before attempting a deeper understanding of PGP specifically.
Intuitive intro to Diffie-Hellman needing no prior cryptography knowledge
@tialaramex Jun 2017 Recommends
on HN thread Ask HN: Want to study SSL, HTTPS, and the works. Where to start?
Read more
I recommend beginning at the fundamentals. For example here's a video that walks through Diffie Hellman, so that anybody can follow, you can probably sprint through it, but by taking it slow they avoid accidentally forgetting anything important. [this video] Grasping the fundamentals means that when it comes to policy decisions (e.g. in the management of certificates) you can see what the consequences of a particular decision are, rather than just hoping that whoever proposed that policy knew what they were doing. For example, I think a lot of people today use Certificate Signing Request (CSR) files without understanding them at all. But once you have a grounding in the underlying elements you can see at once what the CSR does, and why it's necessary without needing to have that spelled out separately. Or another example, understanding what was and was not risky as a result of the known weakness of SHA-1. I saw a lot of scare-mongering by security people who saw the SHA-1 weakness as somehow meaning impossible things were now likely, but it only affected an important but quite narrow type of usage, people who understood that could make better, more careful decisions without putting anybody at risk.
Walks through Diffie-Hellman so anyone can follow
@ivanr Jun 2017 Recommends
on HN thread How HTTPS Handshake Happens
Read more
As others have already pointed out, this explanation focuses on the RSA key exchange, which has been deprecated. It's not recommended for use with the current line of protocols (TLS 1.2 and earlier) and it's been completely removed from TLS 1.3 (work in progress, but close to being finished). The key weakness of the RSA key exchange is that session encryption keys are transported over the network encrypted with the server's public key. When the server's private key is compromised in some way, the attacker can passively decrypt all traffic, they can also "go back in time" to decrypt all previous conversations they might have recorded and kept. For a more secure handshake approach, consider the Diffie-Hellman key exchange, which is a way for two parties to agree on a secret number (a very large number when used for encryption, of course) that third party can't discover from looking at the network traffic. It's a very simple and intuitive algorithm; there's a great video that explains it here: [this video] Today, we generally use the ephemeral elliptic curve DH variant (ECDHE), which has better security characteristics and works much faster. However, DH is not sufficient, you must also authenticate the other party. Otherwise you could be negotiating your key exchange with the attacker and not the real recipient. This is where public cryptography comes in. After the key exchange, both parties use their private keys to sign the transcripts of the entire conversation up until that point
Simple, intuitive explanation of Diffie-Hellman key exchange
@gregmac Oct 2017 Recommends
on HN thread Practical Public Key Cryptography
If you haven't seen it, there's a pretty neat video that outlines how public-key cryptography works using paint colors [1]. It's focused on Diffie-Hellman key exchange, but it's a great intro for beginners to be able to visualize the concepts, and I think helps provide some context before jumping right into the GPG command line. [1] [this video]
Paint-color visualization of public-key ideas for beginners
@itsrajivshah Jan 2018 Recommends
on HN thread Algorithms Explained: Diffie-Hellman
Interesting explanation - thanks for sharing. I find it easier to visualise, through colours of paint, for a high-level metaphor of the DH key exchange process, which may be useful - [this video]
High-level paint-mixing metaphor for the DH exchange
@siparikh May 2021 Recommends
on HN thread Diffie-Hellman for the Layman
Here is another video from "Art of the Problem" that uses the same analogy that really helped me understand this better: [this video]
Color-mixing analogy that aids understanding of key exchange

Citations, criticism and jokes

@nurple Mar 2024 Cites it
on HN thread Guess my RGB
Reminds me of a video[0] that describes Diffie-Hellman key exchange in terms of mixing color values (as globs of oil paint). I guess in this game you're guessing the mix of primary colors, so maybe it doesn't hold the same property of difficulty in deriving the constituents? [0] [this video]
Describes Diffie-Hellman as mixing color values like oil paint

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close