Download presentation
Presentation is loading. Please wait.
Published byClemence Norman Modified over 8 years ago
1
‘Baby DES’ cipher Alexei Vernitski
2
Block cipher A message is a sequence of bits: 0110010100001011110… We split the message in blocks of a fixed length Each block is encrypted in exactly the same way, until the whole message is encrypted
3
DES DES stands for Data Encryption Standard This is a block cipher with the block size 64 and the key size 56 To analyse how DES works, we would need to spend too much time on it We shall look at another, simpler cipher
4
Simplified DES Simplified DES or Baby DES is a cipher with a shorter block length and a shorter key length than DES. This is a block cipher with the block size 8 and the key size 10 This cipher is not secure; it was designed only to demonstrate how DES works.
5
What is a block? A block is an arrays of bits In Simplified DES, a block is 8 bits 01100110
6
What is a permutation? 01100110 11001001
7
Permutation We shall use a short notation for permutations For example, suppose we have a block of bits numbered 1 2 3 4 5 6 7 8 Then by a permutation 2 3 4 5 6 7 8 1 we mean a permutation with which 1 goes to 2, 2 goes to 3, etc., 8 goes to 1.
8
Permutation Cyclic shift is an example of a permutation For example, 8 1 2 3 4 5 6 7 Or 2 3 4 5 6 7 8 1
9
What is XOR? Exclusive OR Of course, we shall be especially interested to applying XOR not to individual bits, but to arrays of bits 01 001 110
10
What is an S-box? *00**01**10**11* 0**001001110 0**111100100 1**000100111 1**111010011
11
Encryption We use permutations, XOR and S-boxes We use some permutations to generate two 8- bit subkeys from the 10-bit key The first round: –We use XOR to add the first subkey to the block –We use two S-boxes to transform the block The second round: –We use XOR to add the second subkey to the block –We use two S-boxes to transform the block
12
Generating subkey 1 Apply the permutation 3 5 2 7 4 10 1 9 8 6 Apply the permutation 5 1 2 3 4 10 6 7 8 9 (this is a cyclic shift of each half) Discard the first two bits Apply the permutation 6 3 7 4 8 5 10 9
13
Generating subkey 2 Apply the permutation 3 5 2 7 4 10 1 9 8 6 Apply the permutation 5 1 2 3 4 10 6 7 8 9 three times Discard the first two bits Apply the permutation 6 3 7 4 8 5 10 9
14
Encryption – step 1 We encrypt an 8-bit block Apply the permutation 2 6 3 1 4 8 5 7 Put the last four bits aside and work with the first four bits
15
Encryption – step 2a This is what we do with the first four bits Apply a permutation 4 1 2 3 Add (XOR) first four bits of the first subkey Apply the S-box *00**01**10**11* 0**001001110 0**111100100 1**000100111 1**111010011
16
Encryption – step 2b This is what we also do with the first four bits Apply a permutation 2 3 4 1 Add (XOR) last four bits of the first subkey Apply the S-box *00**01**10**11* 0**000011011 0**110000111 1**011000100 1**110010011
17
Encryption – step 3 The two S-boxes have generated for us 4 bits Apply to the 4 bits the permutation 2 4 3 1 Add (XOR) the original four bits (those in the end of step 1)
18
Encryption – step 4 Swap the first four bits and the last four bits Repeat the steps 2a, 2b, 3, using the second subkey Apply the permutation 4 1 3 5 7 2 8 6 That’s it!
19
Decryption To decrypt, we use all the same steps in the opposite order and the opposite direction
20
Avalanche criterion This is one of the properties of a good cipher Changing one bit of the original block should result in changing exactly a half of the encrypted block
21
DES Simplified DES is much simpler than DES The difference between Simplified DES and DES is the following –Block size: 8 vs 64 –Key size: 10 vs 56 –Number of S-boxes: 2 vs 8 –Number of rounds: 2 vs 16
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.