Three different questions
- Correctness: does decryption give back exactly what was encrypted? A failure here is a bug.
- Performance: is it fast and cheap enough to use? Speed is a reason to choose a scheme, never evidence that it is secure.
- The security claim: what does it promise against an adversary, and has anyone tried to break that promise? Neither of the first two answers this.
Practical ciphers can be broken in principle, so what matters is how much work an attack really needs. Trying every key is the attack of last resort, which means a large key space bounds only exhaustive key search. Any shortcut that avoids searching keys makes the number of keys irrelevant (Fred Piper and Sean Murphy, Cryptography: A Very Short Introduction).
A worked example: four questions, two tests
The scheme is a simple substitution cipher: each letter is always replaced by the same other letter. The message and key below are invented for this page.
- 1. What does the adversary have?
- The ciphertext only, plus ordinary knowledge of English. No key and no plaintext.
- 2. What property is claimed?
- That the ciphertext gives nothing away, because there are 26! (about 4 × 1026) possible keys: far too many to try.
- 3. What would a functional test show?
- Whether decrypting with the key returns the message exactly. It tests correctness only.
- 4. What is a separate security test?
- An attack that uses only what the adversary has. Here: rank the ciphertext letters by how often they occur, and pair them with English letters ranked the same way. No key is searched.
Ciphertext:
Attacker’s first reading:
The verdict
The cipher works: it is correct, and fast enough to do by hand. Its security claim still fails, because the attack never needed to search the key space. The museum’s substitution exhibit goes from this first reading to the full key. To play a security game in which the attacker’s advantage is measured over many rounds, try Hidden Bit in Crypto Lab.
When the claim fails
Sarah Flannery’s Cayley–Purser algorithm was a working public-key scheme, and it won her the Young Scientist competition. An attack then exposed a security problem in it. In her book In Code (2000) she describes including a detailed report on that attack in her later project, and treating the negative result as part of how science moves forward rather than as a failure. The book does not give the technical attack, and this page does not reproduce the attack either.
Friedrich L. Bauer’s maxims of cryptology make the same warning from the other side: do not underrate the adversary, distrust an inventor’s confidence in their own method, and remember that people make mistakes (Bauer, Decrypted Secrets, 4th edition).
Follow the route
The Working Is Not Secure tour visits exhibits where each of the four questions decides the outcome: a huge key space undone by language patterns, a perfect-secrecy guarantee that holds only under strict conditions, a machine attacked through its procedures, what a security proof really assumes, and how modern attacks are judged. It returns to the verdict above.
Sources
- Sarah Flannery with David Flannery, In Code: A Mathematical Journey (Profile Books, 2000).
- Friedrich L. Bauer, Decrypted Secrets: Methods and Maxims of Cryptology, 4th edition (Springer, 2007).
- Fred Piper and Sean Murphy, Cryptography: A Very Short Introduction (Oxford University Press, 2002).
The message, key and tests are original to this page. Books are cited by title; no copy of any book is linked. Key-size figures from older books are not used as present-day guidance.