Transition Mode Risks and Dragonblood
SAE's mathematics is sound, but WPA3 arrived in a world full of WPA2 devices, and its first implementations computed the password element in a way that leaked through timing. In April 2019, a year after WPA3 was announced, Mathy Vanhoef and Eyal Ronen published Dragonblood: downgrade attacks against networks running WPA2 and WPA3 side by side, and side-channel leaks that let an attacker narrow down the password from measurements. Both were fixed by changes to the specification and to implementations. This lesson explains the two mechanisms with toy models, then the detection and the configuration that closes them.
Transition mode
A WPA3 transition-mode network advertises both AKM 2 (PSK) and AKM 8 (SAE) on one SSID with the same password: WPA3 clients use SAE, old clients use WPA2-PSK. PMF is capable, not required, so old clients without PMF can join. It is the usual way to migrate, and it has a built-in weakness: the password is still usable with WPA2.
The downgrade. An attacker sets up an access point with the same SSID that offers only WPA2-PSK. A client that has saved the network may connect to it with the WPA2 handshake. The fake AP doesn't know the password, so the handshake fails after M2, but M2 already carries a MIC computed from the password: exactly what offline guessing needs (previous lesson). The WPA3 client has been pushed back into WPA2's weakness.
The program models what different clients do when they see the real AP and a fake WPA2-only one with the same SSID:
def client_choice(offered_akms, profile):
"""What a client does when it sees a network with its saved SSID."""
if "SAE" in offered_akms:
return "SAE (WPA3)"
if profile["sae_only"]:
return "refuse: profile requires WPA3"
if profile["transition_disabled"]:
return "refuse: AP told us earlier that WPA2 is disabled for this network"
return "WPA2-PSK <- downgrade: a handshake usable for offline guessing"
profiles = {
"old phone (WPA2 only)": {"sae_only": False, "transition_disabled": False, "wpa3": False},
"WPA3 phone, default profile": {"sae_only": False, "transition_disabled": False, "wpa3": True},
"WPA3 phone after Transition Disable": {"sae_only": False, "transition_disabled": True, "wpa3": True},
"managed laptop, WPA3-only profile": {"sae_only": True, "transition_disabled": False, "wpa3": True},
}
real_ap, fake_ap = ["PSK", "SAE"], ["PSK"] # the fake one copies SSID "LabNet" but offers only WPA2
for name, prof in profiles.items():
real = client_choice(real_ap, prof) if prof["wpa3"] else "WPA2-PSK (all it can do)"
fake = client_choice(fake_ap, prof)
print(f"{name:37} real AP: {real:24} fake WPA2-only AP: {fake}")old phone (WPA2 only) real AP: WPA2-PSK (all it can do) fake WPA2-only AP: WPA2-PSK <- downgrade: a handshake usable for offline guessing
WPA3 phone, default profile real AP: SAE (WPA3) fake WPA2-only AP: WPA2-PSK <- downgrade: a handshake usable for offline guessing
WPA3 phone after Transition Disable real AP: SAE (WPA3) fake WPA2-only AP: refuse: AP told us earlier that WPA2 is disabled for this network
managed laptop, WPA3-only profile real AP: SAE (WPA3) fake WPA2-only AP: refuse: profile requires WPA3
Two mechanisms stop the downgrade. A client profile that requires WPA3 never uses WPA2 for that SSID; managed devices can be configured that way. And Transition Disable, added to WPA3 after Dragonblood: once a client has connected to the network with SAE, the AP can tell it (inside the protected handshake) that WPA2 is disabled for this network, and the client remembers it.
The side channels in the original password element
SAE must turn the password into a group element. The original method, hunting and pecking, hashed the password, both MAC addresses and a counter, and checked whether the result was a valid element (for elliptic curves: an x-coordinate with a point on the curve; for prime-field groups: a value below the prime). If not, it incremented the counter and tried again. How many iterations that takes depends on the password and the MAC addresses.
A nearby attacker who can measure how long the AP or client takes (timing), or observe its cache use from the same machine, learns the iteration count for a given MAC address. Repeating with different spoofed MAC addresses gives a pattern that only some passwords produce. Testing a dictionary against those patterns happens offline, without any discrete logarithm: the leak bypasses SAE's security argument.
The toy below uses a 16-bit "valid if below the prime" test. It prints the iteration counts for three passwords and four client MACs, then shows how one measurement narrows a word list. The constant-time variant does all 40 iterations every time:
import hashlib
P = 40009 # toy prime between 2^15 and 2^16: a 16-bit candidate is below it about 61% of the time
AP = bytes.fromhex("020000000a01")
def hunt_and_peck(password, client_mac, constant_time=False):
"""Original SAE idea: hash (password, MACs, counter) until the value is a valid field element.
Returns how many iterations did real work (what an observer of timing or cache traces learns)."""
found_at, counter = None, 1
while counter <= 40 if constant_time else found_at is None:
h = hashlib.sha256(password + min(AP, client_mac) + max(AP, client_mac) + bytes([counter])).digest()
if int.from_bytes(h[:2], "big") < P and found_at is None:
found_at = counter
counter += 1
return found_at, counter - 1
macs = [bytes.fromhex(f"0200000000{i:02x}") for i in (1, 2, 3, 4)]
print("iterations done for client MACs ...01 ...02 ...03 ...04")
for pw in (b"LabNet2026!", b"sunshine", b"correct horse lab staple"):
leaky = [hunt_and_peck(pw, m)[1] for m in macs]
fixed = [hunt_and_peck(pw, m, constant_time=True)[1] for m in macs]
print(f"{pw.decode():25} leaky: {leaky} constant-time: {fixed}")
# What an attacker measuring timing for MAC ...01 could do with a word list (concept):
observed = hunt_and_peck(b"correct horse lab staple", macs[0])[1]
wordlist = [b"LabNet2026!", b"sunshine", b"correct horse lab staple", b"dragon", b"letmein"]
alive = [w.decode() for w in wordlist if hunt_and_peck(w, macs[0])[1] == observed]
print(f"observed {observed} iteration(s) for MAC ...01 -> words still possible: {alive}")iterations done for client MACs ...01 ...02 ...03 ...04
LabNet2026! leaky: [2, 1, 1, 2] constant-time: [40, 40, 40, 40]
sunshine leaky: [1, 1, 3, 1] constant-time: [40, 40, 40, 40]
correct horse lab staple leaky: [2, 1, 1, 1] constant-time: [40, 40, 40, 40]
observed 2 iteration(s) for MAC ...01 -> words still possible: ['LabNet2026!', 'correct horse lab staple']
Each measured count removes the words that would have produced a different count; a few dozen measurements with different MACs leave a single candidate. The constant-time version always reports 40, so the measurement tells nothing.
Dragonblood's findings, in short
| Finding | Mechanism | Fix |
|---|---|---|
| Transition-mode downgrade | fake WPA2-only AP with the same SSID gets a WPA2 M2 from WPA3 clients | WPA3-only where possible; Transition Disable; WPA3-only client profiles |
| SAE group downgrade | forged rejections push the client to a weaker group | allow only strong groups (19, 20, 21); clients remember the network's group |
| Timing leak (prime-field groups) | iteration count of hunting and pecking | constant-time derivation; disable those groups |
| Cache leak (elliptic curves) | memory-access pattern of the iteration loop | constant-time code; hash-to-element (H2E) |
| Commit-flood denial of service | expensive SAE computations from spoofed MACs | anti-clogging tokens, rate limits |
| Implementation bugs in EAP-pwd (the same Dragonfly idea in Enterprise) | missing validation of received elements, side channels | patched hostapd/wpa_supplicant and FreeRADIUS |
The SAE side-channel bugs in hostapd and wpa_supplicant were assigned CVE-2019-9494 (with related ones for EAP-pwd). The lasting specification change is hash-to-element (H2E): the password element is derived directly with a constant-time hash-to-curve method, which ends the iteration loop and its leaks. H2E is mandatory on 6 GHz and recommended everywhere.
How the risks are detected
- Beacon audit: SSIDs with AKM 2 + 8 (transition) and PMF only capable; whether H2E is advertised (an RSN extension element bit).
- WIDS: an SSID of yours seen on an unknown BSSID offering only WPA2 is the downgrade setup (Rogue APs and WIDS).
- AP logs: anti-clogging activity and bursts of SAE Commits from many MACs (flooding, or side-channel measurement).
- Patch audits: AP and client firmware dated after the 2019 fixes; hostapd/wpa_supplicant 2.8 or later contained the first round of fixes (check vendor advisories for your devices).
How it is fixed
- Plan the end of transition mode: list the WPA2-only clients, upgrade or isolate them (a separate IoT SSID), then switch the main SSID to WPA3-only with PMF required.
- Enable Transition Disable and H2E on the APs; push WPA3-only profiles to managed devices.
- Allow only strong SAE groups and keep firmware current.
- Keep the password strong even with SAE: it is still the only secret, and in transition mode it is also a WPA2 passphrase.
Pitfalls
- Treating transition mode as "WPA3": its security against offline guessing is WPA2's as long as any client can be lured into WPA2.
- Believing side channels need physical access: timing differences of SAE were measurable over the air in the published work.
- Assuming the fix is in the standard only: the side-channel fixes are in each implementation, so old firmware stays vulnerable.
Practice
1. Why does the fake WPA2-only AP get useful data even though it doesn't know the password?
The client sends M2 after M1, and M2 carries a MIC computed from the password-derived PMK. The fake AP can't send a valid M3, so the connection fails, but M1 (its own ANonce) plus M2 is all an offline guesser needs.
2. In the first program, which client is never exposed to the downgrade, and what configuration gives other clients the same protection?
The managed laptop with a WPA3-only profile. A client that has connected once with SAE and received Transition Disable behaves the same way for that network; unmanaged WPA3 phones without it can be downgraded.
3. Why does doing all 40 iterations remove the leak, and what does H2E do instead?
The running time no longer depends on where the valid candidate was found, so measurements carry no information about the password. H2E removes the loop entirely: a constant-time hash-to-curve function maps the password straight to an element.
Test yourself
What makes WPA3 transition mode vulnerable to downgrade?
- SAE is broken
- The same password also works with WPA2-PSK, which a fake WPA2-only AP can lure clients into
- PMF is mandatory
- Beacons are encrypted
What did hunting and pecking leak?
- The PMK directly
- The number of iterations, which depends on the password and MACs
- The SSID
- Nothing
Which change removes the password-element side channels from the design?
- Longer SSIDs
- Hash-to-element (H2E)
- WEP compatibility
- Turning off PMF
What does Transition Disable tell a client?
- To disable Wi-Fi
- That this network no longer accepts WPA2 for it, so it must not fall back
- To use TKIP
- To forget the password