EasyManuals Logo
Home>ST>Microcontrollers>STM32L0x3

ST STM32L0x3 User Manual

ST STM32L0x3
1043 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #439 background imageLoading...
Page #439 background image
RM0367 Rev 7 439/1043
RM0367 AES hardware accelerator (AES)
466
Figure 88. STM32 cryptolib AES flowchart example
Initialization of AES
To initialize AES, first disable it by clearing the EN bit of the AES_CR register. Then perform
the following steps in any order:
Configure the AES mode, by programming the MODE[1:0] bitfield of the AES_CR
register.
For encryption, Mode 1 must be selected (MODE[1:0] = 00).
For decryption, Mode 3 must be selected (MODE[1:0] = 10), unless ECB or CBC
chaining modes are used. In this latter case, an initial key derivation of the
encryption key must be performed, as described in Section 19.4.5: AES
decryption key preparation.
Select the chaining mode, by programming the CHMOD[1:0] bitfield of the AES_CR
register
Write a symmetric key into the AES_KEYRx registers .
Configure the data type (1-, 8-, 16- or 32-bit), with the DATATYPE[1:0] bitfield in the
AES_CR register.
When it is required (for example in CBC or CTR chaining modes), write the initialization
vectors into the AES_IVRx register.
Data append
This section describes different ways of appending data for processing, where the size of
data to process is not a multiple of 128 bits.
MSv42146V1
Error status
Begin
AES_x encrypt init
AES_x encrypt
append
Error status
AES_x encrypt finish/
final
Error status
End
success
success
success
Encryption
Error status
Begin
AES_x decrypt init
AES_x decrypt
append
Error status
AES_x decrypt finish/
final
Error status
End
success
success
success
Decryption
Data to append
Data to append

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32L0x3 and is the answer not in the manual?

ST STM32L0x3 Specifications

General IconGeneral
BrandST
ModelSTM32L0x3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals