The answer is the Counter mode would be faster.
The reason for this is with CBC mode, there's a data dependency.
Then we can't start doing this encryption until we know the value of the previous ciphertext block
so we can't run all these encryptions in parallel.
That's one major drawback of CBC mode.
With Counter mode, well, we can actually compute all these encryptions
before we even know the message.
These values and the expensive operation here is not the EXORs,
EXORs are very cheap.
Encryption is expensive. So we could actually pre-compute,
for a given nonce, all these encrypted counters,
And then once we know the contents of the file,
we can do those EXORs, also in parallel,
but those are very quick. So all of these encrypted blocks could be
computed in parallel using many processors.
So that's a big advantage of Counter mode over CBC mode.
