HTTPS ก็คือ HTTP ที่ทำงานอยู่ภายในช่องทางที่เข้ารหัสด้วย TLS นั่นเอง TLS (Transport Layer Security) ให้การรับประกันสามอย่าง: confidentiality (ทราฟฟิกถูกเข้ารหัส), integrity (แก้ไขไม่ได้โดยไม่ถูกตรวจพบ) และ authentication (คุณกำลังคุยกับเซิร์ฟเวอร์ที่ระบุใน certificate จริง) มันถูกเจรจาในการ จับมือ (handshake) ก่อนส่ง HTTP ใด ๆ:
Client Server
│──── ClientHello ──────────────────────▶│ (TLS versions, cipher suites, random)
│◀─── ServerHello + Certificate ─────────│ (chosen cipher + cert with public key)
│ │
│ verify cert against a trusted CA │
│ agree on keys (e.g. ECDHE key exchange)│
│ │
│──── Finished (encrypted) ──────────────▶│
│◀─── Finished (encrypted) ───────────────│
│========= encrypted application data ====│ (now HTTP flows, encrypted)
