Is the order of applying transformations in SP cryptosystems significant? SP-cryptosystems Is the order of applying transformations in SP cryptosystems matter? What will change if we first apply the P-transformation and then the S-transformation? Will cryptographic strength be less? And if yes, why?
Let call the Substitution by $S$ and Permutation by $P$ in the Substitution Permutation Network (SPN). Let consider an SPN block cipher with $4$ rounds where $K$ represents the $\oplus$ round key.


With $S$ applied first

|KSP|KSP|KSP|KSP|

The last $P$ has no effect on security. The attackers simply discard it. So we can consider it like;

|KSP|KSP|KSP|KS|
With $P$ applied first

|KPS|KPS|KPS|KPS|

The initial permutation has no effect in the view of the attacker. Similarly, we can consider it with some changes in the key schedule.

|KS|KPS|KPS|KPS|


Now we can swap K and P that will require a change in the key schedule.

|KSP|KSP|KSP|KS|

That is turned into the simplified version of S applied first. Consequently, they did not differ.