applied cryptography - protocols, algorithms, and source code in c

Read earthwebs privacy statement to access the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: verse of the initial permutation and is described in Table 12.8. Note that the left and right halves are not exchanged after the last round of DES; instead the concatenated block R16L16 is used as the input to the final permutation. There’s nothing going on here; exchanging the halves and shifting around the permutation would yield exactly the same result. This is so that the algorithm can be used to both encrypt and decrypt. Decrypting DES After all the substitutions, permutations, XORs, and shifting around, you might think that the decryption algorithm is completely different and just as confusing as the encryption algorithm. On the contrary, the various operations were chosen to produce a very useful property: The same algorithm works for both encryption and decryption. With DES it is possible to use the same function to encrypt or decrypt a block. The only difference is that the keys must be used in the reverse order. That is, if the encryption keys for each round are K1 K2 K3,..., K16 then the decryption keys are K16 K15 K14, ..., K1. The algorithm that generates the key used for each round is circular as well. The key shift is a right shift and the number of positions shifted is 0,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1. Modes of DES FIPS PUB 81 specifies four modes of operation: ECB, CBC, OFB, and CFB (see Chapter 9) [1143]. The ANSI banking standards specify ECB and CBC for encryption, and CBC and n-bit CFB for authentication [52]. In the software world, certification is usually not an issue. Because of its simplicity, ECB is most often used in off-the-shelf commercial software products, although it is the most vulnerable to attack. CBC is used occasionally, even though it is just slightly more complicated than ECB and provides much more security. Table 12.8 Final Permutation 40, 38, 36, 34, 8, 6, 4, 2, 48, 46, 44, 42, 16, 14, 12, 10, 56, 54, 52, 50, 24, 22, 20, 18, 64, 62, 60, 58, 32, 30, 28, 26, 39, 37, 35, 33, 7, 5, 3, 1, 47, 45, 43, 41, 15, 13, 11, 9, 55, 53, 51, 49, 23, 21, 19, 17, 63, 61, 59, 57, 31, 29, 27, 25 Hardware and Software Implementations of DES...
View Full Document

Ask a homework question - tutors are online