Implement ephemeral key exchange.