I have an interesting problem: I have someone who implements a cryptographic function for me as follows:

- There is a HSM that contains a secret k that I know
- The HSM creates a derived key using a HKDF
- The derived key is then usable for communication

Above operations are deterministic. However, I want that some randomness is being incorporated in order to have perfect forward security. The current idea is to take the deterministic derived key of the HKDF and hash it together with some random number to get a session key as follows: session_key = sha(derived key, random)

But now I have different problem: On the running system I cannot verify whether the session key is really the product of randomness or whether a backdoor has been implemented. Is there mechanism that allows me to make the procedure verifiable?