0
$\begingroup$

Is it necessary to pass a ECDH generated key to a KDF?

According to the python cryptography documentation, it is stated that

For most applications the shared_key should be passed to a key derivation function. This allows mixing of additional information into the key, derivation of multiple keys, and destroys any structure that may be present.

On a side note, isn't a KDF used to generated multiple keys of desired length?
How does it achieve this if if only produces a single key of variable length?

EDIT: The main point here is I would like to know why we should pass a ECDH key into a KDF.

$\endgroup$
  • $\begingroup$ And to answer your side note: a KDF generates a sequence of bytes. You can break it up at any point(s) into multiple keys of variable lengths. $\endgroup$ – Gilles 'SO- stop being evil' Jul 23 '19 at 22:18