Block Cipher and Des
Block Cipher and Des
Cryptography
Product cipher
Feistel Cipher
C (n bits)
pi + ci
Block Cipher vs. Stream Cipher
C (n bits)
pi + ci
Reversible function
Dec(K,(Enc(K,X)))=X, for all X
Reversible transformation
2n! Possible transformations or keys
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111 Ciphertext
1000 1000
1001 1001
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111 Ciphertext
1000 1000
1001 1001
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111 Ciphertext
1000 1000
1001 1001
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111 Ciphertext
1000 1000
1001 1001
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111 Already taken by the 1st plaintext block
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111 Already taken by the 2nd plaintext block
1000 1000
1001 1001
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111 Already taken by the 1st plaintext block
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111 Already taken by the 2nd plaintext block
1000 1000
1001 1001 Already taken by the 3rd plaintext block
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111 Already taken by the 1st plaintext block
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010 For block i, 0≤i≤15,
0011 0011
0100 0100 (16-i) block options
0101 0101
0110 0110
Plaintext 0111 0111
1000 1000
1001 1001
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010 For block i, 0≤i≤15,
0011 0011
0100 0100 (16-i) block options
0101 0101
0110 0110
Plaintext 0111 0111
1000
1001
1000
1001
16! mappings/keys
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111
Ideal Block Cipher Example (n=4)
0000 0000
0001 0001
0010 0010
0011 0011
0100 0100
0101 0101
0110 0110
Plaintext 0111 0111
1000
1001
1000
1001
2n! possible keys
1010 1010
1011 1011
1100 1100
1101 1101
1110 1110
1111 1111
Plaintext Ciphertext
An IBM researcher
Product cipher
Round 1
Round n
Li : the left half of data after round i
Ri : the right half of data after round i
Ki : the subkey for round i
ß Substitution
Li : the left half of data after round i
Ri : the right half of data after round i
Ki : the subkey for round i
ß Substitution
ß Permutation (swap
left half and right half)
Li : the left half of data after round i
Ri : the right half of data after round i
Ki : the subkey for round i
ß Substitution
ß Permutation (swap
left half and right half)
In the i-th round:
Li = Ri-1
Ri = Li-1 Å F(Ri-1, Ki)
Li : the left half of data after round i
Ri : the right half of data after round i
Ki : the subkey for round i
Block size
Key size
Number of rounds
Subkey generation
Round function
Data Encryption Standard (DES)
ß Substitution
ß Permutation (swap
left half and right half)
Feistel Cipher Design Parameters
Block size
Key size
Number of rounds
Subkey generation
Round function
Feistel Cipher Design Parameters
DES
Block size 64 bits
Key size 56 bits
Number of rounds 16 rounds
Subkey generation (Later)
Round function (Later)
DES Overview
DES Overview
DES Overview
n=16
Initial Permutation
DES Overview
n=16
Final Permutation
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
n=16
64 bits
Add permutation blocks at
the beginning and the end
64 bits
64 bits
Final Permutation
64 bits of ciphertext
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
48 bits
n=16
64 bits
48 bits Add permutation blocks at
the beginning and the end
64 bits
48 bits
64 bits
Final Permutation
64 bits of ciphertext
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
48 bits
64 bits
Final Permutation
64 bits of ciphertext
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
48 bits
64 bits
Final Permutation
64 bits of ciphertext
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
48 bits
64 bits
48 bits
64 bits
Round function F:
48 bits
32 bits à 32 bits
64 bits
Final Permutation
64 bits of ciphertext
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
48 bits
64 bits
Final Permutation
64 bits of ciphertext
DES Round Function (F)
32 bits
48 bits
DES Round Function (F)
48 bits
48 bits
48 bits
DES Round Function (F)
48 bits
32 bits
DES Round Function (F)
32 bits
32 bits
64 bits of plaintext
Initial Permutation
DES Overview
64 bits
48 bits
48 bits
64 bits
Final Permutation
64 bits of ciphertext
DES Subkey Generation (Ki)
DES Subkey Generation (Ki)
Avalanche Effect