DES Example
DES Example
M = 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100
1101 1110 1111
LK0 = 1111000011001100101010101111
RK0 = 0101010101100110011110001111
LK1 = 1110000110011001010101011111
RK1 = 1010101011001100111100011110
LK2 = 1100001100110010101010111111
RK2 = 0101010110011001111000111101
LK3 = 0000110011001010101011111111
RK3 = 0101011001100111100011110101
We now form the keys Kn, for 1<=n<=16, by applying the following permutation
table to each of the concatenated pairs LKnRKn. Each pair has 56 bits, but PC-2
only uses 48 of these.
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
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
S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)
where Si(Bi) refers to the output of the i-th S-box.
f = P(S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8) )
Example: From the output of the eight S-boxes:
S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8) = 0101 1100 1000 0010 1011
0101 1001 0111
we get
f = 0010 0011 0100 1010 1010 1001 1011 1011
R1 = L0 + f(R0 , K1 )
= 1100 1100 0000 0000 1100 1100 1111 1111 + 0010 0011 0100 1010 1010 1001
1011 1011
R16L16
We reverse the order of these two blocks and apply the final permutation to