If I encrypt some data with a randomly generated Key and Initialization Vector, then store all three pieces of information in the same table row; is it necessary to encrypt the IV as well as the Key?
Simplified table structure:
- Encrypted data
- Key (encrypted using a second method)
- IV (encrypted?)
Please assume that the architecture and method are necessary: The explanation behind it is lengthy and dull.
Message
, you encrypt e.g.lkjoiukqMessage
, orylmqtclrMessage
on another day. Even thoughMessage
is the same on both days, the random-looking output of the cipher will be different, there is no way of knowing it's the same, nor is there a way of guessing the key from the fact that the input to the cipher is the known plaintextMessage
(because it isn't). When you decrypt <random gargbage>, you get backxxxxxxxxMessage
wherexxxxxxxx
is something that you simply ignore, knowing that it's just meaningless random. – Damon Aug 23 '15 at 10:33