A checksum is a value derived from a block of digital data—such as a file or message—using a mathematical algorithm, with the primary purpose of detecting errors or alterations that may have occurred during data transmission or storage. This value acts as a digital fingerprint: even a tiny change in the original data will result in a completely different checksum, making it a reliable way to verify data integrity.
The sender runs the original data through a checksum algorithm, which processes the data and produces a fixed-size value (the checksum). The receiver (or anyone verifying the data) recalculates the checksum using the same algorithm. If the new checksum matches the original, the data is likely intact. If not, the data may have been corrupted or tampered with.
Checksums are primarily used to detect accidental errors introduced during data transmission (such as over a network) or storage (such as on disk). In cybersecurity, checksums help ensure files and logs have not been tampered with, providing a basic level of authenticity and integrity checking.