1
$\begingroup$

I want to see a bit-sliced implementation of 5-bit and 6-bit S-Boxes of FIDES or, at least, a representation of these two functions in algebraic normal form. Where can I find it?

$\endgroup$
  • $\begingroup$ There is some code here for turning an s-box into the ANF, but this particular program seems to require that the size be a power of two. Maybe it is still a useful starting point. $\endgroup$ – Ella Rose Oct 26 at 13:12
1
$\begingroup$

You can build this youself in a very mechanical process, it's only optimizing circuit size which gets interesting.

Take a 5 bit to 5 bit S-box, each can viewed as 5 different binary functions on 5 variables.

You can trivially construct any such function. A simple (inefficient) approach is to build it in normal form: write out the 32 different input values, and take only those whose matching output is 1. You can construct an expression which is the Or between sub expressions one for each row with 1 output. Each subexpression is the and between all variables optionally negated. Each variable will be as is if it is 1 on the given row and negated otherwise. This results in a binary function for the required output bit.

You can obviously optimize this to get smaller circuits. A basic method for optimizing circuits is: https://en.m.wikipedia.org/wiki/Karnaugh_map There are many more techniques including some which reuse structure between different bits of an S box and different S boxes.

$\endgroup$
  • $\begingroup$ Does there exist an open-source implementation of FIDES with an optimized S-Boxes circuit? $\endgroup$ – lyrically wicked Oct 26 at 9:51
  • $\begingroup$ I don't know of one, this is not a common cipher. $\endgroup$ – Meir Maor Oct 26 at 12:33

Your Answer

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

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