Distinguishing WPA

Sourav Sen Gupta, Subhamoy Maitra, Willi MeierIACR ePrint 2013

This research, presented at FSE 2014, provides a deep dive into the cryptographic weaknesses of the RC4 stream cipher as implemented in the WPA (Wi-Fi Protected Access) protocol. By analyzing how WPA derives its encryption keys from public initialization vectors (IVs), the authors uncover predictable patterns—or "biases"—that significantly lower the bar for attackers to distinguish WPA traffic from random noise and recover encrypted data.

The Root of the Vulnerability: IV Key Derivation

While the older WEP protocol was famously broken due to its poor use of RC4, its successor, WPA (specifically the TKIP implementation), was designed to be more robust. WPA mixes a temporal key with a public Initialization Vector (IV) to ensure that every packet uses a different RC4 key.

However, the authors identify a lingering vulnerability: the first three bytes of the RC4 key in WPA are still directly derived from the public IV. This creates a mathematical dependency between the first two bytes of the key ($K[0]$ and $K[1]$) because they share bits from the same portion of the IV.

Extracted figure from page 6 of Distinguishing WPA

Because of how WPA constructs these first three key bytes, it can only generate $2^{16}$ distinct values for that portion of the key, rather than the $2^{24}$ possible values if the bytes were independent. This "loss of entropy" is the root of the vulnerability, creating non-random biases in the resulting keystream that an attacker can exploit.

The Sawtooth Effect

The most striking finding is the "sawtooth" pattern in the probability distribution of the initial state and keystream. Because the first two key bytes share 6 bits of information from the IV, their sum is always even and follows a specific jagged distribution. This dependency ripples through the Key Scheduling Algorithm (KSA), affecting the internal permutation table $S$.

Extracted figure from page 8 of Distinguishing WPA

As shown in the figure, the experimental data for WPA (blue) and the theoretical model (red) both exhibit a distinct sawtooth pattern that deviates sharply from the smoother distribution of generic RC4 (green dashed line). This non-randomness allows for a new "distinguisher" attack that is significantly more efficient than previous methods.

Key Results and Impact

The researchers employed a combination of combinatorial analysis and large-scale empirical simulation, using up to 34 billion keystream samples to validate their models. Their findings represent a major leap in WPA cryptanalysis:

  • Superior Distinguisher: The authors developed a method to tell WPA traffic apart from random noise using only $2^{19}$ packets. This is a $2^{21}$ improvement over the previous state-of-the-art attack, which required $2^{40}$ packets.
  • Efficient Plaintext Recovery: By exploiting the IV correlations, they could recover specific bytes of plaintext with high probability using only $2^{15}$ to $2^{21}$ samples, compared to the $2^{30}$ samples typically required by previous attacks.
  • Long-range Biases: They discovered a new absolute bias at the 259th byte ($Z_{259}$), which was the farthest known significant bias in the RC4 keystream at the time of publication.

Conclusion

While the industry has largely moved toward WPA2/AES, which is not susceptible to these specific attacks, this research highlights critical flaws in legacy WPA/TKIP implementations. It demonstrates how subtle bit-sharing in key derivation can lead to massive security vulnerabilities, providing vital insights for understanding stream cipher weaknesses and protocol design.

Summary updated

BibTeX
@article{gupta2013distinguishing,
  author = {Sourav Sen Gupta and Subhamoy Maitra and Willi Meier},
  title = {{Distinguishing WPA}},
  journal = {IACR ePrint},
  year = {2013},
}
Figure