EXERCISE 1 — Comparing plain HTTP vs HTTPS with curl -v ======================================================== Command (plain HTTP): curl -v http://example.com Relevant output (trimmed): * Trying 93.184.216.34:80... * Connected to example.com (93.184.216.34) port 80 > GET / HTTP/1.1 > Host: example.com > User-Agent: curl/8.x > < HTTP/1.1 200 OK ... -> Notice: straight after "Connected", curl sends the GET request. There is NO encryption step. Everything (the >) is sent as plaintext. Command (HTTPS): curl -v https://example.com Relevant output (trimmed): * Trying 93.184.216.34:443... * Connected to example.com (93.184.216.34) port 443 * ALPN: offers h2,http/1.1 * TLS handshake, Client hello (1): * TLS handshake, Server hello (2): * TLS handshake, Certificate (11): * TLS handshake, ... key exchange ... * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * Server certificate: * subject: CN=example.com * issuer: C=US; O=DigiCert Inc; CN=... > GET / HTTP/1.1 > Host: example.com ... WHERE TLS IS NEGOTIATED: - The lines beginning "* TLS handshake, ..." are the TLS handshake (Chapter 6 will break these down message by message). - "SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384" confirms the agreed protocol version and cipher suite (Chapter 8). - "Server certificate:" with subject/issuer is the AUTHENTICATION step (Chapters 4-5). - ONLY AFTER all that does the actual "> GET /" request get sent — and now it travels encrypted. KEY TAKEAWAYS: - Port 80 = HTTP (plaintext), port 443 = HTTPS (TLS). - For HTTP, "Connected" is immediately followed by the request. - For HTTPS, a whole handshake happens between "Connected" and the request — that handshake is what the rest of this course explains. - Lines starting with * are curl's own diagnostics; > is data sent, < is data received.