The scenario
Using AES 256 with CBC mode. (Authentication is done separately. Ignored here.)
The goal (explained more later)
To avoid sending an unencrypted IV.
But since this is being done using .NET whose function forces us to use an IV, we can't just prepend 16 random bytes and then toss away the first 16 bytes after decryption.
The plan
Prepend 16 random bytes ("IV1"), and besides that use 16 bytes with value zero as the IV ("IV0"). Then send the ciphertext without its first 16 bytes.
Decryption will be done by the receiver first determining what the first block of ciphertext will be (for that AES key, for any message) by encrypting something in the aforementioned manner (which will have to be done only once per key) and taking the first 16 bytes of the resulting ciphertext.
They then prepend those bytes to the cropped-ciphertext-received to get the original uncropped ciphertext, and then decrypt it with an IV ("IV0") of 16 bytes of value zero (i.e. they use .NET's decryption function, feeding it the required IV which is those 16 zeros).
They then discard the first 16 bytes of the result (which is received from .NET after .NET discards the first-first 16 bytes which are the IV) because those are the 16 random bytes prepended ("IV1").
But why?
Communicating the IV in plaintext gives a brute-force attacker an edge - they can decrypt only one block (16 bytes) and compare it to the IV in order to check if the key is correct. (Perhaps there are more attack channels possible which I am unaware of.)
So my question is
Does this plan seem fine, or am is there some pitfall in it?
Usually the IV is prefixed to the message.
- The keyword here is "usually". If this were the case in CBC, and no more was done with the IV - my point in the question would be true. I.e. communicating the IV in plaintext would give the attacker an edge in brute-forcing the key. Since the IV is XORd with the plaintext before encryption - that is not the case. As Fractalice's comment implies. $\endgroup$