How can I calculate the minimum number of active s_boxes for block cipher algorithms such as present algorithm? I have read in that, but I couldn't understand the meaning of branch number.


1 Answer 1


Present cipher is bit based permutation cipher. The branch number is calculated based on the minimum number of hamming weight sum of input and output in the difference distribution table(DDT) or linearity approximation table (LAT) of the sbox. in case of present cipher the 4-bit sbox , the differential branch number (BR) is 3.

to apply the differential BR on the whole present cipher , I advice you to apply mixed integer linear programming. this link contains the MILP model of different ciphers including present in sage, you can start from here.

  • $\begingroup$ Thank you .I want to understand the meaning of active s_boxes.and how can I calculate it manually, as I read here , it can be measured by running the algorithm with two plain texts which differ in just few bits, and then if s_box result in different output that means it is an active s box ? That, what I want to understand $\endgroup$ Commented Jul 25, 2018 at 18:20
  • $\begingroup$ manual calculation of number of active sbox will be mathematical proof. I recommend you to start with AES cipher as a fundamental understanding of branch number of MDS matrix ( note the active S-box is calculated based on bytes/cells unlike the present cipher the s-box is activated even with one bit input). $\endgroup$
    – hardyrama
    Commented Jul 27, 2018 at 5:13
  • 1
    $\begingroup$ active s-box in differential BR means non-zero difference input to the sbox , overall , you need to find the trail over n-rounds that contains the minimum active s-box, in present cipher the differential trail over 5 rounds is like : 2-1-1-3-3 (10 active sbox in total). $\endgroup$
    – hardyrama
    Commented Jul 27, 2018 at 5:29
  • $\begingroup$ Yes, that is what I am asking about, if I want to calculate the number of active s_boxes by finding the trail over n rounds, like your example for present.how did you do this calculation and found the number of active s_boxes after each round(2_1_1_3_3)?that is what I am trying to do, but what difference should I notice to say that is an active s_box , should I run the present algorithm with two different plain text, with just few bit different, and notice the output of the s_box $\endgroup$ Commented Jul 27, 2018 at 14:14
  • $\begingroup$ Differential number of active s_boxes after 2_4_6__8 rounds , calculation such as in that paper dl.acm.org/citation.cfm?id=2659662&dl=ACM&coll=DL. , That is I am trying to understand .and thank you very much $\endgroup$ Commented Jul 27, 2018 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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