Explain the Merkle-Damgård length extension attack. How can an attacker compute hash of…
- User
Explain the Merkle-Damgård length extension attack. How can an attacker compute hash of message plus suffix without knowing the secret? Why does SHA-3 sponge construction fix this?
- Assistant
Explaining Merkle-Damgård length extension attack and SHA-3 resistance
The length extension attack exploits how Merkle-Damgård hashes expose their internal chaining value as the output digest, letting attackers resume hashing with a chosen suffix if they know the original message length. SHA-3’s sponge construction resists this by outputting only part of a hidden internal state, preventing attackers from continuing absorption and computing an extended hash without the secret capacity bits. All of the classic MD‑type hashes, MD5, SHA‑1, SHA‑2, have the same structure. They split the padded message up into fixed–size blocks and feed them into a one‑block compression function
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.