# Order of multiple encryption algorithms

as you can see on image above, in VeraCrypt you can select either

Serpent -> Twofish -> AES

or

AES -> Twofish -> Serpent

what's the point of those permutations? is there any difference if I use

A -> B -> C

or

C -> B -> A

combination of encryption algorithms?

Yes, in case of VeraCrypt there is a difference, but it is negligible in practice.

First we need to consider how VeraCrypt actually performs the cascading of the encryption algorithms which is (literally) a block-wise chaining. E.g.:

$$C=E_{XTS}^{1}(E_{XTS}^{2}(E_{XTS}^{3}(M)))$$

where each $$E$$ is a block cipher run in XTS mode and all using the same XTS parameters in the same position. Of course, keys for each block cipher are still independent, resulting in 1536-bit of key material ($$=6\times 256$$, XTS uses 2 256-bit keys by itself and each XTS instance has its own keys).

Now the difference of order comes into play when we consider the following result in particular:

[...] a cascade is at least as difficult to break as the first component cipher.

From the abstract of: "Cascade Ciphers: The Importance of Being First" by Maurer and Massey (PDF)

So obviously you want the cipher you trust the most in the first position and this is the whole reason why you are given the choice of the order here.

Note however:
Actually using triple encryption is a waste of resources as none of the available ciphers has yet been (notably) broken when independent keys are used and brute-force is already out of the reach for any attacker even if the key-length is "only" 256-bit.