Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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