Skip to main content
Cipher Visualizers home

Tag

#HMAC

4 articles 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

A visual representation of the HKDF Algorithm
Key Derivation Functions Intermediate

HKDF: HMAC-Based Key Derivation

TLS 1.3 and the Signal Protocol both lean on the same small, elegant primitive to turn a shared secret into however many separate keys they actually need. Here's how HKDF's extract-then-expand design works.

8 min read

A visual representation of the HMAC Algorithm
Message Authentication Codes Beginner

HMAC: Hash-Based Message Authentication

A hash alone can't prove a message wasn't tampered with. Anyone can recompute it. HMAC fixes that by mixing in a secret key, becoming one of the most quietly essential building blocks in TLS, SSH, and beyond.

8 min read

A visual representation of the PBKDF2 Algorithm
Key Derivation Functions Beginner

PBKDF2: Password-Based Key Derivation

For nearly two decades, PBKDF2's answer to password cracking was simple: make every guess expensive by repeating a hash thousands of times. Here's how it works, and why memory-hard successors like Argon2 eventually surpassed it.

8 min read

← All tags