I'm working on a project that splits large files into several encrypted fixed-size blocks (e.g. 4KiB). Those blocks shall be used to be stored persistently on a storage device.
Blocks are encrypted symmetrically and each block has its own Initialization Vector. Unfortunately I am unsure how to "generate" those Initialization Vectors correctly:
As it is explained here and here there are several different Initialization Vector generation algorithms. Obviously, it has to be distinguished between private ones (e.g. ESSIV) and public ones (e.g. Plain). I also read that IV algorithms like Plain should not be combined with CBC mode of operation.
Which IV generation algorithm should I use? Or in other words: What should I definitely NOT do?
I don't want to use random nonces for each block, as those nonces would have to be stored somewhere - a IV generation algorithm would be much more comfortable to me.