0% found this document useful (0 votes)
5 views10 pages

DES Example

The document provides a detailed example of encryption using a one-round version of the DES algorithm, including steps to derive the first-round subkey K1 from a given hexadecimal key. It outlines the process of initial permutation, expansion of R0, XOR operations, S-box substitutions, and the final ciphertext output. The document includes binary representations and transformations at each step to illustrate the encryption process.

Uploaded by

randomuser100526
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

DES Example

The document provides a detailed example of encryption using a one-round version of the DES algorithm, including steps to derive the first-round subkey K1 from a given hexadecimal key. It outlines the process of initial permutation, expansion of R0, XOR operations, S-box substitutions, and the final ciphertext output. The document includes binary representations and transformations at each step to illustrate the encryption process.

Uploaded by

randomuser100526
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Example of encryption using a one round

version of DES
Given:-
Key (Hexadecimal) 0 1 2 3 4 5 6 7 8 9 A B C D E F

Plaintext (Hexadecimal) F E D C B A 9 8 7 6 5 4 3 2 1 0
(a) Derive K1 | the first-round sub key
Step-1: Input Key
• Convert the given input Key into binary form (shown below):
0 1 2 3 4 5 6 7 8 9
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
1010 1011 1100 1101 1110 1111
A B C D E F
Cont . . .
Step-2: Permuted Choice I
• 64-bits key → Permuted Choice I → 56-bits key
• Output:
1111 0000 1100 1100 1010 1010 0000
1010 1010 1100 1100 1111 0000 0000
Cont . . .
Step-3: Circular Left Shift
• Divide received data into half | two 28-bits of data
C0 : 1111 0000 1100 1100 1010 1010 0000
D0 : 1010 1010 1100 1100 1111 0000 0000
• Round: 1 | No. of bits shifted: 1 | as specified in the table
• Circular left shift on C0 and D0

C0

D0
Cont . . .
Step-4: Permuted Choice II
• 56-bits key → Permuted Choice II → 48-bits key | sub key, K1
• Output:
K1 : 0000 1011 0000 0010 0110 0111
1001 1011 0100 1001 1010 0101
(b) Derive L0 and R0
Initial Permutation, IP | Phase-I
• Input: (Substitute the given plain text (bits) in the Initial Permutation table
1111 1110 1101 1100 1011 1010 1001 1000
0111 0110 0101 0100 0011 0010 0001 0000
• Output:
L0 : 0011 0011 1111 1111 0011 0011 0000 0000
R0 : 0000 1111 0101 0101 0000 1111 0101 0101
58 0 50 0 42 1 34 1 26 0 18 0 10 1 2 1
60 1 52 1 44 1 36 1 28 1 20 1 12 1 4 1
L0
62 0 54 0 46 1 38 1 30 0 22 0 14 1 6 1
64 0 56 0 48 0 40 0 32 0 24 0 16 0 8 0
57 0 49 0 41 0 33 0 25 1 17 1 9 1 1 1
59 0 51 1 43 0 35 1 27 0 19 1 11 0 3 1
R0
61 0 53 0 45 0 37 0 29 1 21 1 13 1 5 1
63 0 55 1 47 0 39 1 31 0 23 1 15 0 7 1
(C) Expand R0 to get E[R0], where E [·] is the
expansion function/permutation
• R0 : 0000 1111 0101 0101 0000 1111 0101 0101
• 32-bits R0 → Expansion → 48-bits
Expansion, E[R0]: 100001 011110 101010 101010 100001 011110
101010 101010
32 1 1 0 2 0 3 0 4 0 5 1
4 0 5 1 6 1 7 1 8 1 9 0
8 1 9 0 10 1 11 0 12 1 13 0
12 1 13 0 14 1 15 0 16 1 17 0
16 1 17 0 18 0 19 0 20 0 21 1
20 0 21 1 22 1 23 1 24 1 25 0
24 1 25 0 26 1 27 0 28 1 29 0
28 1 29 0 30 1 31 0 32 1 1 0
(d) Calculate A = E[R0] ⨁ K1
• E[R0]: 1000 0101 1110 1010 1010 1010 1000 0101 1110 1010 1010 1010
• K1 : 0000 1011 0000 0010 0110 0111 1001 1011 0100 1001 1010 0101
•A : 1000 1110 1110 1000 1100 1101 0001 1110 1010 0011 0000 1111
(e) Group the 48-bit of A into sets of 6 bits and
evaluate the corresponding S-box substitutions
• 48 bits → Substitution → 32 bits
• 100011 101110 100011 001101 000111 101010 001100 001111
S1 S2 S3 S4 S5 S6 S7 S8
1100 0001 1010 0000 1100 1000 1000 0100
(f) Concatenate the results of S-box to get a
32-bit result, B
• B: 1100 0001 1010 0000 1100 1000 1000 0100
(g) Apply the permutation to get P(B)
• Input : 1100 0001 1010 0000 1100 1000 1000 0100
• Output P(B): 0001 0001 1000 0100 1100 0001 0010 0101

16 0 7 0 20 0 21 1 29 0 12 0 28 0 17 1
1 1 15 0 23 0 26 0 5 0 18 1 31 0 10 0
2 1 8 1 24 0 14 0 32 0 27 0 3 0 9 1
19 0 13 0 30 1 6 0 22 0 11 1 4 0 25 1
(h) Calculate R1 = P(B)⨁ L0
• P(B) : 0001 0001 1000 0100 1100 0001 0010 0101
• L0 : 0011 0011 1111 1111 0011 0011 0000 0000
• Output (R1): 0010 0010 0111 1011 1111 0010 0010 0101
(i) Write down the resulting Ciphertext
• L1 : 0000 1111 0101 0101 0000 1111 0101 0101 (R0)
• R1 : 0010 0010 0111 1011 1111 0010 0010 0101
• Output : 0000 1111 0101 0101 0000 1111 0101 0101 0010 0010 0111
0 F 5 5 0 F 5 5 2 2 7

1011 1111 0010 0010 0101


B F 2 2 5

You might also like