SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
The DES module is an efficient implementation of a DES block cipher. Block ciphers, as opposed to stream ciphers, operate on blocks of plain text and cipher text. The DES block size is 8 bytes. The DES key consists of 64 binary digits, but only 56 bits are actually used directly by the algorithm. The other 8 bits are used for error detection.
The 64-bit block of input data to be enciphered is initially permuted, then passed through 16 iterations of a calculation that uses a cipher function and finally permutated to the inverse of the initial permutation. At each of the 16 iterations, a 48-bit key computed from the 64-bit input key is applied to one of the 32-bit sub-blocks of the 64-bit input block using the cipher function. The 48-bit key value changes for each iteration. The result of the cipher function is a 32-bit sub-block, which is concatenated with the second 32-bit input sub-block. The resulting 64-bit output block of each iteration feeds back as the input of the next iteration. To decipher, it is only necessary to apply the same algorithm to the enciphered message block, taking care that each iteration of the computation will use the same 48-bit key which was used during enciphering.
The triple DES is the DES used three times in a row (also known as DES-EDE). It uses three keys key1, key2, and key3, so that key length is 168 bits effective: a 64-bit block plaintext is encrypted with key1, decrypted with key2, and encrypted with key3, and a 64-bit ciphertext is decrypted with key1, encrypted with key2, and decrypted with key3.
The following is the three keying options defined in ANSI X9.52 for DES-EDE:
The first option provides highest level of security; the last option is compatible with single DES. See Table 14-1 for key use.
Mode | Key1_L | Key1_H | Key2_L | Key2_H | Key3_L | Key3_H |
---|---|---|---|---|---|---|
64 Bit (DES) | ✓ | ✓ | X | X | X | X |
192 Bit (3DES) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
ECB, CBC, and CFB modes can be used with DES and 3DES modes.