323
8331B–AVR–03/12
Atmel AVR XMEGA AU
Figure 25-3.
The key memory with pointers and register.
In the AES crypto module, the following definition of the key is used:
• In encryption mode, the key is the one defined in the AES standard.
• In decryption mode, the key is the last subkey of the expanded key defined in the AES
standard.
In decryption mode, the key expansion procedure must be executed by software before opera-
tion with the AES crypto module so that the last subkey is ready to be loaded through the KEY
register. Alternatively, this procedure can be run in hardware by using the AES crypto module to
process a dummy data block in encryption mode using the same key. After the end of the
encryption, reading from the key memory allows the last subkey to be obtained; i.e., get the
result of the key expansion procedure.
shows the results of reading the
key, depending on the mode (encryption or decryption) and status of the AES crypto module.
25.4.2
DMA Support
The AES module can trigger a DMA transfer when the encryption/decryption procedure is com-
plete. For more details on DMA transfer triggers, refer to
”Transfer Triggers” on page 56
.
Table 25-1.
The result of reading the key memory at different stages.
Encryption
Decryption
Before Data
Processing
After Data
Processing
Before Data
Processing
After Data
Processing
Same key as loaded
The last subkey
generated from the
loaded key
Same key as loaded
The initial key
generated from the last
loaded subkey
4-bit key write
address pointer
1
-
14
15
KEY
0
4-bit key read
address pointer
Reset pointer
Reset pointer
reset or
access to CTRL
reset or
access to CTRL