What's the difference between confusion/diffusion and mode of operation? I understand the concepts of confusion (substitution) and diffusion (permutation). 

My understanding of what a mode is that it's an algorithm that lets us encrypt arbitrary message size. i.e. AES is a mode of operation, and confusion/diffusion are what we use to achieve a certain mode.

But that doesn't sound right.
AES is a mode of operation, and confusion/diffusion are what we use to achieve a certain mode.


AES is a block cipher, which replaces one fixed-length block of bits (plaintext) with another fixed-length block of bits (ciphertext) according to the key. A block cipher is not a mode of operation.

Confusion and diffusion are a description of how AES behaves to ensure that given a/many plaintext-ciphertext pairs, you cannot recover the key, as well as given a ciphertext, you cannot recover the plaintext. 

"Confusion" basically means that the equations that represent the ciphertext are too complicated and cannot be worked with, while diffusion means that each bit of the plaintext influences many (half) of the bits of the ciphertext. These two properties help to ensure that extracting the key from plaintext-ciphertext pairs is difficult or infeasible.

Since AES only operates on blocks of 128-bits, you require a mode of operation to encrypt plaintexts of size > 128 bits. So a mode of operation is a way of using a block cipher to encrypt (effectively) arbitrary length messages. 

Since for a fixed key AES is deterministic, a mode of operation also provides a means to randomize plaintext-ciphertext pairs, so that multiple encryptions of a plaintext cannot be distinguished from each other. This is necessary to properly provide confidentiality of the plaintext.