Search code examples
sslnetwork-security

How are the random numbers in SSL obfuscated to prevent a third party from generating the same master key?


My understanding of how SSL works:

The client sends a hello message containing the SSL version number, supported key, cipher and hash methods, and a randomly generated number.

Server replies selecting the key, cipher and hash methods, a randomly generated number, and its certificate.

Client and server generate a master key based on above randomly generated number(s).

Client request change cipher, server replies change cipher, and they are now both encrypted with the master key.

My question is that wouldn't a third party (eg man in the middle) be able to intercept the initial hello messages, use the intercepted randomly generated numbers and figure out the master key, and thereby able to figure out what the rest of the messages are for the entirety of the connection? Thanks!


Solution

    1. SSL can encrypt your message and traffic.
    2. If man in the middle able to intercept, he'll see an encrypted message but not danger because that's hash function a way.

    Good luck!

    By @Jackie