# Comparing Difference Distribution Tables

I have been studying the Diff. Cryptanalysis and finding it hard to do a problem. The problem is

I have calculated the tables programmatically and found that the second table has a max value of 6 where as the first has a max value of 4.What can i infer from the tables? PS:I started reading this recently and need help in atleast the direction to think

• I wrote my own testing software, I will check it within the hour Commented Aug 27, 2014 at 3:37

Your calculations are correct. The 2nd table has 2 entries of 6 in its DDT, and 18 entries of 4. The Hamsi s-box has 24 entries of 4.

What can you infer from these tables? First off, CryptWizard001 is a liar. Second, the larger the max value in the DDT, the more vulnerable the s-box is to differential cryptanalysis, therefore the modified s-box does not have better differential properties.

For reference, here are the DDTs for both:

Hamsi
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 2 0 2 0 0 2 2 2 0 4 2
0 0 0 4 0 4 0 0 0 4 0 0 0 0 0 4
0 4 2 0 0 0 2 0 0 2 0 0 2 0 2 2
0 0 0 0 0 0 4 0 0 0 4 4 0 4 0 0
0 4 0 2 2 2 2 0 2 0 0 0 2 0 0 0
0 0 2 2 2 2 0 0 2 2 0 0 0 0 2 2
0 0 0 0 4 2 0 2 0 0 2 2 2 0 0 2
0 0 0 2 0 2 0 4 0 2 0 0 0 4 0 2
0 0 0 2 0 0 0 2 4 2 2 2 2 0 0 0
0 0 2 0 2 0 4 0 2 0 4 0 0 0 2 0
0 4 0 0 2 0 2 0 2 2 0 0 2 0 0 2
0 0 2 0 2 0 0 0 2 0 0 4 0 4 2 0
0 4 2 2 0 2 2 0 0 0 0 0 2 0 2 0
0 0 2 0 2 0 0 4 2 0 0 0 0 4 2 0
0 0 4 2 0 0 0 2 0 2 2 2 2 0 0 0


Note I have left the upper left entry as 0, as it has a value of 16 and is ignored during analysis.

Modified
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 2 2 0 0 0 0 4 4 0 0 2 2
0 0 0 0 0 2 0 2 0 4 0 4 0 2 0 2
0 4 4 0 0 2 2 0 0 0 0 0 2 0 0 2
0 0 0 2 0 2 4 0 0 0 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