0Pricing
Cryptology Academy · Lesson

MAC Concepts & Length-Extension Attacks

Explain why appending a secret prefix is insecure against length extension.

Welcome

Message Authentication Codes (MACs) provide integrity and authenticity with a shared secret key. In this lesson we understand MACs, their properties, and a critical vulnerability in naive keyed hashes.

What Is a MAC?

A MAC is a short authentication code computed from a message and a secret key. Receiver with the same key recomputes the MAC and verifies. Prevents forgery without the key.

All lessons in this course

  1. MAC Concepts & Length-Extension Attacks
  2. HMAC Construction & Security Proof
  3. HMAC in APIs: Request Signing
  4. CMAC & Poly1305: Block-Cipher MACs
← Back to Cryptology Academy