I've read about 20 papers about the criteria for choosing best $n \times n$ s-boxes.
Now, I've got two problems:
- How to generate $2^{24}$ s-boxes, and
- how to test them considering the criteria.
Any help is appreciated.
I've read about 20 papers about the criteria for choosing best $n \times n$ s-boxes.
Now, I've got two problems:
Any help is appreciated.
If you are looking specifically for $3 \times 3$ S-boxes, you might want to take a look at the printCipher specification since it uses one. You can trust the people who chose it to have picked the best one.
If you still want to go for the generation, keep in mind that many S-boxes have identical cryptographic properties (differential uniformity/spectrum, non-linearity, walsh spectrum, etc): they are so-called CCZ-equivalent. For instance, when looking for optimal $4 \times 4$ optimal S-boxes, only 16 "really" different ones were found (see "On the Classification of 4 Bit S-Boxes", the thought process of the authors would also help you by the way), I.e there are only 16 different interesting CCZ-equivalence classes. Thus, you would not need to check all $2^{24}$.
The answer is: it depends upon the cipher. You cannot design a S-box in isolation; the S-box properties need to be crafted together with the design of the block cipher, to make sure they work well together.
See also Desirable S-box properties. Don't forget to use "search" before asking questions.
The 3-Way cipher also uses 3x3 S-boxes.