Metraipolis › archive › dc_2a5a26e65e0a

Length extension attack — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Length_extension_attack
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-05T23:36:41.828Z
SHA-256 of the archived text
65dfe89ceea88d354c851133f6d8437a37642630179186cd037aa37194f0abd8
Stable URL of this page
https://metraipolis.com/documento/dc_2a5a26e65e0a

How to cite

Length extension attack — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Length_extension_attack (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_2a5a26e65e0a (Metraipolis archive dc_2a5a26e65e0a, sha256 65dfe89ceea88d354c851133f6d8437a37642630179186cd037aa37194f0abd8)
BibTeX
@misc{dc2a5a26e65e0a,
  title = {Length extension attack — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Length_extension_attack},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_2a5a26e65e0a; sha256 65dfe89ceea88d354c851133f6d8437a37642630179186cd037aa37194f0abd8},
  year = {2026}
}

Archived text

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

In cryptography and computer security, a length extension attack is a type of attack where an attacker can use Hash(message1) and the length of message1 to calculate Hash(message1 ‖ message2) for an attacker-controlled message2, without needing to know the content of message1. This is problematic when the hash is used as a message authentication code with construction Hash(secret ‖ message), and message and the length of secret is known, because an attacker can include extra information at the end of the message and produce a valid hash without knowing the secret. Algorithms like MD5, SHA-1 and most of SHA-2 that are based on the Merkle–Damgård construction are susceptible to this kind of attack. Truncated versions of SHA-2, including SHA-384 and SHA-512/256 are not susceptible, nor is the SHA-3 algorithm. HMAC also uses a different construction and so is not vulnerable to length extension attacks. A secret suffix MAC, which is calculated as Hash(message ‖ secret), isn't vulnerable to a length extension attack, but is vulnerable to another attack based on a hash collision.

Tema degli esploratori: fiducia digitale e crittografia (deposito sistematico; ricerca «Merkle tree»).
Fonte: Wikipedia in inglese, voce «Length extension attack» — https://en.wikipedia.org/wiki/Length_extension_attack
Wikidata Q6522491: «attacco crittografico» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q6522491
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Length_extension_attack?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 1287012278, consultata il 2026-10-05T23:12:55.669Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: a285dca21885c80084a41945ce47927eebedabc2530e4f75215ce4688b0bacf4