Block Ciphers and The Data Encryption Standard
Block Ciphers and The Data Encryption Standard
Block Ciphers and The Data Encryption Standard
Encryption Standard
Block vs Stream Ciphers
block ciphers process messages in blocks, each of
which is then en/decrypted
like a substitution on very big characters
64-bits or more
stream ciphers process messages a bit or byte at a
time when en/decrypting
many current ciphers are block ciphers
broader range of applications
Simplest Stream Cipher
Key Key
Li-1 Ri-1
Ki
Li Ri
Feistel Cipher Structure
Feistel Cipher Structure
58 50 42 34 26 18 10 2 40 8 48 16 56 24 64 32
60 52 44 36 28 20 12 4 39 7 47 15 55 23 63 31
62 54 46 38 30 22 14 6 38 6 46 14 54 22 62 30
64 56 48 40 32 24 16 8 37 5 45 13 53 21 61 29
57 49 41 33 25 17 9 1 36 4 44 12 52 20 60 28
59 51 43 35 27 19 11 3 35 3 43 11 51 19 59 27
61 53 45 37 29 21 13 5 34 2 42 10 50 18 58 26
63 55 47 39 31 23 15 7 33 1 41 9 49 17 57 25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
1 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
2 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
3 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13
Permutation Table
The permutation after each round
16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
DES Key Schedule
The 64 –bit key input is first processed by permuted
choice One.
The resulting 56-bit key is then treated as two 28-bit
quantities C and D.
In each round forms subkeys
rotating each half separately either 1 or 2 places
depending on the key rotation schedule K
selecting 24-bits from each half & permuting
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 47 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4
Permutation table P1
After this permutation, the key is split into two halves, C and
D. After each round, each half is independently shifted to the
left by either one or two bits, depending on which round is
executing .The shift is rotational, so that bits that get shifted
off of one end get placed back on the other end.
Round 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Shifts 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1
Subkey Permutation
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 Decryption
decrypt must unwind steps of data computation
with Feistel design, do encryption steps again using
subkeys in reverse order (SK16 … SK1)
IP undoes final FP step of encryption
1st round with SK16 undoes 16th encrypt round
….
16th round with SK1 undoes 1st encrypt round
then final FP undoes initial encryption IP
thus recovering original data value
Avalanche Effect
A desirable property of any encryption
algorithm is that a small change in either the
plaintext or the key should produce a
significant change in the ciphertext . where a
change of one input or key bit results in
changing approx half output bits
making attempts to “home-in” by guessing
keys impossible
DES exhibits strong avalanche
Strength of DES – Key Size
56-bit keys have 256 = 7.2 x 1016 values
brute force search looks hard
recent advances have shown is possible
in 1997 on Internet in a few months
in 1998 on dedicated h/w (EFF) in a few days
in 1999 above combined in 22hrs!
still must be able to recognize plaintext
must now consider alternatives to DES
Strength of DES – Analytic Attacks
now have several analytic attacks on DES
these utilise some deep structure of the cipher
by gathering information about encryptions
can eventually recover some/all of the sub-key bits
if necessary then exhaustively search for the rest