Is it possible to deduce the IV from CBC ciphered data, without knowing the key? The question came up here, which left me thinking:

Is it possible to deduce the IV from CBC ciphered data, without knowing the key?
And if not, why is it considered a bad idea to create an IV by, for example, filename$\oplus$Key, if you never store the IV?

I know, that XOR is a no-go, when you are using ciphers, because, XOR is bidirectional. Having the filename and the IV will give me the key. But HOW will you get the IV from CBC ciphered data without having the key first?
For CBC mode, the IV must be  


Never used twice with the same key
Unpredictable


So, in your example (filename$\oplus$key), if you ever encrypt two files that have the same filename with the same key, you will violate #1. 

Now, you may be tempted to say "but I always generate a new key for every file that I encrypt, so that example doesn't apply". Fine, it doesn't. There are probably some use cases where filename$\oplus$key is fine. But, there are a lot of use cases where this will have big problems. In crypto, we typically try to develop our systems so that they are secure no matter how they are used. This is often not entirely possible, but that is what we aim for. So instead, we would generate a random IV and publish it with the ciphertext.

To give you an example of where filename$\oplus$key could have issues, consider the following. What if you publish your IV (which is a very, very common practice). Then all I have to do is brute force the file name and I have the key.