[Jump to code hierarchy]

Internet checksum code [1]

Description

Checksum code that divides a binary string into 16-bit words and appends the one’s complement of their one’s complement sum [2]. One’s complement addition of 16-bit words is addition modulo \(2^{16}-1\), with both all zeros and all ones representing zero. A received string passes the check when the one’s complement sum of all of its words, including the checksum, is all ones.

Protection

Detects all burst errors of length at most 15, including all single-bit errors [3; Sec. 3.3]. Errors that preserve the one’s complement sum go undetected, e.g., reordering the 16-bit words or changing a word from all zeros to all ones [3; Sec. 3.3].

Realizations

Internet protocol suite: error detection for IPv4 headers and for TCP and UDP segments [4–6].

Notes

See Ref. [7] for the performance of the Internet checksum on real file-system data.

Primary Hierarchy

Parents
The Internet checksum is the one’s complement of the residue of the message modulo \(2^{16}-1\), which is the end-around-carry sum of its 16-bit words [2; pp. 1 and 18].
Internet checksum code

References

  1. [1]

    V. Cerf, “Specification of Internet Transmission Control Program: TCP (Version 2)”, Internet Experiment Note 5 (1977) URL

  2. [2]

    R. T. Braden, D. A. Borman, and C. Partridge, Computing the Internet Checksum (RFC Editor, 1988) DOI

  3. [3]

    T. C. Maxino and P. J. Koopman, “The Effectiveness of Checksums for Embedded Control Networks”, IEEE Transactions on Dependable and Secure Computing 6, 59 (2009) DOI

  4. [4]

    J. Postel, Internet Protocol (RFC Editor, 1981) DOI

  5. [5]

    J. Postel, Transmission Control Protocol (RFC Editor, 1981) DOI

  6. [6]

    J. Postel, User Datagram Protocol (RFC Editor, 1980) DOI

  7. [7]

    J. Stone, M. Greenwald, C. Partridge, and J. Hughes, “Performance of checksums and CRCs over real data”, IEEE/ACM Transactions on Networking 6, 529 (1998) DOI

Page edit log

Your contribution is welcome!

on github.com (edit & pull request)

— see instructions

Zoo Code ID: internet_checksum

Cite as:
“Internet checksum code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/internet_checksum, arXiv:2606.11484
BibTeX:
@incollection{eczoo_internet_checksum,
title={Internet checksum code},
booktitle={The Error Correction Zoo},
year={2026},
editor={Albert, Victor V. and Faist, Philippe},
eprint={2606.11484},
doi={10.48550/arXiv.2606.11484},
url={https://errorcorrectionzoo.org/c/internet_checksum}
}
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:
https://errorcorrectionzoo.org/c/internet_checksum

Cite as:

“Internet checksum code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/internet_checksum, arXiv:2606.11484

Github: https://github.com/errorcorrectionzoo/eczoo_data/edit/main/codes/classical/bits/easy/checksum/internet_checksum.yml.