# Diffie-Hellman Key Exchange One-sentence definition: Method for two parties to establish a shared secret over an insecure channel without prior shared keys. ## Key Facts - Classic DH (finite fields) and ECDH (elliptic curve variant) produce same shared secret on both sides. - Requires authenticated channel (e.g., certs) to prevent MITM. - Ephemeral modes (DHE/ECDHE) enable **PFS**—new keys per session. - Parameters (groups/curves) must be strong; avoid small/legacy groups. - Used in TLS handshakes, IPsec/IKE, and secure messaging. - **Verify:** check official (ISC)² CBK and current exam outline. ## Exam Relevance - Pick DH/ECDH for key agreement and PFS requirements. **Mnemonic:** “**D**erive **H**idden (shared) key.” ## Mini Scenario Q: Need session keys that can't be recovered if server key leaks later—what to use? A: Ephemeral DH (DHE/ECDHE) for PFS. ## Revision Checklist - DH vs ECDH difference. - Why authentication is required. - Define PFS benefit. ## Related [[Perfect Forward Secrecy (PFS)]] · [[TLS Handshake Overview]] · [[IPsec (AH, ESP, Transport vs Tunnel)]] · [[Asymmetric Encryption Overview (RSA, ECC)]] · [[Public Key Infrastructure (PKI) Components]] · [[Domain 3 - Index]]