All crypto solves one awkward fact: you want to share secrets with someone you have never met, over a line the whole world can read. Symmetric encryption (one key for both sides, fast, used for the bulk of every connection) needs the key agreed first — impossible over an open line. The fix is a public-key handshake: each side can post an encryption key that locks but cannot unlock (mathematical one-way functions: products of huge primes, elliptic curves), so anyone can send a sealed question, and only the holder of the matching private key can open and answer. A negotiated symmetric key rides inside, and the rest of the session is cheap and fast. The lock is only as good as verification: “key exchange” without identity is why certificate authorities, chains of trust and pinned keys exist — otherwise a middleman locks to you and to the site and reads both.
What the padlock honestly means: the line is encrypted and the server proved its identity for that domain. What it does not mean: the site is safe, honest or unlogged. HTTPS is table stakes now (most web traffic runs on it, browsers mark the rest “Not secure”); the remaining weak links are endpoints — malware on your device sees plaintext because decryption has to end somewhere — and metadata: who you visited, when and how often. End-to-end encryption (messaging apps, and this site’s T Chat) moves the keys to the participants, so even the carrier server reads nothing; the caveat is backups and device access, where the plaintext still lives.
Two honest tensions to be able to argue: mathematics cannot build a backdoor that only good actors use — a weakness that works for the intercepting agency works equally for whoever steals or breaks it — and post-quantum migration is already underway: future large quantum computers threaten today’s public-key schemes (not symmetric or hashes, halved at worst), so standards and mixed key exchanges are shipping now, quietly, in browser and server updates you have already received.