It sounds like this“Encryption is safe because nobody knows how the scrambling works.”
Thinking encryption is safe because the method is secret
Why it feels right
It is how codes work in films and children's games: a secret alphabet, a clever twist nobody has seen. If the code works because the trick is hidden, then publishing the trick would ruin it, so real security must also depend on keeping the method a secret.
Why it’s wrong
The methods are public, and everyone can study them. What is secret is only the key. A good method is one that stays unbreakable even when everything but the key is known, because a 128-bit key has about 3.4 x 10^38 possibilities, too many to try.
A worked example
Modern encryption works the other way round. The method, such as AES, is published in full, studied by thousands of researchers, and built into every phone. Everyone knows exactly how it scrambles. What stays secret is a short number called the key.
This is a rule from the 1880s, called Kerckhoffs's principle: a system should be secure even if everything about it, except the key, is public. A secret method can be found out, copied or leaked, and only a few people ever check it for flaws. A public method has been attacked for years.
The key protects the message by being hard to guess. A 128-bit key has 2^128, about 340 trillion trillion trillion possible values. If a machine could try a trillion keys every second, it would still need about 10^19 years to try them all, far more than the age of the universe.
How to catch yourself
- You trust a product that boasts of a secret, home-made encryption method.
- You think publishing the algorithm weakens it.
- You judge security by how mysterious it sounds.
What to hold instead
Good encryption uses a published method and a secret key. Anyone can study how the scrambling works; only the key is private, and a long key has far too many possibilities to guess.
Where you’ll meet it
- Judging a product that boasts of its own secret encryption.
- Understanding why AES is trusted by governments and banks alike.
- Reading why key length is quoted in bits.
Questions people ask
- Why is encryption safe if everyone knows the algorithm?
- Because it only needs the key to be secret. A 128-bit key has about 3.4 x 10^38 possible values, so even with the full method known, trying every key is out of reach.
- What is Kerckhoffs's principle?
- The rule that a cipher should stay secure even if the enemy knows everything about it except the key. Auguste Kerckhoffs set it out in 1883, and modern cryptography follows it.