# How to calculate the number of Linearly active Sbox

I cant understand the concept of linearly active sbox. In the case of differential analysis it is more easy to understand the concept of 'active sbox' Also how the increase in number of (linearly) active sbox improves the security of cipher

If any generic software programs are available to calculate the number of active sboxes, just by giving sbox functioning and permutation pattern?

In brief, if a linear expression $$a\cdot x+ b\cdot S(x)$$ is used then all the output wires that correspond to 1 bit in the vector $$b$$ turn on the Sboxes they are connected to in the next round. It's best to start with one active Sbox in the initial round to turn on as few Sboxes as possible in the next round (by choosing $$a$$ and $$b$$ so that $$b$$ has a minimum Hamming weight but at he linear expression has a large bias).