0

I know that TCP has a 16-bit checksum, to catch errors in transmission. So what TCP outputs on the other end is theoretically reliable... to a point.

This article suggests that TCP is not as reliable as one might hope if they are after "high reliability": http://iang.org/ssl/reliable_connections_are_not.html#ref_6

Are there readily available protocols, or even transport libraries (C/C++ preferred), that are more reliable than TCP? Speed of moderate concern too.

I would imagine a transport library would effectively be a reimplementation of most of the parts of TCP.

It is a shame that TCP isn't more flexible to allow a tradeoff for more reliability at the cost of throughput/latency/speed. You could get a lot more reliability if you even made the checksum 32-bit instead of 16-bit. And again if you chose to make it 64-bit. There seems to be a very big cost to adding your own reliable transport layer on top of TCP: for starters, the hardware acceleration support for processing TCP won't suffice, and you'll need to provide some of your CPU time to process this layer. Additionally, it is a lot of extra complexity and code to implement such a thing, which could have been all avoided if the TCP checksum was larger or selectable.

Jetski S-type
  • 1,138
  • 2
  • 16
  • 32

1 Answers1

1

TLS

Widely deployed, well understood, plenty of libraries available in all commonly used languages.

If by 'reliability' you understand a better chance to detect stream alteration (bad hardware or malicious interference) then cryptographic HMAC is the way to go. And TLS is pretty much the industry standard.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569
  • Ah thanks, I'm not even interested in cryptography or malicious attackers (the user has direct physical control of the channel), so I didn't even consider that as a solution. I was thinking the unreliability would be bit flips from channel interference or whatever. I'll have a quick read of it and let you know if it's what I'm after. :) – Jetski S-type Jul 03 '15 at 08:35
  • This is the feature that I'm after: https://en.wikipedia.org/wiki/Transport_Layer_Security#Data_integrity Seems to be the appropriate protocol, even though it carries a lot of extra features I'm not interested in. It is standard though. Thanks. :) – Jetski S-type Jul 16 '15 at 05:11