Designing Misuse Resistant APIs - Learning from Security Mistakes
summary
Shows how real failures — AMD microcode signing that replaced a hash with a MAC and used a hardcoded MAC key exploited — arise from exposing unsafe choices, then gives concrete fixes: prefer Libsodium-style high-level functions that hide modes, stop documenting copy‑paste insecure examples (PyAES’s static IV), force SQL prepared statements or an API accepting only string-literal queries, and use C++ techniques (user‑defined literals, non‑empty vector types, and the type-state builder pattern) to make invalid states unrepresentable at compile time.
AI-written summary · about
