# Question about the security of Substitution-Permutation Network

In general, we execute key-mixing, substitution and permutation sequentially in a single round in a n-round SPN, but if we execute n-round key-mixing firstly, n-round substitution secondly and n-round permutation finally, how is the security of this modified SPN?

• possible duplicate of Increase number of rounds for SPN and Feistel ciphers Sep 18 '14 at 18:06
• @e-sushi Disagree with the duplicate vote as suggested duplicate is about increasing the number of permutations (rounds) whereas this question is about changing the order of substitutions and permutations.
– rath
Oct 2 '14 at 0:29

If you have an $n\times n$ bit s-box $s(x)$ (e.g. Rijndael's sbox), then $s(s(x))$ is just another sbox which can be expressed as a lookup table.
The same logic applies to the permutation. If you have a permutation $p(x)$ then $p(p(x))$ is itself a permutation.