DES Substitution Example and Homework Solution

Click For Summary

Discussion Overview

The discussion revolves around the implementation of the Data Encryption Standard (DES), specifically focusing on the substitution process within the encryption algorithm. Participants explore the mechanics of the S-boxes, the use of tables for substitution, and the steps involved in deriving keys and processing plaintext through DES. The scope includes theoretical understanding, practical application, and homework-related queries.

Discussion Character

  • Homework-related
  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant describes the DES process, detailing the splitting of a 64-bit block and the round function involving XOR operations and S-box substitutions.
  • Another participant expresses uncertainty about the correct tables to use for S-boxes and seeks clarification on identifying outer and inner bits in the addressing scheme.
  • A third participant clarifies that the outer bits are the two end bits of the 6-bit input to the S-box, while the inner bits are the four middle bits, providing an example with S5.
  • There is a suggestion that using a tool like Microsoft Excel may be necessary for encoding or decoding DES blocks, prompting a question about whether this can be done by hand.
  • One participant shares a new example from their textbook, outlining specific steps to derive subkeys and process plaintext, while expressing confusion about how to perform the key derivation step.
  • Another participant questions whether their shift and bit loss process for key derivation is correct, indicating a need for further guidance.

Areas of Agreement / Disagreement

Participants exhibit uncertainty regarding the correct tables for S-boxes and the process of key derivation in DES. There is no consensus on whether the process can be effectively completed by hand or if tools are necessary. The discussion remains unresolved with multiple competing views on the approach to solving the homework problem.

Contextual Notes

Participants mention various steps in the DES process, including the need for left circular shifts and the loss of bits during key derivation, but do not reach a resolution on these specific methods. There are also references to different tables and examples, which may lead to confusion without clear definitions or assumptions being established.

Who May Find This Useful

This discussion may be useful for students studying cryptography, particularly those learning about the DES algorithm and its implementation challenges. It may also benefit individuals seeking clarification on S-boxes and key derivation processes in symmetric encryption.

DODGEVIPER13
Messages
668
Reaction score
0

Homework Statement


example:

S(18 09 12 3d 11 17 38 39) = 5fd25e03


Homework Equations





The Attempt at a Solution


So I know about DES that you split a 64 bit block into left and right halves 32 bits each. Where even bits are on the left and odd are on the right. Perform the round function of the 32 bit right side and 48 bit key. The round function works by expanding the bits the flowing them through a xor gate with the 48 bit key, which then flows into the substitution stage where the 48 bit expanded input is dropped to 32 bit. This then goes into permutation and goes into the XOR gate along with LI-1. Such that Li = RI-1 and Ri = LI-1 xor F(RI-1,Ki). So knowing that and only focusing on the substitution the 8 S boxes map the 6 bit to 4 bit, in which each each s box is 4 little 4 bit boxes where the outer bits select rows and the inner bits select the columns. Ok so I know all this and I have the table that it suggests using but I don't know what any of this means I have tried to find a pattern to no avail. More specifically what are the outer bits in this and what are the inner? Then once I figure this out how do I use the table provided?
 

Attachments

  • EPSON002Revised.jpg
    EPSON002Revised.jpg
    32.6 KB · Views: 1,138
  • EPSON003.jpg
    EPSON003.jpg
    25.7 KB · Views: 974
Physics news on Phys.org
I don't think I am using the correct tables because I looked up a table on Wikipedia that had the stuff in binary. But I am still unsure of what the outer and inner bits are?
 
Each of the eight S-Boxes is addressed with 6-bits, separated into the 4 middle bits (inner) and the two end bits (outer).
For example, if I am using S5, my outer bits are 1yyyy0, and my inner bits are x1010x, the full address to S5 will be 110100. Under these conditions, the S5 output will be 1100 (12).

Having said that...

If you are going to try to encode or decode a DES block, you're going to need some sort of tool - for example, Microsoft Excel.

What is your plan?
 
Is there no way to do this by hand? If not I would have to guess Excel?
 
Ok so I found a question in my book that may be a better example to start with. I UPLOADED WORK. It states:

This problem provides a numerical example of encryption using a one-round version of DES. We start with the same bit pattern for the key K and the plaintext, namely:

Hexadecimal notation: 0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary notation: 0000 0001 0010 0011 0100 0101 0110 0111
1000 1001 1010 1011 1100 1101 1110 1111

a. Derive K1, the first-round subkey
b. Derive L0, R0
c. Expand R0 to get E[R0], where E[.] is the expansion function of Table S.1
d. Calculate A = E[R0] xor K1
e. Group the 48-bit result of (d) into sets of 6 bits and evaluate the corresponding S-box substitutions.
f. Concatenate the results of (e) to get a 32-bit result, B
g. Apply the permutation to get P(B)
h. Calculate R1 = P(B) xor L0
I. Write down the cipher text

I then solved (b) and (c) but I was unsure of how to solve (a).

(b) L0 = 1100 1100 0000 0000 1100 1100 1111 1111
(HEX) L0 = C C 0 0 C C F F
R0 = 1111 0000 1010 1010 1111 0000 1010 1010
(HEX) R0 = F 0 A A F 0 A A

(c) E[R0] = 011110 100001 010101 010101 011110 100001 010101 010101
(HEX) E[R0] = 7 A 1 5 5 5 7 A 1 5 5 5

My question is how do I do the key part? I read in the book that I need to perform a left circular shift on the left and right 28 bit side. I then need to somehow lose 8 bits, how will I do this? Part (e) looks similar to what I need but I need to do (a) so I can (d), and therefore finish (e).MY WORK IS UPLOADED.
 

Attachments

  • EPSON004.jpg
    EPSON004.jpg
    17.3 KB · Views: 1,569
Sorry was my question out of line? If so we can go back to the original, I just figured this was a better starting point.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K