$linuxjunkies
>

checksum

also: hash, hash value, digest, CRC

A checksum is a small value calculated from data that allows verification the data hasn't been corrupted or altered. It's computed using a mathematical algorithm and compared against the original to detect changes.

A checksum is a fixed-size string of characters (often hexadecimal) generated by running data through a hash function. Common algorithms include MD5, SHA-1, and SHA-256. The checksum acts as a digital fingerprint—any change to the original data, no matter how small, produces a completely different checksum.

Checksums serve two main purposes: detecting accidental corruption (like disk errors or network transmission problems) and verifying file integrity and authenticity. For example, when you download a Linux ISO image, the website often provides the SHA-256 checksum. You can verify your download with: sha256sum ubuntu-22.04-desktop-amd64.iso and compare the output to the published value.

While checksums detect corruption, they don't prevent tampering by malicious actors. For cryptographic security, digital signatures using public keys are required instead. Checksums are lightweight and fast, making them ideal for routine integrity checks.

Related terms