encrypted-userprefs icon indicating copy to clipboard operation
encrypted-userprefs copied to clipboard

Random initialization Vector (IV) with Cipher Block Chaining (CBC) Mode algorithm

Open GokhanArik opened this issue 9 years ago • 1 comments

byte[] iv = new byte[writer.getBlockSize()];

I was told that we should use random number for iv size. Do you confirm that? What should be limits of the random size?

GokhanArik avatar Sep 24 '15 19:09 GokhanArik

The IV is hashed with SHA-256, so regardless of what you pass in it will be 256 bits which is the entropy size for the IV for this AES configuration.

sveinungkb avatar Sep 24 '15 20:09 sveinungkb