Chapter 5
Chapter 5
Chapter 5
5.2
5.1 Continued
5.3
5.1.1 Substitution or Transposition
Note
5.4
5.1.2 Block Ciphers as Permutation Groups
Full-size key ciphers: the key is long enough to choose every possible mapping from
input to output. In practice, the key is smaller (partial-key), only some mappings
from the input to output are possible.
Full-sizeKey
Full-Size keyTransposition
ciphers areBlock
not used in practice, only partial-key ciphers are used.
Ciphers
In a full-size key transposition cipher We need to have n! possible keys, so the key should
have élog2 n!ù bits.
Example 5.3
Show the model and the set of permutation tables for a 3-bit block transposition
cipher where the block size is 3 bits.
Solution
The set of permutation tables has 3! = 6 elements, as shown in Figure 5.2.
5.5
5.1.2 Continued
5.6
5.1.2 Continued
Show the model and the set of permutation tables for a 3-bit block substitution cipher.
Solution
Figure 5.3 shows the model and the set of permutation tables. The key is also much
longer, élog240,320 = 16 bits.
5.7
5.1.2 Continued
5.8
5.1.2 Continued
Note
5.9
5.1.3 Components of a Modern Block Cipher
For example, a common substitution cipher is DES which uses a 64-bit block cipher. If the
designer of DES had used a full-size key, the key would have been log2 (264 )! = 270 bits. The
key size for DES is only 56 bits which is only a very small fraction of the full-size key. This
means that DES uses only 256 mappings out of approximately
2^ 270 possible mappings.
5.10
5.1.3 P-Boxes
A P-box (permutation box) parallels the traditional transposition cipher
for characters. It transposes bits.
Figure 5.4 Three types of P-boxes
5.11
5.1.3 Continued
S-Box
An S-box (substitution box) can be thought of as a
miniature substitution cipher.
Note
An S-box is an m × n substitution unit, where m and n
are not necessarily the same.
5.12
5.1.5 Two Classes of Product Ciphers
Modern block ciphers are all product ciphers, but they are
divided into two classes.
1. Feistel ciphers
2. Non-Feistel ciphers
5.13
5.1.5 Continued
Feistel Ciphers
Feistel designed a very intelligent and interesting cipher
that has been used for decades. A Feistel cipher can have
three types of components: self-invertible, invertible, and
noninvertible.
5.14
5.1.5 Continued
Note
Diffusion hides the relationship between the
ciphertext and the plaintext.
5.15
6.1.2 Overview
6.16
6-2 DES STRUCTURE
6.17
6-2 Continue
6.18
6.2.1 Initial and Final Permutations
6.19
6.2.1 Continue
6.20
6.2.1 Continued
Note
The initial and final permutations are straight P-boxes that are
inverses
of each other.
They have no cryptography significance in DES.
6.21
6.2.2 Rounds
Figure 6.4
A round in DES
(encryption site)
6.22
6.2.2 Continued
DES Function
The heart of DES is the DES function. The DES function
applies a 48-bit key to the rightmost 32 bits to produce a
32-bit output.
Figure 6.5
DES function
6.23
6.2.2 Continue
Expansion P-box
Since RI−1 is a 32-bit input and KI is a 48-bit key, we first
need to expand RI−1 to 48 bits.
6.24
6.2.2 Continue
6.25
6.2.2 Continue
Whitener (XOR)
After the expansion permutation, DES uses the XOR
operation on the expanded right section and the round key.
Note that both the right section and the key are 48-bits in
length. Also note that the round key is used only in this
operation.
6.26
6.2.2 Continue
S-Boxes
The S-boxes do the real mixing (confusion). DES uses 8 S-
boxes, each with a 6-bit input and a 4-bit output. See
Figure 6.7.
6.27
6.2.2 Continue
6.28
6.2.2 Continue
Table 6.3 shows the permutation for S-box 1. For the rest of
the boxes see the textbook.
6.29