3 ms·
Why doesnt TCP reject the flip bits when the checksum fails?
by km3r 6y ago
Why doesnt TCP reject the flip bits when the checksum fails?
- jedberg 6y agoApparently MacOS doesn't check the checksums.
- tjalfi 6y agoThe 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...
- dboreham 6y agoTCP checksum is notorious for not catching all corruption, to the point that all protocols run over TCP should have their own integrity checking. TLS is good enough AFAIK, which lets most traffic off the hook these days.