Public-Key Encryption Is a Letterbox: Why You Can Share One Key Safely
Ask most people how two strangers can exchange a secret over the internet and you get a pause. It sounds like it should be impossible. If we have never met, how do we agree on a secret without somebody listening in on the agreement?
The idea that solves it, public-key encryption, is easier to hold in your head if you forget computers for a moment and think about a letterbox.
The letterbox
Picture a letterbox set into a wall. Anyone walking past can post a letter through the slot. You do not need to know the owner, and you do not need their permission. The slot is public.
Now notice what the slot cannot do. Once a letter has dropped through, the person who posted it cannot get it back out, and neither can anyone else standing in the street. Only the owner, holding the key to the box, can open it and read what is inside.
That is the whole idea. Posting is open to everyone. Opening is open to one person.
Mapping it to keys
In public-key encryption, every person or system has a pair of keys that are made together and belong together.
- The public key is the slot. You can publish it on a website, put it in an email signature or hand it to a stranger. What it does is lock a message so that it can be sent in.
- The private key is the key to the box. It never leaves its owner. It is the only thing that can unlock a message that was locked with the matching public key.
So if you want to send me something private, you take my public key, lock your message with it and send it across any network you like. Everyone along the way can see a locked message, and none of them can read it. When it reaches me, my private key opens it.

Notice what we avoided. We never had to agree on a secret in advance. The only thing that crossed the wire was something that was safe to be seen.
Why this is better than a shared secret
Older, simpler schemes use one key for both locking and unlocking. That works well, and it is still used for the bulk of the work, because it is fast. But it has a hard problem at the start: how do the two sides get the same key to each other without it being seen?
Public-key encryption turns that problem around. Instead of passing a secret, each side publishes something harmless and keeps something private. In practice, the two are often combined: the slow public-key step is used once, to agree on a fast shared key, and the fast key does the rest of the conversation. The letterbox gets you the key. Then you talk in private.
Where the analogy stops
Every analogy bends somewhere, and it helps to know where.
A real letterbox is a lock you can see and a slot you can touch. A mathematical one depends on problems that are easy to do in one direction and impractical to undo. Multiplying two very large numbers is quick, and working out which two numbers were multiplied is not. The strength of the system rests on that gap, and on the keys being long and random enough.
Also, a letterbox tells you nothing about who posted the letter. Anyone can drop something in. Proving who sent a message is a separate job, handled by digital signatures, where the private key is used the other way round and the public key lets anyone check the result.
Where the letterbox shows up in a design
The analogy also gives you four questions that come up whenever a system handles private messages or data.
- Where does the private key live, and who can read it? In the letterbox picture this is the key to the box. If a copy sits in a shared folder or a code repository, the box is only as private as that folder.
- What happens if a private key is lost or exposed? A box needs a way to change the lock and to tell senders to stop using the old slot. Systems need the equivalent: key replacement and revocation.
- Which scheme and library does the system rely on? The letterbox idea is simple, but the maths behind it has many details that matter, which is why systems use established, publicly reviewed implementations.
- How do we know a public key really belongs to who we think it does? A letterbox with the wrong name on it is still a letterbox, and the letters will arrive in the wrong hands. This is the problem certificates exist to solve.
The short version
Share the slot as widely as you like. Guard the key to the box as if the contents depended on it, because they do.
If your team is designing something that has to keep messages or records private and you would like a second pair of eyes on it, we are happy to talk it through at adyaksharlabs.com.

