GD32F20x User Manual
202
plaintext is also obtained after data swapping according to the data type. The procedure of
AES CBC mode decryption is illustrated in
Figure 10-11. AES CBC decryption
Figure 10-11. AES CBC decryption
SWAP
CAU_DI
DATAM
AEA, decrypt
CAU_KEY0..3
SWAP
CAU_DO
Ciphertext
Plaintext
CAU_IV0..1(H/L)
+
AES-CTR mode
In counter mode, a counter is used in addition with a nonce value to be encrypted and
decrypted in AEA, and the result will be used for the XOR operation with the plaintext or the
ciphertext. As the counter is incremented from the same initialized value for each block in
encryption and decryption, the key schedule during the encryption and decryption are the
same. Then decryption operation acts exactly in the same way as the encryption operation.
Only the 32-bit LSB of the 128-bit initialization vector represents the counter, which means
the other 96 bits are unchanged during the operation, and the initial value should be set to 1.
Nonce is 32-bit single-use random value and should be updated to each communication block.
And the 64-bit initialization vector is used to ensure that a given value is used only once for a
given key.
Figure 10-12. Counter block structure
illustrates the counter block structure and
Figure 10-13. AES CTR encryption/decryption
shows the AES CTR encryption/decryption.
Figure 10-12. Counter block structure
NONCE
Initialization
vector
Counter
Figure 10-13. AES CTR encryption/decryption
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 ...