03 — Foundations
Kerckhoffs's Principle
"The enemy knows the system." Security must live in the key — never in the algorithm's secrecy.
"A cryptosystem should be secure even if everything about the system, except the key, is public knowledge."
— Auguste Kerckhoffs, 1883 (in "La Cryptographie Militaire")
Shannon's restatement
Claude Shannon (1949) reformulated it as "the enemy knows the system" — the foundational design assumption of TLS, AES, RSA, and Signal. Public algorithms get peer review; secret algorithms get broken quietly after deployment.
Implications
- Algorithms should be public and peer-reviewed — "security through obscurity" is forbidden
- All security rests on the secrecy of the key alone
- Keys must be long enough to resist brute force (128+ bits symmetric, 2048+ bits RSA)
- Allows standardisation — AES, RSA, SHA-256 are published specs; everyone uses the same algorithm and they stay secure
- If a key is compromised, only that key's data falls — the algorithm remains trusted (key agility)
Counter-examples (violations)
- Hidden ciphers — proprietary algorithms kept secret (e.g. A5/1 in GSM) — repeatedly broken once reverse-engineered
- DVD-CSS (1999) — 40-bit secret cipher, broken in days once decompiled; key length + obscurity both failed
- Hardcoded keys in firmware — found by inspection, violate "key must be replaceable"
- "Security by obscurity" — relying on attackers not knowing the design — universally fails
Open design wins — why?
Public review finds flaws before wide deployment; interoperability needs a shared spec; and key rotation is cheap while algorithm replacement is expensive. Secrecy of design adds zero bits of key strength once the device ships.Exam one-liner
Security of a cryptosystem must depend only on the secrecy of the key, never on the secrecy of the algorithm.