After reading this awesome explanation of how SSL works, I now have a confusion.
The answer states that the first messages of SSL are ClientHello and ServerHello(in response to ClientHello). Both of which are unencrypted, correct me if I am wrong. Also the client does not start sending encrypted until ChangeCipherSpec is issued.
So both ClientHello and ServerHello contain the "client random" and "server random" and also the session-id. Now AFAIK the data is encrypted using a symmetric encryption key, that is, the client and server both have a copy of the same key and encryption/decryption is done via that single key for that SSL session.
So if the ClientHello and ServerHello are both plaintext can't the attacker just use the same algorithm as the client and generate his own symmetric key and converse with the server impersonating the client ?
How is this not possible ? What am I missing here ?
UPDATE: The phases of ServerKeyExchange and ClientKeyExchange also happen before ChangeCipherSpec so they are also suppose to be unencrypted.