$$\text{Figure 4.9 S Box Design}$$
- The substitution function of a set of 8 S- boxes, each of which accepts 6 bits as input and produces 4 bits as output.
- The main characteristics of S box is its size.
- The n × m S box has n inputs and m outputs bits.
e.g DES has 6 × 4 S boxes.
- Larger the S box more is it resistant to the crypto analysis. However if n is large, the look up table is large, the look up table is large. Hence a limit of n equals to about 8 to 10 is usually imposed.
- Also if S box is large, it is more difficult to design it properly.
The S- Box Design Criteria
- No output bits of any S box should be close to a linear function of input bits.
- Each row of a S box should include all possible bit combinations.
- If 2 inputs to an S box differs in exactly, the output must in exactly in at least 2 bits.
- If 2 inputs to a S box differ in two middle bits, the output must differ in at least 2 bits.
- If 2 inputs to a S box differ in 2 first bits are identical in their last 2 bits, the 2 outputs must not be same.
- The above criteria make the algorithm robust and can’t be easily broken. If it also gives good confusion properties.
The S-Box Design Approaches
- Random: It was some Pseudo random number generation or some table of random digits to generate the entries in ‘S’ box.
- Random with Testing: Choose S box entries randomly then let the results against various criteria and throw away those that do not pass.
- Human Made: This is a manual approach with only simple maths to support it ( Not Suitable for large S box)
- Math Made: Generate S box according to mathematical principles.