What if in AES-128 CBC, IV is very related to KEY? while digging into some secured communication protocol, I noticed a  usage of AES-128 CBC that raised my attention.
In it, the IV is tightly coupled to the Key, being a xor of its values with the byte index:

for(i=0; i&lt;16; i++)
{
  IV[i] = Key[i] ^ i;
}



Could it be an issue if an attacker knows the first blocks of a plaintext?
Does it weaken the implementation of the encryption?


Thank you in advance
This implementation is horribly broken, since the IV is (most likely) sent in the clear. An eavesdropper who knows the implementation will immediately be able to deduce the key and decrypt all data.

The IV will also be the same for repeated uses of the key. This opens up several weakness. For one, it leaks information on when multiple plaintexts begin with the same data, and for approximately how long. IV reuse is also vulnerable to chosen plaintext attacks. See this answer for more details.