Secrets and the sharing problem
In one sentence
One shared secret key can encrypt anything strongly, but getting that key safely to everyone who needs it does not scale, and that is the problem PKI exists to solve.
The situation
Your finance team emails an encrypted spreadsheet to an outside auditor. Then someone asks: “How do we send the password?” One person suggests a second email. Another suggests a text message. A third says to read it out on a call.
That small, awkward moment is the oldest problem in cryptography. It is also the reason PKI exists.
What is going on
Encryption scrambles data so that only someone with the right key can turn it back. A key is simply a large random number. The scrambled result is called ciphertext: anyone may see it, but without the key it is useless.
In symmetric encryption, the same key locks and unlocks. Modern symmetric ciphers such as AES are fast and very strong. Guessing a 128-bit key by trying every possible value would take any computer that exists far longer than the age of the universe. So the weak point is almost never the mathematics. It is the key.
Why the key is the hard part
Your message does not travel straight to the other person. It passes through Wi-Fi routers, mail servers and internet providers, and any of them could keep a copy. Encryption makes that copy worthless, unless the key travelled the same way.
Both sides need the same key before they can talk privately. People try three ways to share it:
- Send it over the same channel. Anyone who copied the ciphertext can copy the key too.
- Send it over a second channel, such as a text message or a phone call. Better, but now you must trust that channel as well, and a person has to do it every time.
- Meet in person. Safe, but it does not scale.
Scale is what really breaks it. Every pair of people who want to talk privately needs their own key; otherwise one person could read messages meant for another. With n people that is n × (n − 1) ÷ 2 keys: 45 keys for 10 people and 499,500 for 1,000. Each key must be delivered secretly, stored safely and replaced if it leaks.
The web has it worse. Your browser talks to sites it has never met before, thousands of them, and there is no time to meet anyone.
This is the key-distribution problem. Symmetric encryption is not wrong: it still protects almost all data on the internet, including inside HTTPS. What is missing is a safe way to agree on a key with a stranger, and to know who that stranger is. Lessons 2 to 4 build both.
Try it
No tool needed for this one. Take two minutes for a thought exercise.
- Count the keys. List the outside parties your team exchanges confidential files with. Add your own team. If every party must be able to talk privately to every other party, how many secret keys is that? Use n × (n − 1) ÷ 2.
- Trace one key. Pick one of those keys and write down how it reaches the other side today. If the honest answer is “by email” or “in the same chat”, that key travels the same way as the data it protects.
Check
Your team encrypts a file with AES and emails it. A second email carries the password. Why is the file not well protected?
RightNot quite The answer is A: Anyone who can read the mailbox, or copy the traffic, gets both the file and the key
- What happened
- Anyone with access to that mailbox or that traffic receives the ciphertext and the key, and simply decrypts.
- Why
- Encryption is only as private as its key. The strength of AES does not help once the key travels the same way as the data.
- The rule
- Never send a key over the same channel as the data it protects.
Show answer
Answer A Anyone who can read the mailbox, or copy the traffic, gets both the file and the key
- What happened
- Anyone with access to that mailbox or that traffic receives the ciphertext and the key, and simply decrypts.
- Why
- Encryption is only as private as its key. The strength of AES does not help once the key travels the same way as the data.
- The rule
- Never send a key over the same channel as the data it protects.
Twenty people must each be able to talk privately to every other person, using only shared secret keys. How many keys is that?
RightNot quite The answer is B: 190
- What happened
- Each pair needs its own key: 20 × 19 ÷ 2 = 190.
- Why
- One group key would let every member read every other member's messages. Separate keys per pair keep conversations private, but their number grows roughly with the square of the group.
- The rule
- With n people, pairwise secret keys number n × (n − 1) ÷ 2, which is why shared secrets alone cannot scale to the internet.
Show answer
Answer B 190
- What happened
- Each pair needs its own key: 20 × 19 ÷ 2 = 190.
- Why
- One group key would let every member read every other member's messages. Separate keys per pair keep conversations private, but their number grows roughly with the square of the group.
- The rule
- With n people, pairwise secret keys number n × (n − 1) ÷ 2, which is why shared secrets alone cannot scale to the internet.
Which statement about symmetric encryption is true today?
RightNot quite The answer is C: It still encrypts almost all data in transit, including HTTPS; the hard part is agreeing the key
- What happened
- Symmetric ciphers such as AES still do the bulk of the work, including inside every HTTPS connection.
- Why
- They are fast and strong. Public-key cryptography is used to agree on the symmetric key and to prove identity, not to replace it.
- The rule
- Symmetric encryption moves the data; public-key cryptography and PKI let strangers agree on a key and know who they are talking to.
Show answer
Answer C It still encrypts almost all data in transit, including HTTPS; the hard part is agreeing the key
- What happened
- Symmetric ciphers such as AES still do the bulk of the work, including inside every HTTPS connection.
- Why
- They are fast and strong. Public-key cryptography is used to agree on the symmetric key and to prove identity, not to replace it.
- The rule
- Symmetric encryption moves the data; public-key cryptography and PKI let strangers agree on a key and know who they are talking to.
Takeaways
- One shared secret key both encrypts and decrypts. The mathematics is strong, so the key is the weak point.
- Every pair needs its own key and a safe way to deliver it, and that does not scale to millions of strangers.
- Public-key cryptography and PKI exist so that strangers can agree on keys and know who is on the other end.
Go further
- Handbook: Symmetric encryption: one shared key
- Handbook: The key-distribution problem
- Next lesson: Two keys
Early edition. Checked against the standards; an independent expert review is in progress. Found a mistake? Tell us.