Metraipolis › archive › dc_a347d1bfbd8a

Merkle–Damgård construction — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-05T23:18:02.140Z
SHA-256 of the archived text
d7c6f390f7c05267bd55360f0f2ac0b8057926c4c38161b516bdef716ff12955
Stable URL of this page
https://metraipolis.com/documento/dc_a347d1bfbd8a

How to cite

Merkle–Damgård construction — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_a347d1bfbd8a (Metraipolis archive dc_a347d1bfbd8a, sha256 d7c6f390f7c05267bd55360f0f2ac0b8057926c4c38161b516bdef716ff12955)
BibTeX
@misc{dca347d1bfbd8a,
  title = {Merkle–Damgård construction — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_a347d1bfbd8a; sha256 d7c6f390f7c05267bd55360f0f2ac0b8057926c4c38161b516bdef716ff12955},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

In cryptography, the Merkle–Damgård construction or Merkle–Damgård hash function is a method of building collision-resistant cryptographic hash functions from collision-resistant one-way compression functions. This construction was used in the design of many popular hash algorithms such as MD5, SHA-1, and SHA-2. The Merkle–Damgård construction was described in Ralph Merkle's Ph.D. thesis in 1979. Ralph Merkle and Ivan Damgård independently proved that the structure is sound: that is, if an appropriate padding scheme is used and the compression function is collision-resistant, then the hash function will also be collision-resistant. The Merkle–Damgård hash function first applies an MD-compliant padding function to create an input whose size is a multiple of a fixed number (e.g. 512 or 1024) — this is because compression functions cannot handle inputs of arbitrary size. The hash function then breaks the result into blocks of fixed size, and processes them one at a time with the compression function, each time combining a block of the input with the output of the previous round. In order to make the construction secure, Merkle and Damgård proposed that messages be padded with a padding that encodes the length of the original message. This is called length padding or Merkle–Damgård strengthening. In the diagram, the one-way compression function is denoted by f, and transforms two fixed length inputs to an output of the same size as one of the inputs. The algorithm starts with an initial value, the initialization vector (IV). The IV is a fixed value (algorithm- or implementation-specific). For each message block, the compression (or compacting) function f takes the result so far, combines it with the message block, and produces an intermediate result. The last block is padded with zeros as needed and bits representing the length of the entire message are appended. (See below for a detailed length-padding example.) To harden the hash further, the last result is then sometimes fed through a finalisation function. The finalisation function can have several purposes such as compressing a bigger internal state (the last result) into a smaller output hash size or to guarantee a better mixing and avalanche effect on the bits in the hash sum. The finalisation function is often built by using the compression function. (Note that in some documents a different terminology is used: the act of length padding is called "finalisation".)

Tema degli esploratori: fiducia digitale e crittografia (deposito sistematico; categoria «Cryptographic hash functions»).
Fonte: Wikipedia in inglese, voce «Merkle–Damgård construction» — https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction
Wikidata Q1757463 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q1757463
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1362916064, consultata il 2026-10-05T23:04:28.108Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 8952d352e03e1299444d2d8e829a2047c797574eba17594e9bc5d393a0bc541e