I am currently using AES (256) with CBC mode to encrypt data. I save the initialization vector with encrypted data. Right now, I'm just adding an IV to the beginning of the encrypted data, and then decrypting it, reading it as a hard-coded byte length.
If the length of the initialization vector changes in the future, this method will break.
So my questions are:
Will there be more AES key sizes = longer IVs in the future? Or, in other words, will the AES block size change in the future?
If so, what would be the best way to handle this? Using the first byte as an indicator of how long the IV lasts, and then read in that number of bytes?
source
share