Generates an ephemeral keypair for Diffie-Hellman key exchange using the EC algorithm, as required for AReq message.