Theoretically – is CBC mode harder to bruteforce when compared with ECB when assuming:
- we ignore computational cost for the XOR operations, and
- the IV is made public?
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.Sign up to join this community
As Maarten Bodewes already wrote in a comment, if you ignore the computational overhead of XOR, then there is essentially no difference in CBC and ECB for a bruteforce attack.
However, the question is actually mixing oranges and apples (and it is not obvious), because the security weakness of modes of operation has nothing to do with the underlying symmetric cipher - and a brute force attack has everything to do with the underlying cipher.
The problem is, that brute force attacks are a completely different scenario than what the different modes of operation try to achieve. In brute force you actually try out keys until you find the correct one. In cryptanalysis this is called a total break. The weakness of ECB compared to CBC is, that you can actually can achieve an easier goal of the attack: A distinguishing attack works on ECB and doesn't (with proper randomness, etc.) on CBC - under the assumption that the cipher is secure.
Btw, your 2. assumption is not needed. The IV is always assumed to be publicly known (and generated randomly for security arguments).
Yes there is a significant difference concerning brute-force.
ECB suffers from multi target attacks whenever you encrypt the same message block.
This is always possible in a chosen-plaintext attack and often possible in practice with a known-plaintext attack.
With 128 bit and smaller keys this could lead to practical attacks. With 256 bit keys the security margin is so big that even multi-target attacks don't matter anymore.
But of course the main reason why we don't use ECB isn't the susceptibility to multi-target attacks, but that it leaks a lot of information even if the key is big enough.