CCM is able to read an encrypted packet, decrypt it, authenticate the MIC field, and generate an appropriate MIC status.
- Reads the encrypted packet located in RAM at the address specified in the INPTR pointer
- Decrypts the packet
- Authenticates the packet's MIC field
- Generates the appropriate MIC status
The packet header (S0) and payload are included in the MIC authentication. Bits in the packet header can be masked away by configuring register HEADERMASK.
Decryption is started by triggering the CRYPT task, by setting the register MODE to Decryption. An ENDCRYPT event will be generated when packet decryption is completed.
CCM modifies the length field of the packet to adjust for the MIC field. It subtracts four bytes from the length and stores the decrypted packet in RAM at the address specified in the OUTPTR pointer.
CCM is only able to decrypt packet payloads that are at least five bytes long (one byte or more encrypted payload (EPL) and four bytes of MIC). CCM will therefore generate a MIC error for packets where the length field is set to 1, 2, 3, or 4.
Empty packets (length field is set to 0) will not be decrypted but instead moved unmodified through CCM. These packets will always pass the MIC check.
CCM supports different widths of the LENGTH field in the data structure for decrypted packets. This is configured in register MODE.
The CCM is only able to decrypt packet payloads that are at least 5 bytes long, 1 byte or more encrypted payload (EPL) and 4 bytes of MIC. The CCM will therefore generate a MIC error for packets where the length field is set to 1, 2, 3 or 4. Empty packets (length field is set to 0) will not be decrypted, but instead moved unmodified through CCM. These packets will always pass the MIC check.
CCM supports different widths of the length field in the data structure for decrypted packets. This is configured in register MODE.