Lorixen.
EN

Publish SHA-256 checksums for your software downloads

Short answer: If you distribute software, firmware, templates or large data files to customers, publish a SHA-256 checksum next to each download. The customer runs one command and compares the result, which tells them the file arrived complete and unchanged. Checksums catch broken downloads and accidental mix-ups well, but they only prove the file wasn't tampered with if the checksum comes from somewhere an attacker can't also edit, so serve it over HTTPS and ideally from a separate place or signed.

What a checksum actually tells you

A checksum (more precisely, a cryptographic hash) is a short fingerprint calculated from every byte of a file. Change one byte and the fingerprint changes completely. SHA-256 produces a 64-character hexadecimal string and is widely supported on every common operating system.

When a customer downloads your installer and calculates its SHA-256 value, a match with the value on your website means they have the exact file you built. A mismatch means something went wrong: a truncated download, a corrupted mirror, the wrong version, or deliberate tampering.

Businesses that ship files often meet these situations:

  • Support tickets saying "the installer won't open", caused by an incomplete download.
  • A reseller or partner hosting an old copy under a new name.
  • Customers on slow or unreliable connections who need to know a 2 GB file is intact before installing it.
  • IT departments at client companies that require a hash before they'll approve your software.

Creating checksums when you release

Generate the checksum from the final file, after any signing or packaging step, on the machine or pipeline that produced it.

  • Linux: sha256sum myapp-2.4.0.zip
  • macOS: shasum -a 256 myapp-2.4.0.zip
  • Windows PowerShell: Get-FileHash myapp-2.4.0.zip. Microsoft's documentation notes that Get-FileHash uses the SHA256 algorithm by default.

For several files, write them all to one file, conventionally named SHA256SUMS or checksums.txt, with one line per file: the hash, a space, and the file name. Publishing that file alongside the downloads lets customers verify everything at once.

Automate this in your build or release pipeline. Hand-copied hashes are easy to paste against the wrong file, and a wrong published checksum is worse than none, because it makes good downloads look broken.

How customers verify a download

Give customers short, copy-ready instructions on the download page:

  • Linux: put SHA256SUMS in the same folder as the download and run sha256sum --check SHA256SUMS. The manual page describes --check as reading checksums from the file and checking them; each line reports OK or FAILED.
  • macOS: shasum -a 256 -c SHA256SUMS does the same.
  • Windows: run Get-FileHash on the file and compare the output by eye or with a short script.

Keep the instructions next to the button, not buried in a help centre. People verify when it's easy.

Where checksums fall short

A checksum detects change; it doesn't prove who made the file. If an attacker can replace the download on your server, they can probably replace the checksum on the same page too. To make checksums meaningful against tampering:

  • Serve the page and files over HTTPS so they can't be altered in transit.
  • Publish checksums in a second place you control separately, such as your release notes in your code host or a signed announcement email.
  • Sign the checksum file with a key customers can verify, using a tool like GPG or a modern signing service. A valid signature on SHA256SUMS lets customers trust every hash in it.
  • Sign the software itself where the platform supports it. Operating systems check code signatures on installers and apps, which customers see as a trusted publisher name rather than a warning.

For most small software businesses, checksums plus HTTPS plus platform code signing is a sensible baseline. Signed checksum files are worth adding when your customers are security-conscious or you distribute through mirrors.

Avoid older hash types

You'll still see MD5 and SHA-1 checksums on some download pages. Both have known weaknesses that let attackers craft different files with matching hashes, so they shouldn't be relied on to detect tampering. If you publish them for compatibility, publish SHA-256 alongside and point customers to it.

A tidy release page

A clear download section might include:

  1. The file name, version number and release date.
  2. The download button.
  3. The SHA-256 value, in a monospace font, with a copy button.
  4. A link to the full SHA256SUMS file and its signature, if you sign it.
  5. Two or three lines of verification instructions per operating system.

Common mistakes

  • Hashing before the final step. If you sign or compress after hashing, the published value won't match what customers download.
  • Forgetting to update the hash when you replace a file with a quick fix under the same name. Give every fix a new version number instead.
  • Publishing the hash as an image, which customers can't copy. Use plain text.

A worked example

Picture a hypothetical Halifax company that sells point-of-sale software installed on shop computers. Support kept hearing that the installer "crashed at 90%". Many of these turned out to be incomplete downloads on poor rural connections. The team added a SHA-256 value and a three-line check to the download page, generated automatically by their release pipeline. Support now asks customers to run the check first, which settles download problems in one step.

FAQ

Do I need checksums if my site uses HTTPS?

HTTPS protects the file in transit, but it doesn't catch a broken file on a mirror, an interrupted download or a wrong version. Checksums still help.

Should every file on my site have a checksum?

No. Focus on installers, firmware, archives and large data files that customers install or rely on. Ordinary PDFs and images rarely need one.

Is SHA-512 better than SHA-256?

Both are strong. SHA-256 is the most common choice and easiest for customers to check with built-in tools.

Can I put checksums in my app's auto-updater?

Yes, and you should. Updaters should verify a hash or signature before installing anything they download.

If you ship files to customers and want a clean, verifiable release process, let us know what you distribute.

Sources

WhatsAppBook a call