3 Chapter4 D E S
3 Chapter4 D E S
3 Chapter4 D E S
security
B L O C K C I P H E R S A N D D ATA E N C R Y P T I O N S TA N D A R D ( D E S )
CHAPTER 4
AN-NAJAH UNIVERSITY
ADNAN SALMAN
Block size = n = 4
Key length = n*2n = 64
Approach:
Plaintext split into halves
Developed in 1977
P10 – permutation:
Input: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Output: 3, 5, 2, 7, 4, 10, 1, 9, 8, 6
Output: 2 4 3 1
IP-1 – Inverse IP
4, 1, 3, 5, 7, 2, 8, 6
Permuted choice 2
C0 =1111000 0110011 0010101 0101111
D0 = 0101010 1011001 1001111 0001111
Left shift
C1 =1110000 1100110 0101010 1011111
D1 = 1010101 0110011 0011110 0011110
Permuted choice 2
Expansion permutation E
Substitution/choice (S-box)
IP = 1100 1100 0000 0000 1100 1100 1111 1111 1111 0000 1010 1010 1111 0000 1010 1010
L0 =1100 1100 0000 0000 1100 1100 1111 1111 R0 = 1111 0000 1010 1010 1111 0000 1010 1010
Li = Ri-1
Ri = Li −1 f ( Ri −1 , K i )
K1+E(R0)
E(R0) = 011110 100001 010101 010101 011110 100001 010101 010101
K1 = 000110 110000 001011 101111 111111 000111 000001 110010
K1+E(R0) = 011000 010001 011110 111010 100001 100110 010100 100111
Substitution Box
f = P(S1(B1)S2(B2)...S8(B8))
= P(0101 1100 1000 0010 1011 0101 1001 0111)
= 0010 0011 0100 1010 1010 1001 1011 1011
R1 = L0 + f(R0 , K1 )
R1 = 1111 0000 1010 1010 1111 0000 1010 1010
+ 0010 0011 0100 1010 1010 1001 1011 1011
=1110 1111 0100 1010 0110 0101 0100 0100
Repeat these step for the 16 round
number of
bits that
differ