7.2 A Simplified DES-Type Algorithm

The DES algorithm is rather unwieldy to use for examples, so in the present section we present an algorithm that has many of the same features, but is much smaller. Like DES, the present algorithm is a block cipher. Since the blocks are encrypted separately, we assume throughout the present discussion that the full message consists of only one block.

The message has 12 bits and is written in the form L0R0, where L0 consists of the first six bits and R0 consists of the last six bits. The key K has nine bits. The ith round of the algorithm transforms an input Li1Ri1 to the output LiRi using an eight-bit key Ki derived from K.

The main part of the encryption process is a function f(Ri1, Ki) that takes a six-bit input Ri1 and an eight-bit input Ki and produces a six-bit output. This will be described later.

The output for the ith round is defined as follows:

Li=Ri1 and Ri=Li1f(Ri1, Ki), 

where denotes XOR, namely bit-by-bit addition mod 2. This is depicted in Figure 7.1.

Figure 7.1 One Round of a Feistel System

The illustration shows One Round of a Feistel System.

This operation is performed for a certain number of rounds, say n, and produces the ciphertext LnRn.

How do we decrypt? Start with LnRn and switch left and right to obtain RnLn. (Note: This switch is built into the DES encryption algorithm, so it is not needed when decrypting DES.) Now use the same procedure as before, but with the keys Ki used in reverse order Kn, , K1. Let’s see how this works. The first step takes RnLn and gives the output

[Ln][Rnf(Ln, Kn)].

We know from the encryption procedure that Ln=Rn1 and Rn=Ln1f(Rn1, Kn). Therefore,

[Ln][Rnf(Ln, Kn)]=[Rn1][Ln1f(Rn1, Kn)f(Ln, Kn)]=[Rn1][Ln1].

The last equality again uses Ln=Rn1, so that f(Rn1, Kn)f(Ln, Kn) is 0. Similarly, the second step of decryption sends Rn1Ln1 to Rn2Ln2. Continuing, we see that the decryption process leads us back to R0L0. Switching the left and right halves, we obtain the original plaintext L0R0, as desired.

Note that the decryption process is essentially the same as the encryption process. We simply need to switch left and right and use the keys Ki in reverse order. Therefore, both the sender and receiver use a common key and they can use identical machines (though the receiver needs to reverse left and right inputs).

So far, we have said nothing about the function f. In fact, any f would work in the above procedures. But some choices of f yield much better security than others. The type of f used in DES is similar to that which we describe next. It is built up from a few components.

The first function is an expander. It takes an input of six bits and outputs eight bits. The one we use is given in Figure 7.2.

Figure 7.2 The Expander Function

The illustration shows The Expander Function.

This means that the first input bit yields the first output bit, the third input bit yields both the fourth and the sixth output bits, etc. For example, 011001 is expanded to 01010101.

The main components are called S-boxes. We use two:

S1[101010001110011100111000001100110010000111101011]
S2[100000110101111001011010101011000111110010001100].

The input for an S-box has four bits. The first bit specifies which row will be used: 0 for the first row, 1 for the second. The other three bits represent a binary number that specifies the column: 000 for the first column, 001 for the second, ..., 111 for the last column. The output for the S-box consists of the three bits in the specified location. For example, an input of 1010 for S1 means we look at the second row, third column, which yields the output 110.

The key K consists of nine bits. The key Ki for the ith round of encryption is obtained by using eight bits of K, starting with the ith bit. For example, if K=010011001, then K4=01100101 (after five bits, we reached the end of K, so the last two bits were obtained from the beginning of K).

We can now describe f(Ri1, Ki). The input Ri1 consists of six bits. The expander function is used to expand it to eight bits. The result is XORed with Ki to produce another eight-bit number. The first four bits are sent to S1, and the last four bits are sent to S2. Each S-box outputs three bits, which are concatenated to form a six-bit number. This is f(Ri1, Ki). We present this in Figure 7.3.

Figure 7.3 The Function f(Ri1, Ki)

A flow chart of the Function f left parenthesis R subscript i minus 1; K subscript i right parenthesis is shown.

For example, suppose Ri1=100110 and Ki=01100101. We have

E(100110)Ki=1010101001100101=11001111.

The first four bits are sent to S1 and the last four bits are sent to S2. The second row, fifth column of S1 contains 000. The second row, last column of S2 contains 100. Putting these outputs one after the other yields f(Ri1, Ki)=000100.

We can now describe what happens in one round. Suppose the input is

Li1Ri1=011100100110

and Ki=01100101, as previously. This means that Ri1=100110, as in the example just discussed. Therefore, f(Ri1, Ki)=000100. This is XORed with Li1=011100 to yield Ri=011000. Since Li=Ri1, we obtain

LiRi=100110011000.

The output becomes the input for the next round.

For work on this and another simplified DES algorithm and how they behave under multiple encryption, see [Konikoff-Toplosky].

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset