I am using AES and CBC to encrypt a local files separately. I don't plan to transmit them over any network.

What are the risks of using a fixed IV for my encrypting application? The only problem I can see, it is that two files encrypted with the same key would have the same starting characters if both plain texts start the same. Is there any other leak of information?

  • 1
    Some information is leaked. But if the files are never actually examined by a determined attacker you'd be safe. Best to use a random IV, since the cost of doing so is approximately zero. – tylerl Jun 29 '13 at 17:42
  • Remember to use a MAC (such as HMAC) as well. – Michael Jun 30 '13 at 0:00

Predictable IVs in CBC mode are vulnerable to chosen plaintext attacks.

In short, there is zero defensible reason to use a static initialization vector. It is a terrible practice and invalidates many of the guarantees provided by your choice of encryption method.

Just don't do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.