GD32W51x User Manual
929
DES/TDES ECB encryption
The 64-bit input plaintext is first obtained after data swapping according to the data type.
When the TDES algorithm is configured, the input data block is read in the DEA and encrypted
using KEY1. The output is fed back directly to next DEA and then decrypted using KEY2.
After that, the output is fed back directly to the last DEA and encrypted with KEY3. The output
after above processes is then swapped back according to the data type again, and a 64-bit
ciphertext is produced. When the DES algorithm is configured, the result of the first DEA
encrypted using KEY1 is swapped directly according to the data type, and a 64-bit ciphertext
is produced. The procedure of DES/TDES ECB mode encryption is illustrated in
.
Figure 27-4. DES/TDES ECB encryption
SWAP
CAU_DI
DATAM
DEA, encrypt
DEA, encrypt
DEA, decrypt
KEY1
KEY2
KEY3
SWAP
CAU_DO
Plaintext
Ciphertext
DES/TDES ECB decryption
The 64-bit input ciphertext is first obtained after data swapping according to the data type.
When the TDES algorithm is configured, the input data block 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 output
after above process is then swapped back according to the data type again, and a 64-bit
plaintext is produced. When the DES algorithm is configured, the result of the first DEA
decrypted using KEY1 is swapped directly according to the data type, and a 64-bit plaintext
is produced. The procedure of DES/TDES ECB mode decryption is illustrated in
.