6

I have three questions related to the use of IV within CBC mode of operation:

  1. Why, exactly, is it so bad to have a fixed (or predictable) IV in CBC mode? An example would be great!

  2. Given 1., why is a random IV better? And if the IV is "random", how are Alice and Bob boh supposed to know it? Isn't the IV part of the key in that case?

  3. Why not only use the IV once (as in, keep on the CBC process forever and ever, without ever "starting again with a new IV")?

Maarten Bodewes
  • 92,551
  • 13
  • 161
  • 313
Joe
  • 121
  • 1
  • 2
  • 4
  • 1
  • With a fixed IV you leak if the first 16 bytes of two messages are identical. 2) The IV is usually send alongside the ciphertext, typically as a prefix. The IV is not secret, but needs to be different for each message.
  • – CodesInChaos Jan 08 '15 at 14:09
  • I see! Thanks! So for 1), if the IV is predictable, why is that bad? Also, added a 3) – Joe Jan 08 '15 at 14:22
  • @CodesInChaos: You imply a block size of 128 bits, which is not always the case. – Nova Jan 08 '15 at 19:37
  • @Joe: 2) The random IV gets send with the ciphertext, in the clear. 3) Well, you would have to always send the last ciphertext block with a new message. Also this allows some attacks which would show him/her the same things mentioned in 1). – Nova Jan 08 '15 at 19:39
  • Predictable IV attack covered here: https://crypto.stackexchange.com/questions/3883/why-is-cbc-with-predictable-iv-considered-insecure-against-chosen-plaintext-atta – Meir Maor Mar 30 '18 at 14:11