The oldest kind of encryption is symmetric: the same key locks and unlocks. Caesar's shift cipher was symmetric. So is the workhorse of the modern internet, an algorithm called AES (Advanced Encryption Standard).
Think of a symmetric key as a physical key to a strongbox. You and I both have an identical copy. I put the message in the box, lock it, and send you the box. You open it with your copy. Anyone who steals the box without the key gets nothing.
AES is the gold standard. It was chosen in 2001 through an open international competition, has been hammered on by every cryptographer alive for twenty-five years, and protects your bank transactions right now. You will see versions named AES-128 and AES-256. The number is the key length in bits — roughly, how many different possible keys exist. AES-256 has so many possible keys (a number with 77 digits) that trying them all is beyond any computer that exists or is realistically imaginable.
But symmetric encryption has a fatal logistical problem, and it is worth pausing on it, because this problem is the reason half the internet's security architecture exists.
How do you get the key to the other person in the first place?
If I email you the key, whoever intercepts that email has the key, and the whole exercise was pointless. If we meet in person and hand over a USB stick, fine — but the internet exists precisely so we don't have to meet. Two strangers on different continents need to agree on a shared secret key, over a public channel, while an eavesdropper watches every byte they exchange.
For centuries this was considered impossible. It is called the key distribution problem. Banks solved it in the 1970s with armored couriers carrying briefcases of keys around the world — genuinely, physically. That is obviously not how your browser talks to your supermarket.
The solution to this problem, invented in the mid-1970s and kept quiet by British intelligence for years before being published publicly, is the cleverest trick in this entire story. It deserves a page of its own.
Symmetric encryption (AES) is strong and fast, but both sides need the same secret key, and getting that key to someone safely over the internet was long thought impossible.