Unformatted text preview: de in C (cloth)
Go!
Keyword
Brief Full Advanced Search Search Tips (Publisher: John Wiley & Sons, Inc.) Author(s): Bruce Schneier ISBN: 0471128457 Publication Date: 01/01/96 Search this book:
Go! Previous Table of Contents Next
 The SBox Substitution
After the compressed key is XORed with the expanded block, the 48bit result moves to a substitution operation. The substitutions are performed by eight substitution boxes, or Sboxes. Each Sbox has a 6bit input and a 4bit output, and there are eight different Sboxes. (The total memory requirement for the eight DES Sboxes is 256 bytes.) The 48 bits are divided into eight 6bit subblocks. Each separate block is operated on by a separate Sbox: The first block is operated on by Sbox 1, the second block is operated on by Sbox 2, and so on. See Figure 12.4. Each Sbox is a table of 4 rows and 16 columns. Each entry in the box is a 4bit number. The 6 input bits of the Sbox specify under which row and column number to look for the output. Table 12.6 shows all eight Sboxes. The input bits specify an entry in the Sbox in a very particular manner. Consider an Sbox input of 6 bits, labeled b1 b2 b3 b4 b5 and b6. Bits b1 and b6 are combined to form a 2bit number, from 0 to 3, which corresponds to a row in the table. The middle 4 bits, b2 through b5 are combined to form a 4bit number, from 0 to 15, which corresponds to a column in the table. For example, assume that the input to the sixth Sbox (i.e., bits 31 through 36 of the XOR function) is 110011. The first and last bits combine to form 11, which corresponds to row 3 of the sixth Sbox. The middle 4 bits combine to form 1001, which corresponds to the column 9 of the same Sbox. The entry under row 3, column 9 of Sbox 6 is 14. (Remember to count rows and columns from 0 and not from 1.) The value 1110 is substituted for 110011. Figure 12.3 Expansion permutation. Table 12.5 Expansion Permutation 32, 8, 16, 24, 1, 9, 17, 25, 2, 10, 18, 26, 3, 11, 19, 27, 4, 12, 20, 28, 5, 13, 21, 29, 4, 12, 20, 28, 5, 13, 21, 29, 6, 14, 22, 30, 7, 15, 23, 31, 8, 16, 24, 32, 9, 17, 25, 1 It is, of course, far easier to implem...
View
Full Document
 Fall '10
 ALIULGER
 Cryptography, Bruce Schneier, Applied Cryptography, EarthWeb, Search Search Tips

Click to edit the document details