Glossary

Checksum

check valueintegrity checksum

A checksum is a compact value calculated from data to help detect accidental changes or corruption.

Definition

A checksum is a small value computed from a block of data so that later software or a person can recompute it and compare the result. If the values differ, the data almost certainly changed somewhere in storage, copying, or transmission.

Checksums are common in file formats, network protocols, downloads, backups, and archives. They are useful because they are compact and easy to compare, not because they contain the original data.

How it works

The algorithm reads the exact bytes and combines them into a fixed-size value. CRC32, for example, produces a 32-bit value often written as 8 hexadecimal characters. Cryptographic hashes such as SHA-256 are also used as checksums when the published digest is trusted.

The same visible text can have different checksums if the byte encoding, line endings, spaces, or file contents differ. A checksum of a filename is not a checksum of the file.

Security limits

Many checksum algorithms, including simple sums and CRCs, are designed for accidental errors rather than malicious tampering. An attacker who can alter both the data and the checksum can often make them match.

Use an HMAC, a digital signature, or a protocol-specific integrity mechanism when the threat model includes deliberate modification. Use a cryptographic hash such as SHA-256 for stronger collision resistance than CRC32, but remember that a plain hash alone still does not prove who produced the data.

Frequently asked questions

Usually no. A checksum detects that data changed; error-correcting codes or backups are needed to reconstruct missing or damaged data.

No for adversarial security. CRC32 is fast and good at detecting common accidental corruption, but it is not designed to resist deliberate tampering.

The data or algorithm is different. Check the exact file bytes, text encoding, line endings, hidden spaces, algorithm variant, and output format.

See also