2 ms·
The TCP checksum catches some issues but it won't detect everything. Other newer algorithms like CRC32C[0] are much more effective at detecting corrupt data. T
by tjalfi 6y ago
The TCP checksum catches some issues but it won't detect everything. Other newer algorithms like CRC32C[0] are much more effective at detecting corrupt data.
The following is an excerpt from Performance of Checksums and CRCs over Real Data[1].
The TCP checksum is a 16-bit ones-complement sum of the data. This sum will catch any burst error of 15bits or less[8], and all 16-bit burst errors except for those which replace one 1’s complement zero with another (i.e., 16 adjacent 1 bits replaced by 16 zero bits, or vice-versa). Over uniformly distributed data, it is expected to detect other types of errors at a rate proportional to 1 in 2^16.
If you're deeply interested in this topic then I would recommend Jonathan Stone's Phd thesis.
[0] https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Polynomial_representations_of_cyclic_redundancy_checks https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Polyno...
[1] https://www.researchgate.net/publication/3334567_Performance_of_checksums_and_CRCs_over_real_data https://www.researchgate.net/publication/3334567_Performance...