Which algorithm would be ideal for ephermal key generation followed by DH key exchange? Bob and Alice, both generate a temporary public key pair each using X algorithm on their individual PC.
After being authenticated by a third party, they use the DHE to come to get a common symmetric key; This key is used for the encryption of messages sent between them for that session. After the session is over, all the mentioned keys are forgotten.

My question primarily is what would be an appropriate algorithm 'X'
Also, if there is a vulnerability in the above presented scenario, kindly mention it.
Using ECDHE as an example, the steps are like this,


The client sends supported named curved list.
The server chooses a curve and generate key-pair, and sent back curve type and public key.
The client uses the server curve type to generate key-pair, and send back curve type and public key.


Now, both client and server can generate same secret(i.e. pre-master secret in SSL)