I am dealing with protocol design regarding the Diffie-Hellman Key Exchange (DHKE). The DHKE is performed by the Key Master and some Slave Component. Afterwards, a session key is transmitted using the secure channel provided by the DHKE (i.e. the session key is protected using the shared DH key).
From a logical standpoint, I would suppose that the session key is derived after the DHKE was performed. However, for performance reasons it may be better to derive the session key berforehand (see diagram below).
I am asking myself whether there might be security issues by doing so and whether there are other things that need to be considered w.r.t. order of executed actions.
Edit: The session key is not derived from the shared DH key. Reasoning: The DHKE is performed among the Key Master and multiple Slave Components.
Furthermore, the session key is just used for integrity protection (by calculating a MAC).