I have read several articles about SSL certificates on the internet, however, I could still not figure out how it can avoid the man-in-the-middle attack
: https://en.wikipedia.org/wiki/Man-in-the-middle_attack.
What I understand about SSL certificates in general is that it's using the Public/Private key pair
to encrypt and decrypt the message. People say that everyone knows the Public key
, and can use this Public key
to encrypt the message. And, thus, the 'man-in-the-middle'
knows this Public key
too so he could intercept the message from client, then change the message and encrypt again with the Public key
before sending it to the server. Is that correct?