WPA2 vs WPA3: How the Key Is Agreed

WPA3-Personal replaced WPA2's password-derived key with a Diffie-Hellman exchange called SAE. See how Diffie-Hellman works with small numbers, how each version gets its key, and what that changes when a password leaks or someone tries to guess it.

Why the key exchange matters

Every Wi-Fi connection ends with the client and the AP holding the same secret key, which CCMP or GCMP then use to encrypt each frame. The question is how they arrive at that key. In WPA2-Personal it is calculated directly from the password and the network name, so it is the same every time and for everyone. In WPA3-Personal it comes out of a fresh Diffie-Hellman exchange (SAE, "Simultaneous Authentication of Equals") that only works if both sides know the password, and it is different for every connection.

1 · Diffie-Hellman with small numbers

Two sides agree on a shared secret while everything they send can be overheard. Step through the exchange and watch what the listener in the middle collects. Both use the public numbers p = 23 and g = 5. Each picks a private number and sends only gprivate mod p. Real Wi-Fi uses elliptic curves with 256- to 521-bit numbers (usually 256); the idea is the same.

View

2 · Where each version's key comes from

Step through both handshakes, then press Connect again a few times and watch the PMK (the master key both sides end up with). The WPA2 PMK is calculated in your browser with the real formula; the WPA3 one is shown as a random stand-in, because it depends on random numbers thrown away after each exchange. Nothing you type leaves your browser, but use a made-up password anyway.

WPA2-Personal (PSK)

    WPA3-Personal (SAE)

      3 · What if…

      Pick a situation to see what each version protects.

      4 · Other places Wi-Fi uses Diffie-Hellman

      Open networks

      Enhanced Open (OWE)

      On a network with no password, the client and AP do a Diffie-Hellman exchange while associating, so each device gets its own encryption key. Passive listeners see nothing useful.

      Nothing proves who the AP is, so it doesn't stop a fake AP with the same name. Required instead of plain open networks on 6 GHz.

      802.1X / EAP

      WPA2 and WPA3-Enterprise

      EAP-TLS, PEAP and EAP-TTLS run a TLS handshake between the client and the RADIUS server. With ECDHE cipher suites (always, in TLS 1.3) the key the AP receives has forward secrecy, and every user gets their own keys.

      WPA3-Enterprise 192-bit mode requires ECDHE on the P-384 curve (or 3072-bit DHE), with GCMP-256.

      Onboarding

      Wi-Fi Easy Connect (DPP) and FILS

      Easy Connect adds devices by scanning a QR code: it uses elliptic-curve Diffie-Hellman to authenticate the device and set up its credentials, with no shared password.

      FILS (802.11ai, fast initial link setup) can add an optional Diffie-Hellman exchange for forward secrecy.

      5 · Side by side

      WPA2-PersonalWPA3-PersonalEnhanced Open (OWE)WPA2/WPA3-Enterprise
      How the key is agreedCalculated from password and SSID (PBKDF2), then the 4-way handshakeSAE: password-authenticated elliptic-curve Diffie-Hellman, then the 4-way handshakeUnauthenticated elliptic-curve Diffie-HellmanTLS inside EAP, usually with (EC)DHE
      Forward secrecyNoYesYesYes, with (EC)DHE
      Offline password guessingPossibleNot possible: one guess per live exchangeNo passwordDepends on the EAP method; none with certificates (EAP-TLS)
      Separate keys per connectionDifferent session keys, but anyone with the password can work them outYesYesYes, per user
      Proves the AP is genuineOnly that it knows the passwordOnly that it knows the passwordNoYes, with server certificate validation
      Protected Management FramesOptionalRequiredRequiredRequired in WPA3
      Where requiredNot allowed on 6 GHz6 GHz (with H2E); devices must support it for Wi-Fi CERTIFIED 6 and laterOpen networks on 6 GHzOrganisations with user accounts

      What to do

      Notes