I've been reading a lot about SSL/TLS handshake between a client and a server and many articles on it are very contradictory.
Some say that the symmetric key that will be used to communicate between the two parties is transmitted from the client to the server (ofc, encrypted with the server's public key) and that's it.
Some say that a DH algo is being used and first the client sends a pre-master secret to help generate the shared key (why is the pre-master secret encrypted in the first place, an attacker won't gain any confidential info).
What's confusing is the overall flow of the generation on the shared symmetric key. a) Is DH being used at all (and if not, how is the symmetric key being generated, the client suggests it, sends it via RSA encryption and that's all?)
And b) If DH is being used, who starts first? There must be someone who first suggests the overall prime numbers to use for generating the secret, and then sends their computation (or is the overall algo determined up-front)?