Question involving DES cryptosystem

77 Views Asked by At

This is probably an easy question. Im Assuming whoever can answer this has access to S-boxes and P boxes etc.

Suppose the input to a round of DES is $1010101010......10101010$. (64 bits)

Suppose the round key is $11111111111111111111.....1111111111111111$ (48 1’s)

Compute the 53rd output bit of this round.

I am a little confused in how to approach this. Do I break up the 64 inputs into two 32 inputs and transform the second 32 into 48? Do I then add to the key mod 2?

If anyone can provide an answer or even the relevent steps involved (Ie like how to know which S-box to use) that would be great.

1

There are 1 best solutions below

4
On BEST ANSWER

You can see here https://engineering.purdue.edu/kak/compsec/NewLectures/Lecture3.pdf for lecture notes which explain the whole procedure.

It is a lengthy process.

I will explain briefly here. First you divide the 64 bits into left and right part, both 32 bits. The right part $101010...1010$ (32 bits) is then extended into 48 bits by the following method:

Break the 32 into 8 4-bit blocks. For each block, do the following: add the first bit of the next block to the last bit of the current block, add the last bit of the last block before the first bit of the current block. For the first and last block, treat the 32 bits as a cycle. For example, you have $$1010\quad 1010\quad 1010 ...\quad 1010$$ It becomes $$010101\quad 010101 \quad 010101 ...\quad 010101$$

So the right side 32 bits turns into 48 bits.

Suppose your raw round key is 48 bits $1111...111$. Permute it using the permutation table 1 in the notes. Your key will still be $111..111$. Divide it into 2 parts and shift both parts to the left the number of "round number" bits, as a cycle, which means, the first bit will go to the last bit when shifting to the left.

Combining the two parts and do another permutation using the table 2 in the notes. Your key will still be $1111...111$.

Now XOR the 48 bits coming from the right part of the input text and the round key. In your case, do $010101....010101$ XOR $111111....11111$. You will get

$$101010...101010$$

You are now in the position of combining this with the S-box to get the new right part. This 48 bits will be divided into 8 6-bit blocks, in your example, each block is $101010$. Each block is then turned into a 4 bit word using the corresponding S-box. There are 8 S-box. So each block is corresponding to one.

Each S-box is a $4\times 16$ table. You will extract the row number and column number of the cell you want to use in the table from the input block. From the input block, the first and last two digit gives you the row number, the middle 4 digits gives you the column number. Find the corresponding row and column. The number in that cell is the output 4-bit block.

For example, one of your block is $101010$, first digit and last digit makes $10$, which gives you the row number $2$. The middle 4 digits is $0101$, which gives you the column number $5$. So you should find the number in the first S-box, 2nd row and 5th column, which is $14$ (you can find it from the notes). So your output for that block is $1110$.

After you do this for all 8 blocks, you get a 32 bits word. This 32-bit word is then permuted using the P-box. After this permutation, your new right part is the original left part XOR this 32 bits word. Your new left part is exactly this 32 bits.

It is a long process. I hope I made myself understandable.