Product Specs

Table Of Contents
29 CCM AES CCM mode encryption
Page
269
MODE = DECRYP TION
AES CCM
AES CCM
OUTPTR
SCRATCH PTR
INPTR
Unencrypted packet
H
L
RFU
PL
Encrypted packet
H
L+4
RFU
EPL
MIC
CNF
H: Header (S0)
L: Length
RFU: reserved for future use (S1)
PL: unencrypted payload
EPL: encrypted payload
Figure 61: Decryption
29.4 AES CCM and RADIO concurrent operation
The AES CCM is designed to run in parallel with the RADIO to enable on-the-fly encryption and decryption
of RADIO packets without CPU involvement. To facilitate this, the RADIO has to be configured with specific
settings.
Table 56: Radio configuration settings
Radio parameter
Value
Description
PCNF0.S0LEN
1
Length of HEADER field in: Table 58: Data structure for unencrypted packet on page 271 and Table
59: Data structure for encrypted packet on page 271.
PCNF0.LFLEN
5 or 8
Length of LENGTH field in: Table 58: Data structure for unencrypted packet on page 271 and Table
59: Data structure for encrypted packet on page 271.
PCNF0.S1LEN
3 or 0
Length of the RFU field in: Table 58: Data structure for unencrypted packet on page 271 and Table
59: Data structure for encrypted packet on page 271. The combined length of LENGTH and RFU
must always be 8 bit.
PCNF0.S1
Include
Always include the S1 field (RFU field) in RAM to secure that the same data structure can be used
for PCNF0.S1LEN = 3 and PCNF0.S1LEN = 0: Table 58: Data structure for unencrypted packet on page
271 and Table 59: Data structure for encrypted packet on page 271.
MODE
Ble_1Mbit
Data rate. Must match CCM->MODE.DATARATE
PCNF1.BALEN
3
Length of address (32 bit)
CRCCNF.LEN
3
Length of CRC (24 bit)
29.5 Encrypting packets on-the-fly in radio transmit mode
When the AES CCM is encrypting a packet on-the-fly at the same time as the RADIO is transmitting it, the
RADIO must read the encrypted packet from the same memory location as the AES CCM is writing to.
The OUTPTR pointer in the AES CCM must therefore point to the same memory location as the
PACKETPTR pointer in the RADIO, see Figure 62: Configuration of on-the-fly encryption on page 269.
INPTR
SCRATCH PTR
OUTPTR
&
PACKETPTR
Unencrypted packet
Encrypted packet
MODE = ENCRYP TION
CCM data
structure
H: Header (S0)
L: Length
RFU: reserved for future use (S1)
PL: unencrypted payload
EPL: encrypted payload
CNFPTR
To remote
receiver
TXEN
Figure 62: Configuration of on-the-fly encryption
In order to match the RADIO’s timing, the KSGEN task must be triggered no later than when the START task
in the RADIO is triggered, in addition the shortcut between the ENDKSGEN event and the CRYPT task must
be enabled. This use-case is illustrated in Figure 63: On-the-fly encryption using a PPI connection on page
270 using a PPI connection between the READY event in the RADIO and the KSGEN task in the AES
CCM.
CCM data
structure
PTR
H
RADIO
Scratch area
Scratch area
H
L
RFU
PL
L+4
RFU
EPL
MIC