yuuwwang/aicrypto huggingface dataset:
\paragraph{Problem 3 (18 points)} 

Let us briefly recall the Diffie-Hellman key exchange: Alice and Bob want to establish a shared secret key. Alice has a secret $x$ and sends Bob $g^x$, Bob has a secret $y$ and sends Alice $g^y$. At the end, their shared secret is $g^{xy}$. 

This question asks you to give a formal definition of a secure key exchange (not just for the Diffie-Hellman key exchange, but for secure key exchange schemes in general). 
Please provide the syntax and the requirements of correctness and security. 
Your definition does not have to be equivalent to ``the'' standard definition of a key exchange protocol. Any definition that captures any reasonable security of key exchange is acceptable (you are welcome to add a few sentences explaining why your definition captures some reasonable security of a key exchange protocol).