English
Language : 

CC2430 Datasheet, PDF (136/234 Pages) Texas Instruments – A True System-on-Chip solution for 2.4 GHz IEEE 802.15.4 / ZigBee-TM
CC2430
the mode must be changed to CBC. The
last block is then downloaded and the
block uploaded will be the MAC value.
CCM is a combination of CBC-MAC and
CTR. Parts of the CCM must therefore be
done in software. The following section
gives a short explanation of the necessary
steps to be done.
13.9.5.1 CBC-MAC
When performing CBC-MAC encryption,
data is downloaded to the coprocessor in
CBC-MAC mode one block at a time,
except for the last block. Before the last
block is loaded, the mode is changed to
CBC. The last block is downloaded and
the block uploaded is the message MAC.
CBC-MAC decryption is similar to
encryption. The message MAC uploaded
must be compared with the MAC to be
verified.
13.9.5.2 CCM mode
To encrypt a message under CCM mode,
the following sequence can be conducted
(key is already loaded):
Message Authentication Phase
This phase takes place during steps 1-6
shown in the following.
(1) The software loads the IV with zeros.
(2) The software creates the block B0.
The layout of block B0 is shown in Figure
28.
Name
Designation
B0
First block for authentication in CCM mode
Byte 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Name Flag
NONCE
L_M
Figure 28: Message Authentication Phase Block 0
There is no restriction on the NONCE
value. L_M is the message length in bytes.
For 802.15.4 the NONCE is 13 bytes and
L_M is 2 bytes.
The content of the Authentication Flag
byte is described in Figure 29.
L is set to 6 in this example. So, L-1 is set
to 5. M and A_Data can be set to any
value.
Bit
Name
Value
Name
FLAG/B0
7
Reserved
0
6
A_Data
x
Designation
Authentication Flag Field for CCM mode
5
4
3
2
1
(M-2)/2
L-1
x
x
x
1
0
0
1
Figure 29: Authentication Flag Byte
(3) If some Additional Authentication Data
(denoted a below) is needed (that is
A_Data =1), the software creates the
A_Data length field, called L(a) by :
CC2430 PRELIMINARY Data Sheet (rev. 1.03) SWRS036A
Page 136 of 232