User manual

...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 738
www.energymicro.com
KEYWR: Cleared on a AES_KEYHn write or AES_CTRL write
31.3.5 Block Chaining Example
Example 31.1 (p. 738) below illustrates how the AES module could be configured to perform Cipher
Block Chaining with 128-bit keys.
Example 31.1. AES Cipher Block Chaining
1. Configure module to encryption, key buffer enabled and XORSTART in AES_CTRL
2. Write 128-bit initialization vector to AES_DATA, starting with least significant word.
3. Write PlainKey to AES_KEYHn, starting with least significant word.
4. Write PlainText to AES_XORDATA, starting with least significant word. Encryption will be started
when the DATA3 is written. KEYH (PlainKey) will be copied to KEYL before encryption starts.
5. When encryption finished, read CipherText from AES_DATA, starting with least significant word.
6. Loop to step 4, if new PlainText is available.