**HTTPS は、TLS で暗号化されたチャネルの中で動く HTTP にすぎません。**TLS(Transport Layer Security)は 3 つの保証を与えます:confidentiality(機密性)(トラフィックが暗号化される)、integrity(完全性)(検知されずに改ざんできない)、authentication(認証)(本当に 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)
