What is HTTPS?


🎯 Main Goals of HTTPS

Goal Meaning
Confidentiality Data is encrypted — no one can read it during transit.
Integrity ⇒ النزاهة Ensures data hasn't been altered in transit.
Authentication Verifies that the website is genuine, not fake or impersonated.

🔄 TLS Handshake (TLS 1.2 – Simplified Steps)

  1. Client Hello (from browser):
  2. Server Hello (from server):
  3. Browser verifies the certificate:
  4. Browser generates a Pre-Master Secret:
  5. Server decrypts it using its Private Key.
  6. Both browser and server now have:
  7. They use these values to generate the Session Key.
  8. From this point on, all communication is symmetric encrypted (e.g., using AES).

🎲 What’s the Role of the Random Numbers?

Random Value Role
Client Random Sent by the browser; helps derive the session key.
Server Random Sent by the server; also part of session key derivation.
Pre-Master Secret Secret value created by browser, encrypted with server's public key.