Topic

Checksums and checksum errors

A checksum is a value computed from data so another system can detect whether the data changed, while a checksum error means the expected and computed values do not match.

At a glance

Purpose
Detect changed data
A mismatch means
The compared bytes are not identical under that checksum

Overview

Checksums are used when copying, downloading, storing, or transmitting data. A sender or publisher provides a value derived from the original bytes, and the receiver computes the same function over the received bytes. A mismatch indicates that the bytes differ, but it does not by itself explain whether the cause was corruption, incomplete transfer, the wrong file, or malicious modification.

Verification is a comparison

A checksum tool computes a digest from the file or data and compares it with an expected value. If the values match, the data is consistent with that expected digest. If they do not, the safest assumption is that the data should not be trusted until the cause is understood.

Security depends on the algorithm and source of the expected value

Simple checksums can detect random errors without resisting deliberate manipulation. Cryptographic hashes provide stronger integrity properties, but only when the expected digest itself comes from a trustworthy channel and the chosen algorithm remains appropriate for the threat model.

Sources and review

MOOR's explanatory text is supported by the following source links.

  1. cksum: Print and verify file checksums — GNU Coreutils
  2. Hash Functions — NIST

Browse MOOR Knowledge