I am designing a secure protocol (for academic/learning purposes) and I am at the point where I need to (re)design the key exchange step.
In my previous implementation, I used to rely on RSA to encrypt then sign a couple of randomly generated AES keys that I would then use for traffic encryption.
It has been brought to my attention that using Diffie Hellman for the key exchange could suit my needs better but I'm not too comfortable using an algorithm I don't understand well enough, hence the questions:
I'd like to use EC-DHE and I read that the generated key was not random (read: it has some structure, that I suppose comes from the underlying mathematical concepts). I always heard that using randomly generated keys was highly recommended for symmetric cipher algorithms. Even if I hash the resulting DHE key, it still won't be "random". Is it still okay to use it for that purpose?
I understood (please correct me if I'm wrong), that in EC-DHE, the choice of the elliptic curve is basically an easy way of choosing DH parameters. Is there anything I should be aware of when picking the elliptic curve? Should I let the users decide what EC they can use?