Modern & Applied Cryptography Breakers Intermediate
Forging MACs with a Hash Length-Extension Attack
Using a plain hash as a MAC, with tag = H(secret || message), is a classic mistake. A length-extension attack appends your own data and forges a valid tag without ever knowing the secret. Learn the attack on SHA-256, with runnable Python, and why HMAC exists.
11 min read