Substitution (a rule for replacing plaintext symbols by another) has been identified as a mechanism for primarily confusion (see S-box); on the other hand transposition using P-box (rearranging or swapping the order of symbols) is a technique for diffusion, although other mechanisms are also used in modern practice, such as linear transformations (e.g. in AES). Product ciphers use alternating substitution and transposition phases (rounds) to achieve both confusion and diffusion respectively.