First, let me clarify what I mean with a Key Derivation Function (KDF). I'm interested in KDFs that take an $n$-bit symmetric master key and some diversification data of arbitrary length as input and produce an $n$-bit symmetric key as output that can be used in subsequent cryptographic operations.
It seems to me that such KDFs have much in common with MACs:
- A key and data as input and an output that has the same length as the input key;
- The output should be unforgeable for an attacker who does not have access to the input key;
- The probability of producing equal outputs for unequal inputs should be negligible.
Hence my question: is it secure to use any secure MAC algorithm as a KDF?