The following question is about a specific protocol that uses a modified version of the CCM mode. Since I'm not a cryptographer, the protocol specification provides no reasoning for this change to CCM or proof of security, I'd like to know if this might have any practical or theoretical implication for the security of the encryption and authentication.
In NIST 800-38C and RFC 3610 the CCM mode creates the $S_0, ..., S_m$ by encrypting the counter blocks in the following way:
- For $j=0$ to $m$, do $S_j=CIPH_K(Ctr_j)$
Then the $S_1$ to $S_m$ are concatenated to form $S$. Note this doesn't use $S_0$:
- $S = S_1 || S_2 || ... || S_m$.
The encryption of the plaintext $P$ is done by xoring it with the $Plen$ most significant bits of $S$ and the MAC $T$ is xored with the $Tlen$ most significant bits of $S_0$:
- $C = (P \oplus MSB_{Plen}(S)) || (T \oplus MSB_{Tlen}(S_0))$
The step where the protocol in question deviates from the standard CCM is in the construction of $S$. It includes $S_0len - Tlen$ of the least significant bits of $S_0$ into $S$.
- $S = LSB_{S_0len - Tlen}(S_0) || S_1 || S_2 || ... || S_m$
The ciphertext is still created through:
- $C = (P \oplus MSB_{Plen}(S)) || (T \oplus MSB_{Tlen}(S_0))$
It is ensured that the $MSB_{Tlen}(S_0)$ and $LSB_{S_0len - Tlen}(S_0)$ never overlap.
In my layman's eyes it seems like a strange change. However, since the $Ctr_0$ is constructed in the same fashion as the other counter blocks and the particular bytes used for xoring aren't that same between the encryption and authentication, it might not degrade security? Is there any obvious reason why someone would want to include parts of $S_0$ into the encryption?