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][ref]

Articles by others on the same topic (1)

A checksum is a value used to verify the integrity of a data set. It is typically calculated by applying a specific algorithm to a block of data and producing a fixed-size string of characters, which can be in the form of a number or a sequence of hexadecimal digits. The primary purpose of a checksum is to detect errors that may have occurred during data transmission or storage.