title: How exactly HTTPS (ssl) works
body: <p>I have been reading on HTTPS, trying to figure out how exactly it works. To me it doesn't seem to make sense, for example, I was reading this</p>
  
  <p><a href="https://ssl.trustwave.com/support/support-how-ssl-works.php" rel="noreferrer">https://ssl.trustwave.com/support/support-how-ssl-works.php</a></p>
  
  <p>And notice it says this in the page</p>
  
  <blockquote>
    <p>Step 4: xyz.com will next create a
    unique hash and encrypt it using both
    the customer's public key and
    xyz.com's private key, and send this
    back to the client.</p>
    
    <p>Step 5: Customer's browser will decrypt the hash. This process shows
    that the xyz.com sent the hash and
    only the customer is able to read it.</p>
  </blockquote>
  
  <p>What I don't understand is, couldn't a hacker just intercept the public key it sends back to the "customer's browser", and be able to decrypt anything the customer can?</p>
  
  <p>Thanks for any response</p>