![GigaDevice Semiconductor GD32F20 Series User Manual Download Page 198](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801198.webp)
GD32F20x User Manual
198
Figure 10-6. DES/TDES CBC encryption
SWAP
CAU_DI
DATAM
DEA, encrypt
DEA, encrypt
DEA, decrypt
KEY1
KEY2
KEY3
SWAP
CAU_DO
Plaintext
Ciphertext
+
CAU_IV0(H/L)
DES/TDES CBC decryption
In DES/TDES CBC decryption, when the TDES algorithm is configured, the first ciphertext
block is used directly after data swapping according to the data type, it is read in the DEA and
decrypted using KEY3. The output is fed back directly to next DEA and then encrypted using
KEY2. After that, the output is fed back directly to the last DEA and decrypted with KEY1. The
first result of above process is then XORed with the initialization vector which is the same as
that used during encryption. At the same time, the first ciphertext is then used as the next
initialization vector and exclusive-ORed with the next result after DEA blocks. The above
operations are repeated until the last ciphertext block is decrypted. Note if the ciphertext
message does not consist of an integral number of data blocks, the final partial data block
should be decrypted in a specified manner same to that in encryption. At last, the output
plaintext is also obtained after data swapping according to the data type. When the DES
algorithm is configured, the state and process of the second and third block of DEA should
also be omitted. The procedure of DES/TDES CBC mode decryption is illustrated in
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...