Recognize weak randomness, nonce reuse, and algorithm misuse.
Use threat modeling to select a cryptographic boundary.
Explain why implementation and operations matter as much as algorithms.
Strong algorithms can fail through weak random number generation, repeated nonces, unauthenticated ciphertext, predictable keys, incorrect certificate validation, or leaked error details. Cryptography should be specified with a library-supported construction, key sizes, lifecycle, and test vectors.
Do not: encrypt(data, key) and trust the ciphertext blindly
Do: authenticatedEncrypt(data, key, uniqueNonce, associatedData)
Review cryptographic code with threat scenarios and misuse resistance in mind. Tests should cover tampering, wrong keys, wrong associated data, replay, rotation, and unavailable key services. Avoid “home-grown” protocols assembled from primitives without expert review.
Exercises
Diagnose four cryptographic anti-patterns.
Write tests for ciphertext tampering and replay.
Create a design review checklist.
Self-check
Why is nonce reuse dangerous?
What does authenticated encryption detect?
Why use reviewed libraries?
Self-Check Quiz
1. Can encryption alone detect tampering?
AnswerNot reliably. Use authenticated encryption or a separately sound integrity mechanism.
2. What is misuse resistance?
AnswerDesign and APIs that reduce the chance ordinary implementation mistakes silently remove security properties.
Homework
Perform a cryptographic review of a fictional document service.
List threats, assumptions, controls, and tests.
Explain one operational failure that defeats a sound algorithm.
Sample answerA sound review covers confidentiality, integrity, authenticity, replay, key compromise, rotation, randomness, nonce uniqueness, error handling, and access to keys. A sound AES-GCM choice can still fail if a nonce repeats or the key is committed in a repository.