This question is a little bit more implementation based of differential cryptanalysis. I hope it is okay.

I am working with the book "The Block Cipher Companion" on the topic differential cryptanalysis currently. I want to implement the proceed, but it seems that there are some problems over here. May be someone had already seen my question here:

Differential cryptanalysis in "The Block Cipher Companion"

I got an working implementation for the CipherFour from the book, which can successful attack all rounds of the CipherFour. But it seems that I can not reach the statistic values from the book in Fig. 6.10.

To figure out some possible problems with my implementation I implemented a easier variant of CipherFour the CipherThree from the book. The Cipher is in the following picture:

enter image description here

I implemented the differential cryptanalysis but it seems that it works a lot more bad than in CipherFour. For that purpose I uploaded my code for that cipher to GitHub, because someone asked on cipherFour implementation. I hope we can solve the problem here in CipherThree, the code is nearly similar. Some comments to my code:

I am starting to search for a differential in method GenerateConfiguraiton. After successful search I generate a list of 16 input pairs satisfying the input differential from the path. Then I do not apply the filter (to reduce possible problems). Then I try go get the key with encrypting the input pairs, decrypt with the guessed key (there are only 16) and then build the difference. But it seems that it works very very bad... May be someone can give me some hint or figure out some problem?

My Code is here: https://github.com/dercdev/TBC_CipherThree


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.