HTTPS to po prostu HTTP działające wewnątrz kanału zaszyfrowanego TLS. TLS (Transport Layer Security) daje ci trzy gwarancje: confidentiality (ruch jest zaszyfrowany), integrity (nie da się go niezauważenie zmodyfikować) oraz authentication (naprawdę rozmawiasz z serwerem wskazanym w certyfikacie). Jest negocjowany w handshake przed wysłaniem jakiegokolwiek 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)
