Merkle–Damgård iterates a fixed-length compression function over padded blocks and carries a chaining value forward. Length-strengthening padding makes the encoding unambiguous. The collision-resistance proof traces equal final digests backward until it finds two different compression-function inputs with the same output.
- Plain secret-prefix hashing can expose length-extension behavior.
- HMAC wraps the hash with distinct inner and outer domains.
- The reduction’s collision is located at the last point where two computation paths merge.
Start by naming the exact security game and the primitive assumption. For a secure construction, assume an efficient breaker and route its view through a reduction. For an insecure construction, identify a visible invariant and calculate a non-negligible distinguishing or forgery advantage.
- A reduction must simulate every oracle and challenge consistently.
- Abort probability and guessing steps belong in the advantage calculation.
- A proof that invokes the right assumption but gives the adversary the wrong distribution is not a proof.