Checksum Created 2026-10-31 Updated 2026-11-05
A checksum is a short value calculated from a data block and stored or transmitted with it to help detect corruption. The receiver recomputes the checksum from the received data and compares it with the supplied value. Different data blocks can have the same checksum, so a successful comparison does not prove equality.
For example, summing four bytes modulo gives a one-byte checksum. The bytes give ; changing the first byte to changes the checksum to , whereas exchanging two bytes leaves it unchanged. The particular checksum determines which error patterns are detected.
The Internet checksum groups bytes into 16-bit words, adds them with end-around carry, and complements the result. End-around carry adds an overflow bit back into the low end of the sum. Verification includes the checksum field and expects a sum with all bits set. The covered fields depend on the protocol; IPv6 has no header checksum.[ref]
Computing the Internet Checksum (RFC 1071). Section 1: generation, verification, and end-around carry
[ref]