Economy of Mechanism (Keep It Simple)
What you'll learn: Why simpler security designs are more verifiable, auditable, and trustworthy than complex ones.
The Core Principle
"Economy of Mechanism" means designing security systems with minimal complexity. The fewer moving parts, interfaces, and dependencies you have, the easier it is to understand what your system does, find vulnerabilities, and prove it works correctly.
Think of it like comparing a deadbolt lock to a smart lock with Bluetooth, Wi-Fi, fingerprint scanner, and voice control. The deadbolt has one mechanism: turn key, slide bolt. The smart lock has hundreds of components, firmware, network protocols—each a potential attack surface. Which is easier to audit? Which has fewer points of failure?
Why Complexity Is the Enemy
Complex systems suffer from:
- Hidden interactions between components that create unexpected vulnerabilities
- Difficult auditing — reviewers can't easily trace all execution paths
- Higher bug density — more code means more mistakes
- Maintenance burden — updates to one part may break security assumptions elsewhere
- Cognitive overload — developers and security teams can't hold the entire system in their heads
Applying Economy of Mechanism
- Choose simple, well-understood algorithms over clever but obscure ones
- Minimize privilege boundaries and trust relationships
- Reduce the number of components in your Trusted Computing Base (TCB)
- Prefer straightforward access control rules over intricate permission chains
- Document clearly so others can verify your design logic
When you must add complexity, isolate it outside security-critical paths and verify those critical paths exhaustively.
Key Takeaway: Simple security mechanisms are easier to understand, audit, and trust—complexity multiplies attack surfaces and makes verification nearly impossible. When designing secure systems, always ask: "What can I remove?"