Si102x/3x
14.6.3.1. CBC Encryption using SFRs
First Configure the AES module for CBC encryption
Reset AES module by writing 0x00 to AES0BCFG.
Configure the AES module data flow for XOR on input data by writing 0x01 to AES0DCFG.
Write key size to bits 1 and 0 of AES0BCFG.
Configure the AES core for encryption by setting bit 2 of AES0BCFG.
Enable the AES core by setting bit 3 of AES0BCFG.
Repeat alternating write sequence 16 times
Write plaintext byte to AES0BIN.
Write initialization vector to AES0XIN
Write encryption key byte to AES0KIN.
Write remaining encryption key bytes to AES0KIN for 192-bit and 256-bit decryption only.
Wait on AES done interrupt or poll bit 5 of AES0BCFG.
Read 16 encrypted bytes from AES0YOUT.
If encrypting multiple blocks, this process may be repeated. It is not necessary reconfigure the AES mod-
ule for each block. When using Cipher Block Chaining, the initialization vector is written to AES0XIN for the
first block only, as described. Additional blocks will chain the encrypted data from the previous block.
Rev. 0.3
195