GD32W51x User Manual
939
(q) Wait until the ONE flag is set to 1, and then read CAU_DO 4 times. The output
corresponds to the authentication tag.
(r) Disable the CAU
AES-CFB mode
The Cipher Feedback (CFB) mode is a confidentiality mode that features the feedback of
successive ciphertext segments into the input blocks of the forward cipher to generate output
blocks that are exclusive-ORed with the plaintext to produce the ciphertext, and the decryption
process is similar to the encryption described before.
AES-OFB mode
The Output Feedback (OFB) mode is a confidentiality mode that features the iteration of the
forward cipher on an initialization vectors (IV) to generate a sequence of output blocks that
are exclusive-ORed with the plaintext to produce the ciphertext, and the dec ryption process
is similar to the encryption described before.
27.5.
Operating modes
Encryption
1.
Disable the CAU by resetting the CAUEN bit in the CAU_CTL register.
2.
Select and configure the key length with the KEYM bits in the CAU_CTL register if AES
algorithm is chosen.
3.
Configure the CAU_KEY0..3(H/L) registers according to the algorithm.
4.
Configure the DATAM bit in the CAU_CTL register to select the data swapping type.
5.
Configure
the
algorithm
(DES/TDES/AES)
and
the
chaining
mode
(ECB/CBC/CTR/GCM/GMAC/CCM/CFB/OFB) by writing the ALGM[3:0] bit in the
CAU_CTL register.
6.
Configure the encryption direction by writing 0 to the CAUDIR bit in the CAU_CTL
register.
7.
Configure the initialization vectors by writing the CAU_IV0..1 registers.
8.
Flush the input FIFO and output FIFO by configure the FFLUSH bit in the CAU_CTL
register when CAUEN is 0.
9.
Enable the CAU by set the CAUEN bit as 1 in the CAU_CTL register.
10. If the INF bit in the CAU_STAT0 register is 1, then write data blocks into the CAU_DI
register. The data can be transferred by DMA/CPU during interrupts/no DMA or interrupts.
11. Wait for ONE bit in the CAU_STAT0 register is 1 then read the CAU_DO registers. The
output data can also be transferred by DMA/CPU during interrupts/no DMA or interrupts.
12. Repeat steps 10, 11 until all data blocks has been encrypted.
Decryption
1. Disable the CAU by resetting the CAUEN bit in the CAU_CTL register.
Содержание GD32W515 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32W51x Arm Cortex M33 32 bit MCU User Manual Revision 1 0 Nov 2021 ...
Страница 66: ...GD32W51x User Manual 66 Bits Fields Descriptions 31 0 UNIQUE_ID 95 64 Unique device ID ...
Страница 389: ...GD32W51x User Manual 389 The FWDGT timeout can be more accurate by calibrating the IRC32K ...
Страница 504: ...GD32W51x User Manual 504 ...
Страница 710: ...GD32W51x User Manual 710 ...