0% found this document useful (0 votes)
95 views

DES (Data Encryption Standard)

The document summarizes the Data Encryption Standard (DES) encryption process in 3 steps: 1. The 64-bit plaintext is permuted and divided into subkeys which are generated from a 64-bit key. 2. Each 64-bit block is initially permuted and divided into 32-bit left and right halves. The halves are swapped and input to 16 rounds of processing using the subkeys. 3. Each round applies the key using XOR on an expanded right half, then substitutes the bits using 8 S-boxes before swapping the halves again for the next round. After 16 rounds the left and right halves are combined and inversely permuted to generate the ciphertext.

Uploaded by

Hirko Gemechu
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

DES (Data Encryption Standard)

The document summarizes the Data Encryption Standard (DES) encryption process in 3 steps: 1. The 64-bit plaintext is permuted and divided into subkeys which are generated from a 64-bit key. 2. Each 64-bit block is initially permuted and divided into 32-bit left and right halves. The halves are swapped and input to 16 rounds of processing using the subkeys. 3. Each round applies the key using XOR on an expanded right half, then substitutes the bits using 8 S-boxes before swapping the halves again for the next round. After 16 rounds the left and right halves are combined and inversely permuted to generate the ciphertext.

Uploaded by

Hirko Gemechu
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

DES(Data Encryption Standard)

By: Getahun Tigistu


DES(Data Encryption Standard)
Example: Let M be the plain text message M =
0123456789ABCDEF
Step 1:Create 16 subkeys, each of which is 48-bits long
The 64-bit key is permuted according to the following
table PC-1
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4
DES(Data Encryption Standard)/Key Generation

Example: From the original 64-bit key


K = 00010011 00110100 01010111 01111001 10011011 10111100 11011111
11110001
we get the 56-bit permutation
K+ = 1111000 0110011 0010101 0101111 0101010 1011001 1001111 0001111
Next, split this key into left and right halves, C0 and D0,
where each half has 28 bits.
Example: From the permuted key K+, we get
• C0=1111000011001100101010101111
• D0 = 0101010 1011001 1001111 0001111
DES(Data Encryption Standard)/Shift left
After the parity-bit drop, the key is divided into two 28-bit parts
Each part is shifted left one or two bits
In rounds 1,2,9 and 16, shifting is one bit
In the other rounds, shifting is two bits
The two parts are then combined to form a 56-bit part
Table: Number of bits shifts

This means, for example, C3 and D3 are obtained from C2 and D2,
respectively, by two left shifts, and C16 and D16 are obtained from C15 and
D15, respectively, by one left shift
DES(Data Encryption Standard)/subkey
C0 = D8 =
1111000011001100101010101111 1001111000111101010101011001
D0 = C9 =
0101010101100110011110001111 0101010101111111100001100110
C1 = D9 =
1110000110011001010101011111 0011110001111010101010110011
D1 =
C10 =
1010101011001100111100011110
0101010111111110000110011001
C2 D10 =
=1100001100110010101010111111
1111000111101010101011001100
D2 =
0101010110011001111000111101 C11 =
C3 = 0101011111111000011001100101
0000110011001010101011111111 D11 =
D3 = 1100011110101010101100110011
0101011001100111100011110101 C12 =
C4 = 0101111111100001100110010101
0011001100101010101111111100 D12 =
DES(Data Encryption Standard)
Compression Permutation
We now form the keys Kn, for 1<=n<=16, by applying the
following permutation table to each of the concatenated
pairs CnDn. Each pair has 56 bits, but PC-2 only uses 48 of
these.
14 17 11 24 1 5
3 28 15 6 21 10
23 19 12 4 26 8
16 7 27 20 13 2
41 52 31 37 47 55
30 40 51 45 33 48
44 49 39 56 34 53
46 42 50 36 29 32
DES(Data Encryption Standard)
Therefore, the first bit of Kn is the 14th bit of CnDn, the
second bit the 17th, and so on, ending with the 48th bit of
Kn being the 32th bit of CnDn.
Example:
For the first key we have C1D1 = 1110000 1100110 0101010
1011111 1010101 0110011 0011110 0011110
which, after we apply the permutation PC-2, becomes
K1 = 000110 110000 001011 101111 111111 000111 000001
110010
DES(Data Encryption Standard)
Step 2: Encode each 64-bit block of data.
There is an initial permutation IP of the 64 bits of the
message data M. This rearranges the bits according to the
following table
DES(Data Encryption Standard)
Example:
Applying the initial permutation to the block of text M,
given previously, we get
M = 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110
1111
IP = 1100 1100 0000 0000 1100 1100 1111 1111 1111 0000 1010 1010 1111 0000 1010
1010
Next divide the permuted block IP into a left half L0 of 32
bits, and a right half R0 of 32 bits.
Example: From IP, we get L0 and R0
L0 = 1100 1100 0000 0000 1100 1100 1111 1111
R0 = 1111 0000 1010 1010 1111 0000 1010 1010
Then for n going from 1 to 16 we calculate
Ln = Rn-1
DES(Data Encryption Standard)/function

The heart of DES is the


DES function.
The DES function applies
a 48-bit key to the
rightmost 32 bits to
produce a 32-bit output
The function is made of 4
sections
DES(Data Encryption Standard)/Expansion P-Box

Since Ri−1 is a 32-bit input and Ki is a 48-bit key, we first need


to expand Ri−1 to 48 bits
Ri-1 is divided into 8 4-bit sections
Each section is expanded to 6 bits based on a predetermined rule
For each section, input bits 1,2,3,4 are copied to output bits 2,3,4 and 5,
respectively.
Output bit 1 comes from the bit 4 of the previous section
Output bit 6 comes from bit 1 of the next section

Expansion permutation
DES(Data Encryption Standard)/whitener(XOR)

After the expansion permutation, DES uses the XOR


operation on the expanded right section and the round key.
Note that both the right section and the key are 48-bits in
length
Also note that the round key is used only in this operation.
Example:
For K1 , E(R0), we have
K1 = 000110 110000 001011 101111 111111 000111 000001
110010
E(R0) = 011110 100001 010101 010101 011110 100001 010101
010101
K1+E(R0) = 011000 010001 011110 111010 100001 100110
010100 100111.
DES(Data Encryption Standard)/S-Box
The S-boxes do the real mixing (confusion)
DES uses 8 S-boxes, each with a 6-bit input and a 4-bit
output

The 48-bit input is divided into 8 6-bit chunks and each


chunk is fed into a box
The result of each box is a 4-bit chunk
DES(Data Encryption Standard)/S-Box
The substitution in each box follows a pre-determined
rule based on a 4-row by 16-column table
The combination of bits 1 and 6 of the input defines one of the four
rows
The combination of bits 2 through 5 defines one of the sixteen
columns
DES(Data Encryption Standard)/S-Box

Example:The input to S-box 1 is 100011. What is the output?


1. If we write the first and the sixth bits together, we get 11 in binary, which is 3
in decimal.
2. The remaining bits are 0001 in binary, which is 1 in decimal. We look for the
value in row 3, column 1, in Table (S-box 1). The result is 12 in decimal, which
in binary is 1100.
3. So the input 100011 yields the output 1100.
DES(Data Encryption Standard)
DES(Data Encryption Standard)

You might also like