# Building multiple keys from the same input using a KDF [duplicate]

Let's say I have a single secret with high entropy, S, for the entire application. I want to generate keys K1, K2 for 2 different users of the app. I run:

K1 = PBKDF2(S, salt1)
K2 = PBKDF2(S, salt2)


where each salt is some 128 bit random number.

Is this a safe construction or do KDFs (or PBKDF2 specifically) have any properties that user 1, knowing K1, could infer any part of K2?

EDIT:

Assume a non-broken hash and a sufficient number of iterations for the KDF

## migrated from security.stackexchange.comMar 2 '16 at 21:09

This question came from our site for information security professionals.

• If you have a high entropy secret, use a KBKDF (key-based KDF) not a PBKDF (password-based KDF) – Xander Mar 2 '16 at 20:54