No fixed-construction reduction from CRHF to MAC (secret-prefix MAC)

Conditional · against fixed-construction reductions · assuming collision resistance · folklore

Statement

Let , with , be any keyed compressing family, such as a CRHF, and let be its Merkle–Damgård iteration, with initial value , chaining and padding , with least such that divides . For a polynomial , the secret-prefix MAC has message space , key , where is sampled by the key generation of and ,

and canonical verification. The hash key is public, so each tag carries it; for an unkeyed compression function the tag is . The scheme is perfectly correct and, for every , not UF-CMA-secure: the forger that queries one message computed from , receives , sets and outputs

wins with probability , after one query and one evaluation of — folklore. The same holds on every message space containing such a pair and . In particular, if a CRHF exists, the secret-prefix MAC over its Merkle–Damgård iteration is not a MAC, so this construction is no reduction from a CRHF to a MAC.

Sketch

depends on only through , so is the padded form of , whose chain ends at . Its length is a multiple of , so is the single block , and one more call to gives ; since — standard. More generally, , , and determine the tag of for every , by the length-extension property of the iteration.

Notes

  • Tsudik observed that cannot be used as a MAC of under key — BR93 (Section 6). The extension attack on the prepend-only construction, which needs no knowledge of or attack on the key, is in BCK96 (Section 6).
  • The same forgery breaks the iteration of a compression function keyed by a secret initial value in place of a fixed one, whatever : from it computes . So is not a MAC even when , keyed by its chaining input, is one — BCK96 (Remark 4.9).
  • The secret-suffix MAC falls to any collision of with : for , the chains of and both pass through after blocks and then process the same blocks, so and have equal tags under every , and the forger that knows the collision queries and outputs with that tag — standard; BCK96 (Section 6) describe this attack on the append-only construction. Unlike length extension, the forgery needs a collision. An equal-length collision of yields one of at the last step at which the two chains differ in their input, so for a CRHF every efficient algorithm finds one with negligible probability, while on the generic birthday attack finds one with constant probability after about evaluations of , without — standard.
  • NMAC applies under a second secret key to the output of the inner iteration, which starts from a secret initial value, so its tags do not expose the inner chaining value, and an attack through collisions needs collisions of the inner function under its secret initial value rather than of the public hash function — BCK96 (Section 6). HMAC is NMAC under two keys derived from one by (NMAC and HMAC), so the same holds for it — BCK96 (Sections 5.2, 6). NMAC is a MAC if , keyed by its chaining input, is one and the keyed iteration is weakly collision resistant (Fixed-length SUF-CMA MAC + arbitrary-length weakly collision-resistant hash ⇒ arbitrary-length SUF-CMA MAC (NMAC)) — BCK96 (Theorem 4.1), and a PRF if is a PRF (Non-uniform compression-function PRF ⇒ MAC (NMAC), Compression-function PRF ⇒ MAC (NMAC, uniform proof)) — Bel06, GPR14.
  • With replaced by a random oracle with -bit outputs and , is a PRF on inputs of polynomially bounded length (ROM ⇒ PRF (secret-prefix hashing)) — folklore.