Skip to main content
Cipher Visualizers home

Tag

#Length Extension

1 article with this tag.

A visual representation of a hash length-extension attack forging a message authentication tag
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

← All tags