Imagine I have a file encrypted using AES CBC mode with a key and a random IV. T
ID: 662119 • Letter: I
Question
Imagine I have a file encrypted using AES CBC mode with a key and a random IV. The attacker access to the encrypted text and the IV used but not the key.
In this scenario there is no vulnerability since the IV is random.
Now lets assume the attacker gets information about the plaintext used. The plaintext is a survey form filled out by a user. So there is a fixed format for the data encrypted. In that case if we assume the attacker has access to the empty survey form (with the questions) does that change the presumed security of the encrypted data? The random IV does not matter any more. The situation lends itself to a chosen plaintext attack. Am I missing something here?
How do you protect the data in this case?
Explanation / Answer
The data is protected. The attacker can't decrypt its contents, not even with the (partial) plaintext (otherwise we would be talking of AES as a broken cipher).
However, you also need to protect the integrity.
For example suppose that the survey contains some Yes/No questions and we were encrypting in CTR mode. If Eve has access to the answers to the survey given by other employees, she could blindly change the answers of someone she hates to make them look bad (eg. imagine that a quesiton was