HTTPS ਬਸ HTTP ਹੈ ਜੋ ਇੱਕ TLS-encrypted channel ਦੇ ਅੰਦਰ ਚੱਲ ਰਿਹਾ ਹੈ। TLS (Transport Layer Security) ਤੁਹਾਨੂੰ ਤਿੰਨ ਗਾਰੰਟੀਆਂ ਦਿੰਦਾ ਹੈ: confidentiality (traffic encrypted ਹੈ), integrity (ਇਸ ਨਾਲ ਬਿਨਾਂ ਪਤਾ ਲੱਗੇ ਛੇੜਛਾੜ ਨਹੀਂ ਹੋ ਸਕਦੀ), ਅਤੇ authentication (ਤੁਸੀਂ ਸੱਚਮੁੱਚ ਉਸ server ਨਾਲ ਗੱਲ ਕਰ ਰਹੇ ਹੋ ਜਿਸਦਾ ਨਾਂ certificate ਵਿੱਚ ਹੈ)। ਇਹ ਕੋਈ ਵੀ HTTP ਭੇਜਣ ਤੋਂ ਪਹਿਲਾਂ ਇੱਕ handshake ਵਿੱਚ ਤੈਅ ਹੁੰਦਾ ਹੈ:
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)
