DES Substitution Example and Homework Solution

In summary, the homework statement is trying to solve a problem involving encryption using a one-round version of DES. The Attempt at a Solution provides a numerical example of the encryption process. L0 is the first-round subkey, R0 is the plaintext, and A is the resulting 48-bit result of (d). E[R0] is the expansion function of Table S.1. K1 is the first-round subkey, and P(B) is the resulting 32-bit result of (h). R1 is the cipher text.
  • #1
DODGEVIPER13
672
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,097
  • EPSON003.jpg
    EPSON003.jpg
    25.7 KB · Views: 932
Physics news on Phys.org
  • #2
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?
 
  • #3
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?
 
  • #4
Is there no way to do this by hand? If not I would have to guess Excel?
 
  • #5
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,531
  • #6
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.
 

FAQ: DES Substitution Example and Homework Solution

What is DES Substitution Example?

DES (Data Encryption Standard) Substitution Example is a type of symmetric key encryption algorithm used to convert plain text into cipher text. It operates on 64-bit blocks of data and uses a 56-bit key to perform the encryption.

How does DES Substitution Example work?

The DES Substitution Example algorithm works by taking a 64-bit input and dividing it into two 32-bit halves. These halves then undergo a series of substitution and permutation operations, known as S-boxes and P-boxes, respectively. This process is repeated 16 times, with the output of each round being used as the input for the next round. The final output is the encrypted cipher text.

What is the purpose of DES Substitution Example?

The purpose of DES Substitution Example is to securely encrypt data so that it cannot be read or understood by anyone who does not have the correct key. It is commonly used in electronic transactions, such as online banking and e-commerce, to protect sensitive information from being intercepted and accessed by unauthorized parties.

What are the weaknesses of DES Substitution Example?

One of the main weaknesses of DES Substitution Example is its relatively short key length of 56 bits. With advancements in technology, this key length is considered too short and can be easily cracked by modern computers. Additionally, the fixed block size of 64 bits also makes it vulnerable to certain types of attacks, such as brute force attacks.

Is DES Substitution Example still used today?

Although DES Substitution Example was once widely used as a standard encryption algorithm, it has now been replaced by more secure and advanced algorithms such as AES (Advanced Encryption Standard). However, DES is still used in some legacy systems and is also used as a building block in other encryption algorithms.

Similar threads

Replies
2
Views
1K
Replies
1
Views
3K
Replies
11
Views
1K
Replies
1
Views
2K
Replies
1
Views
874
Replies
1
Views
7K
Replies
23
Views
3K
Back
Top