Shuffling: Purpose and formal definition To my understanding, shuffling means simply to permute the elements in vector $\mathbf{v}$ pseudorandomly, using a PRP $\pi (\mathrm{seed},\mathbf{v})$. A secure PRP should yield a permutation indistinguishable from a random one.
However, I'd still have 2 questions on this subject:

Is there a more formal definition to shuffling?

What is the purpose of shuffling? Is it simply to misalign power traces for differential power analysis attacks?
In side channel, shuffling makes correlation attacks harder. For example, if you shuffle the 16 AES S-Boxes in the first round each execution, and you target say first S-Box' output in the attack, at any single point in the trace you will see information related directly to that output only on 1/16th of all traces, and in the other 15/16th traces there will be something else, which qualifies as &quot;noise&quot; for the attack.
Note that this countermeasure is rather weak and is mostly considered complimentary to more sound masking countermeasure. Indeed, after taking 16 times more traces (maybe a bit more), the correlation would become noticeable again. While this adds up to the practical attack complexity, it is impossible to achieve exponential complexity increase, as masking allows.