Has it been Pwned
ProtocolPractical impactMedium confidence

Raw CBC-MAC forgeable on variable-length messages; CMAC standardised

Plain CBC-MAC is provably secure only for messages of one fixed length (Bellare, Kilian and Rogaway, CRYPTO 1994). With variable-length messages an attacker who sees MACs of m and m' can forge a valid tag for a spliced message without the key. NIST standardised CMAC (SP 800-38B, May 2005), based on Black-Rogaway XCBC and Iwata-Kurosawa OMAC, to fix this.

A separate source-review date has not been recorded for this historical entry. Corrections.

Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.

Background

The forgery is simple: given tag t for a one-block message m, the two-block message m || (m XOR t) has the same tag t. Real systems have repeatedly misused raw CBC-MAC (variable lengths, same key for encryption and MAC, or attacker-controlled IVs), giving forgeries in payment, smartcard and firmware-signing contexts.

The block cipher is not at fault; this is a mode/protocol misuse, which is why it is classed protocol. Length-prepending, encrypt-last-block (EMAC/ISO 9797-1 algorithm 2) or CMAC remove the problem.

Sources

  1. paperThe Security of the Cipher Block Chaining Message Authentication Code (Bellare, Kilian, Rogaway; journal version)UCSD, cseweb.ucsd.edu
  2. standardSP 800-38B: Recommendation for Block Cipher Modes of Operation: The CMAC Mode for AuthenticationNIST CSRC, csrc.nist.gov
  3. wikiCBC-MACWikipedia, en.wikipedia.org