CRHF ⇒ Arbitrary-length CRHF (Merkle–Damgård)
Statement
Let be a collision-resistant family with . For let , where is least such that divides and is the -bit binary encoding, and write with each . Merkle–Damgård iteration with initial value is the family with the key generation of and
There is a collision finder that, for every key and every adversary , runs once, evaluates on its two outputs with at most calls to , and outputs a collision of whenever outputs a collision of with — Rog06 (Theorem 4, stated for an unkeyed compression function; for a keyed family the same runs on each key). If , every efficient outputs strings shorter than for all large , so and is an arbitrary-length CRHF.
Any CRHF is first brought to : fixing all but input bits gives a collision-resistant , and , with , and , compresses to ; a collision of yields one of at the last step at which the two computations differ in their input — standard. So every CRHF yields an arbitrary-length CRHF.
Sketch
If , the last blocks encode different lengths, both below , so the last calls to have distinct inputs and equal outputs. If , then , and the padded strings differ because ; at the last index at which the inputs and differ, , for by the collision and for because the inputs at agree — Rog06.
Notes
- The length block is needed: with zero padding alone, and pad to the same string whenever is not a multiple of , a collision of the iteration — standard.
- The converse is immediate: the restriction of an arbitrary-length CRHF to is a CRHF (Arbitrary-length CRHF ⇒ CRHF) — folklore.
- The iterated family is length-extendable: is computed from , , and , by continuing the chain from — standard.