Encryption

nRF5340 Product Specification

CCM is able to read an unencrypted packet, encrypt it, and append a four byte MIC field to the packet.

During packet encryption, CCM performs the following:
  • Reads the unencrypted packet located in RAM address specified in the INPTR pointer
  • Encrypts the packet
  • Appends a four byte long Message Integrity Check (MIC) field to the packet

Encryption is started by triggering the CRYPT task with register MODE set to Encryption. An ENDCRYPT event is generated when packet encryption is completed.

CCM will also modify the length field of the packet to adjust for the appended MIC field. It adds four bytes to the length and stores the resulting packet in RAM at the address specified in pointer OUTPTR, as illustrated in the figure below.

Figure 2. Encryption

AES CCM packet encryption

Empty packets (length field is set to 0) will not be encrypted, but instead moved unmodified through CCM.

CCM supports different widths of the length field in the data structure for encrypted packets. This is configured in register MODE.