
101
42073A-MCU Wireless-02/13
ATmega2564/1284/644RFR2
9.8.8.3 Security Key Setup
The key is stored in a 16 Byte sequential buffer. To read or write the contents of the
buffer, 16 consecutive read or write operations to the AES_KEY register are required.
A 16-folded read access to registers AES_KEY returns the last round key of the
preceding security operation. This is the key required for the corresponding ECB
decryption operation after an ECB encryption operation. However the initial AES key
written to the security module in advance of an AES run (see step 1 in
Table 9-29 onpage 100) is not modified during an AES operation. This initial key is used for the next
AES run although it cannot be read from AES_KEY.
Before accessing the Key Buffer it must be ensured, that the internal address counter is
initialized correctly. This is the cases after Radio Transceiver Reset (see
TRXPR –operation. After an interrupted buffer read or write access, Address pointer
reinitialization is recommended by a simple read access to the AES_CTRL register.
Note:
1. ECB decryption is not required for IEEE 802.15.4 or ZigBee security processing.
The radio transceiver provides this functionality as an additional feature.
9.8.8.4 Security Operation Modes
9.8.8.4.1 Electronic Code Book (ECB)
ECB is the basic operating mode of the security module and is configured by the
AES_CTRL register. The bit AES_MODE = 0 defines the ECB mode and bit AES_DIR
selects the direction to either encryption or decryption. The data to be processed has to
be written to registers AES_STATE.
A security operation can be started by writing the start command AES_REQUEST = 1
(AES_CTRL register).
102 shows the ECB decryption mode which is supported in a similar way.
Figure 9-36. ECB Mode - Encryption
Block Cipher
Encryption
Key
Plaintext
Ciphertext
Block Cipher
Encryption
Plaintext
Ciphertext
Encryption
Key