I'm trying to understand the security of KDF but stuck with PBKDF case (case 3). Suppose, we have the following settings:
$KDF(SK,salt_1) \rightarrow k_1$
$KDF(SK,salt_2) \rightarrow k_2$
The adversary $A$ knows $salt_1$, $salt_2$, $k_2$ (and maybe even more derived keys $k_j$ for salts $salt_j$). His goal is to get $k_1$. Let even help him by makeing all salts closely related and haveing the same substring. Can $A$ learn $k_1$ from $salt_1$, $salt_2$, $k_2$?
In the best (and almost unrealistic) case $SK$ is random and uniformly distributed in key space $K$. In this case, we can use some PRF $F$ to derivate a key $k \leftarrow KDF(SK,salt,l):=F(SK,salt||0)||F(SK,salt||1)||...||F(SK,salt||l)$
In such case $A$ can't learn $k_1$, otherwise $F$ is not secure PRF.Slightly worse case: $SK$ is uniform in some subset of $K$. We need Extract-then-Expand KDF - so we use HKDF. At first we extract $k_{short} \leftarrow HMAC(salt, SK)$ and then expand $k_{short}$ to $k$ by using HMAC as PRF with key $k_{short}$. Again, $A$ can do nothing as long as underlying compression function in a hash is PRF and $SK$ has enough entropy.
Worst case: $SK$ is a password. Suppose it's PBKDF1 and $k \leftarrow PBKDF1(pwd,salt,c) = H^{(c)}(pwd||salt)$
On the one hand, $A$ still should learn nothing about $k_1$ if the hash is secure. On the other, I've got a feeling that he knows enough data to come up with something better than bruteforce. Am I wrong?