Derive cipher IV and cipher Key using PBKDF2 with random salt?
It is secure. The IV only needs to be indistinguishable from random to an attacker, and it is as long as the salt is random.



There is one remark: if you extract more key + iv bytes than the hash function in PBKDF2 returns then the PBKDF2 function is executed twice. An attacker however only has to find the key, not the IV, so an attacker doesn't have to do this, halving the security provided by the number of iterations.

You could use a KBKDF (Key Based Key Derivation Function) rather than direct extraction to get the key and IV. So you would have:

S = PBKDF2(salt, password, iterations)
K = KBKDF(S, 'enc')
IV = KBKDF(S, 'iv')


A good KBKDF is HKDF-expand.