I haven't written encryption in a while and have forgotten some stuff.
I remember that to have the output be different for the same data using the same key, I want to salt the data on one of the ends of the byte array and then use CBC mode so that the salt can do its thing.
However I can't remember which direction the encryption goes. Should the salt go at position 0 and then the data to be encrypted goes behind it, or does the salt go at the end? I know CBC mode works best when the salt is the first block in the chain.
Also what block size for AES 256? The wiki article says that all AES uses 128-bit block sizes, and that the 256 part only relates to the key length. So should my salt for AES 256 be 16 bytes or 32 bytes?
I'm using AesCryptoServiceProvider, not RijndaelManaged.