Search code examples
hashchecksumdownload

why are downloads sometimes tagged md5, sha1 and other hash indicators?


I've seen this all over the place:

Download here! SHA1 = 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0

What does it mean? How does a hash come into play as far as downloads and... What use can I make of it? Is this a legacy item where you used to have to verify some checksum after you downloaded the whole file?


Solution

  • It's a security measure. It allows you to verify that the file you just downloaded is the one that the author posted to the site. Note that using hashes from the same website you're getting the files from is not especially secure. Often a good place to get them from is a mailing list announcement where a PGP-signed email contains the link to the file and the hash.

    Since this answer has been ranked so highly compared to the others for some reason, I'm editing it to add the other major reason mentioned first by the other authors below, which is to verify the integrity of the file after transferring it over the network.

    So:

    • Security - verify that the file that you downloaded was the one the author originally published
    • Integrity - verify that the file wasn't damaged during transmission over the network.