skip to content

A security reviewer asks which parts of a WPA2 data frame CCMP's MIC covers and how its nonce stays unique — what do you answer?

level: seniorimportance: should knowfreq 18%

answer

  1. header in, but masked
  2. Duration is not covered
  3. priority, A2, packet number
  4. both directions share one key

basics

~20 s

CCMP's MIC covers the body plus AAD from the MAC header — addresses, most Frame Control bits, fragment number, QoS TID — but not Duration/ID or changeable bits. The 13-octet nonce is priority, transmitter address and a never-reused packet number.

solid answer

~50 s

The MIC covers the **plaintext body** and the **additional authenticated data (AAD)** CCMP builds from the header: Frame Control with Retry, Power Management and More Data masked to zero and Protected Frame forced to one; Address 1, 2 and 3; Sequence Control with the sequence number masked but the fragment number kept; Address 4 when present; and the QoS Control TID. Duration/ID is not covered. The **13-octet nonce** is a flags octet carrying the priority, the transmitter address A2 and the 48-bit packet number. Uniqueness under a key holds because each transmitter increments its PN for every frame, and A2 separates the access point's frames from the client's, since both encrypt with the same pairwise key. That matters because CCM's guarantees are lost if a nonce ever repeats under one key; changing the TID or a covered address simply makes the MIC fail.

go deeper

for a junior

Recall that the MIC covers the payload and much of the MAC header, and that each frame's nonce includes a packet number that never repeats.

for a middle

List the AAD fields and the masked bits, and the three parts of the 13-octet nonce: priority flags, transmitter address, packet number.

for a senior

Answer like a reviewer: name exactly what is not covered, explain why A2 is needed when both ends share the pairwise key, and point to evidence for the cipher in force.

for a principal

Turn the construction into review criteria: which unprotected fields matter for your threat model, what assurance an implementation's nonce handling needs, and when to require management-frame protection alongside CCMP.

## The two inputs a reviewer should ask about CCMP (AES in CCM mode) protects a frame with one key, but what it actually protects is decided by two inputs it builds per frame: the **additional authenticated data (AAD)**, which is authenticated but not encrypted, and the **nonce**, which makes every encryption under the key distinct. A reviewer asking "what protects this frame?" is really asking what goes into those two, and what is left out. NIST SP 800-97 §4.3.2 describes both, and hostapd's wlantest analyser — part of the open-source reference implementation — builds them in a short, readable function, `ccmp_aad_nonce`. ## What the AAD contains | Header field | Treatment in the AAD | |---|---| | Frame Control | Included; Retry, Power Management and More Data masked to 0; Protected Frame set to 1; for data frames, subtype bits other than the QoS bit masked | | Address 1, 2, 3 | Included as sent | | Sequence Control | Sequence number masked to 0; fragment number kept | | Address 4 | Included when both To DS and From DS are set | | QoS Control | Only the TID kept; the other bits masked | | Duration/ID | Not included | The frame body is authenticated too, as the plaintext fed to CBC-MAC. So the MIC binds the payload to the addresses, to the frame type, to the fragment number and to the priority it was sent at. ## What the MIC deliberately does not cover - **Duration/ID** — the medium-reservation time, which is not part of the AAD at all. - **Retry, Power Management and More Data** — Frame Control bits that can differ when the same frame is retransmitted; masking Retry is what lets a retransmitted copy verify without re-encryption. - **The sequence number** — masked out; replay protection relies on the packet number, not on Sequence Control. - **The rest of QoS Control** beyond the TID. - **Management frames as a class** — CCMP on a WPA2 data path says nothing about beacons or deauthentication frames, which only Protected Management Frames covers. None of these is a flaw in the cipher; each is a field CCMP chose not to bind, and a reviewer should hear that they are unprotected rather than assume "the frame is authenticated". ## How the nonce is built The CCM nonce in 802.11 is **13 octets**, because CCM's nonce is 15-L octets and 802.11 uses L=2: - a **nonce flags** octet carrying the **priority** (the TID from QoS Control, zero for non-QoS frames) and a bit marking management frames when CCMP protects them under PMF; - the **transmitter address, A2**, 6 octets; - the **packet number (PN)**, 6 octets, taken from the CCMP header. The priority appears in both the nonce and the AAD, so a frame moved to a different TID fails verification. The PN in the nonce is why the PN, though sent in the clear, cannot be altered undetected. ## Why the nonce must never repeat, and what keeps it unique RFC 3610 is blunt: within the scope of a key, nonce values MUST be unique, and using the same nonce for two messages under the same key destroys the mode's security properties. The general reason — repeated counter-mode keystream — is covered with cipher modes; for CCMP the reviewer wants to know what guarantees uniqueness: 1. **The transmitter increments its PN for every MPDU it encrypts** under a key and never reuses one. A retransmission is the same encrypted frame, not a new encryption. 2. **A2 separates the two directions.** The pairwise temporal key is shared: the access point and the client both encrypt with it. Without the transmitter address in the nonce, the access point's PN 1 and the client's PN 1 would collide. 3. **Each association gets a fresh temporal key**, so PN spaces never carry over between sessions; how that key is derived is the four-way handshake's subject. 4. **The 48-bit space does not run out**: NIST SP 800-97 notes the key's possible lifetime exceeds any association. Group-addressed frames are transmitted by the access point alone, so its address and its group PN keep those nonces unique under the group key. ## Evidence to show the reviewer - The **RSN element** in beacons listing pairwise suite `00-0F-AC:4` (CCMP) and the negotiated cipher in the association. - The access point configuration fixing the cipher, for example hostapd's `rsn_pairwise=CCMP`. - For the construction itself, SP 800-97's encapsulation steps or the reference implementation's `ccmp_aad_nonce`, which shows field by field what is masked. A crisp review answer is two sentences: the MIC covers the body, the addresses, the frame type, the fragment number and the TID, but not Duration/ID, the sequence number or the masked Frame Control bits; the nonce is priority plus transmitter address plus a packet number that never repeats under the key.

  • Why is the transmitter address, not the receiver address, used in the CCMP nonce?
    Uniqueness is a property of each encryption, and encryptions are performed by transmitters. Both ends of a pairwise association encrypt with the same temporal key and each runs its own packet-number sequence, so the transmitter address is what keeps their nonces apart. The receiver address is still authenticated, because Address 1 is part of the AAD.
  • If Duration/ID is not covered by the MIC, should a reviewer flag that as a defect?
    Not as a CCMP defect. Duration/ID is a medium-reservation value that stations act on before any decryption, so integrity protection at the CCMP layer could not help them. The honest answer is to list it as unprotected and to recognise that it concerns medium access, not the confidentiality or integrity of the payload.

  • CCMP's MIC covers the entire MAC header, Duration/ID included.
  • The nonce is random, so uniqueness is only probabilistic.
  • The receiver address is in the nonce, so each direction needs its own key.
  • The 802.11 sequence number is part of the nonce and prevents replays.
  • A nonce repeat in CCMP only weakens integrity, never confidentiality.