Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I've read about 20 papers about the criteria for choosing best $n \times n$ s-boxes.

Now, I've got two problems:

  1. How to generate $2^{24}$ s-boxes, and
  2. how to test them considering the criteria.

Any help is appreciated.

share|improve this question
3  
Welcome to Cryptography Stack Exchange. The second part "how to test" depends greatly from your criteria. Could you add some examples to your question? –  Paŭlo Ebermann Jul 14 '13 at 18:27
    
for example differential uniformity or differential spectrum –  Saeidmscs Jul 14 '13 at 21:22
add comment

2 Answers 2

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}$.

share|improve this answer
    
Thanks but the problem is its code. i have some novice idea about the code and i've found some useful notes in "Generating Pseudo random S-Boxes – a Method of Improving the Security of Crypto systems Based on Block Ciphers" but that's not enough. –  Saeidmscs Jul 14 '13 at 21:25
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.